Skip to content

[Access] Add authority-or-grant guard and grant context key - #56

Open
0xNeshi wants to merge 1 commit into
mainfrom
access/authority-or-grant-guard
Open

0xNeshi wants to merge 1 commit into
mainfrom
access/authority-or-grant-guard

Conversation

@0xNeshi

@0xNeshi 0xNeshi commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Adds two helpers to openzeppelin-scoped-authorization-grant-v1 so a generic interface can support grant-based access without depending on this package.

  • requireAuthorityOrGrant lets the expected authority act without a grant. If a grant is presented, the helper validates it through requireAuthorization. A missing grant fails with openzeppelin.com/scoped-authorization-grant-required.
  • authorizationContextKey is a standard key for passing a grant contract ID through an extensible choice context, such as Splice ExtraArgs.

The package README documents the integration pattern. New tests cover both paths, and the sandbox suite runs the cases that go through the ledger.

@0xNeshi 0xNeshi self-assigned this Oct 7, 2026
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