Approve and transferFrom in the same tx

The fungible token needs an approve and call mechanism to support doing this in a single transaction. Otherwise users will require two transactions.

If you are developing the fungible token then I suggest having a look at ERC777 to see if this meets your needs. (I haven’t used ERC777 in anger yet, I have only deployed to a testnet). I have previously used other approve and call mechanisms and believe it is essential for a good user experience.

As part of OpenZeppelin 2.3 there is an implementation of ERC777, though as per the release notes for RC3 it has not been audited yet.

ERC777

The long awaited sequel to ERC20 is here. The EIP is almost finalized, and OpenZeppelin has an implementation of it. Please note that this code has not been audited yet . An audit will be performed soon, but for now we need you all to look at it and review it from top to bottom . The main source file is here at ERC777.sol :new::sparkles:. Anything you see, drop us a line in the forum or via email at security@openzeppelin.org. Letting us know that you’ve looked at it and found nothing is also valuable!

3 Likes