Remix IDE is a full featured Solidity smart contract IDE (Integrated Development Environment). It can be used to:
pragma solidity ^0.4.0;
contract FirstContract {
string storedName;
function set(string x) public {
storedName = x;
}
function get() public constant returns (string) {
return storedName;
}
}
The smart contract is very simple, it lets user to save and retrieve any string (set of characters).
4.Compile
Click on the Compile on top to open Compiling tab, and then click on Start to compile.
If you see the name of your contract in a green it means that everything went well.
ganache-cliIn Remix IDE go to a Run tab
Make sure to select the Web3 provider as an environment.
Now you can click on the Create button. You should be able to see two things:
Successful debug message
Interactive tab with two buttons to work with your contract:
The debug console should display updated information about transaction.
Now to test if it worked click on the 'get' button. You should see the following:
https://remix.readthedocs.io/en/latest/