Describe the bug
The setDelegate function in OAppCoreUpgradeable is not marked as virtual, which prevents developers from overriding it to implement custom access control logic. This limits flexibility for integrators who want to apply role-based permissions or other mechanisms instead of onlyOwner.
To Reproduce
Steps to reproduce the behavior:
- Attempt to override
setDelegate in a contract that inherits from OAppCoreUpgradeable
- Compile the contract
- See error:
TypeError: Trying to override non-virtual function. Did you forget to add "virtual"?
Expected behavior
The setDelegate function should be marked as virtual, similar to setPeer, so that developers can override it as needed.
Screenshots
N/A
Environment (please complete the following information):
N/A
Additional context
This is particularly important when using AccessControl-based permissioning instead of Ownable. Without virtual, the only workaround is to wrap setDelegate in a separate method or fork the base contract, which is not ideal and breaks the default tooling
Describe the bug
The
setDelegatefunction inOAppCoreUpgradeableis not marked asvirtual, which prevents developers from overriding it to implement custom access control logic. This limits flexibility for integrators who want to apply role-based permissions or other mechanisms instead ofonlyOwner.To Reproduce
Steps to reproduce the behavior:
setDelegatein a contract that inherits fromOAppCoreUpgradeableTypeError: Trying to override non-virtual function. Did you forget to add "virtual"?Expected behavior
The
setDelegatefunction should be marked asvirtual, similar tosetPeer, so that developers can override it as needed.Screenshots
N/A
Environment (please complete the following information):
N/A
Additional context
This is particularly important when using
AccessControl-based permissioning instead ofOwnable. Withoutvirtual, the only workaround is to wrapsetDelegatein a separate method or fork the base contract, which is not ideal and breaks the default tooling