Skip to content

feat: make setAuthorizer public for super-callable overrides#307

Merged
thedavidmeister merged 1 commit into
mainfrom
2026-05-15-setauthorizer-public
May 15, 2026
Merged

feat: make setAuthorizer public for super-callable overrides#307
thedavidmeister merged 1 commit into
mainfrom
2026-05-15-setauthorizer-public

Conversation

@thedavidmeister
Copy link
Copy Markdown
Collaborator

@thedavidmeister thedavidmeister commented May 15, 2026

external setAuthorizer is overridable but downstream can only re-implement it — Solidity rejects super.fn() on external functions. public keeps the ABI unchanged for external callers while letting downstream extensions wrap and forward via super.setAuthorizer(...).

Summary by CodeRabbit

  • Refactor
    • Updated contract function visibility for internal consistency. No changes to user-facing functionality or behavior.

Review Change Stack

External setAuthorizer was overridable but downstream overrides could
only re-implement it; Solidity rejects `super.fn()` on external
functions. Public exposes the same ABI (external callers still hit it
unchanged) while letting downstream extensions wrap and forward via
`super.setAuthorizer(...)` instead of re-implementing the body or
calling `_setAuthorizer` directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this May 15, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ff737eee-770b-4a66-9d32-680ab0c63785

📥 Commits

Reviewing files that changed from the base of the PR and between 4df5f24 and 27c8cda.

📒 Files selected for processing (1)
  • src/concrete/vault/OffchainAssetReceiptVault.sol

Walkthrough

The PR changes the setAuthorizer function in OffchainAssetReceiptVault from external to public visibility, while preserving the virtual and onlyOwner modifiers. This allows internal calls to the function without requiring the this prefix.

Changes

setAuthorizer Visibility Update

Layer / File(s) Summary
setAuthorizer Public Visibility
src/concrete/vault/OffchainAssetReceiptVault.sol
setAuthorizer function visibility changed from external to public while retaining virtual and onlyOwner modifiers, enabling direct internal calls.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly Related PRs

  • rainlanguage/rain.vats#306: Modifies the same setAuthorizer(IAuthorizeV1) function signature in OffchainAssetReceiptVault.sol with related visibility and virtual modifier changes.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: making setAuthorizer public to enable super-callable overrides in downstream contracts, which is the core purpose of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-15-setauthorizer-public

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thedavidmeister thedavidmeister merged commit 0f43b9c into main May 15, 2026
4 checks passed
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