Skip to content

benleim/huff-merkle

Repository files navigation

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
├─ MerkleDistributorA 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

About

Merkle distributor written in Huff

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published