2020-02-10 19:27:58 +01:00
|
|
|
type storage is unit
|
|
|
|
type return is list (operation) * storage
|
|
|
|
|
|
|
|
function cb (const s : storage) : return is
|
2020-01-29 14:09:02 +01:00
|
|
|
block {
|
2020-01-21 02:24:16 -06:00
|
|
|
const c : contract(unit) = get_contract(sender)
|
2020-01-29 14:09:02 +01:00
|
|
|
}
|
2020-02-10 19:27:58 +01:00
|
|
|
with (list [transaction(unit, 0mutez, c)], s)
|
2020-01-29 14:09:02 +01:00
|
|
|
|
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function cbo (const s : unit) : return is
|
2020-01-29 14:09:02 +01:00
|
|
|
block {
|
2020-02-10 19:27:58 +01:00
|
|
|
const c : contract (unit) =
|
2020-01-21 02:24:16 -06:00
|
|
|
case (get_contract_opt(sender) : option(contract(unit))) of
|
2020-02-10 19:27:58 +01:00
|
|
|
Some (c) -> c
|
|
|
|
| None -> (failwith ("contract not found") : contract (unit))
|
2020-01-29 14:09:02 +01:00
|
|
|
end
|
|
|
|
}
|
2020-02-10 19:27:58 +01:00
|
|
|
with (list [transaction(unit, 0mutez, c)], s)
|