web3wagmi
← All standards

ERC-998 Composable Non-Fungible Token

DraftERCcreated 2018-07-07requires ERC-20, ERC-165, ERC-721

Extends a ERC-721 to own other ERC-721 and ERC-20 tokens.

Authors: Matt Lockyer, Nick Mudge, Jordan Schalm, sebastian echeverry, Zainan Victor Zhou (@xinbenlv)

ERC-165 interface ids

Computed here as the XOR of the selectors each interface defines.

ERC998ERC721TopDown0xcde244d9
ERC998ERC721TopDownEnumerable0xa344afe4
ERC998ERC20TopDown0x7294ffed
ERC998ERC20TopDownEnumerable0xc5fd96cd
ERC998ERC721BottomUp0xa1b23002
ERC998ERC721BottomUpEnumerable0x8318b539
ERC998ERC20BottomUp0x3617a1cb
The spec asserts 0xffafa991 for ERC998ERC20BottomUp, which its own interface does not produce.

Asserted value is the XOR of only 4 of the 5 declared functions; it predates transferFromParentERC223(address,uint256,address,uint256,bytes).

Functions this standard introduces (31)

0xe226ed22balanceOfERC20(uint256,address)view
0xe380b7bdbalanceOfToken(address,uint256)view
0x0d5a621bchildContractByIndex(uint256,uint256)view
0x051847d5childTokenByIndex(address,uint256,uint256)view
0x160b01a1childTokenByIndex(uint256,address,uint256)view
0x627c81fferc20ContractByIndex(uint256,uint256)view
0xba6b5f96getChild(address,uint256,address,uint256)
0x07cff6f2getERC20(address,uint256,address,uint256)
0x150b7a02onERC721Received(address,address,uint256,bytes)
0xeadb80b8ownerOfChild(address,uint256)view
0x43a61a8erootOwnerOf(uint256)view
0xed81cddarootOwnerOfChild(address,uint256)view
0x8d81f51esafeTransferChild(uint256,address,address,uint256,bytes)
0x1d98f3c5safeTransferChild(uint256,address,address,uint256)
0xc0ee0b8atokenFallback(address,uint256,bytes)
0x89885a59tokenOwnerOf(uint256)view
0x8da7d0b5totalChildContracts(uint256)view
0x8600f2ectotalChildTokens(address,uint256)view
0x35b21cebtotalChildTokens(uint256,address)view
0xa7811732totalERC20Contracts(uint256)view
0xc0a899f2transferAsChild(address,uint256,address,uint256,uint256,bytes)
0x737bf30ftransferAsChild(address,uint256,address,uint256,uint256)
0xbef44f18transferChild(uint256,address,address,uint256)
0x08937f62transferChildToParent(uint256,address,uint256,address,uint256,bytes)
0x830ef41btransferERC20(uint256,address,address,uint256)
0xd49d1bactransferERC223(uint256,address,address,uint256,bytes)
0x5e3e2687transferFromParent(address,uint256,address,uint256,bytes)
0x5438496ftransferFromParent(address,uint256,address,uint256)
0xc9b8085atransferFromParentERC223(address,uint256,address,uint256,bytes)
0xf50acfa0transferToParent(address,address,uint256,uint256,bytes)
0x3b6ca44ctransferToParent(address,address,uint256,uint256)

Events (6)

Topic0 is the keccak256 hash of the signature, which is what a log filter matches on.

0x0371ddf2288ad1ba92626a7e31c86a9d006e592cfe57d7d946ef08b13457c08bReceivedChild(address,uint256,address,uint256)
0x0ef52e516fb5aec15a5d3587e5480481b702b26db93c8430eca78b61990fd3f6TransferChild(uint256,address,address,uint256)
0x684ce28ace37552c6bfb98b7cceda8ed55327078eafb5dfb31218e0856382763ReceivedERC20(address,uint256,address,uint256)
0xa8352277873fc0d2b233b8127433da351a4164fa701ed6ff79655694222932c4TransferERC20(uint256,address,address,uint256)
0xda19c10bf4b88776cd85f9091592a44edff2d94035ec670ebd9e8356f56f887dTransferToParent(address,uint256,uint256)
0x3c619d5b30fb8431c0c0094f4485f1859d63f222f36cc2104cc13e56c2b993d3TransferFromParent(address,uint256,uint256)

Depends on (3)

Proposals this one names in its requires field.

What the specification covers

Compare with

Parsed from the canonical specification · discussion