-
Notifications
You must be signed in to change notification settings - Fork 256
chore: add virtual flag to overridable functions
#1889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR SummaryMakes overridable functions explicitly
Written by Cursor Bugbot for commit 7d222fd. This will update automatically on new commits. Configure here. |
There was a problem hiding this 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 adds the virtual keyword to functions in upgradeable OFT contracts that are intended to be overridable by derived contracts, improving extensibility while excluding initialization and storage getter functions.
- Added
virtualkeyword to public view/pure functions that return contract-specific values - Added
virtualkeyword to external functions with access control modifiers - Added
virtualkeyword to internal functions that implement overridable behavior
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| OFTUpgradeable.sol | Made token() function virtual to allow customization of token address retrieval |
| OFTFeeUpgradeable.sol | Made feeBalance() and withdrawFees() virtual to enable custom fee management logic |
| OFTCoreUpgradeable.sol | Made msgInspector() virtual to allow custom message inspection behavior |
| OFTAdapterUpgradeable.sol | Made token() function virtual to enable custom token address implementation |
| OFTAdapterFeeUpgradeable.sol | Made feeBalance() and withdrawFees() virtual to support custom fee handling |
| NativeOFTAdapterUpgradeable.sol | Made token() and _payNative() virtual to allow customization of native token operations |
| FeeUpgradeable.sol | Made fee configuration and calculation functions virtual to enable custom fee logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🚨 E2E Tests FailedThe E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:
This is non-blocking and does not prevent merging. Check the action logs above for detailed failure information. |
Description
virtualkeyword to every function of@layerzerolabs/oft-evm-upgradeablecontracts susceptible of being overriden. Excludes init and storage getter functions.