feat: add access modes#1001
Conversation
|
There was a problem hiding this comment.
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) andauthorized(AuthorizedCallers-based allowlist check). - Embed
chainSelectorandcontractAddressinto generated read/write operation names (and update generated constructor signatures accordingly). - Add
IsAuthorizedCallerhelper (+ 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…github.com:smartcontractkit/chainlink-deployments-framework into feat/add-access-control-types-and-update-ops-names
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
|


Summary
private: returns false onIsAllowedCallerto prevent call execution and force proposalauthorized: adds compatibly for AuthorizedCallers access control