ligo/src/test/contracts/entrypoints.ligo

17 lines
547 B
Plaintext
Raw Normal View History

2019-11-09 01:27:30 -06:00
function cb(const a : address; const s : unit) : list(operation) * unit is
block {
const c : contract(unit) = get_entrypoint("%cb", a)
}
2019-11-09 01:27:30 -06:00
with (list transaction(unit, 0mutez, c) end, s)
function cbo(const a : address; const s : unit) : list(operation) * unit is
block {
const c : contract(unit) =
case (get_entrypoint_opt("%cbo", a) : option(contract (unit))) of
| Some (c) -> c
| None -> (failwith ("entrypoint not found") : contract (unit))
end
}
with (list transaction(unit, 0mutez, c) end, s)