First test work commit, don't touch
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/* Example from Solidity by Example
|
||||
http://solidity.readthedocs.io/en/develop/introduction-to-smart-contracts.html
|
||||
|
||||
The Solidity code:
|
||||
|
||||
contract SimpleStorage {
|
||||
uint storedData
|
||||
|
||||
function set(uint x) {
|
||||
storedData = x
|
||||
}
|
||||
|
||||
function get() constant returns (uint) {
|
||||
return storedData
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
contract SimpleStorage =
|
||||
|
||||
type event = int
|
||||
record state = { data : int }
|
||||
|
||||
function init(value : int) : state = { data = value }
|
||||
|
||||
function get() : int = state.data
|
||||
|
||||
function set(value : int) =
|
||||
put(state{data = value})
|
||||
Reference in New Issue
Block a user