Proof of inclusion sample contract.
# Clone the repository
git clone https://github.com/marco-jardim/merkle-verifier.git
# Install dependencies
npm install
# Set up environment variables (keys)
cp .env.example .env # (linux)
copy .env.example .env # (windows)
### Hardhat usage:
## Just Compile:
npx hardhat compile
## Deploy locally:
# Dry deployment:
npx hardhat deploy
# With node running:
npx hardhat node
# Connect with console:
npx hardhat console --network localhost
## Compile and Deploy to Rinkeby:
npx hardhat deploy --network rinkeby
## Test:
npx hardhat test
# Generate typescript files
npx hardhat typechain
# Clean artifacts (doesn't need to be versioned):
npx hardhat clean
- The
deployments/localhost
directory is included in the git repository, so that the contract addresses remain constant. Otherwise, the frontend'sconstants.ts
file would need to be updated. - Avoid committing changes to the
deployments/localhost
files (unless you are sure), as this will alter the state of the hardhat node when deployed in tests.
- Check out
./test/test.ts
for a full example of how to interact with the contract.