Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Blockchain By Example

You're reading from  Blockchain By Example

Product type Book
Published in Nov 2018
Publisher Packt
ISBN-13 9781788475686
Pages 528 pages
Edition 1st Edition
Languages
Concepts
Authors (3):
Bellaj Badr Bellaj Badr
Profile icon Bellaj Badr
Richard Horrocks Richard Horrocks
Profile icon Richard Horrocks
Xun (Brian) Wu Xun (Brian) Wu
Profile icon Xun (Brian) Wu
View More author details

Table of Contents (13) Chapters

Preface Say Hello to Blockchain Building a Bitcoin Payment System Building Your Own Cryptocurrency Peer-to-Peer Auctions in Ethereum Tontine Game with Truffle and Drizzle Blockchain-Based Futures System Blockchains in Business Creating an ICO Distributed Storage IPFS and Swarm Supply Chain on Hyperledger Letter of Credit (LC) Hyperledger Other Books You May Enjoy

What is an ICO?

During an ICO on Ethereum, participants send ether to a special smart contract, and, in return, receive tokens of equal value, depending on the price of the token set at the start of the sale.

In Ethereum, a token is just a balance itself just a number stored in a smart contract and associated with an owner's wallet address. A minimal implementation of a token would therefore only require a way to store how many tokens a given address owns. In Solidity, this can be achieved simply by using a mapping:

mapping (address => uint256) balances;

It's important to note that a token isn't something that resides in a user's wallet, nor is it something that can be moved around. When a user sees a token in their wallet, the wallet software is really making a call into the token contract and reading the balance associated with its address...

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}