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

Solidity version with pragma

Each Solidity contract/library source file should have the version of Solidity compiler specified. The version of the compiler should be specified first thing in the source file. The following is an example of how to specify the Solidity version:

pragma solidity ^0.4.4;

If a source file is of this version, it means the file will compile with 0.4.4 and higher versions in the 0.4.x branch, up to version 0.5.0 where 0.5.0 is not included.

It is recommended that the Solidity version should be locked and specified without the ^ (caret) sign, as follows:

pragma solidity 0.4.4;

This ensures that the specific compiler version will always be used, using which code is tested most. It also prevents the code from exhibiting ...

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