mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-05-02 06:16:03 -04:00
fix tests, ci
This commit is contained in:
parent
346ffcee3c
commit
a359e86f85
13 changed files with 309 additions and 79 deletions
|
@ -2,21 +2,20 @@
|
|||
require('dotenv').config({ path: '../.env' })
|
||||
const ETHTornado = artifacts.require('ETHTornado')
|
||||
const Verifier = artifacts.require('Verifier')
|
||||
const hasherContract = artifacts.require('Hasher')
|
||||
const Hasher = artifacts.require('Hasher')
|
||||
|
||||
module.exports = function (deployer, network, accounts) {
|
||||
return deployer.then(async () => {
|
||||
const { MERKLE_TREE_HEIGHT, ETH_AMOUNT } = process.env
|
||||
const verifier = await Verifier.deployed()
|
||||
const hasherInstance = await hasherContract.deployed()
|
||||
await ETHTornado.link(hasherContract, hasherInstance.address)
|
||||
const hasher = await Hasher.deployed()
|
||||
const tornado = await deployer.deploy(
|
||||
ETHTornado,
|
||||
verifier.address,
|
||||
hasher.address,
|
||||
ETH_AMOUNT,
|
||||
MERKLE_TREE_HEIGHT,
|
||||
accounts[0],
|
||||
)
|
||||
console.log('ETHTornado address ', tornado.address)
|
||||
console.log('ETHTornado address', tornado.address)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -2,15 +2,14 @@
|
|||
require('dotenv').config({ path: '../.env' })
|
||||
const ERC20Tornado = artifacts.require('ERC20Tornado')
|
||||
const Verifier = artifacts.require('Verifier')
|
||||
const hasherContract = artifacts.require('Hasher')
|
||||
const Hasher = artifacts.require('Hasher')
|
||||
const ERC20Mock = artifacts.require('ERC20Mock')
|
||||
|
||||
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 hasherInstance = await hasherContract.deployed()
|
||||
await ERC20Tornado.link(hasherContract, hasherInstance.address)
|
||||
const hasher = await Hasher.deployed()
|
||||
let token = ERC20_TOKEN
|
||||
if (token === '') {
|
||||
const tokenInstance = await deployer.deploy(ERC20Mock)
|
||||
|
@ -19,11 +18,11 @@ module.exports = function (deployer, network, accounts) {
|
|||
const tornado = await deployer.deploy(
|
||||
ERC20Tornado,
|
||||
verifier.address,
|
||||
hasher.address,
|
||||
TOKEN_AMOUNT,
|
||||
MERKLE_TREE_HEIGHT,
|
||||
accounts[0],
|
||||
token,
|
||||
)
|
||||
console.log('ERC20Tornado address ', tornado.address)
|
||||
console.log('ERC20Tornado address', tornado.address)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue