# Upgrading SNS canisters

**URL:** <https://forum.dfinity.org/t/upgrading-sns-canisters/23293>\
**Category:** Developers\
**Tags:** sns\
**Created:** [September 24, 2023, 9:13am UTC](https://forum.dfinity.org/t/upgrading-sns-canisters/23293 "2023-09-24T09:13:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gabriel/32/546_2.png) [@Gabriel](https://forum.dfinity.org/u/Gabriel)\
**Post date:** [September 24, 2023, 9:13am UTC](https://forum.dfinity.org/t/upgrading-sns-canisters/23293/1 "2023-09-24T09:13:42Z")

</div>

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”)”  
> DEVELOPER\_NEURON\_ID=“12345”

> quill sns   
> –canister-ids-file ./sns\_canister\_ids.json   
> –pem-file “${PEM\_FILE}”   
> make-proposal   
> –proposal “(record {   
> title="Upgrade SNS-1 to latest version";   
> url="[https://dragginz.io](https://dragginz.io)";   
> summary="upgrade mfs";   
> action=opt variant { UpgradeSnsToNextVersion })”   
> “${DEVELOPER\_NEURON\_ID}” \   
> msg.json

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?

---

<div class="post-metadata">

**Author:** ![msumme](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/msumme/32/8646_2.png) [@msumme](https://forum.dfinity.org/u/msumme)\
**Post date:** [September 25, 2023, 6:50pm UTC](https://forum.dfinity.org/t/upgrading-sns-canisters/23293/2 "2023-09-25T18:50:52Z")

</div>

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.

```auto
 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.

---

<div class="post-metadata">

**Author:** ![anon98822045](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@anon98822045](https://forum.dfinity.org/u/anon98822045)\
**Post date:** [September 25, 2023, 6:53pm UTC](https://forum.dfinity.org/t/upgrading-sns-canisters/23293/3 "2023-09-25T18:53:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![msumme](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/msumme/32/8646_2.png) [@msumme](https://forum.dfinity.org/u/msumme)\
**Post date:** [September 25, 2023, 6:54pm UTC](https://forum.dfinity.org/t/upgrading-sns-canisters/23293/4 "2023-09-25T18:54:28Z")

</div>

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.
