From 27a00bfd5f12994c31b0da18ea19bf6d08569d6c Mon Sep 17 00:00:00 2001 From: poma Date: Fri, 1 Nov 2019 04:12:32 +0300 Subject: [PATCH] rename withdraw event --- contracts/Mixer.sol | 4 ++-- test/ERC20Mixer.test.js | 6 +++--- test/ETHMixer.test.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/Mixer.sol b/contracts/Mixer.sol index 1fd9466..223c3e0 100644 --- a/contracts/Mixer.sol +++ b/contracts/Mixer.sol @@ -37,7 +37,7 @@ contract Mixer is MerkleTreeWithHistory { } event Deposit(uint256 indexed commitment, uint256 leafIndex, uint256 timestamp); - event Withdraw(address to, uint256 nullifierHash, address indexed relayer, uint256 fee); + event Withdrawal(address to, uint256 nullifierHash, address indexed relayer, uint256 fee); /** @dev The constructor @@ -98,7 +98,7 @@ contract Mixer is MerkleTreeWithHistory { require(verifier.verifyProof(proof, input), "Invalid withdraw proof"); nullifierHashes[nullifierHash] = true; _processWithdraw(receiver, relayer, fee, refund); - emit Withdraw(receiver, nullifierHash, relayer, fee); + emit Withdrawal(receiver, nullifierHash, relayer, fee); } /** @dev this function is defined in a child contract */ diff --git a/test/ERC20Mixer.test.js b/test/ERC20Mixer.test.js index 8818a79..534a062 100644 --- a/test/ERC20Mixer.test.js +++ b/test/ERC20Mixer.test.js @@ -180,7 +180,7 @@ contract('ERC20Mixer', accounts => { ethBalanceRecieverAfter.should.be.eq.BN(toBN(ethBalanceRecieverBefore).add(toBN(refund))) ethBalanceRelayerAfter.should.be.eq.BN(toBN(ethBalanceRelayerBefore).sub(toBN(refund))) - logs[0].event.should.be.equal('Withdraw') + logs[0].event.should.be.equal('Withdrawal') logs[0].args.nullifierHash.should.be.eq.BN(toBN(input.nullifierHash.toString())) logs[0].args.relayer.should.be.eq.BN(relayer) logs[0].args.fee.should.be.eq.BN(feeBN) @@ -304,7 +304,7 @@ contract('ERC20Mixer', accounts => { ethBalanceRecieverAfter.should.be.eq.BN(toBN(ethBalanceRecieverBefore).add(toBN(refund)).sub(feeBN)) - logs[0].event.should.be.equal('Withdraw') + logs[0].event.should.be.equal('Withdrawal') logs[0].args.nullifierHash.should.be.eq.BN(toBN(input.nullifierHash.toString())) logs[0].args.relayer.should.be.eq.BN(operator) logs[0].args.fee.should.be.eq.BN(feeBN) @@ -386,7 +386,7 @@ contract('ERC20Mixer', accounts => { ethBalanceRecieverAfter.should.be.eq.BN(toBN(ethBalanceRecieverBefore).add(toBN(refund)).sub(feeBN)) - logs[0].event.should.be.equal('Withdraw') + logs[0].event.should.be.equal('Withdrawal') logs[0].args.nullifierHash.should.be.eq.BN(toBN(input.nullifierHash.toString())) logs[0].args.relayer.should.be.eq.BN(operator) logs[0].args.fee.should.be.eq.BN(feeBN) diff --git a/test/ETHMixer.test.js b/test/ETHMixer.test.js index b1c00f2..aa8f3a6 100644 --- a/test/ETHMixer.test.js +++ b/test/ETHMixer.test.js @@ -242,7 +242,7 @@ contract('ETHMixer', accounts => { balanceRecieverAfter.should.be.eq.BN(toBN(balanceRecieverBefore).add(toBN(value)).sub(feeBN)) - logs[0].event.should.be.equal('Withdraw') + logs[0].event.should.be.equal('Withdrawal') logs[0].args.nullifierHash.should.be.eq.BN(toBN(input.nullifierHash.toString())) logs[0].args.relayer.should.be.eq.BN(operator) logs[0].args.fee.should.be.eq.BN(feeBN)