Store Updated XION Marketplace Contract Code (v0.2.0)
Verona proposal #62: # Store Updated XION Marketplace Contract Code (v0.2.0) ## Purpose This proposal stores an updated build (v0.2.0) of the **XION Marketpl...
Yes
78%
No
0%
Abstain
22%
Veto
0%
Original Proposal Text
# Store Updated XION Marketplace Contract Code (v0.2.0) ## Purpose This proposal stores an updated build (v0.2.0) of the **XION Marketplace contract** on XION mainnet. It is an additive update to the Marketplace code approved in proposal #53 (code ID 65). Storing this code does not modify any existing contract: it makes a new code ID available for fresh marketplace instances and for optional migrations by contract admins. The update is requested by an ecosystem team (Objectify) integrating the Asset + Marketplace contracts, who need server-side list queries that the current code does not expose. ## Team Background Developed by **Burnt Labs**, the core team building XION network infrastructure, in the same repository as proposals #52 (Asset) and #53 (Marketplace). ## Changes Since Code ID 65 (commit e3dadc6) - **PR #136** — New paginated queries `listings` (all listings) and `listings_by_seller`. https://github.com/burnt-labs/contracts/pull/136 - **PR #138** — New secondary index of listings by collection and paginated query `listings_by_collection`; crate version 0.1.0 → 0.2.0; `migrate` now records the cw2 contract version. https://github.com/burnt-labs/contracts/pull/138 - **PR #118** — Expired pending sales can be reclaimed by the seller, and the manager can no longer approve an already-expired pending sale. - Zero-price listings are rejected, and zero-amount bank sends (e.g. a 0 bps fee) are no longer emitted, which previously caused `invalid coins` failures. - Listing-status check for a direct-buy edge case, with added tests. - **PR #132** — Dependency updates resolving Dependabot advisories. **Migration note:** v0.2.0 does not backfill the new collection index. An existing marketplace instance migrated to this code will keep working, and `listings` / `listings_by_seller` return all listings, but `listings_by_collection` only returns listings created after the migration until earlier items are relisted. Fresh instantiation is recommended for teams that need the collection query. ## Source Code - **Repository:** https://github.com/burnt-labs/contracts - **Commit:** [`e82deac`](https://github.com/burnt-labs/contracts/commit/e82deac8981acb18ea17fbab23f76a8c7f9d9795) - **Contract path:** [`contracts/marketplace`](https://github.com/burnt-labs/contracts/tree/e82deac8981acb18ea17fbab23f76a8c7f9d9795/contracts/marketplace) (crate `xion-nft-marketplace` v0.2.0) ## Build Reproducibility Built with `cosmwasm/optimizer:0.17.0` (linux/amd64). To reproduce: ``` docker run --rm --platform linux/amd64 -v "$(pwd)":/code cosmwasm/optimizer:0.17.0 ``` **SHA256 checksum:** `65b2da0691d332a24d81ff499a448a2d6542459142ea4033e8b937e5b52bba76 xion_nft_marketplace.wasm` After execution, verify with `xiond query wasm code-info `; `data_hash` must match. ## Audit The Marketplace and Asset contracts were audited by **SCV Security**: [Audit Report (PDF)](https://github.com/SCV-Security/PublicReports/blob/7acbba6ce14d6b96b2a7902eb5cfd3a9262b77bc/Burnt%20Labs%2FBurnt%20Labs%20-%20Marketplace%20and%20Asset%20Contracts%20-%20Audit%20Report%20v1.0.pdf). Changes since the audited revision are additive read queries and an index maintained alongside the existing listing map, plus the input guards listed above. Fund custody, fee calculation and authorization paths are unchanged. CI (unit and integration tests, fmt, clippy with `-D warnings`, wasm build) passed on the commit above. ## Testnet Deployment - **Code ID:** 2315 on `xion-testnet-2` (same checksum), stored in tx `F8B4ED065714A0859EA996385D2D1E4A8A8F4B93880F3C05C640FEAEC5CC6F46`. The new queries were verified against a freshly instantiated instance. ## Instantiation Permissions Instantiation is open to everybody, matching code ID 65. ## Discussion - Original signaling thread: https://discourse.xion.burnt.com/t/deploy-xion-asset-marketplace-contracts-on-xion/109 - An update notice for this proposal is posted as a reply on that thread. This proposal is submitted as **expedited** (24h voting period) to unblock an integration partner. The change is additive and backwards compatible, following the precedent of proposals #59 and #61.