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
Modifiers with unsafe opcodes in parent contracts are reported, but even if those modifiers are not used. This is because in https://github.com/OpenZeppelin/openzeppelin-upgrades/blob/master/packages/core/src/validate/run.ts, getDirectFunctionOpcodeErrors finds the modifier's FunctionCall containing the unsafe opcode, although the NodeType is a ModifierDefinition rather than a FunctionDefinition. Therefore isInternalFunction evaluates to false since this is not a FunctionDefinition, and the check is not skipped.
Instead, the above should skip modifiers (which are internal), but getReferencedFunctionOpcodeErrors should also look for ModifierInvocation nodes and dereference those.
The text was updated successfully, but these errors were encountered:
Related to #702
Modifiers with unsafe opcodes in parent contracts are reported, but even if those modifiers are not used. This is because in https://github.com/OpenZeppelin/openzeppelin-upgrades/blob/master/packages/core/src/validate/run.ts,
getDirectFunctionOpcodeErrors
finds the modifier'sFunctionCall
containing the unsafe opcode, although theNodeType
is aModifierDefinition
rather than aFunctionDefinition
. ThereforeisInternalFunction
evaluates tofalse
since this is not aFunctionDefinition
, and the check is not skipped.Instead, the above should skip modifiers (which are internal), but
getReferencedFunctionOpcodeErrors
should also look forModifierInvocation
nodes and dereference those.The text was updated successfully, but these errors were encountered: