Understanding the Solidity syntax

For understanding the syntax, let's take a look at the Solidity file MetaCoin.sol. The following screenshot will act as a guide so that we understand every line of code:

As you can see, every Solidity file begins with the definition of the Solidity version that you are currently using. In this case, that would be 0.4.17. This is immediately followed by the importing of the conversion library (commonly known as ConvertLib.sol). This is shown the the code block as follows: 

pragma solidity ^0.4.17;library ConvertLib{ function convert(uint amount,uint conversionRate) public pure returns (uint convertedAmount) ...

Get Ethereum Projects for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.