O'Reilly logo

Ethereum Smart Contract Development by Mayukh Mukhopadhyay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required