fix tests, ci

This commit is contained in:
poma 2021-02-11 10:00:53 +03:00
parent 346ffcee3c
commit a359e86f85
No known key found for this signature in database
GPG key ID: BA20CB01FE165657
13 changed files with 309 additions and 79 deletions

View file

@ -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)
})
}

View file

@ -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)
})
}