MerkleProofWrapper Smart Contract Module in Bunzz

We are excited to announce our new MerkleProofWrapper Module available in Bunzz and created by LightFury.

This contract allows you to verify whether single or multiple leaves exist on the MerkleTree or not. It’s a wrapper contract based on OpenZeppelin’s MerkleProof library.

This contract does not have any variables in itself.

You can access this Module and the code here:

This contract’s functions deal with verification of Merkle Tree proofs.

  • The proofs can be generated using the JavaScript library
  • Note: The hashing algorithm should be keccak256 and pair sorting should be enabled.
  • Note: This contract is not a standalone contract. This will work like a library contract.

How to Use

  1. Deploy the smart contract via Bunzz
  2. Write front-end or back-end projects which use MerkleTree to store data, like whitelists or sensitive information.
  3. Generate the MerkleTree and store the Proofs and Leaves on the backend
  4. Share the leaf for a specific user, the proofs for that leaf and the root of the MerkleTree to the user upon user’s request.
  5. Users can use the deployed MerkleProofWrapper smart contract to verify whether those are correct.
  6. DeFi builders can use the deployed MerkleProofWrapper smart contract to verify the user’s request.
    For this:
  • Users can get leaves and proofs from the backend.
  • Root of the MerkleTree must be stored in the DeFi’s main smart contract.
  • Inside the main smart contract, call the deployed MerkleProofWrapper contract to verify the user’s request. This will reduce the size of the main smart contract for DeFi builders.

  • Here is the usage of the library.

And here’s another usage of it.

With this MerkleProofWrapper, you can do like this:

MerkleProofWrapper(address _merkleProofWrapperAddress).verify(_merkleProof, root, leaf)

By doing this, you can reduce the size of the contract deployed.



  • verifyCalldata
  • verify
  • processProofCalldata
  • processProof
  • processMultiProofCalldata
  • processMultiProof
  • multiProofVerifyCalldata
  • multiProofVerify

You can access this Module and the code here:

If you still haven’t signed up to Bunzz, what are you waiting for?

Sign up here and get your smart contracts deployed in 5 minutes through our great GUI.

Share this article: