From a9a0a7f8c22376871a5079dc62436a2cfe293885 Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 6 Oct 2021 18:09:37 +0300 Subject: [PATCH] update deploy scripts --- scripts/deployBSCHelper.js | 6 +++--- scripts/deployTornado.js | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/deployBSCHelper.js b/scripts/deployBSCHelper.js index e4d6055..b3edb5e 100644 --- a/scripts/deployBSCHelper.js +++ b/scripts/deployBSCHelper.js @@ -1,16 +1,16 @@ const { ethers } = require('hardhat') -// This script deploys WETHOmnibridgeRouter to FOREIGN chain (mainnet) +// This script deploys L1Helper to FOREIGN chain (mainnet) async function main() { const owner = '0x03Ebd0748Aa4D1457cF479cce56309641e0a98F5' const omniBridge = '0xf0b456250dc9990662a6f25808cc74a6d1131ea9' const token = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c' // WBNB - const Helper = await ethers.getContractFactory('WETHOmnibridgeRouter') + const Helper = await ethers.getContractFactory('L1Helper') const helper = await Helper.deploy(omniBridge, token, owner) await helper.deployed() - console.log(`WETHOmnibridgeRouter address: ${helper.address}`) + console.log(`L1Helper address: ${helper.address}`) } main() diff --git a/scripts/deployTornado.js b/scripts/deployTornado.js index 112e0a1..df86dc4 100644 --- a/scripts/deployTornado.js +++ b/scripts/deployTornado.js @@ -1,4 +1,5 @@ const { ethers } = require('hardhat') +const { utils } = ethers const MERKLE_TREE_HEIGHT = 23 const { MINIMUM_WITHDRAWAL_AMOUNT, MAXIMUM_DEPOSIT_AMOUNT } = process.env @@ -36,7 +37,7 @@ async function main() { token, omniBridge, l1Unwrapper, - l1ChainId, + govAddress, ) await tornadoImpl.deployed() console.log(`TornadoPool implementation address: ${tornadoImpl.address}`) @@ -47,7 +48,14 @@ async function main() { console.log(`proxy address: ${proxy.address}`) const tornadoPool = await Pool.attach(proxy.address) - await tornadoPool.initialize(MINIMUM_WITHDRAWAL_AMOUNT, MAXIMUM_DEPOSIT_AMOUNT) + + await tornadoPool.initialize( + utils.parseEther(MINIMUM_WITHDRAWAL_AMOUNT), + utils.parseEther(MAXIMUM_DEPOSIT_AMOUNT), + ) + console.log( + `Proxy initialized with MINIMUM_WITHDRAWAL_AMOUNT=${MINIMUM_WITHDRAWAL_AMOUNT} ETH and MAXIMUM_DEPOSIT_AMOUNT=${MAXIMUM_DEPOSIT_AMOUNT} ETH`, + ) } main()