[][src]Crate ic_cycles_account_manager

This module contains the CyclesAccountManager which is responsible for updating the cycles account of canisters.

A canister has an associated cycles balance, and may send a part of this cycles balance to another canister In addition to sending cycles to another canister, a canister spends cycles in the following three ways: a) executing messages, b) sending messages to other canisters, c) storing data over time/rounds Each of the above spending is done in three phases:

  1. reserving maximum cycles the operation can require
  2. executing the operation and return cycles_spent
  3. reimburse the canister with cycles_reserved - cycles_spent

Structs

CyclesAccountManager

Handles any operation related to cycles accounting, such as charging (due to using system resources) or refunding unused cycles.

Enums

CyclesAccountManagerError

Errors returned by the CyclesAccountManager.

IngressInductionCost

Encapsulates the payer and cost of inducting an ingress messages.

IngressInductionCostError

Errors returned when computing the cost of receiving an ingress.