Skip to content

fix(abi): ship the Ricardian clauses, and write the eight that were missing - #32

Open
robrigo wants to merge 2 commits into
mainfrom
fix/ship-ricardian-clauses
Open

fix(abi): ship the Ricardian clauses, and write the eight that were missing#32
robrigo wants to merge 2 commits into
mainfrom
fix/ship-ricardian-clauses

Conversation

@robrigo

@robrigo robrigo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Not for v2.0.0. This changes the ABI, so it changes abiSha256, and the v2.0.0 release plus the four live msig proposals are pinned by that hash. It targets a later release.

The contract ships no Ricardian text at all

resource/atomicassets.contracts.md is 27 KB of Ricardian clauses, correctly named and correctly placed, that CDT never embeds. The published atomicassets.abi has ricardian_clauses: [] and every one of its 47 actions carries ricardian_contract: "".

The cause is a missing flag, and the sibling repository proves it:

atomicmarket  cdt-cpp -abigen -contract=atomicmarket -I./include -R./resource ...   -> 51 actions carry Ricardian text
atomicassets  cdt-cpp -abigen -contract=atomicassets -I./include ...                -> 0

The consequence is user-facing: a wallet asking someone to sign an AtomicAssets transfer or burnasset has no human-readable description to show them. AtomicMarket shows one. This is the document that tells a signer what they are agreeing to.

Eight clauses were also missing

Turning the flag on alone would have shipped a partial Ricardian, which is worse than an obvious absence: some actions would carry a description and others silently would not.

Of the 47 actions, 9 are log* actions guarded by require_auth(get_self()). They are dispatched inline by the contract, never signed by a user, so they need no clause and no wallet ever renders one. That leaves 38 user-signed actions, of which 8 had none, all introduced by v2:

createtempl2, settempldata, deltemplate, redtemplmax, setschematyp, createauswap, acceptauswap, rejectauswap

They are written here in the file's existing house style, using the same spec_version, icon, description and clauses structure, and the same handlebars conventions as neighbouring clauses ({{#if}} blocks for the transferable, burnable and max_supply variants in createtempl2, mirroring createtempl).

Coverage after this change: 38 of 38 user-signed actions have a clause, 0 missing.

Wording that deserves review

Each clause states what a signer is agreeing to, and several carry real consequence that I have tried to make explicit rather than neutral:

  • acceptauswap says plainly that accepting transfers control of the collection, including the right to authorize accounts and set the market fee.
  • settempldata notes that already-minted assets are affected, because mutable data is read from the template rather than copied onto each asset.
  • setschematyp notes that descriptors are replaced in full, so an omitted descriptor is removed.
  • deltemplate and redtemplmax state that the effect is permanent.

These are legally-shaped text. I would want whoever owns product or legal wording to read them before they ship, rather than treating my drafting as final.

Verification

ricardian_clauses stays empty after this, which is expected: that array is populated from a <contract>.clauses.md file, which this repository does not have and which atomicmarket does not have either. The per-action ricardian_contract field is what wallets render, and that is what the -R flag populates.

Worth adding a CI assertion that the built ABI carries non-empty ricardian_contract for every non-log action, so this cannot silently regress again. Not included here to keep the change reviewable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant