sophia/test/contracts/protected_call.aes
2020-03-02 12:08:41 +01:00

15 lines
320 B
Plaintext

contract Remote =
entrypoint id : int => int
contract ProtectedCall =
function higher_order(r : Remote) =
r.id
entrypoint test_ok(r : Remote) =
let f = higher_order(r)
let Some(n) = r.id(protected = true, 10)
let Some(m) = f(protected = true, 5)
n + m + r.id(protected = false, 100) + f(1)