Commit 6a2ff743 authored by vicotor's avatar vicotor

update add token

parent 2a13fa70
......@@ -35,13 +35,17 @@ async function getDeploy(chainId) {
}
async function setOutConfig(bridge, tokenPair) {
const tokenContract = await hre.ethers.getContractAt("TestToken", tokenPair.token);
var decimals = await tokenContract.decimals();
const outConfig = {
receiveToken: tokenPair.targetToken,
fee: hre.ethers.parseEther(tokenPair.fee),
limit: hre.ethers.parseEther(tokenPair.limit),
fee: hre.ethers.parseUnits(tokenPair.fee, decimals),
limit: hre.ethers.parseUnits(tokenPair.limit, decimals),
isBurn: tokenPair.isBurn,
enabled: true,
};
console.log("set out config for token ", tokenPair.token, "-", outConfig);
var tx = await bridge.changeOutConfig(
tokenPair.token,
......@@ -61,6 +65,7 @@ async function main() {
for (var i = 0; i < tokenPairs.length; i++) {
await setOutConfig(curChainDeploy.bridge, tokenPairs[i]);
}
console.log("all token pairs processed.");
}
// Run the script
......
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