[Proposal #49] Upgrade Smart Wallet to support NFTs

The Agoric chain is preparing for the launch of the first mainnet 2 application - the Kread dapp written by Kryha. 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:

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

Background

The mainnet-1 proposal 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), including NFTs, as required by several dapps in development.

The core-eval mechanism was used to add DAI PSM support 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.

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.

:zero: – 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.

:one: – 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.

:two: – Node operators monitor the execution of the proposals once they pass.
:three:Test the new NFT trading functionality as well as existing Inter Protocol functionality and standard cosmos features.
:four: – 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.
:five: –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.

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

2 Likes

Creating an On Chain Core Eval proposal

The key files from the release required for the on-chain proposal are:

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. in agoricdev-20.

3 Likes

Bundles are installed on emerynet

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:

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

absolutely.

For reference: Agoric Dev Office Hours are 9amET Wednesdays.
Venue: Zoom room 87343330101 Passcode: 47695358

1 Like

And speaking of interesting…

1 Like

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

  1. emerynet proposal 11 was 12 Sep
  2. The proposal passed and was carried out in block 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 with the same git hash, e669bb12f560d84f7fc017abda49d3dd6d5cee17

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 :ballot_box:

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.

1 Like

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

Bring on the NFT apps!!!

2 Likes