Skip to content

feat: add access modes#1001

Merged
RayXpub merged 9 commits into
mainfrom
feat/add-access-control-types-and-update-ops-names
May 22, 2026
Merged

feat: add access modes#1001
RayXpub merged 9 commits into
mainfrom
feat/add-access-control-types-and-update-ops-names

Conversation

@RayXpub
Copy link
Copy Markdown
Contributor

@RayXpub RayXpub commented May 21, 2026

Summary

  • Introduces new access modes for operations:
    • private: returns false on IsAllowedCaller to prevent call execution and force proposal
    • authorized: adds compatibly for AuthorizedCallers access control

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 21, 2026

⚠️ No Changeset found

Latest commit: 7f4f5d5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@RayXpub RayXpub marked this pull request as ready for review May 21, 2026 06:17
@RayXpub RayXpub requested a review from a team as a code owner May 21, 2026 06:17
Copilot AI review requested due to automatic review settings May 21, 2026 06:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the EVM operations generator and contract write helpers to support additional access-control modes and to make generated operation identifiers more granular by including chain selector + contract address.

Changes:

  • Add new EVM operation access modes: private (force proposal) and authorized (AuthorizedCallers-based allowlist check).
  • Embed chainSelector and contractAddress into generated read/write operation names (and update generated constructor signatures accordingly).
  • Add IsAuthorizedCaller helper (+ mocks/tests) and add FeeQuoter generator testdata coverage.

Reviewed changes

Copilot reviewed 11 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/operations-gen/testdata/evm/rbac_timelock.golden.go Updates golden output for new op naming + signature changes.
tools/operations-gen/testdata/evm/operations_gen_mcms_config.yaml Adds private access example for acceptOwnership.
tools/operations-gen/testdata/evm/operations_gen_fee_quoter.yaml Adds FeeQuoter config fixture using authorized access.
tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go Updates golden output for new op naming + adds private acceptOwnership op.
tools/operations-gen/testdata/evm/link_token.golden.go Updates golden output for new op naming + signature changes.
tools/operations-gen/testdata/evm/gobindings/v1_0_0/fee_quoter/fee_quoter.go Adds FeeQuoter gobindings fixture (currently missing methods needed for authorized).
tools/operations-gen/testdata/evm/fee_quoter.golden.go Adds FeeQuoter golden output including authorized IsAllowedCaller generation.
tools/operations-gen/internal/families/evm/evm_golden_test.go Adds golden generation test for FeeQuoter.
tools/operations-gen/internal/families/evm/contract.go Adds parsing support for private and authorized access config.
tools/operations-gen/internal/families/evm/config.go Updates config docs to mention new access modes.
tools/operations-gen/internal/families/evm/codegen.go Tracks read ops to conditionally include fmt import.
tools/operations-gen/generate/templates/evm/operations.tmpl Implements new naming format + access-control behaviors in generated ops.
chain/evm/operations2/contract/write.go Adds AuthorizedCallersContract + IsAuthorizedCaller helper.
chain/evm/operations2/contract/write_test.go Adds tests for IsAuthorizedCaller.
chain/evm/operations2/contract/mocks/mock_authorized_callers_contract.go Adds mock for authorized callers contract interface.
.mockery.yml Registers AuthorizedCallersContract for mock generation.
Files not reviewed (5)
  • chain/evm/operations2/contract/mocks/mock_authorized_callers_contract.go: Language not supported
  • tools/operations-gen/testdata/evm/fee_quoter.golden.go: Language not supported
  • tools/operations-gen/testdata/evm/link_token.golden.go: Language not supported
  • tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go: Language not supported
  • tools/operations-gen/testdata/evm/rbac_timelock.golden.go: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/operations-gen/generate/templates/evm/operations.tmpl
Comment thread chain/evm/operations2/contract/write_test.go Outdated
Comment thread tools/operations-gen/generate/templates/evm/operations.tmpl
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 21, 2026 06:47
…github.com:smartcontractkit/chainlink-deployments-framework into feat/add-access-control-types-and-update-ops-names
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 16 changed files in this pull request and generated 3 comments.

Files not reviewed (5)
  • chain/evm/operations2/contract/mocks/mock_authorized_callers_contract.go: Language not supported
  • tools/operations-gen/testdata/evm/fee_quoter.golden.go: Language not supported
  • tools/operations-gen/testdata/evm/link_token.golden.go: Language not supported
  • tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go: Language not supported
  • tools/operations-gen/testdata/evm/rbac_timelock.golden.go: Language not supported

Comment thread tools/operations-gen/internal/families/evm/contract.go
Comment thread tools/operations-gen/generate/templates/evm/operations.tmpl
Comment thread tools/operations-gen/generate/templates/evm/operations.tmpl Outdated
Copilot AI review requested due to automatic review settings May 21, 2026 08:33
@RayXpub RayXpub changed the title feat: add access modes and update genereated operations names feat: add access modes May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 13 changed files in this pull request and generated 4 comments.

Files not reviewed (3)
  • chain/evm/operations2/contract/mocks/mock_authorized_callers_contract.go: Language not supported
  • tools/operations-gen/testdata/evm/fee_quoter.golden.go: Language not supported
  • tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go: Language not supported

Comment thread tools/operations-gen/generate/templates/evm/operations.tmpl
Comment thread tools/operations-gen/generate/templates/evm/operations.tmpl Outdated
Comment thread chain/evm/operations2/contract/write.go
Comment thread chain/evm/operations2/contract/write_test.go
@cl-sonarqube-production
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
28.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@RayXpub RayXpub requested a review from graham-chainlink May 21, 2026 15:34
Copy link
Copy Markdown
Collaborator

@graham-chainlink graham-chainlink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@RayXpub RayXpub added this pull request to the merge queue May 22, 2026
Merged via the queue into main with commit 8cc4fdb May 22, 2026
28 of 29 checks passed
@RayXpub RayXpub deleted the feat/add-access-control-types-and-update-ops-names branch May 22, 2026 05:16
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.

3 participants