0

I am currently writing a code that list all types of transactions in a given contract . my plan is to just check for all logs whether the topics[0] == an event signature of a function. and now i am missing the even signature of transferfrom. does anyone know the exact event signature of that so i can do the keccak hash of it that would be put in the topics[0]?

1

Calling transferFrom triggers a Transfer event. If you use open zeppelin then it also triggers an Approval event. There is not a tranferFrom event in the ERC20 standard.

Hope this helps.

0

There you go:

const Web3 = require("web3");
const signature = Web3.utils.keccak256("Transfer(address,address,uint256)");

Tested with web3 v1.0.0-beta.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.