Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 1.93 KB

README.md

File metadata and controls

71 lines (54 loc) · 1.93 KB

ERC1155 written in pure Yul

List of supported functions (ERC-1155 standard):

  • ✅ balanceOf(address account, uint256 id)
  • ✅ balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
  • ✅ setApprovalForAll(address _operator, bool _approved)
  • ✅ isApprovedForAll(address _owner, address _operator)
  • ✅ safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data)
  • ✅ safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data)
  • ✅ uri(uint256 _id)
  • ✅ setURI(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data)

List of non-standard functions:

  • ✅ mint(address to, uint256 id, uint256 amount, bytes calldata data)
  • ✅ batchMint(address to, uint256 id, uint256 amount, bytes calldata data)

List of events:

  • ✅ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values );
  • ✅ event TransferSingle( address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value );
  • ✅ event ApprovalForAll( address indexed account, address indexed operator, bool approved );

Repository installation

  1. Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup
forge test

Running tests

Run tests (compiles yul then fetch resulting bytecode in test)

forge test

To see the console logs during tests

forge test -vvv