jesperkristensen58 / erc1155-in-pure-yul

The ERC1155 Token contract implemented in pure Yul.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The ERC1155 - Delivered as a Yul Present!

This is a pure Yul implementation of the ERC1155 Token contract. Some mock contracts (under contracts/mocks) accompy the main Yul contract for testing purposes.

How to Compile & Test

Run:

./test.sh

How to Test in Detail

Test.sh under hood calls:

node scripts/compile.js # compiles the Yul contract as well as the mock contracts
npx hardhat test tests/ERC1155Yul.js --no-compile

Notice the --no-compile flag; this is to ensure that hardhat does not start compiling the Yul contract (it won't know how by default at least). So we compile separately with the compile.js script. We then do the same for the Solidity contracts as well using solc(...).

Author

Jesper Kristensen

Follow me on Twitter!

Twitter URL

License

This project uses the following license: MIT.

About

The ERC1155 Token contract implemented in pure Yul.


Languages

Language:JavaScript 96.6%Language:Solidity 2.3%Language:Shell 1.0%