2020-02-10 19:27:58 +01:00
|
|
|
type storage is unit
|
|
|
|
type return is list (operation) * storage
|
|
|
|
|
2020-02-27 19:09:14 +01:00
|
|
|
function cb (const s : storage) : return is block {
|
2020-03-04 15:23:51 +01:00
|
|
|
const c : contract (unit) = get_contract (Tezos.sender)
|
2020-02-27 19:09:14 +01:00
|
|
|
} with (list [Tezos.transaction (unit, 0tez, 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-02-27 19:09:14 +01:00
|
|
|
case (Tezos.get_contract_opt (Tezos.sender) : option (contract (unit))) of
|
|
|
|
Some (contract) -> contract
|
2020-02-10 19:27:58 +01:00
|
|
|
| None -> (failwith ("contract not found") : contract (unit))
|
2020-01-29 14:09:02 +01:00
|
|
|
end
|
2020-02-27 19:09:14 +01:00
|
|
|
} with (list [Tezos.transaction (unit, 0tez, c)], s)
|