MerkleProofWrapper.sol 1002 B

123456789101112131415161718192021222324252627282930313233343536
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../utils/cryptography/MerkleProof.sol";
  4. contract MerkleProofWrapper {
  5. function verify(
  6. bytes32[] memory proof,
  7. bytes32 root,
  8. bytes32 leaf
  9. ) public pure returns (bool) {
  10. return MerkleProof.verify(proof, root, leaf);
  11. }
  12. function processProof(bytes32[] memory proof, bytes32 leaf) public pure returns (bytes32) {
  13. return MerkleProof.processProof(proof, leaf);
  14. }
  15. function multiProofVerify(
  16. bytes32 root,
  17. bytes32[] memory leafs,
  18. bytes32[] memory proofs,
  19. bool[] memory proofFlag
  20. ) public pure returns (bool) {
  21. return MerkleProof.multiProofVerify(root, leafs, proofs, proofFlag);
  22. }
  23. function processMultiProof(
  24. bytes32[] memory leafs,
  25. bytes32[] memory proofs,
  26. bool[] memory proofFlag
  27. ) public pure returns (bytes32) {
  28. return MerkleProof.processMultiProof(leafs, proofs, proofFlag);
  29. }
  30. }