Skip to content

Solidity API

MerkleProof

derived from https://github.com/OpenZeppelin/openzeppelin-contracts (MIT license)

verify

solidity
function verify(bytes32[] proof, bytes32 root, bytes32 leaf) internal pure returns (bool)

verify whether given leaf is contained within Merkle tree defined by given root

Parameters

NameTypeDescription
proofbytes32[]proof that Merkle tree contains given leaf
rootbytes32Merkle tree root
leafbytes32element whose presence in Merkle tree to prove

Return Values

NameTypeDescription
[0]boolwhether leaf is proven to be contained within Merkle tree defined by root