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
827cf7f2
Commit
827cf7f2
authored
Sep 18, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
fb799d56
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
13 deletions
+21
-13
deploy.json
scripts/deploy.json
+6
-6
getinfo.js
scripts/getinfo.js
+9
-1
setconfig.js
scripts/setconfig.js
+4
-4
usercase.js
scripts/usercase.js
+2
-2
No files found.
scripts/deploy.json
View file @
827cf7f2
...
...
@@ -5,14 +5,14 @@
"bridge"
:
"0x5fcEa08A3E2F0Eb96424925dA9a951388b7EC764"
},
"6174"
:
{
"tokenA"
:
"0x
25cAa6D61D1b9589D827A29b2c4e9dA0a85080B6
"
,
"tokenB"
:
"0x
a77285d7BB3655C98E2f71D21f16e3aa511082c7
"
,
"bridge"
:
"0x
C91b0E98572b06a45a456715268Dd17b4b85D7fc
"
"tokenA"
:
"0x
EC8e0c8255Fcef6b6c594b783817DfF7C99086E0
"
,
"tokenB"
:
"0x
218453ea15f6aC033D9A5b4Ba0D6d08180F25626
"
,
"bridge"
:
"0x
674e408c6Bc59e551912f118662732cddDc3d0c9
"
},
"8891"
:
{
"tokenA"
:
"0x
29Ec4977338704e2665020c1FA91187B5d40bfcc
"
,
"tokenB"
:
"0x
De6Fea12B657128331bbB909400793A66EC5828B
"
,
"bridge"
:
"0x
a33DD581A5e287535D955bC9961bEC9Af6E39db7
"
"tokenA"
:
"0x
fCcF95F6E309Cd5f316704fC3a759a048FC08a4e
"
,
"tokenB"
:
"0x
1eea18e6797D002280b0A9B61d4ac8513e106D20
"
,
"bridge"
:
"0x
EC8e0c8255Fcef6b6c594b783817DfF7C99086E0
"
},
"10323"
:
{
"tokenA"
:
"0x2e97f146364Bf2436414aFC68716e712657Bb929"
,
...
...
scripts/getinfo.js
View file @
827cf7f2
...
...
@@ -11,6 +11,12 @@ async function getOutConfig(bridge, token , targetchain) {
console
.
log
(
"
OutConfig for token:
"
,
token
,
"
to chain:
"
,
targetchain
,
"
config:
"
,
config
)
}
async
function
getFeeReceiver
(
bridge
)
{
const
receiver
=
await
bridge
.
feeReceiver
();
console
.
log
(
"
Fee Receiver:
"
,
receiver
);
return
receiver
;
}
async
function
getDeploy
(
chainId
)
{
if
(
!
fs
.
existsSync
(
DEPLOY_FILE
))
{
throw
new
Error
(
"
deploy.json file not found
"
);
...
...
@@ -38,7 +44,9 @@ async function main() {
const
curChainDeploy
=
await
getDeploy
(
chainId
);
await
getOutConfig
(
curChainDeploy
.
bridge
,
await
curChainDeploy
.
tokenA
.
getAddress
(),
targetChainId
);
await
getFeeReceiver
(
curChainDeploy
.
bridge
);
// await getOutConfig(curChainDeploy.bridge, await curChainDeploy.tokenA.getAddress(), targetChainId);
}
// Run the script
...
...
scripts/setconfig.js
View file @
827cf7f2
...
...
@@ -29,9 +29,9 @@ async function setTreasury(contract, treasury) {
}
async
function
setFeeReceiver
(
contract
,
receiver
)
{
var
tx
=
await
contract
.
set
Treasury
(
receiver
);
var
tx
=
await
contract
.
set
FeeReceiver
(
receiver
);
await
tx
.
wait
();
console
.
log
(
"
Set
treasury to:
"
,
treasury
);
console
.
log
(
"
Set
feeRecevier to:
"
,
receiver
);
}
async
function
mintToken
(
tokenA
,
tokenB
,
user
)
{
...
...
@@ -144,8 +144,8 @@ async function setOutConfig(curTokenMap, targetTokenMap, targetChainId, bridge)
// Define the script
async
function
main
()
{
const
chainId
=
await
hre
.
ethers
.
provider
.
getNetwork
().
then
(
network
=>
network
.
chainId
);
const
targetChainId
=
chainId
===
97
n
?
10323
:
97
;
//
const targetChainId = chainId === 6174n ? 8891 : 6174;
//
const targetChainId = chainId === 97n ? 10323 : 97;
const
targetChainId
=
chainId
===
6174
n
?
8891
:
6174
;
console
.
log
(
"
Current chain ID:
"
,
chainId
,
"
Target chain ID:
"
,
targetChainId
);
const
curChainDeploy
=
await
getDeploy
(
chainId
);
...
...
scripts/usercase.js
View file @
827cf7f2
...
...
@@ -131,8 +131,8 @@ async function outTransfer(bridge, token , amount, targetChainId, receiver) {
// Define the script
async
function
main
()
{
const
chainId
=
await
hre
.
ethers
.
provider
.
getNetwork
().
then
(
network
=>
network
.
chainId
);
//
const targetChainId = chainId === 6174n ? 8891 : 6174;
const
targetChainId
=
chainId
===
97
n
?
10323
:
97
;
const
targetChainId
=
chainId
===
6174
n
?
8891
:
6174
;
//
const targetChainId = chainId === 97n ? 10323 : 97;
console
.
log
(
"
Current chain ID:
"
,
chainId
,
"
Target chain ID:
"
,
targetChainId
);
const
chainDeploy
=
await
getDeploy
(
chainId
);
...
...
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