mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-08-10 07:39:59 -04:00
Update instructions for new pool
This commit is contained in:
parent
3af3379688
commit
90df50ead1
4 changed files with 40 additions and 39 deletions
|
@ -1,18 +1,20 @@
|
|||
/* global artifacts */
|
||||
require('dotenv').config({path: '../.env'})
|
||||
const ERC20Tornado = artifacts.require('ERC20Tornado')
|
||||
const Verifier = artifacts.require('Verifier')
|
||||
const FeeManager = artifacts.require('FeeManager')
|
||||
const hasherContract = artifacts.require('Hasher')
|
||||
const ERC20Mock = artifacts.require('ERC20Mock')
|
||||
|
||||
const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"
|
||||
const {
|
||||
MERKLE_TREE_HEIGHT,
|
||||
ERC20_TOKEN,
|
||||
TOKEN_AMOUNT,
|
||||
VERIFIER,
|
||||
FEE_MANAGER,
|
||||
} = process.env
|
||||
|
||||
module.exports = function (deployer, network, accounts) {
|
||||
return deployer.then(async () => {
|
||||
const {MERKLE_TREE_HEIGHT, ERC20_TOKEN, TOKEN_AMOUNT} = process.env
|
||||
const verifier = await Verifier.deployed()
|
||||
const feeManager = await FeeManager.deployed()
|
||||
const hasherInstance = await hasherContract.deployed()
|
||||
await ERC20Tornado.link(hasherContract, hasherInstance.address)
|
||||
let token = ERC20_TOKEN
|
||||
|
@ -23,15 +25,13 @@ module.exports = function (deployer, network, accounts) {
|
|||
console.log(`Deploying ERC20Tornado with token ${ERC20_TOKEN} and denomination ${TOKEN_AMOUNT}`)
|
||||
const tornado = await deployer.deploy(
|
||||
ERC20Tornado,
|
||||
verifier.address,
|
||||
feeManager.address,
|
||||
VERIFIER,
|
||||
FEE_MANAGER,
|
||||
TOKEN_AMOUNT,
|
||||
MERKLE_TREE_HEIGHT,
|
||||
accounts[0],
|
||||
ZERO_ADDRESS,
|
||||
token,
|
||||
)
|
||||
console.log('ERC20Tornado\'s address ', tornado.address)
|
||||
tornado.changeOwner(ZERO_ADDRESS)
|
||||
console.log('Changed ERC20Tornado contract owner to zero address')
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue