Upgrading SNS canisters

We would like to upgrade the SNS canisters and we came with this script, it would be great if we can get a second opinion on this. @lara @bjoernek @domwoe

OWNER_IDENTITY=$(dfx identity whoami)
PEM_FILE=“$(readlink -f “$HOME/.config/dfx/identity/${OWNER_IDENTITY}/identity.pem”)”

quill sns
–canister-ids-file ./sns_canister_ids.json
–pem-file “${PEM_FILE}”
–proposal “(record {
title="Upgrade SNS-1 to latest version";
summary="upgrade mfs";
action=opt variant { UpgradeSnsToNextVersion })”

inside canisters.ids.json we have the following

“governance_canister_id”: “zqfso-syaaa-aaaaq-aaafq-cai”,
“index_canister_id”: “zlaol-iaaaa-aaaaq-aaaha-cai”,
“ledger_canister_id”: “zfcdd-tqaaa-aaaaq-aaaga-cai”,
“root_canister_id”: “zxeu2-7aaaa-aaaaq-aaafa-cai”,
“swap_canister_id”: “zcdfx-6iaaa-aaaaq-aaagq-cai”,
“sns_governance”: {
“ic”: “zqfso-syaaa-aaaaq-aaafq-cai”
“sns_index”: {
“ic”: “zlaol-iaaaa-aaaaq-aaaha-cai”
“sns_ledger”: {
“ic”: “zfcdd-tqaaa-aaaaq-aaaga-cai”
“sns_root”: {
“ic”: “zxeu2-7aaaa-aaaaq-aaafa-cai”
“sns_swap”: {
“ic”: “zcdfx-6iaaa-aaaaq-aaagq-cai”

Does this looks right? Also do we need to run this multiple times until we get the last version?


It looks close to right, though I can’t find a good example of using quill to submit the proposal.

Try adjusting the action to be the following.

 action = opt variant {
            UpgradeSnsToNextVersion = record {}

It should be safe to try submitting the proposal, as it will be rejected if it’s malformed.

To answer your other question, yes, you just need to submit and execute them until the SNS is up to date.


We were using the iclight.io proposal generator but it only seemed to do one canister at a time. Anyway we’ll give this a shot tomorrow, thanks!

1 Like

Yes, currently the upgrade path is limited to one canister at a time. That will likely change in the future so that upgrades are easier to manage for SNSes.