deposit_cycles
This section is a work in progress.
Examples:
from kybra import Async, CallResult, match, Principal, update, Variant, void
from kybra.canisters.management import management_canister
class DefaultResult(Variant, total=False):
Ok: bool
Err: str
@update
def execute_deposit_cycles(canister_id: Principal) -> Async[DefaultResult]:
call_result: CallResult[void] = yield management_canister.deposit_cycles(
{"canister_id": canister_id}
).with_cycles(1_000_000)
return match(
call_result, {"Ok": lambda _: {"Ok": True}, "Err": lambda err: {"Err": err}}
)