Skip to content

AtomicAssets v2.0.0-rc2

Pre-release
Pre-release

Choose a tag to compare

@robrigo robrigo released this 08 Jun 22:49
143f4a1

AtomicAssets v2.0.0-rc2

Release candidate of the AtomicAssets v2 standard contract, for WAX and Jungle4 testnet smoke testing. Built from feat/v2-integration with CDT 4.1.1. This supersedes v2.0.0-rc1 and adds the self-service RAM utilities.

This is a pre-release for testnet only. It does not include the held partial_read_collection byte-math fix (#12), so this build still carries the auth-path over-read. That needs to be resolved before mainnet.

Artifacts

asset sha256
atomicassets.wasm aa15b3a310b42aea2c42765eab592f74a89e03f6c6f535a7b9230241c49adc98
atomicassets.abi b5963843fa0015c7c3b16b818a7506fe7eee5d38daa91ff29588a4e723a11a74

SHA256SUMS is attached. The ABI is patched back to the legacy key/value (pair) and uint8[] (vector<uint8_t>) spellings the deployed contract uses, so v2 stays a non-breaking superset: every v2 change is additive, and nothing existing is removed, renamed, or retyped. The compiled wasm and the binary wire format are the same with or without that patch.

What's in v2

Feature 1: reduce max template supply

redtemplmax lowers a template's max_supply down to its issued supply. This was previously immutable.

Feature 2: delete unused templates

deltemplate removes a template that has zero issued and circulating assets (it sets deleted_at).

Features 3 and 6: mutable templates, non-burnable/non-transferable

createtempl2 creates a template with explicit immutable and mutable data; settempldata edits the mutable data afterward. The mutable data lives in a new templates2 table, with a logsetdatatl event. Templates can now be non-transferable or non-burnable (the two are mutually exclusive).

Feature 4: per-field media types for schemas

setschematyp attaches media/descriptor types to schema attributes, stored in a new schematypes table.

Feature 5: changing collection authors

createauswap, acceptauswap, and rejectauswap propose, accept, or reject a collection author change, tracked in a new authorswaps table.

Feature 7: deprecating backed assets

Adjusts the deposit/withdraw/back lifecycle to deprecate backed assets.

Feature 8: contract-wide CPU optimizations

partial_read_collection and related read-path changes lower CPU on auth checks. Note that the byte-math fix (#12) for this path is not in this rc.

Feature 300: renting assets (dual ownership)

move and logmove split owner from holder: an asset can be moved to a holder while the owner keeps ownership. A new holders table backs this; the indexer treats holders.holder as the effective holder and falls back to owner when there isn't one.

New in rc2: self-service RAM utilities (#14, @aaroncox)

Before v2, an asset's ram_payer was fixed to the authorized minter and only changed as a side effect of setassetdata. These actions let the current owner take over the RAM cost:

  • setrampayer(new_payer, asset_id): the owner takes over RAM for a specific asset; the previous ram_payer is refunded.
  • setlastpayer(owner, collection_name): the owner takes over RAM for their newest asset in a collection. This is a convenience for post-mint flows.
  • logrampayer: the matching event, consistent with the other log* actions.

Testing

The VeRT suite is green in CI: 40 suites, 337 passing, including coverage for setrampayer, setlastpayer, and logrampayer. CI builds with the pinned CDT 4.1.1 and runs the suite on every push and PR to the integration line.

Deploying

Pinned in the AtomicHub monorepo as a type: release ingestion for wax-testnet and jungle4-testnet, with sha256 verification. Deploy by hand through the Deploy Contract workflow, or run cleos set contract atomicassets <dir> atomicassets.wasm atomicassets.abi -p atomicassets@deploy.

Changelog since rc1

  • Added setrampayer, setlastpayer, and logrampayer, plus VeRT tests for them.
  • Hardened the setlastpayer iterator (named lvalue iterator instead of decrementing the end() temporary).

Credits

The bulk of the v2 contract work was authored by t-break (@on-a-t-break), originally in the wax-office-of-inspector-general/atomicassets-contract repo. The self-service RAM utilities are from Aaron Cox (@aaroncox, Greymass). See AUTHORS.md for the full list. AtomicAssets was created by pink.network.