Skip to content

Commit

Permalink
fix: cycles_balance => cycle_balance (#4886)
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk authored Feb 6, 2025
1 parent 03bd995 commit c213f00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/references/ic-interface-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ There must be at most one call to `ic0.call_on_cleanup` between `ic0.call_new` a

The amount of cycles it moves is represented by a 128-bit value which can be obtained by combining the `amount_high` and `amount_low` parameters.

The cycles are deducted from the balance as shown by `ic0.canister_cycles_balance128` immediately, and moved back if the call cannot be performed (e.g. if `ic0.call_perform` signals an error, if the canister invokes `ic0.call_new`, or returns without calling `ic0.call_perform`).
The cycles are deducted from the balance as shown by `ic0.canister_cycle_balance128` immediately, and moved back if the call cannot be performed (e.g. if `ic0.call_perform` signals an error, if the canister invokes `ic0.call_new`, or returns without calling `ic0.call_perform`).

This system call may be called multiple times between `ic0.call_new` and `ic0.call_perform`.

Expand Down Expand Up @@ -1779,7 +1779,7 @@ This specification currently does not go into details about which actions cost h

:::note

This call traps if the current balance does not fit into a 64-bit value. Canisters that need to deal with larger cycles balances should use `ic0.canister_cycles_balance128` instead.
This call traps if the current balance does not fit into a 64-bit value. Canisters that need to deal with larger cycles balances should use `ic0.canister_cycle_balance128` instead.

:::

Expand Down Expand Up @@ -7247,7 +7247,7 @@ ic0.canister_cycle_balance<es>() : i64 =
return es.balance

I ∈ {i32, i64}
ic0.canister_cycles_balance128<es>(dst : I) =
ic0.canister_cycle_balance128<es>(dst : I) =
if es.context = s then Trap {cycles_used = es.cycles_used;}
let amount = es.balance
copy_cycles_to_canister<es>(dst, amount.to_little_endian_bytes())
Expand Down

0 comments on commit c213f00

Please sign in to comment.