Commit 827cf7f2 authored by vicotor's avatar vicotor

fix bug

parent fb799d56
......@@ -5,14 +5,14 @@
"bridge": "0x5fcEa08A3E2F0Eb96424925dA9a951388b7EC764"
},
"6174": {
"tokenA": "0x25cAa6D61D1b9589D827A29b2c4e9dA0a85080B6",
"tokenB": "0xa77285d7BB3655C98E2f71D21f16e3aa511082c7",
"bridge": "0xC91b0E98572b06a45a456715268Dd17b4b85D7fc"
"tokenA": "0xEC8e0c8255Fcef6b6c594b783817DfF7C99086E0",
"tokenB": "0x218453ea15f6aC033D9A5b4Ba0D6d08180F25626",
"bridge": "0x674e408c6Bc59e551912f118662732cddDc3d0c9"
},
"8891": {
"tokenA": "0x29Ec4977338704e2665020c1FA91187B5d40bfcc",
"tokenB": "0xDe6Fea12B657128331bbB909400793A66EC5828B",
"bridge": "0xa33DD581A5e287535D955bC9961bEC9Af6E39db7"
"tokenA": "0xfCcF95F6E309Cd5f316704fC3a759a048FC08a4e",
"tokenB": "0x1eea18e6797D002280b0A9B61d4ac8513e106D20",
"bridge": "0xEC8e0c8255Fcef6b6c594b783817DfF7C99086E0"
},
"10323": {
"tokenA": "0x2e97f146364Bf2436414aFC68716e712657Bb929",
......
......@@ -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
......
......@@ -29,9 +29,9 @@ async function setTreasury(contract, treasury) {
}
async function setFeeReceiver(contract, receiver) {
var tx = await contract.setTreasury(receiver);
var tx = await contract.setFeeReceiver(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 === 97n ? 10323 : 97;
// const targetChainId = chainId === 6174n ? 8891 : 6174;
// const targetChainId = chainId === 97n ? 10323 : 97;
const targetChainId = chainId === 6174n ? 8891 : 6174;
console.log("Current chain ID:", chainId, "Target chain ID:", targetChainId);
const curChainDeploy = await getDeploy(chainId);
......
......@@ -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 === 97n ? 10323 : 97;
const targetChainId = chainId === 6174n ? 8891 : 6174;
// const targetChainId = chainId === 97n ? 10323 : 97;
console.log("Current chain ID:", chainId, "Target chain ID:", targetChainId);
const chainDeploy = await getDeploy(chainId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment