sophia/test/contracts/protected_call.aes

15 lines
330 B
Plaintext

contract interface 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)