The Commit-Reveal smart contract is designed to demonstrate a simple commit-reveal scheme, which is often used in cryptographic protocols to ensure fair and secure data submission and revelation processes. In this contract, participants can commit their guesses by submitting a hash of their guess along with their address. After the guessing period ends, they reveal their guesses by submitting the actual guess, which is then verified against the original commitment. Winners are determined based on matching commitments, and they can claim their share of the total prize pool.
- git
- You'll know you did it right if you can run
git --version
and you see a response likegit version x.x.x
- You'll know you did it right if you can run
- foundry
- You'll know you did it right if you can run
forge --version
and you see a response likeforge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
- You'll know you did it right if you can run
git clone git@github.com:PanGan21/commit-reveal.git
cd commit-reveal
make
make test
This small project is only for demonstration purposes and no audit has been performed. The contract, as implemented, may lack various security features and optimizations necessary for production use.
Do not use in production system.