Created
September 19, 2022 08:19
-
-
Save mbvissers/19e8b77ca037e75fd7606f08aea92af8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
bytes32 public root = 0x11....; | |
function checkValidity(bytes32[] calldata _merkleProof) public view returns (bool){ | |
bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); | |
require(MerkleProof.verify(_merkleProof, root, leaf), "Incorrect proof"); | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment