From 8657bc8b8259ae123634a0ca2fe7a8751a75a870 Mon Sep 17 00:00:00 2001 From: poma Date: Mon, 15 Jul 2019 19:15:06 +0300 Subject: [PATCH] isSpent function --- contracts/Mixer.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/Mixer.sol b/contracts/Mixer.sol index 3bf4027..6c3412e 100644 --- a/contracts/Mixer.sol +++ b/contracts/Mixer.sol @@ -69,4 +69,8 @@ contract Mixer is MerkleTreeWithHistory { } emit Withdraw(receiver, nullifier, fee); } + + function isSpent(uint256 nullifier) public view returns(bool) { + return nullifiers[nullifier]; + } }