mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-07-22 06:49:13 -04:00
mixer deploy WIP
This commit is contained in:
parent
19f916e6fd
commit
fb3f2425d2
10 changed files with 2143 additions and 40 deletions
41
test/Mixer.test.js
Normal file
41
test/Mixer.test.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
const should = require('chai')
|
||||
.use(require('bn-chai')(web3.utils.BN))
|
||||
.use(require('chai-as-promised'))
|
||||
.should()
|
||||
|
||||
const { toWei, toBN, fromWei } = require('web3-utils')
|
||||
const { takeSnapshot, revertSnapshot, increaseTime } = require('../scripts/ganacheHelper');
|
||||
|
||||
const Mixer = artifacts.require('./Mixer.sol')
|
||||
|
||||
|
||||
contract('Mixer', async accounts => {
|
||||
let mixer
|
||||
let miMC
|
||||
const sender = accounts[0]
|
||||
const emptyAddress = '0x0000000000000000000000000000000000000000'
|
||||
const levels = 16
|
||||
const zeroValue = 1337
|
||||
let snapshotId
|
||||
let prefix = 'test'
|
||||
let tree
|
||||
let hasher
|
||||
|
||||
before(async () => {
|
||||
mixer = await Mixer.deployed()
|
||||
snapshotId = await takeSnapshot()
|
||||
})
|
||||
|
||||
describe('#constuctor', async () => {
|
||||
it('should initialize', async () => {
|
||||
const { AMOUNT } = process.env
|
||||
const transferValue = await mixer.transferValue()
|
||||
transferValue.should.be.eq.BN(toBN(AMOUNT))
|
||||
})
|
||||
})
|
||||
|
||||
afterEach(async () => {
|
||||
await revertSnapshot(snapshotId.result)
|
||||
snapshotId = await takeSnapshot()
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue