diff --git a/tasks/add-to-whitelist.ts b/tasks/add-to-whitelist.ts index a5b6e96..a5e75ad 100644 --- a/tasks/add-to-whitelist.ts +++ b/tasks/add-to-whitelist.ts @@ -8,12 +8,18 @@ task("add-to-whitelist", "Whitelists a new address in the bridge.") .addOptionalParam("price", "Gas price in gwei for this transaction", undefined) .addOptionalParam("mintburn", "flag if the token is mintable/burnable", false, types.boolean) .addOptionalParam("native", "flag if the token is native", true, types.boolean) + .addOptionalParam("totalBalance", "total balance") + .addOptionalParam("mintBalance", "minted balance") + .addOptionalParam("burnBalance", "burn balance") .setAction(async (taskArgs, hre) => { const minAmount = taskArgs.min ?? 25; const maxAmount = taskArgs.max ?? 100; const address = taskArgs.address; const mintBurn = taskArgs.mintburn ?? false; const native = taskArgs.native ?? false; + const totalBalance = taskArgs.totalBalance ?? 0 + const mintBalance = taskArgs.mintBalance ?? 0 + const burnBalance = taskArgs.burnBalance ?? 0 const [adminWallet] = await hre.ethers.getSigners(); const fs = require("fs"); const filename = "setup.config.json"; @@ -22,7 +28,7 @@ task("add-to-whitelist", "Whitelists a new address in the bridge.") const safeContractFactory = await hre.ethers.getContractFactory("ERC20Safe"); const safe = safeContractFactory.attach(safeAddress).connect(adminWallet); - await safe.whitelistToken(address, minAmount, maxAmount, mintBurn, native, getDeployOptions(taskArgs)); + await safe.whitelistToken(address, minAmount, maxAmount, mintBurn, native, totalBalance, mintBalance, burnBalance, getDeployOptions(taskArgs)); if (config.tokens === undefined) { config.tokens = {};