Online IDE
https://remix.ethereum.org/
pragma solidity ^0.4.0; // like import library
contract unlvcontract{ // class name
string str="unlv contract";
//getting string
function getter() constant returns(string){
return str;
}
//setting test using
function setter(string newStr){
str=newStr;
}
}
The right side of online IDE
Using setter button, you can input data.
Getter button is to get the string in the contract.







No comments:
Post a Comment