Fail gracefully on higher-order state in AEVM and accept it in FATE

This commit is contained in:
Ulf Norell
2019-09-03 17:24:40 +02:00
parent 325d69e96d
commit 602e99512f
5 changed files with 26 additions and 5 deletions
@@ -0,0 +1,7 @@
contract HigherOrderState =
record state = {f : int => int}
entrypoint init() = {f = (x) => x}
entrypoint apply(n) = state.f(n)
stateful entrypoint inc() = put(state{ f = (x) => state.f(x + 1) })