Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bridgecontract
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
movabridge
bridgecontract
Commits
91409878
Commit
91409878
authored
Sep 19, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code
parent
9631226d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
README.md
README.md
+1
-1
hardhat.config.js
hardhat.config.js
+2
-2
setconfig.js
scripts/setconfig.js
+2
-1
No files found.
README.md
View file @
91409878
...
@@ -8,7 +8,7 @@ npm i
...
@@ -8,7 +8,7 @@ npm i
```
```
## config
## config
-
`.env`
set correct values for
`DEPLOY_PRIVATE_KEY`
,
`BRIDGE_VALIDATORS`
,
`TREASURY`
, in test environemnt
, also set
`TREASURY_PRIVATE_KEY`
.
-
`.env`
set correct values for
`DEPLOY_PRIVATE_KEY`
,
`BRIDGE_VALIDATORS`
,
`TREASURY`
, in test environemnt.
-
`hardhat.config.js`
set correct chain config.
-
`hardhat.config.js`
set correct chain config.
## deploy contract to chain A and B
## deploy contract to chain A and B
...
...
hardhat.config.js
View file @
91409878
...
@@ -18,7 +18,7 @@ task("accounts", "List of accounts", async (taskArgs, hre) => {
...
@@ -18,7 +18,7 @@ task("accounts", "List of accounts", async (taskArgs, hre) => {
const
privateKeys
=
[
const
privateKeys
=
[
process
.
env
.
DEPLOY_PRIVATE_KEY
,
process
.
env
.
DEPLOY_PRIVATE_KEY
,
process
.
env
.
TREASURY_PRIVATE_KEY
//
process.env.TREASURY_PRIVATE_KEY
];
];
module
.
exports
=
{
module
.
exports
=
{
...
@@ -92,7 +92,7 @@ module.exports = {
...
@@ -92,7 +92,7 @@ module.exports = {
hardhat
:
{
hardhat
:
{
accounts
:
[
accounts
:
[
{
privateKey
:
privateKeys
[
0
],
balance
:
"
10000000000000000000000
"
},
{
privateKey
:
privateKeys
[
0
],
balance
:
"
10000000000000000000000
"
},
{
privateKey
:
privateKeys
[
1
],
balance
:
"
10000000000000000000000
"
}
//
{ privateKey: privateKeys[1], balance: "10000000000000000000000" }
]
]
},
},
achain
:
{
achain
:
{
...
...
scripts/setconfig.js
View file @
91409878
...
@@ -4,6 +4,7 @@ const hre = require("hardhat");
...
@@ -4,6 +4,7 @@ const hre = require("hardhat");
let
INITIAL_VALIDATORS
=
process
.
env
.
BRIDGE_VALIDATORS
let
INITIAL_VALIDATORS
=
process
.
env
.
BRIDGE_VALIDATORS
let
TREASURY
=
process
.
env
.
TREASURY
let
TREASURY
=
process
.
env
.
TREASURY
let
FEE_RECEIVER
=
process
.
env
.
FEE_RECEIVER
const
DEPLOY_FILE
=
path
.
join
(
__dirname
,
"
deploy.json
"
);
const
DEPLOY_FILE
=
path
.
join
(
__dirname
,
"
deploy.json
"
);
...
@@ -74,7 +75,7 @@ async function setConfig(tokenA, tokenB, bridge) {
...
@@ -74,7 +75,7 @@ async function setConfig(tokenA, tokenB, bridge) {
await
setValidatorRequired
(
bridge
,
2
);
await
setValidatorRequired
(
bridge
,
2
);
await
addValidators
(
bridge
,
INITIAL_VALIDATORS
);
await
addValidators
(
bridge
,
INITIAL_VALIDATORS
);
await
setFeeReceiver
(
bridge
,
TREASURY
);
await
setFeeReceiver
(
bridge
,
FEE_RECEIVER
);
await
setTreasury
(
bridge
,
TREASURY
);
await
setTreasury
(
bridge
,
TREASURY
);
await
setTokenTreasuryConfig
(
tokenA
,
tokenB
,
bridge
);
await
setTokenTreasuryConfig
(
tokenA
,
tokenB
,
bridge
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment