sophia/test/contracts/counter.aes
2019-06-28 09:42:28 +02:00

10 lines
206 B
Plaintext

contract Counter =
record state = { value : int }
entrypoint init(val) = { value = val }
entrypoint get() = state.value
stateful entrypoint tick() = put(state{ value = state.value + 1 })