Skip to content

Instantly share code, notes, and snippets.

@mbvissers
Created September 19, 2022 08:19
Show Gist options
  • Save mbvissers/19e8b77ca037e75fd7606f08aea92af8 to your computer and use it in GitHub Desktop.
Save mbvissers/19e8b77ca037e75fd7606f08aea92af8 to your computer and use it in GitHub Desktop.
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