ligo/src/test/contracts/get_contract.ligo

17 lines
498 B
Plaintext
Raw Normal View History

2020-01-29 14:09:02 +01:00
function cb(const s : unit) : list(operation) * unit is
block {
const c : contract(unit) = get_contract(source)
}
with (list transaction(unit, 0mutez, c) end, s)
function cbo(const s : unit) : list(operation) * unit is
block {
const c : contract(unit) =
case (get_contract_opt(source) : option(contract (unit))) of
| Some (c) -> c
| None -> (failwith ("contract not found") : contract (unit))
end
}
with (list transaction(unit, 0mutez, c) end, s)