Skip to content

feat: add per-offering jurisdiction allowlist - #857

Open
Aonlike wants to merge 1 commit into
RevoraOrg:masterfrom
Aonlike:feat/jurisdiction-allowlist
Open

feat: add per-offering jurisdiction allowlist#857
Aonlike wants to merge 1 commit into
RevoraOrg:masterfrom
Aonlike:feat/jurisdiction-allowlist

Conversation

@Aonlike

@Aonlike Aonlike commented Aug 28, 2026

Copy link
Copy Markdown

Summary

Adds issuer-controlled, per-offering jurisdiction allowlists for regulated share offerings.

What changed

  • Added set_jurisdiction_allowlist and get_jurisdiction_allowlist.
  • Added JurisdictionBlocked enforcement in transfer pre-transfer hooks.
  • Added the jur_alwup audit event.
  • Added duplicate normalization for jurisdiction entries.
  • Added issuer authorization and current-issuer validation.
  • Added comprehensive allowlist CRUD, authorization, transfer, event, deduplication, and edge-case tests.
  • Updated structured error and storage-layout coverage.

Security notes

  • Only the current issuer can update an offering allowlist.
  • Jurisdiction checks run before share mutation.
  • Rejected transfers do not alter holder balances.
  • Empty allowlists preserve the existing disabled-gating behavior.
  • Existing persisted shares are not retroactively invalidated.

Verification

The branch is based on upstream/master and includes the implementation commit. Local Cargo verification was unavailable because Rust/Cargo is not installed in the execution environment.

closes #537

Add set_jurisdiction_allowlist/get_jurisdiction_allowlist for per-offering
jurisdiction gating. Transfers to holders whose jurisdiction is not in the
allowlist are rejected with the new JurisdictionBlocked error (code 90).

The allowlist is consulted in the pre-transfer hook via the new
require_holder_jurisdiction_allowed_for_transfer helper, distinct from
the existing require_holder_jurisdiction_allowed which continues to use
JurisdictionDisallowed for non-transfer operations.

Changes:
- Add JurisdictionBlocked error (code 90) to RevoraError
- Add EVENT_JUR_ALLOW_UPDATE (jur_alwup) event symbol
- Add set_jurisdiction_allowlist and get_jurisdiction_allowlist functions
- Add require_holder_jurisdiction_allowed_for_transfer helper
- Update pre-transfer hooks in transfer_with_attestation paths
- Add 12 comprehensive tests covering allowlist CRUD, transfer gating,
  empty-allowlist (gating-disabled), deduplication, and audit events
- Update structured_error_tests with new error code
- Fix pre-existing storage layout registry drift

Closes RevoraOrg#537
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.

Add jurisdiction allowlist per offering with pre-transfer eligibility check

1 participant