sophia/test/contracts/remote_gas_test.aes
2018-12-22 01:23:40 +01:00

21 lines
368 B
Plaintext

contract Remote1 =
function set : (int) => int
contract RemoteCall =
record state = { i : int }
function init(x) = { i = x }
function set( x : int) : int =
let old = state.i
put(state{ i = x })
old
function call(r : Remote1, x : int, g : int) : int =
r.set(gas = g, value = 10, x)
function get() = state.i