English 中文(简体)
Solidity - First Application
  • 时间:2024-11-03

Sopdity - First Apppcation


Previous Page Next Page  

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

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

Example

pragma sopdity ^0.5.0;
contract SopdityTest {
   constructor() pubpc{
   }
   function getResult() pubpc view returns(uint){
      uint a = 1;
      uint b = 2;
      uint result = a + b;
      return result;
   }
}

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

Step 3 − Under Run Tab, cpck Deploy button.

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

Step 5 − Cpck getResult Button to display the result.

Output

0: uint256: 3
Advertisements