2019-07-16 16:49:45 -04:00
|
|
|
/* global artifacts */
|
2019-07-12 11:04:45 -04:00
|
|
|
require('dotenv').config({ path: '../.env' })
|
2019-07-16 13:27:20 -04:00
|
|
|
const Mixer = artifacts.require('Mixer')
|
|
|
|
const Verifier = artifacts.require('Verifier')
|
|
|
|
const MiMC = artifacts.require('MiMC')
|
2019-07-12 11:04:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
module.exports = function(deployer) {
|
|
|
|
return deployer.then(async () => {
|
|
|
|
const { MERKLE_TREE_HEIGHT, AMOUNT, EMPTY_ELEMENT } = process.env
|
|
|
|
const verifier = await Verifier.deployed()
|
2019-07-12 18:26:27 -04:00
|
|
|
const miMC = await MiMC.deployed()
|
2019-07-12 11:04:45 -04:00
|
|
|
await Mixer.link(MiMC, miMC.address)
|
2019-07-15 17:34:54 -04:00
|
|
|
const mixer = await deployer.deploy(Mixer, verifier.address, AMOUNT, MERKLE_TREE_HEIGHT, EMPTY_ELEMENT)
|
2019-07-16 13:27:20 -04:00
|
|
|
console.log('Mixer\'s address ', mixer.address)
|
2019-07-12 11:04:45 -04:00
|
|
|
})
|
2019-07-16 13:27:20 -04:00
|
|
|
}
|