Skip to Content
Ethereum Smart Contract Development
book

Ethereum Smart Contract Development

by Mayukh Mukhopadhyay
February 2018
Intermediate to advanced
288 pages
6h 58m
English
Packt Publishing
Content preview from Ethereum Smart Contract Development

TwtAccount.sol

This solidity file models a single Twitter account on a blockchain. Figure 9.3 summarizes the important functions present in this tweeter account contract:

Figure 9.3: TwtAccount contract summary

Now, let us understand explicitly what each function in this smart contract does. Figure 9.4 denotes the start of the account contract where TwtAccount() is a constructor function. Tweet denotes the data structure of a single tweet. The mapping denotes an array of all tweets to a particular tweet, account, which helps in retrieving each tweet by their tweetID. The other two variables denote the owner of the account and the total count ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Games with Ethereum Smart Contracts: Intermediate Projects for Solidity Developers

Building Games with Ethereum Smart Contracts: Intermediate Projects for Solidity Developers

Kedar Iyer, Chris Dannen

Publisher Resources

ISBN: 9781788473040Supplemental Content