Skip to content

Missing initializer for ReentrancyGuard in v5.5.0 #6101

@aviggiano

Description

@aviggiano

In contracts v5.5.0 ReentrancyGuardUpgradeable was deprecated as part of #5944 in favor of a stateless ReentrancyGuard.

The issue is that the non-upgradeable version initializes the storage value on the constructor, which is a problem for proxy-based contracts.

If I understand correctly, integrators must manually call _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED; on the initializer function.

A better solution would be to still provide an initializer for proxy contracts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions