### Get XTC Balance with dfx Source: https://docs.cycleops.dev/docs/cycles-ledger Retrieve the current balance of XTC tokens. The response shows your total cycles balance. ```bash dfx canister --network=ic call --query aanaa-xaaaa-aaaah-aaeiq-cai balanceOf "(principal \"$(dfx identity get-principal)\")" ``` -------------------------------- ### Check New Dfinity Cycles Ledger Balance with dfx Source: https://docs.cycleops.dev/docs/cycles-ledger Query the cycles balance on the new Dfinity cycles ledger. This command is useful for confirming deposits and as a benchmark. ```bash dfx cycles balance --ic ``` -------------------------------- ### Check Legacy Cycles Wallet Balance with dfx Source: https://docs.cycleops.dev/docs/cycles-ledger Verify the current cycles balance in your legacy cycles wallet canister. This serves as a benchmark before and after transactions. ```bash dfx wallet balance --ic ``` -------------------------------- ### Verify Ownership of Cycle Ledger Principal Source: https://docs.cycleops.dev/docs/cycles-ledger After approving CycleOps to spend your cycles, use this command to verify CycleOps' ownership of the principal that has permission to spend your funds. Replace 'YOUR_CYCLEOPS_PRINCIPAL' with the actual principal provided. ```bash dfx canister --ic call qc4nb-ciaaa-aaaap-aawqa-cai verifyOwnershipOfCycleLedgerPrincipal '(record { cycleOpsCustomerPrincipal = principal "YOUR_CYCLEOPS_PRINCIPAL" })' ``` -------------------------------- ### Approve CycleOps to Spend Cycles with DFX Source: https://docs.cycleops.dev/docs/cycles-ledger Use this command to approve CycleOps to spend a specified amount of your cycles when using the DFX wallet. Ensure you have the latest version of DFX. ```bash dfx cycles approve qc4nb-ciaaa-aaaap-aawqa-cai 1_000_000_000_000 ``` -------------------------------- ### Transfer ICP to CycleOps Top-up Account using dfx Source: https://docs.cycleops.dev/docs/basics/topup-account Use this command to transfer ICP to your CycleOps top-up account from the command line. Ensure you replace `` with the desired ICP amount and `` with your actual top-up account address. ```bash dfx ledger transfer --amount --memo 0 ``` -------------------------------- ### Update Canister Reserved Cycles Limit with dfx Source: https://docs.cycleops.dev/docs/alerting/reserved-cycles-alerting Use this command to update the reserved cycles limit for a specific canister. Replace `` with the desired limit and `` with the canister's identifier. ```bash dfx canister --ic update-settings --reserved-cycles-limit ``` -------------------------------- ### Call Cycles Ledger Canister Directly for Approval Source: https://docs.cycleops.dev/docs/cycles-ledger If you don't have the latest DFX version, you can directly call the cycles ledger canister to grant approval. This method requires specifying arguments for the approval, including fee, amount, and spender details. ```bash dfx canister --ic call um5iw-rqaaa-aaaaq-qaaba-cai icrc2_approve This method requires arguments. Enter a value for ApproveArgs ✔ Enter optional field fee : opt nat? · yes ✔ Enter a nat · 100_000_000 ✔ Enter optional field memo : opt vec nat8? · no ✔ Enter optional field from_subaccount : opt vec nat8? · no ✔ Enter optional field created_at_time : opt nat64? · no Enter field amount : nat ✔ Enter a nat · 1_000_000_000_000 ✔ Enter optional field expected_allowance : opt nat? · no ✔ Enter optional field expires_at : opt nat64? · no Enter field spender : Account Enter a value for Account : record { owner : principal; subaccount : opt vec nat8 } Enter field owner : principal Auto-completions: accounts, accounts_staging, anonymous, cycleops, cycleops_aws_notification_poller, cycleops_staging, cycles_ledger, default, mock-client, nns-cycles-minting, nns-genesis-token, nns-governance, nns-ledger, nns-lifeline, nns-registry, nns-root, nns-sns-wasm, nnstest, topup_timer, transaction_history ✔ Enter a principal · qc4nb-ciaaa-aaaap-aawqa-cai ✔ Enter optional field subaccount : opt vec nat8? · no Sending the following argument: ( record { fee = opt (100_000_000 : nat); memo = null; from_subaccount = null; created_at_time = null; amount = 50_000_000_000_000 : nat; expected_allowance = null; expires_at = null; spender = record { owner = principal "qc4nb-ciaaa-aaaap-aawqa-cai"; subaccount = null; }; }, ) ``` -------------------------------- ### Burn XTC to Cycles in Legacy Wallet Source: https://docs.cycleops.dev/docs/cycles-ledger Burn XTC tokens and deposit the resulting cycles into your legacy cycles wallet canister. Ensure you have a wallet canister deployed using dfx. ```bash dfx canister --network=ic call aanaa-xaaaa-aaaah-aaeiq-cai burn "(record { canister_id= principal \"$(dfx identity get-wallet --ic)\"; amount= (1_000_000_000_000:nat64)})" ``` -------------------------------- ### Deposit Cycles to Dfinity Cycles Ledger Source: https://docs.cycleops.dev/docs/cycles-ledger Transfer cycles from your cycles wallet canister to the Dfinity cycles ledger. Update the amount to match your desired deposit. To deposit to a Plug wallet, replace the principal ID. ```bash dfx canister call --ic um5iw-rqaaa-aaaaq-qaaba-cai deposit "(record { to = record { owner = principal \"$(dfx identity get-principal)\" } })" --with-cycles 1_000_000_000_000 --wallet $(dfx identity get-wallet --ic) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.