go-iost icon indicating copy to clipboard operation
go-iost copied to clipboard

IOST Improvement Proposal 1 (token721.iost)

Open nujabes403 opened this issue 5 years ago • 2 comments

I have 2 requests to IOST Dev team.

image https://github.com/iost-official/go-iost/blob/master/rpc/pb/rpc.pb.go#L3578

# Request 1. Please add "fromBlock", "toBlock", and "tokenSymbol" parameters to SubscribeRequest_Filter.

  1. Why you need "fromBlock", "toBlock": When a contract, such as token.iost or token721.iost, manages a lot of tokens, there are so many events and receipts. Because of this, when you subscribe to these, it's too big and hard to handle the response coming over the network. You need to add the "fromBlock" and "toBlock" parameters to get a filtered data.

  2. Why you need a "tokenSymbol": Similar to the above, token.iost or token721.iost is a contract that manages several tokens. For example, when you need events from "rat" NFT in token721.iost, there is no way to get a filtered events only related to "rat" NFT.

# Request 2. Force the "transfer" event to occur in the "issue" and "transfer" functions of the token721.iost base contract. In the Ethereum ERC721 specification, the "Transfer" event is always triggered when the "issue" or "transfer" function is executed. This is very useful when creating a service, like NFT Market or NFT Wallet, that needs to show all the NFTs that the user has since tracking the NFT token's movement is possible.

nujabes403 avatar Dec 11 '19 18:12 nujabes403

@sswsdsn @mlj1991 @flybikeGx @ziranliu @lispc @lileicool1

nujabes403 avatar Dec 11 '19 18:12 nujabes403

For your reference: https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#getpastlogs

nujabes403 avatar Dec 12 '19 15:12 nujabes403