Giter Club home page Giter Club logo

huff-merkle's Introduction

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

huff-merkle's People

Contributors

benleim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.