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

Smart contract optimization

In Chapter 2, Grokking Ethereum, we discussed the concept of ether and gas (recall the buffet and car-fuel analogy). Smart contracts that are under-optimized consume more gas than necessary. The creator and user of such smart contracts will always be over-charged while deploying and running them on the blockchain. Xiapu Luo et al, a group of blockchain researchers from the Hong Kong Polytechnic University and UEST China, have identified seven such gas-costly programming patterns that belong to two categories, as illustrated in Figure 5.5. The first category, useless code pattern, introduces additional gas cost due to the increase in bytecode size during the deployment and the runtime removal of bytecode. The second ...

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