Merkle Tree Whitelist
Generate a Merkle tree for whitelist verification and verify proofs on-chain. Generate a Merkle tree for whitelist verification and verify proofs on-chain.Explanation
Merkle trees allow O(log n) proof verification. The root is stored on-chain; users submit a proof proving their address is in the whitelist. This is far cheaper than storing a mapping of all whitelisted addresses.Code
Canonical knowledge ID:
code-example:merkle-tree-whitelist