Skip to content

difof/merkletree-sol

Repository files navigation

MerkleTree usage in Solidity and TypeScript

This is the example repository for my Medium article on Merkle Trees.

Directory structure

.
├── lib                         -- Solidity dependencies
│   ├── forge-std               -- Forge standard library
│   ├── murky                   -- Efficient Merkle Tree implementation
│   └── openzeppelin-contracts  -- OpenZeppelin!
├── script                      -- Additional Foundry and Hardhat scripts and utilities
├── src                         -- Solidity source, containing a single Airdrop.sol
└── test                        -- Unit tests
    ├── foundry                 -- Foundry specific tests (Solidity)
    └── hardhat                 -- Hardhat integration tests (TypeScript)

Build and test docker image

docker build -t merkletree-sol .
docker run --rm -it merkletree-sol

Build and test from source

Dependencies:

Setup libraries and modules:

foundry install
bun install

Run foundry tests: forge test

Run integration tests: bun run hardhat test

About

MerkleTree usage demonstration. Not Audited and will not be.

Topics

Resources

Stars

Watchers

Forks