test BSC-GC deploy

This commit is contained in:
Drygin 2022-02-08 19:54:32 +03:00
parent cdde55f564
commit b37d6d459f
3 changed files with 26 additions and 21 deletions

View File

@ -3,11 +3,11 @@ const { ethers } = require('hardhat')
// This script deploys L1Helper to FOREIGN chain (mainnet)
async function main() {
const owner = '0x03Ebd0748Aa4D1457cF479cce56309641e0a98F5'
const owner = '0xBAE5aBfa98466Dbe68836763B087f2d189f4D28f'
const omniBridge = '0xf0b456250dc9990662a6f25808cc74a6d1131ea9'
const token = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c' // WBNB
const Helper = await ethers.getContractFactory('L1Helper')
const Helper = await ethers.getContractFactory('L1Unwrapper')
const helper = await Helper.deploy(omniBridge, token, owner)
await helper.deployed()
console.log(`L1Helper address: ${helper.address}`)

View File

@ -1,18 +1,19 @@
const { ethers } = require('hardhat')
const { utils } = ethers
const prompt = require('prompt-sync')()
// const prompt = require('prompt-sync')()
const MERKLE_TREE_HEIGHT = 23
const { MINIMUM_WITHDRAWAL_AMOUNT, MAXIMUM_DEPOSIT_AMOUNT } = process.env
async function main() {
require('./compileHasher')
const govAddress = '0x03ebd0748aa4d1457cf479cce56309641e0a98f5'
const govAddress = '0xBAE5aBfa98466Dbe68836763B087f2d189f4D28f'
const omniBridge = '0x59447362798334d3485c64D1e4870Fde2DDC0d75'
const amb = '0x162e898bd0aacb578c8d5f8d6ca588c13d2a383f'
const token = '0xCa8d20f3e0144a72C6B5d576e9Bd3Fd8557E2B04' // WBNB
const l1Unwrapper = '0x2353Dcda746fa1AAD17C5650Ddf2A20112862197' // WBNB -> BNB
const l1Unwrapper = '0x8845F740F8B01bC7D9A4C82a6fD4A60320c07AF1' // WBNB -> BNB
const l1ChainId = 56
const multisig = '0xE3611102E23a43136a13993E3a00BAD67da19119'
const Verifier2 = await ethers.getContractFactory('Verifier2')
const verifier2 = await Verifier2.deploy()
@ -41,24 +42,28 @@ async function main() {
l1Unwrapper,
govAddress,
l1ChainId,
multisig,
]).slice(1, -1)}\n`,
)
const tornadoImpl = prompt('Deploy tornado pool implementation and provide address here:\n')
// const tornadoImpl = await Pool.deploy(
// verifier2.address,
// verifier16.address,
// MERKLE_TREE_HEIGHT,
// hasher.address,
// token,
// omniBridge,
// l1Unwrapper,
// govAddress,
// )
// await tornadoImpl.deployed()
// console.log(`TornadoPool implementation address: ${tornadoImpl.address}`)
//const tornadoImpl = prompt('Deploy tornado pool implementation and provide address here:\n')
const tornadoImpl = await Pool.deploy(
verifier2.address,
verifier16.address,
MERKLE_TREE_HEIGHT,
hasher.address,
token,
omniBridge,
l1Unwrapper,
govAddress,
l1ChainId,
multisig,
)
await tornadoImpl.deployed()
console.log(`TornadoPool implementation address: ${tornadoImpl.address}`)
const CrossChainUpgradeableProxy = await ethers.getContractFactory('CrossChainUpgradeableProxy')
const proxy = await CrossChainUpgradeableProxy.deploy(tornadoImpl, govAddress, [], amb, l1ChainId)
const proxy = await CrossChainUpgradeableProxy.deploy(tornadoImpl.address, govAddress, [], amb, l1ChainId)
await proxy.deployed()
console.log(`proxy address: ${proxy.address}`)

View File

@ -6913,9 +6913,9 @@ oboe@2.1.5:
dependencies:
http-https "^1.0.0"
"omnibridge@git+https://github.com/peppersec/omnibridge.git#1f0baaa34bbfdc8f2ddb37c0554ad7d964a96803":
"omnibridge@git+https://github.com/peppersec/omnibridge.git#30081f7a735eb03c9d6821a9617cc28efe71a682":
version "1.1.0"
resolved "git+https://github.com/peppersec/omnibridge.git#1f0baaa34bbfdc8f2ddb37c0554ad7d964a96803"
resolved "git+https://github.com/peppersec/omnibridge.git#30081f7a735eb03c9d6821a9617cc28efe71a682"
dependencies:
axios "^0.21.0"
bignumber.js "^9.0.1"