Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

A collection of commonly used, vigorously tested Huff contracts for learning purposes.

License

Notifications You must be signed in to change notification settings

huff-language/huff-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

huff-examples • ci license solidity

Rigorously Tested, Demonstrative Huff Contracts Built with Huffmate.

Warning

These contracts are unaudited and are not recommended for use in production.

Although contracts have been rigorously reviewed, this is experimental software and is provided on an "as is" and "as available" basis. We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.

Pre-requisites

Make sure you've installed the Huff Compiler as outlined in the Huff Docs.

TL;DR: curl -L get.huff.sh | bash && huffup

To verify your installation, run huffc --help. This should print a list of available commands for the huff compiler cli.

Setup

To simplify the developer experience, Huff Language contributors created foundry-huff, a foundry library written in solidity. This allows you to test your Huff contracts in solidity and to utilize the Foundry stack for an ever-growing array of tooling.

To install dependencies, run:

forge install

To run tests, run:

forge test

You can also update dependencies with forge update and format with forge lint.

NOTE: These commands require Foundry to be installed. You can install it with curl -L https://foundry.paradigm.xyz | bash.

Contracts

src
├─ ERC20 — "Mintable and Burnable ERC20 + EIP-2612 implementation"
└─ ERC721 — "Mintable ERC721 implementation"

Acknowledgements

These contracts were enabled by the following beautiful OSS libraries and tooling:

About

A collection of commonly used, vigorously tested Huff contracts for learning purposes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published