0

Let's suppose there is a contract address A of an erc721 token B. If I want to monitor all of its transfers from A to another address say C then should I only filter the Transfer function or should I also monitor safeTransferFrom and transferFrom here. If yes then is there any other event apart from these three that I should be monitoring? And if no then why?

If the same scenario is considered for an erc20 contract then which functions should be monitored just Transfer or transferFrom as well?

0

On ERC20, all these functions emit the exact same event:

event Transfer(address indexed _from, address indexed _to, uint256 _value);

On ERC721, all these functions emit the exact same event:

event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
| improve this answer | |
  • So you mean just monitoring the transfer event is enough? – mahamzaidi Jul 8 at 12:18
  • @mahamzaidi: Yes. You wrote things like "which events should be monitored just Transfer or transferFrom as well?", while there is no such event transferFrom. It's a function. – goodvibration Jul 8 at 12:19
  • Sorry, I just edited the description. – mahamzaidi Jul 8 at 12:24
  • @mahamzaidi: There is no function Transfer. There is function transfer and event Transfer. And in either case, you don't "monitor functions", you monitor events. – goodvibration Jul 8 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.