This commit is contained in:
Danil Kovtonyuk 2021-06-23 15:02:16 +03:00
parent 111d200753
commit 82cf36bcd7
No known key found for this signature in database
GPG Key ID: E72A919BF08C3746
4 changed files with 36 additions and 34 deletions

View File

@ -6,6 +6,6 @@ SALT=0x1234000000000000000000000000000000000000000000000000000047941987
PRIVATE_KEY=0x
RPC_URL=https://bsc-dataseed.binance.org/
NET_ID=56
RPC_URL=
NET_ID=137
GAS_PRICE_IN_WEI=5000000000

View File

@ -6,7 +6,7 @@
## Usage
```
git clone --recursive https://github.com/tornadocash/tornado-deploy -b bsc
git clone --recursive https://github.com/tornadocash/tornado-deploy -b polygon
cd tornado-deploy
cp .env.example .env
yarn

View File

@ -1,30 +1,30 @@
module.exports = [
{
isETH: true,
denomination: '100000000000000000',
domain: 'bnb-01.tornadocash.eth',
symbol: 'BNB',
decimals: 18,
},
{
isETH: true,
denomination: '1000000000000000000',
domain: 'bnb-1.tornadocash.eth',
symbol: 'BNB',
decimals: 18,
},
{
isETH: true,
denomination: '10000000000000000000',
domain: 'bnb-10.tornadocash.eth',
symbol: 'BNB',
decimals: 18,
},
{
isETH: true,
denomination: '100000000000000000000',
domain: 'bnb-100.tornadocash.eth',
symbol: 'BNB',
domain: 'matic-100.tornadocash.eth',
symbol: 'MATIC',
decimals: 18,
},
{
isETH: true,
denomination: '1000000000000000000000',
domain: 'matic-1000.tornadocash.eth',
symbol: 'MATIC',
decimals: 18,
},
{
isETH: true,
denomination: '10000000000000000000000',
domain: 'matic-10000.tornadocash.eth',
symbol: 'MATIC',
decimals: 18,
},
{
isETH: true,
denomination: '100000000000000000000000',
domain: 'matic-100000.tornadocash.eth',
symbol: 'MATIC',
decimals: 18,
},
]

View File

@ -4,12 +4,14 @@ const actions = require('../actions.json')
const abi = require('../abi/deployer.abi.json')
const prefix = {
1: '',
42: 'kovan.',
5: 'goerli.',
1: 'etherscan.io',
42: 'kovan.etherscan.io',
5: 'goerli.etherscan.io',
56: 'bscscan.com',
137: 'polygonscan.com',
}
const explorer = `https://${prefix[process.env.NET_ID]}etherscan.io`
const explorer = `https://${prefix[process.env.NET_ID]}`
async function main() {
const privateKey = process.env.PRIVATE_KEY
@ -27,8 +29,8 @@ async function main() {
const tx = await wallet.sendTransaction({
to: actions.eipDeployer.from,
value: ethers.utils.parseEther('0.0247').sub(balance).toHexString(),
gasLimit: ethers.BigNumber.from(800000).toHexString(), // 800k because of arbitrum
gasPrice: 1e6,
gasLimit: ethers.BigNumber.from(250000).toHexString(),
gasPrice: 100e9,
})
console.log('Tx hash:', tx.hash)
}
@ -47,7 +49,7 @@ async function main() {
continue
}
console.log(`Deploying ${action.contract} to ${action.domain} (${action.expectedAddress})`)
const tx = await deployer.deploy(action.bytecode, actions.salt, { gasLimit: 70e6, gasPrice: 1e9 })
const tx = await deployer.deploy(action.bytecode, actions.salt, { gasLimit: 3e6, gasPrice: 5e9 })
console.log(`TX hash ${explorer}/tx/${tx.hash}`)
try {
await tx.wait()
@ -59,7 +61,7 @@ async function main() {
console.error(`Failed to deploy ${action.contract}, sending debug tx`)
// const trace = await provider.send('debug_traceTransaction', [ tx.hash ])
// console.log(trace)
const tx2 = await wallet.sendTransaction({ gasLimit: 70e6, gasPrice: 1e9, data: action.bytecode })
const tx2 = await wallet.sendTransaction({ gasLimit: 3e6, gasPrice: 5e9, data: action.bytecode })
console.log(`TX hash ${explorer}/tx/${tx2.hash}`)
await tx2.wait()
console.log('Mined, check revert reason on etherscan')