Unmutable canister

If I use a canister to host a smart contract, how is the canister “locked” so that the developer cannot change the contract? How would cycles be handled?

1 Like

Remove any owners using the IC management canister. The Internet Computer Interface Specification :: Internet Computer

await (IC.update_settings( {
       canister_id = cid.canister_id; 
       settings = { 
         controllers = ?[];
         compute_allocation = null;
         freezing_threshold = ?31_540_000} })
    );
  };

Automatic cycle top up is not yet available(I’m interested in that as well) but for now you can expose a query function that will return the existing balance and top up via command line.

1 Like

Thank you Gabriel. I discover more and more, but there is a lot …

Instead of removing yourself from the controller, I suggest you consider using this:

3 Likes

hah, nice, wasn’t aware this is out.