3

I want to retrieve all the transactions (for getting ownership history) of a given NFT(erc721) tokenId. How is it possible?

TylerH
  • 20,799
  • 66
  • 75
  • 101
rahulserver
  • 10,411
  • 24
  • 90
  • 164

1 Answers1

0

I managed to do this by filtering all the "transfer" events using getPastEvents here. The to, from and tokenId are indexed on chain. So we can apply those filters. Had to somehow take care of the infura limits by recursively calling the function.

rahulserver
  • 10,411
  • 24
  • 90
  • 164