rename withdraw event

This commit is contained in:
poma 2019-11-01 04:12:32 +03:00
parent c92ac97ff2
commit 27a00bfd5f
3 changed files with 6 additions and 6 deletions

View File

@ -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 */

View File

@ -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)

View File

@ -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)