The 2 ways to transfer ERC20 Tokens in Solidity

jklepatch

Julien Klepatch

Posted on October 19, 2019

The 2 ways to transfer ERC20 Tokens in Solidity

With ERC20 tokens, there are 2 APIs to transfer tokens:

  • transfer() (simple transfers)
  • transferFrom() (delegated transfer)

For transfer(), there are 3 steps:

  1. Import the ERC20 token
  2. Import the address of the token
  3. Call transfer()

For transfer(), there are 4 steps:

  1. Import the ERC20 token
  2. Import the address of the token
  3. Call approve()
  4. Call transferFrom()

WATCH Whole Solidity tutorial series:

💖 💪 🙅 🚩
jklepatch
Julien Klepatch

Posted on October 19, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related