pragma solidity ^0.4.11;
contract Hello {
// a string variable
string public greeting;
// the function with the same name as the class is a constructor
function Hello(string _greeting) {
greeting = _greeting;
}
// change the greeting message
function setGreeting(string _greeting) {
greeting = _greeting;
}
// get the greeting message
function greet() constant returns (string _greeting) {
_greeting = greeting;
}
}
Click the Details button
Now we can deploy our smart contract to our private blockchain. Under the Run tab, make sure you have the right ethereum account selected, and then the right gas limit is specified. You can keep gas price and value as zero.
> personal.unlockAccount( "0x7a69b359e86893efa3d9732e4c65ced51567edd0","password")
Click "Create"
(that's the beginning of a Smart Contract being created)