Solidity – First Application

Solidity - First Application

This topic is about of Solidity – First Application.

We’re using Remix IDE to Compile and Run our Solidity Code base.

Step 1 − Copy the given code in Remix IDE Code Section.

Example

pragma solidity ^0.5.0;
contract SolidityTest {
   constructor() public{
   }
   function getResult() public view returns(uint){
      uint a = 1;
      uint b = 2;
      uint result = a + b;
      return result;
   }
}

Step 2 − Under Compile Tab, click Start to Compile button.

Step 3 − Under Run Tab, click Deploy button.

Step 4 − Under Run Tab, Select SolidityTest at 0x… in drop-down.

Step 5 − Click getResult Button to display the result.

Output

0: uint256: 3

In this topic we learned about Solidity – First Application. To learn more, Click Here.

This Post Has 27 Comments

Leave a Reply