Skip to content

ERC20 contract written in solidity, yul and huff

Notifications You must be signed in to change notification settings

The-Wary-One/erc20s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERC20 contracts done in Solidity, Yul and Huff

One of the best ways to improve as a Smart Contracts Developer is to learn how the EVM works. After reading Jtriley’s Huff vs Yul article, i wanted to write small ERC20 token contracts in Solidity, Yul and Huff as a more complex exercise (i.e. bigger contract with dynamic length string constructor arguments). This is for learning purposes only, they are not optimized !

🌍 Overview

This is a foundry project so i could write the spec tests in Solidity and reuse them for the Yul and Huff contracts. I also used customized Huff and Yul deployer contracts.

  • The Solidity contract found in src/ERC20.sol, serves as the reference ERC20 spec implementation.
  • The Yul contract can be found in yul/ERC20.yul.
  • The Huff contract is at src/huff/ERC20.huff.

🚚 How to install

⚠ Prerequisites:

Clone this repository and install the dependencies

git clone git@github.com:The-Wary-One/erc20s.git
mkdir erc20s
forge install

👷 How to test

Run the tests

forge test

About

ERC20 contract written in solidity, yul and huff

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published