Closed
Description
It seems like it would be useful to have a standard on-chain library for verifying Merkle proofs since they offer a compact way to prove the existence of some element in a set given a past commitment of a Merkle root.
This contract seems like a great start and contains functions that verify a Merkle proof both in the case where pairs of elements are sorted and the case where the order of elements is preserved: https://github.com/ameensol/merkle-tree-solidity/blob/master/src/MerkleProof.sol
Happy to get started with porting this functionality to a library and add tests if there is interest!