6. Extensibility and Others
The proposed ERC-1000 is fully compatible with both ERC-20 and ERC-721. All extensions based on ERC-20 and ERC-721 can be applied to ERC-1000. The unique functionalities of ERC-1000 can also be extended through the inheritances of ERC-20 and ERC-721 extensions. Furthermore, to facilitate the processing of on-chain data based on ERC-1000, on-chain events can be scanned or monitored and selected data can be saved off-chain as follows:
No.
Event Name
Description
1
event Trade(address indexed account, TradeType indexed tradeType, uint256[] tokenId)
Triggered when a random or specific ERC-721 NFT purchase is made
2
event Borrow(address indexed borrower, uint256[] tokenId, uint256 endBlock, uint256 price, uint256 amount)
Triggered when a user obtains a loan of ERC-20 tokens using an ERC-721 NFT as a collateral; price greater than 0 indicates consignment of ERC-721 NFT; amount represents the ERC-20 tokens received by the user after deducting fees based on the consignment terms and interest rate
3
event Redeem(address indexed payer, uint256[] tokenIds, uint256[] amounts)
Triggered when the consigned ERC-721 NFT is redeemed; amount represents the ERC-20 tokens to be paid for redeeming the NFT
4
event Purchase(address indexed payer, uint256[] tokenIds, uint256[] amounts)
Triggered when the consigned ERC-721 NFT is purchased; amount represents the ERC-20 tokens paid for purchasing the NFT
Last updated