{"repo":"dmfxyz/murky","free":true,"listed":false,"github":"https://github.com/dmfxyz/murky","clone":"git clone https://github.com/dmfxyz/murky.git","description":"Merkle Proof Generator and Validator in Solidity","language":"Solidity","stars":515,"topics":["solidity","merkle-proof","merkle","nft","ethereum"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"Merkle Generator and Prover in Solidity Overview Murky contains contracts that can generate merkle roots and proofs. Murky also performs inclusion verification. A couple of default implementations are available out-of-the-box: 1. Merkle.sol is the original Murky implementation. It implements the tree as a Full Binary Tree. 2. CompleteMerkle.sol is a merkle tree implementation using Complete Binary Trees. Some external libraries, particulary front-end or off-chain ones, use this type of tree. By default, both trees use sorted concatentation based hashing; you can also \"bring your own\" hashing function by inherting from MurkyBase.sol . The root generation, proof generation, and verification functions are all fuzz tested (configured 10,000 runs by default) using arbitrary bytes32 arrays and uint leaves. See testing. Note: Code is not audited (yet). Please do your own due dilligence testing if you are planning to use this code! You can currently see Murky in action in the Seaport test suite. Building Locally You can run the repo using Foundry. 1. clone the repo 2. forge install 3. forge test Example Usage Script Merkle.s.sol is implemented using forge-std for quick and simple interaction with the core contracts. The script reads from script/target/input.json , generates merkle proof using Merkle.sol and then outputs at script/target/output.json . The hashes of the leafs are generated using keccak256(bytes.concat(keccak256(abi.encode(...)))) , which is the same as OpenZeppelin/mer","default_branch":null,"files":null,"tree":[],"storefront":"/r/dmfxyz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dmfxyz/murky/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}