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
Solidity Programming Essentials

You're reading from  Solidity Programming Essentials

Product type Book
Published in Apr 2018
Publisher Packt
ISBN-13 9781788831383
Pages 222 pages
Edition 1st Edition
Languages

Table of Contents (17) Chapters

Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
1. Introduction to Blockchain, Ethereum, and Smart Contracts 2. Installing Ethereum and Solidity 3. Introducing Solidity 4. Global Variables and Functions 5. Expressions and Control Structures 6. Writing Smart Contracts 7. Functions, Modifiers, and Fallbacks 8. Exceptions, Events, and Logging 9. Truffle Basics and Unit Testing 10. Debugging Contracts 1. Other Books You May Enjoy Index

Ether


Ether is the currency of Ethereum. Every activity on Ethereum that modifies its state costs Ether as a fee, and miners who are successful in generating and writing a block in a chain are also rewarded Ether. Ether can easily be converted to dollars or other traditional currencies through cryptoexchanges.

Ethereum has a metric system of denominations used as units of Ether. The smallest denomination or base unit of Ether is called wei. The following is a list of the named denominations and their value in wei which is available at https://github.com/ethereum/web3.js/blob/0.15.0/lib/utils/utils.js#L40:

varunitMap={
   'wei' : '1'
   'kwei': '1000',
   'ada': '1000',
   'femtoether': '1000',
   'mwei': '1000000',
   'babbage': '1000000',
   'picoether': '1000000',
   'gwei': '1000000000',
   'shannon': '1000000000',
   'nanoether': '1000000000',
   'nano': '1000000000',
   'szabo': '1000000000000',
   'microether': '1000000000000',
   'micro': '1000000000000',
   'finney': '1000000000000000',
   'milliether': '1000000000000000',
   'milli': '1000000000000000',
   'ether': '1000000000000000000',
   'kether': '1000000000000000000000',
   'grand': '1000000000000000000000',
   'einstein': '1000000000000000000000',
   'mether': '1000000000000000000000000',
   'gether': '1000000000000000000000000000',
   'tether': '1000000000000000000000000000000'
};
You have been reading a chapter from
Solidity Programming Essentials
Published in: Apr 2018 Publisher: Packt ISBN-13: 9781788831383
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 €14.99/month. Cancel anytime}