[英]Get transaction history of a particular nft token
I want to retrieve all the transactions (for getting ownership history) of a given NFT(erc721) tokenId.我想检索给定 NFT(erc721) tokenId 的所有交易(用于获取所有权历史记录)。 How is it possible?
这怎么可能?
I managed to do this by filtering all the "transfer" events using getPastEvents
here .我设法通过在此处使用
getPastEvents
过滤所有“传输”事件来做到这一点。 The to
, from
and tokenId
are indexed on chain. to
, from
和tokenId
在链上被索引。 So we can apply those filters.所以我们可以应用这些过滤器。 Had to somehow take care of the infura limits by recursively calling the function.
必须通过递归调用函数来以某种方式处理 infura 限制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.