You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a constructor calls a parent constructor with a modifier-like syntax like the below, @custom:oz-upgrades-unsafe-allow-reachable has no effect if that is defined on the constructor:
This is because we are not dereferencing this constructor call, but are always reporting errors in inherited contract constructors. Note that the constructor call is actually a ModifierInvocation that references the parent contract itself, not the parent constructor.
The workaround for users is to define @custom:oz-upgrades-unsafe-allow-reachable at the contract level instead.
The text was updated successfully, but these errors were encountered:
ericglau
changed the title
Support @custom:oz-upgrades-unsafe-allow-reachable in constructors
Support unsafe-allow-reachable in constructors
Jan 18, 2023
Related to #702
If a constructor calls a parent constructor with a modifier-like syntax like the below,
@custom:oz-upgrades-unsafe-allow-reachable
has no effect if that is defined on the constructor:This is because we are not dereferencing this constructor call, but are always reporting errors in inherited contract constructors. Note that the constructor call is actually a
ModifierInvocation
that references the parent contract itself, not the parent constructor.The workaround for users is to define
@custom:oz-upgrades-unsafe-allow-reachable
at thecontract
level instead.The text was updated successfully, but these errors were encountered: