Open peterpeterparker opened 6 months ago
This looks like it would be a nice ergonomic improvement.
With creating canisters this is separated into two methods:
createCanister()
for simply creating the canister.setupCanister()
for creating the canister, installing code and creating the actor.I think a similar separation here would be good. I'll need to think about how to name these methods better. In any case I won't have time to look at this until next week, but I'll report back once it's done.
Thanks for the suggestion!
Definitely no rush from my side and only a suggestion, everything works already smoothly!
Feature request
It would be nice to be able to provide an
ActorInterface
to theupgradeCanister
function, similar tosetupCanister
, and receive an updated actor as a result.This can notably be useful if the candid declaration changes between version and one want to test an upgrade.
Currently, this can be solved by creating a new actor once the upgrade has been processed. Such a feature would spare few lines of code.
From:
To: