Skip to content

Commit

Permalink
Update contracts/proxy/utils/Initializable.sol
Browse files Browse the repository at this point in the history
Co-authored-by: Francisco <[email protected]>
  • Loading branch information
Amxx and frangio authored Sep 5, 2023
1 parent 9249a0b commit 329dc22
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/proxy/utils/Initializable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ abstract contract Initializable {
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;

// Are allowed:
// - "initialSetup" calls: the contract is not in the initializing state and no previous version was
// initialized
// - "construction" calls: the contract is already initialized at step 1 (no reininitialization) and the
// current contract is not yet constructed.
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;

Expand Down

0 comments on commit 329dc22

Please sign in to comment.