15 lines
320 B
Plaintext
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)
|
|
|