4_deploy_eth_tornado.js 655 B

12345678910111213141516171819202122
  1. /* global artifacts */
  2. require('dotenv').config({ path: '../.env' })
  3. const ETHTornado = artifacts.require('ETHTornado')
  4. const Verifier = artifacts.require('Verifier')
  5. const Hasher = artifacts.require('Hasher')
  6. module.exports = function (deployer) {
  7. return deployer.then(async () => {
  8. const { MERKLE_TREE_HEIGHT, ETH_AMOUNT } = process.env
  9. const verifier = await Verifier.deployed()
  10. const hasher = await Hasher.deployed()
  11. const tornado = await deployer.deploy(
  12. ETHTornado,
  13. verifier.address,
  14. hasher.address,
  15. ETH_AMOUNT,
  16. MERKLE_TREE_HEIGHT,
  17. )
  18. console.log('ETHTornado address', tornado.address)
  19. })
  20. }