Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update contracts/proxy/utils/Initializable.sol
Co-authored-by: Francisco <[email protected]>
  • Loading branch information
Amxx and frangio authored Sep 5, 2023
commit 329dc22bafc36c701ada65d00555ae4772e69d94
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