After developing a token Smart Contract that is compliant with the ERC20 standard https://github.com/ethereum/EIPs/issues/20 (is that the same as token API https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs ? ) and a escrow Smart Contract too, I want to use the escrow contract to manage tokens instead of Ether. I guess that is possible by implementing calls to the token contract inside the escrow contract, right?

So, I have two questions:

1.- Can I develop a universal escrow contract that accepts any kind of tokens, not just my own, using the token contract hardcoded address?

2.- If gas is out while executing the escrow and token contract has been called from escrow contract, would token transfers be rollback?

Thx for any hint about these topics.

References: Can I use my own coin in 3rd party contracts? How can I know if a token that I created is used in a smart contract? How can ERC20 token implementations be verified?

  • 4
    Right, Yes and Yes. Jan 26, 2017 at 13:35
  • 1
    Check out 0x for a token escrow example.
    – 0xcaff
    Aug 16, 2017 at 1:46
  • Do you have an example of the escrow contract?
    – sunwarr10r
    Mar 1, 2018 at 7:21

1 Answer 1


Right, it is possible to implement calls to tokens from an escrow contract.

1) You can make an escrow that will support any kind of token (as long as they implement the expected abi).

2) Yes, all evm state changes made by a transaction where the gas runs out are reverted.

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