Managing cycles in different projects and canisters

Are there ways to see how many cycles are in which projects and canisters?

I have always taken down the canister when I started a new project, this worked well and I always got my cycles back.

 dfx canister --network ic stop <canister id>
 dfx canister --network ic delete <canister id>

I did it everywhere but when i do

dfx wallet --network ic balance

I only see 3T cycles and i think i have lost some cycles somewhere. Where can I check this? Is there some list or command?

To see how much cycles are in a canister you can do dfx canister --network ic status <canister id>. You can do that for all the canisters you control.

The biggest drain on cycles at the beginning is probably the creation of new canisters: Just creating a canister costs 0.1T cycles, and dfx by default uses 4T cycles to create a canister (therefore the canister ends up with 3.9T cycles after creation). If you want to create canisters with less cycles, you can use the --with-cycles flag when creating the canisters.

1 Like

Thank you!

Where can I see all my canisters that are deployed?

There is no central registry of deployed canisters. But in your project (just next to dfx.json there should be a file called canister_ids.json that says which canister in your project is deployed under which canister id. You can also use something like icscan.io which will show some of the canisters your wallet created if you search for your wallet’s id. You can figure out your wallet id with dfx identity --network ic get-wallet.

1 Like

I appreciate the answer