Motivation
ERC-20 and ERC-721 wrappers exist (erc20.zig, erc721.zig); ERC-1155 is the remaining mainstream token standard. Gaming/NFT integrators check for it on day one.
Scope
New src/erc1155.zig mirroring the erc721.zig pattern:
- Reads:
balanceOf(account, id), balanceOfBatch, uri(id), isApprovedForAll
- Writes:
setApprovalForAll, safeTransferFrom, safeBatchTransferFrom
- Event topics:
TransferSingle, TransferBatch, ApprovalForAll, URI
Pointers
src/erc721.zig is the template (selector computation via keccak.zig, calls via contract.zig). Batch methods need dynamic-array ABI encoding — see abi_encode.zig tuple/array support. Add a refAllDeclsRecursive test (see src/mev_share.zig).
Motivation
ERC-20 and ERC-721 wrappers exist (
erc20.zig,erc721.zig); ERC-1155 is the remaining mainstream token standard. Gaming/NFT integrators check for it on day one.Scope
New
src/erc1155.zigmirroring the erc721.zig pattern:balanceOf(account, id),balanceOfBatch,uri(id),isApprovedForAllsetApprovalForAll,safeTransferFrom,safeBatchTransferFromTransferSingle,TransferBatch,ApprovalForAll,URIPointers
src/erc721.zigis the template (selector computation viakeccak.zig, calls viacontract.zig). Batch methods need dynamic-array ABI encoding — seeabi_encode.zigtuple/array support. Add arefAllDeclsRecursivetest (seesrc/mev_share.zig).