This commit is contained in:
Alexey 2019-12-14 12:42:22 +03:00
parent 30e8fcb9ac
commit 08f8bfb070
3 changed files with 16 additions and 2 deletions

View File

@ -78,6 +78,19 @@ If you want, you can point the app to existing tornado contracts on Mainnet or K
**Note**. If you want to reuse the same verifier for all the instances, then after you deployed one of the instances you should only run 4th or 5th migration for ETH or ERC20 contracts respectively (`--f 4 --to 4` or `--f 5`).
## Migraton
1. `npm install`
1. `cp .env.example .env`
1. `npm run build` - this may take 10 minutes or more
1. `npm run migrate:kovan`
1. Take `ETHTornado's address` address from the output and set it as `HELPER_INSTANCE` in `./migrationDeposits.js`
1. Go to `./migrations/4_deploy_eth_mixer.js` and change `const ETHTornado = artifacts.require('ETHTornado')` to `const ETHTornado = artifacts.require('MigratableETHTornado')`
1. `npm run migrate:mainnet`
1. Take `ETHTornado's address` address from the output and set it as `NEW_INSTANCE` in `./migrationDeposits.js`
1. Setup right `SOURCE_RPC` and `TARGET_RPC` in the `./migrationDeposits.js`
1. Go to `./migrationDeposits.js` at the line 141 (`// 3. Decide should we uncomment here`)
1. `node migrationDeposits.js`
## Credits
Special thanks to @barryWhiteHat and @kobigurk for valuable input,

View File

@ -17,8 +17,8 @@ const { numberToHex, toWei } = require('web3-utils')
// 2. edit here
const PREVIOUS_INSTANCE = '0xb541fc07bC7619fD4062A54d96268525cBC6FfEF'
const HELPER_INSTANCE = ''
const NEW_INSTANCE = ''
const HELPER_INSTANCE = '0x831822ad4A8AEbfC27DF0b915902de855E613eb2'
const NEW_INSTANCE = '0xcdA7FC8a05CFF618f7e323c547d6F2EF6c3578AA'
function toHex(number, length = 32) {
let str = number instanceof Buffer ? number.toString('hex') : bigInt(number).toString(16)

View File

@ -1,6 +1,7 @@
/* global artifacts */
require('dotenv').config({ path: '../.env' })
const ETHTornado = artifacts.require('ETHTornado')
// const ETHTornado = artifacts.require('MigratableETHTornado')
const Verifier = artifacts.require('Verifier')
const hasherContract = artifacts.require('Hasher')