Adding solidity example file
This commit is contained in:
parent
666c07c7be
commit
1372a565e2
|
@ -0,0 +1,19 @@
|
|||
pragma solidity ^0.4.0;
|
||||
|
||||
contract Greeting {
|
||||
address creator;
|
||||
string message;
|
||||
|
||||
function Greeting(string _message) {
|
||||
message = _message;
|
||||
creator = msg.sender;
|
||||
}
|
||||
|
||||
function greet() constant returns (string) {
|
||||
return message;
|
||||
}
|
||||
|
||||
function setGreeting(string _message) {
|
||||
message = _message;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue