Skip to Content
Mastering Blockchain Programming with Solidity
book

Mastering Blockchain Programming with Solidity

by Jitendra Chittoda
August 2019
Intermediate to advanced
486 pages
13h 52m
English
Packt Publishing
Content preview from Mastering Blockchain Programming with Solidity

Upgrading the contract

In the previous section, we looked at the StableToken contract code, which is prone to integer overflow attacks. Once the bug is identified for a production contract, you can upgrade the implementation contract and deploy it to fix the issue. 

ZeppelinOS manages the upgrading of the contract logic and storage structure seamlessly. Let's now use the following steps to fix the integer overflow issue present in the StableToken contract:

  1. Manage the version of the project so that it becomes easy to track the changes that were introduced and fixed in a specific version of the contract. For that, let's bump the project version:
$ npx zos bump v2

This command will bump the project version from v1 to v2 and update ...

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

Mastering Ethereum

Mastering Ethereum

Andreas M. Antonopoulos, Gavin Wood
Complete Cryptocurrency and Blockchain Course | Learn Solidity

Complete Cryptocurrency and Blockchain Course | Learn Solidity

Ravinder Deol, Codestars By Rob Percival, Thomas Wiesner

Publisher Resources

ISBN: 9781839218262Supplemental Content