Created
June 14, 2021 08:07
-
-
Save johnson86tw/62da103b847dcd5cde8153d7352d7427 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deposit(bytes32 _commitment) external payable nonReentrant { | |
require(!commitments[_commitment], "The commitment has been submitted"); | |
uint32 insertedIndex = _insert(_commitment); | |
commitments[_commitment] = true; | |
_processDeposit(); | |
emit Deposit(_commitment, insertedIndex, block.timestamp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment