Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Blockchain Programming with Solidity

You're reading from  Mastering Blockchain Programming with Solidity

Product type Book
Published in Aug 2019
Publisher Packt
ISBN-13 9781839218262
Pages 486 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Jitendra Chittoda Jitendra Chittoda
Profile icon Jitendra Chittoda

Table of Contents (21) Chapters

Preface 1. Section 1: Getting Started with Blockchain, Ethereum, and Solidity
2. Introduction to Blockchain 3. Getting Started with Solidity 4. Control Structures and Contracts 5. Section 2: Deep Dive into Development Tools
6. Learning MetaMask and Remix 7. Using Ganache and the Truffle Framework 8. Taking Advantage of Code Quality Tools 9. Section 3: Mastering ERC Standards and Libraries
10. ERC20 Token Standard 11. ERC721 Non-Fungible Token Standard 12. Deep Dive into the OpenZeppelin Library 13. Using Multisig Wallets 14. Upgradable Contracts Using ZeppelinOS 15. Building Your Own Token 16. Section 4: Design Patterns and Best Practices
17. Solidity Design Patterns 18. Tips, Tricks, and Security Best Practices 19. Assessments 20. Other Books You May Enjoy

Life cycle patterns

A Solidity contract is created either by deploying a new contract or by creating from within a contract. Apart from these, a contract and its functions can follow a different life cycle. A Solidity contract can also be destroyed by calling the selfdestruct function. Once a contract is destroyed, it cannot be recreated on the same address. 

Similarly, using the timestamp's global variables and time units, contract states can also be moved. It is also possible to allow the contract functions to be called based on these timestamps. Let's look into the life cycle design patterns.

Mortal pattern

The mortal pattern allows a contract to be destroyed from the Ethereum blockchain. As you know...

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}