# \[Proposal #49\] Upgrade Smart Wallet to support NFTs

**URL:** <https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461>\
**Category:** CoreEval\
**Created:** [September 9, 2023, 6:19pm UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461 "2023-09-09T18:19:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dckc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.agoric.com/dckc/32/46_2.png) [@dckc](https://community.agoric.com/u/dckc)\
**Post date:** [September 9, 2023, 6:19pm UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461/1 "2023-09-09T18:19:25Z")

</div>

The Agoric chain is preparing for the launch of the first mainnet 2 application - the Kread dapp written by [Kryha](https://kryha.io/). The Kread character builder contract manages the minting and sale of composable NFTs that let users equip and unequip items to their character. Kread includes new artwork and an associated story, and can be extended to support multiple NFT projects.

This proposal is to upgrade walletFactory, the smart wallet contract, to support NFTs in preparation for that launch.

Agoric OpCo Engineering is pleased to announce:

- [Release agoric-upgrade-11wf-rc0 · Agoric/agoric-sdk](https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-11wf-rc0) [e669bb1](https://github.com/Agoric/agoric-sdk/commit/e669bb12f560d84f7fc017abda49d3dd6d5cee17)
  - upgraded walletFactory contract bundle: [e229e4bb6c8720016d92116e3dccaebec20a43699d5547a1c815f8710985ba897e825cbe4cd5b80c1d9d674f086bcaf3981b82a0d5546a095542c14174d5f942](https://github.com/Agoric/agoric-sdk/releases/download/agoric-upgrade-11wf-rc0/b1-e229e4bb6c8720016d92116e3dccaebec20a43699d5547a1c815f8710985ba897e825cbe4cd5b80c1d9d674f086bcaf3981b82a0d5546a095542c14174d5f942.json)

We invite the community to consider deploying the contract upgrade by way of a core-eval proposal.

## Background

The [mainnet-1 proposal](https://community.agoric.com/t/proposal-launch-inter-protocol-mvp-and-hardened-javascript-vm/43) included “an x/vbank Cosmos SDK module to reflect BLD, IST, and interchain assets as ERTP assets, as well as a smart wallet contract to execute Cosmos transactions containing Zoe offers.”

The initial version of the smart wallet contract supported fungible tokens for PSM and Vaults, specifically assets reflected through x/vbank. This upgrade adds [support for arbitrary well-known ERTP assets (#8156)](https://github.com/Agoric/agoric-sdk/issues/8156), including NFTs, as required by [several dapps in development](https://agoric.com/blog/announcements/announcing-5-dapps-to-launch-on-agoric-mainnet).

The core-eval mechanism was used to [add DAI PSM support](https://community.agoric.com/t/add-axelar-dai-to-parity-stability-module/102) in proposal #17 of Dec 2, 2022, to make a new instance of the PSM contract installation for DAI. This proposal upgrades the smart-wallet to code from a new contract bundle. Agoric will upload the new contract bundle, which can be verified as described in the [agoric-upgrade-11wf-rc0 release notes](https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-11wf-rc0).

### Recommended Testnet Milestones

By running long-lived testnets and using that environment to evaluate software before promoting it to mainnet, validators play a vital role in maintaining a healthy, robust network for the Agoric community. Qualifying or certifying any new software release as production ready requires significant testing, and Agoric core developers recommend that the community evaluate the following milestones leading up to launching an on-chain governance proposal on the agoric-3 mainnet.

Note that unlike a chain software upgrade, testing does not require operating a validator node.

0️⃣ – Choose a **testnet coordinator** to kick off the Emerynet upgrade. Traditionally, the testnet coordinator submits the on-chain proposal for mainnet software upgrade.

- Note: emerynet currently has a 2hr voting period.

1️⃣ – The coordinator should make an **on-chain proposal** to upgrade the walletFactory contract. (_more details to follow_)

- Also make an on-chain core-eval proposal to upgrade the walletFactory contract.
  - The bundles will be installed on chain by Agoric OpCo

- Agoric Engineering will also make an on-chain core-eval proposal to start an NFT testing contract.

2️⃣ – Node operators **monitor the execution** of the proposals once they pass.  
3️⃣ – **Test** the new NFT trading functionality as well as existing Inter Protocol functionality and standard cosmos features.  
4️⃣ – Keep the community **updated** on testnet progress by posting updates to this thread or sharing details about this release in Discord or Twitter so that the entire community can follow progress towards launch.  
5️⃣ –Coordinate with your fellow validators to determine if this **release is ready** to be promoted to mainnet and, when ready, the Testnet Coordinator should notify the OpCo team that they’d like the pre-release tag removed.

6️⃣– Testnet Lead or another community member: create a **mainnet proposal** ; if needed, seek support from the community for the deposit.

---

<div class="post-metadata">

**Author:** ![dckc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.agoric.com/dckc/32/46_2.png) [@dckc](https://community.agoric.com/u/dckc)\
**Post date:** [September 9, 2023, 6:26pm UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461/2 "2023-09-09T18:26:33Z")

</div>

## Creating an On Chain Core Eval proposal

The key files from [the release](https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-11wf-rc0) required for the on-chain proposal are:

- [upgrade-walletFactory-permit.json](https://github.com/Agoric/agoric-sdk/releases/download/agoric-upgrade-11wf-rc0/upgrade-walletFactory-permit.json)
- [upgrade-walletFactory.js](https://github.com/Agoric/agoric-sdk/releases/download/agoric-upgrade-11wf-rc0/upgrade-walletFactory.js)

```auto
CHAIN=agoric-emerynet-8
ACCOUNT=...
agd tx gov submit-proposal \
  swingset-core-eval ./upgrade-walletFactory-permit.json ./upgrade-walletFactory.js \
  --title="Upgrade Smart Wallet to support NFTs" \
  --description="See also [Upgrade Smart Wallet to support NFTs](https://community.agoric.com/t/upgrade-smart-wallet-to-support-nfts/461) discussion" \
  --from=$ACCOUNT \
  --deposit=10000000ubld \
  --gas=auto --gas-adjustment=1.2 \
  --chain-id=$CHAIN --yes -b block -o json

```

By way of example, see the recent devnet proposal [#7 Upgrade WalletFactory for NFTs etc.](https://devnet.explorer.agoric.net/agoric/gov/7) in **agoricdev-20**.

---

<div class="post-metadata">

**Author:** ![dckc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.agoric.com/dckc/32/46_2.png) [@dckc](https://community.agoric.com/u/dckc)\
**Post date:** [September 12, 2023, 2:42am UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461/3 "2023-09-12T02:42:40Z")

</div>

## Bundles are installed on emerynet

[upgrade-walletFactory.js](https://github.com/Agoric/agoric-sdk/releases/download/agoric-upgrade-11wf-rc0/upgrade-walletFactory.js) depends on the contract bundle as well as a supplementary bundle. I just installed them on emerynet using `agd tx swingset install-bundle` to make the following transactions:

- [supplementary 484K bundle install tx 2E36](https://emerynet.explorer.agoric.net/agoric/tx/2E36709915D2B6356FF589969C113ABF9EA5C587BDD5E934EB0E93A9C1876307)… 2023-09-11 21:29 height [1464617](https://emerynet.explorer.agoric.net/agoric/blocks/1464617)
- [1.2M contract bundle install tx 6B20](https://emerynet.explorer.agoric.net/agoric/tx/6B208D042FEB4CFDB1D89903A50A045F1D7963947423181B5773EAF6C3E3CE25)… 2023-09-11 21:29 height [1464618](https://emerynet.explorer.agoric.net/agoric/blocks/1464618)

---

<div class="post-metadata">

**Author:** ![kennyrowe](https://sea1.discourse-cdn.com/flex019/user_avatar/community.agoric.com/kennyrowe/32/19_2.png) [@kennyrowe](https://community.agoric.com/u/kennyrowe)\
**Post date:** [September 12, 2023, 3:25am UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461/4 "2023-09-12T03:25:41Z")

</div>

This looks pretty interesting. Could we take a look at the code this Wednesday’s office hours?

---

<div class="post-metadata">

**Author:** ![dckc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.agoric.com/dckc/32/46_2.png) [@dckc](https://community.agoric.com/u/dckc)\
**Post date:** [September 12, 2023, 3:31am UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461/5 "2023-09-12T03:31:44Z")

</div>

absolutely.

For reference: [Agoric Dev Office Hours](https://github.com/Agoric/agoric-sdk/wiki/Office-Hours) are 9amET Wednesdays.  
Venue: [Zoom room 87343330101](https://agoric.zoom.us/j/87343330101?pwd=M0dhMmdyZ0JOSXNkeTc3ZzRFcGYyZz09) Passcode: `47695358`

---

<div class="post-metadata">

**Author:** ![dckc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.agoric.com/dckc/32/46_2.png) [@dckc](https://community.agoric.com/u/dckc)\
**Post date:** [September 12, 2023, 3:33am UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461/6 "2023-09-12T03:33:30Z")

</div>

And speaking of interesting…

- [Road to Mainnet: Kryha Brings JavaScript NFTs to Agoric](https://agoric.com/blog/guest-post/road-to-mainnet-kryha-brings-javascript-nfts-to-agoric)

---

<div class="post-metadata">

**Author:** ![dckc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.agoric.com/dckc/32/46_2.png) [@dckc](https://community.agoric.com/u/dckc)\
**Post date:** [September 18, 2023, 7:09pm UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461/7 "2023-09-18T19:09:18Z")

</div>

Steps 1, 2, 3, 4, and 5 are complete:

1. [emerynet proposal 11](https://emerynet.explorer.agoric.net/agoric/gov/11) was 12 Sep
2. The proposal passed and was carried out in **[block 1474432](https://emerynet.explorer.agoric.net/agoric/blocks/1474432)**
3. Testing of the new NFT functionality went well and testing existing functionality (PSM, Vaults, …) over a few days showed no issue.
4. Note updates above as well as this one.
5. The release is ready. The non -rc tag is [agoric-upgrade-11wf](https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-11wf) with the same git hash, `e669bb12f560d84f7fc017abda49d3dd6d5cee17`

---

<div class="post-metadata">

**Author:** ![JD-Agoric](https://sea1.discourse-cdn.com/flex019/user_avatar/community.agoric.com/jd-agoric/32/113_2.png) [@JD-Agoric](https://community.agoric.com/u/JD-Agoric)\
**Post date:** [September 18, 2023, 8:51pm UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461/8 "2023-09-18T20:51:19Z")

</div>

Update:  
Following a successful testing period on Emerynet the CoreEval proposal to upgrade the Agoric Smart Wallet is now live in the voting period on mainnet!  
All BLD stakers are encouraged to vote 🗳

> **[Proposal Details](https://bigdipper.live/agoric/proposals/49)**
>
> Big Dipper is an open-source block explorer and token management tool serving over 10 proof-of-stake blockchains. It has been forked more than 100 times on GitHub and has served audiences from 140 countries and regions.

Note for validators: CoreEval proposals do not require node operators to perform a chain upgrade. Only governance participation is required for a contract update to take place.

---

<div class="post-metadata">

**Author:** ![dckc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.agoric.com/dckc/32/46_2.png) [@dckc](https://community.agoric.com/u/dckc)\
**Post date:** [September 21, 2023, 8:06pm UTC](https://community.agoric.com/t/proposal-49-upgrade-smart-wallet-to-support-nfts/461/9 "2023-09-21T20:06:29Z")

</div>

The proposal carried. The contract upgrade executed in block 11731339 without incident.  
As @JD-Agoric said, Boring in a good way.

Bring on the NFT apps!!!
