update deploy for xdai

This commit is contained in:
Alexey 2021-10-04 14:18:55 +03:00
parent 2a1693247f
commit 3b746ec3fc
2 changed files with 13 additions and 7 deletions

View File

@ -35,6 +35,7 @@ const config = {
: {
mnemonic: 'test test test test test test test test test test test junk',
},
gasPrice: 25000000000,
},
bsc: {
url: process.env.ETH_RPC || 'https://bsc-dataseed.binance.org/',

View File

@ -3,11 +3,12 @@ const { ethers } = require('hardhat')
const MERKLE_TREE_HEIGHT = 23
async function main() {
require('../scripts/compileHasher')
const govAddress = '0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce'
require('./compileHasher')
const govAddress = '0x03ebd0748aa4d1457cf479cce56309641e0a98f5'
const omniBridge = '0x59447362798334d3485c64D1e4870Fde2DDC0d75'
const token = '0xCa8d20f3e0144a72C6B5d576e9Bd3Fd8557E2B04' // WBNB
const l1Unwrapper = '0xefc33f8b2c4d51005585962be7ea20518ea9fd0d' // WBNB -> BNB
const l1Unwrapper = '0xcf35E84bbA3506BB97cf6fAEFe6cc1A9bd843Fc2' // WBNB -> BNB
const l1ChainId = 56
const Verifier2 = await ethers.getContractFactory('Verifier2')
const verifier2 = await Verifier2.deploy()
@ -21,6 +22,7 @@ async function main() {
const Hasher = await await ethers.getContractFactory('Hasher')
const hasher = await Hasher.deploy()
await hasher.deployed()
const Pool = await ethers.getContractFactory('TornadoPool')
const tornado = await Pool.deploy(
@ -36,12 +38,15 @@ async function main() {
console.log(`TornadoPool address: ${tornado.address}`)
const CrossChainUpgradeableProxy = await ethers.getContractFactory('CrossChainUpgradeableProxy')
const proxy = await CrossChainUpgradeableProxy.deploy(tornado.address, govAddress, [], omniBridge)
const proxy = await CrossChainUpgradeableProxy.deploy(
tornado.address,
govAddress,
[],
omniBridge,
l1ChainId,
)
await proxy.deployed()
console.log(`proxy address: ${proxy.address}`)
const tornadoPool = Pool.attach(proxy.address)
await tornadoPool.initialize()
}
main()