OpenZeppelin / cairo-contracts

OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup
https://docs.openzeppelin.com/contracts-cairo
MIT License
797 stars 321 forks source link

feat: Add Merkle Proof Verifier #970

Open boray opened 2 months ago

boray commented 2 months ago

Fixes #936

I implemented MerkleProof.sol in Cairo.

This is a draft and needs improvement. It uses only Poseidon for now. That should be abstracted to work with Pedersen and Keccak. Testing coverage is narrow and should be extended.

I am waiting for your comments.

PR Checklist

ericnordelo commented 2 months ago

Hey @boray thanks for taking the time! This would be a nice addition and we are happy to merge it after is finished and reviewed. We will be happy to review the PR after tests and logic are finished.