I am controler of : 2lrqj-5qaaa-aaaal-qbibq-cai ( A cycle wallet created from nns interface)
and 2lrqj-5qaaa-aaaal-qbibq-cai is controller of 10 canister. (all create from its own user interface cycle wallet)
However, I lost the control of the 10 canister and I don’t know how to use 2lrqj-5qaaa-aaaal-qbibq-cai to get back the Tcycles.
Gemini or ChatGPT didn’t find a solution.
EDIT :
For an unknown reason, the T Cycles is quickly consuming automatically now since I made some tries… To preserve the remaining Cycle (that could be useful to unlock the children canister), I used :
dfx canister --network ic stop 2lrqj-5qaaa-aaaal-qbibq-cai
(and It works).
So I give you the interface when it’s up, it’s a Cycle Wallet :
passio@quentins-mini src % **dfx canister --network ic --wallet 2lrqj-5qaaa-aaaal-qbibq-cai status addr5-kyaaa-aaaal-qbkwa-cai**
Error: Failed to get canister status for 'addr5-kyaaa-aaaal-qbkwa-cai'.
Caused by: Failed to get canister status of addr5-kyaaa-aaaal-qbkwa-cai.
Caused by: Failed to call update function 'canister_status' regarding canister 'addr5-kyaaa-aaaal-qbkwa-cai'.
Caused by: Failed to construct wallet canister caller
Caused by: The replica returned a rejection error: reject code CanisterReject, reject message Only a controller or custodian can call this method., error code Some("IC0406")
passio@quentins-mini src % **dfx canister --network ic --wallet 2lrqj-5qaaa-aaaal-qbibq-cai stop addr5-kyaaa-aaaal-qbkwa-cai**
**Stopping code for canister addr5-kyaaa-aaaal-qbkwa-cai, with canister_id addr5-kyaaa-aaaal-qbkwa-cai**
Error: Failed to stop canister addr5-kyaaa-aaaal-qbkwa-cai.
Caused by: Failed to call update function 'stop_canister' regarding canister 'addr5-kyaaa-aaaal-qbkwa-cai'.
Caused by: Failed to construct wallet canister caller
Caused by: The replica returned a rejection error: reject code CanisterReject, reject message Only a controller or custodian can call this method., error code Some("IC0406")
Make your dfx principal controller of your wallet canister first.
Then try to get canister ids of all the canisters of which this wallet canister is a controller.
After this, you need to upgrade code of this wallet canister to a normal canister with endpoints so that you can update controllers of all those 10 canisters from which you want to retrieve cycles.
To do so, you can use IC management canister endpoints like update-settings and update controllers of all those canisters.
After this is done, you can use “dfx canister delete” command to delete all these 10 canisters and pass flag - - withdraw cycles to as well, to withdraw cycles to any single wallet canister.
Note : There can be other ways to do this as well, this is just one of those ways.
Hi and thanks but… Would you happen to have a more detailed tutorial, please? I don’t know what to do with your instructions. I ever spent 3 hours before with manual, trying all commands.
I believe I currently control my wallet canister with my DFX identity (since I’m able to start and stop it without issue).
Using the interface at canister_portefeuille.ic0.app, I can see the list of all canisters it controls — those are the ones I want to retrieve cycles from.
However, I’m unsure how to properly update the code of my wallet canister to turn it into a “regular” canister. An AI tool did recommend this approach, but I was afraid of making things worse, so I decided not to take the risk and instead came here to ask for help.
I haven’t developed on ICP for years, and even back then I was fairly new to DFX, working only on a small project.
So… I’m simply looking for guidance on how to safely update the code of my wallet canister — the right way.
Hi, I can’t use these methods… because my canisters are controlled by a wallet-canister (for which I am controler)… I am controller of the Wallet-Canister, but the wallet-canister have sub-canister for which I can’t be directly controller.
The --wallet <your-wallet-id> part of the call I wrote for you will use a feature called “call forwarding” to have the wallet canister make the call for you, since it is the controller. Try it!
I believe the issue is that your dfx principal is not a controller of the wallet. Try running dfx identity get-principal and adding that principal as a controller through the wallet web UI.
Unfortunately there is a bit of a terminology confusion here - the IC has a list of who is allowed to make canister management operations (e.g. stop and start), which it calls ‘controllers’, and the wallet has a separate list of who is allowed to call its protected functions (e.g. delete another canister), which is also called ‘controllers’. I suspect you are a controller from the IC’s perspective but not the wallet’s. The command I would have suggested trying is dfx wallet controllers, but it looks like you can’t run it against a wallet that isn’t set as your primary. So for now, go to the web UI of 2lrqj-5qaaa-aaaal-qbibq-cai, and add your dfx principal as its controller, even if the NNS says it’s already there.
Ah, my mistake. It looks like there isn’t a button in the web UI for that. In which case, what you can do is overwrite the wallet code, which will automatically add your dfx principal as a new controller. First uninstall the code with dfx canister uninstall-code, then set it up with dfx identity deploy-wallet. Then remember to add your II principal back as a controller with dfx wallet add-controller. I recommend using an older version of dfx when you install the wallet, there’s a known issue with the wallet canister in new dfx versions which will cause the web UI to stop working.
I have been able to delete and transfer cycle for 2 canister. they are They are detected as non-existent
Thank you, I surrend here. Thanks for your help. Anyone who want to try to get back cycle can give me a principal. I think there is about 20-25T cycle remaining.