Skip to content

Gate legacy element attestations behind the operator role#27

Open
heijiLee wants to merge 1 commit into
feature/manifest-lifecyclefrom
chore/legacy-element-gating
Open

Gate legacy element attestations behind the operator role#27
heijiLee wants to merge 1 commit into
feature/manifest-lifecyclefrom
chore/legacy-element-gating

Conversation

@heijiLee

@heijiLee heijiLee commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Stacked on #26. Closes the hardening divergence recorded in D008: the legacy mock elements (Sanctions A-01, AccreditedInvestor A-03, QualifiedPurchaser A-13) had ungated, eventless setters while the CMP-001 elements are operator-gated.

  • All three now extend Governed with onlyOperator setters and *Set events matching the newer elements' shape
  • Lockup (C-01) verified to have no mutator — untouched
  • Tests: forge test --offline 233/233 (+6: per-element outsider auth revert + set/emit)

Sanctions (A-01), AccreditedInvestor (A-03), and QualifiedPurchaser
(A-13) had ungated, eventless attestation setters, diverging from the
Governed/onlyOperator + event pattern used by the six CMP-001 elements
(Jurisdiction, UsTaxResident, etc). Extend Governed on all three, gate
setBlocked/setAccredited/setQp with onlyOperator, and emit an event per
change. Lockup (C-01) has no settable mutator (state is injected via
IAcquisitionSource), so it is left untouched.

Add per-element outsider-auth-revert and set+emit tests to
Elements.t.sol, written RED first against the unmodified elements.
Existing fixtures (Engine.t.sol, IntegrationBase.sol, MultiRecipe.t.sol,
SwapFlow.t.sol) call these setters from the deploying test contract
itself, i.e. as owner, which onlyOperator already admits, so no fixture
changes were needed.
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