I need to suscribe to Transfer events of couple of different ERC20s in order to catch transfers to my contract. And here is the question: to catch all those events I need to create instance of each contract, can I do this using standard ERC20 abi for each of this contract or it has to be abi dedicated to exact erc20 smart contract?

2 Answers 2


Yes, you can use the ABI of a standard ERC20, this should work well as long as the tokens really follow the standard, which is true in most cases.


If you're interested only in the standard ERC20 Transfer events, then even a subset of the ABI is sufficient. For example, if you implement it in Javascript, then you can simply use this:

const ABI =
        "anonymous": false,
            {"indexed": true , "name": "from" , "type": "address"},
            {"indexed": true , "name": "to"   , "type": "address"},
            {"indexed": false, "name": "value", "type": "uint256"}
        "name": "Transfer",
        "type": "event"

const contract = new web3.eth.Contract(ABI, address);
contract.getPastEvents("Transfer", {fromBlock: ..., toBlock: ...}).then(events => {
    for (const event of events) {

You can also choose freely the input parameter names, i.e., replace from, to and value above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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