Home

Awesome

<img align="right" width="150" height="150" top="100" src="./assets/blueprint.png">

huff-merkle-distributor • ci license solidity

A merkle distributor Huff contract.

Warning. Be Cautious.

Huff-merkle-distributor is still a work in progress and the and unaudited. We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.

Getting Started

Once you've cloned and entered into your repository, you need to install the necessary dependencies. In order to do so, simply run:

forge install

To build and test your contracts, you can run:

forge build
forge test

For more information on how to use Foundry, check out the Foundry Github Repository and the foundry-huff library repository.

Blueprint

lib
├─ forge-std — https://github.com/foundry-rs/forge-std
├─ foundry-huff — https://github.com/huff-language/foundry-huff
└─ huff-mate — https://github.com/pentagonxyz/huffmate
scripts
├─ Deploy.s.sol — Deployment Script
src
├─ MerkleDistributor — A Merkle Distributor Contract in Huff
test
└─ MerkleDistTest.t — MerkleDistributorTests

Contract ABI

// Global Variables
address public immutable override token;
bytes32 public immutable override merkleRoot;
mapping(uint256 => uint256) private claimedBitMap;

// Functions
function getMerkleRoot() external view returns (bytes32);
function getTokenAddress() external view returns (address);
function isClaimed(uint256 index) external view returns (bool);
function claim(uint256 index, address account, uint256 amount, bytes32[] calldata proof) external;

License

The Unlicense

Acknowledgements