Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Ethereum Projects for Beginners

You're reading from  Ethereum Projects for Beginners

Product type Book
Published in Jul 2018
Publisher Packt
ISBN-13 9781789537406
Pages 106 pages
Edition 1st Edition
Languages

Deploying and testing ERC20 tokens


In this section, we will have a look at how we can deploy and test our ERC20 token, or cryptocurrency. We will have a look at some of the pitfalls and security concerns that you may encounter when you are transferring tokens, and we will look at the Solidity and JavaScript that will be required to transfer those tokens. We will also be testing them out using Ganache and MetaMask.

 

Deploying ERC20 tokens

First of all, we need some data to enter into the editor. In the MetaCoin.sol, we need to define a name, a symbol, the number of decimal places, and INITIAL_SUPPLY. We will also assign our INITIAL_SUPPLY to the totalSupply in the constructor. We will also give the creator of the token theINITIAL_SUPPLY.

We know that we need totalSupply because if you go to StandardToken, found under node modules | zeppelin-solidity | contracts | token | ERC20 | StandardToken, then you can see that this imports ERC20 and BasicToken. Now, if we go to the ERC20 folder, we can...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}