How to transfer ERC20 tokens with Solidity?

jklepatch

ERC20 tokens allow you to create your own coin inside Ethereum.  They are used in many projects to represent financial assets, in-game assets, collectible, and other kind of assets.

At some point in your project, you will probably need to interact with them. And most often, you will need to transfer tokens.

There are 2 ways to do this:

  • with the `transfer()` function. That’s a simple transfer from A to B
  • with the `transferFrom()` function. That’s a delegated transfer, where an operator (or spender) transfer token from A to B on behalf of A

Watch this 10mins video and you will become a pro at this 🙂

To watch the whole tutorial series on Solidity, follow this link.

More great articles

Graph of memory locations in Solidity: storage, calldata, etc…

In Solidity smart contracts, there are 4 memory locations: storage memory stack calldata They all have different lifetimes and it's…

Read Story

Etherdelta smart contract walkthrough

In this article, I will walk you through the code of the Etherdelta smart contract: ERC20 token transfers, orders creation,…

Read Story

How I Got 2 jobs As A Blockchain Developer | Real story

There are a few other articles /videos that claim to explain how to get a job as a blockchain developer.…

Read Story

Never miss a minute

Get great content to your inbox every week. No spam.

    Only great content, we don’t share your email with third parties.
    Arrow-up