Skip to content

Commit 967f3ae

Browse files
committed
fix: comment/remove reinitializers from codebase
1 parent 3a47b87 commit 967f3ae

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

contracts/src/core/AlignedLayerServiceManager.sol

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ contract AlignedLayerServiceManager is
6868
address _alignedAggregator,
6969
IPauserRegistry _pauserRegistry,
7070
uint256 _initialPausedStatus
71-
) public initializer {
71+
) public initializer { // Applied on Testnet & Mainnet
7272
if (_initialOwner == address(0)) {
7373
revert InvalidAddress("initialOwner");
7474
}
@@ -84,23 +84,25 @@ contract AlignedLayerServiceManager is
8484
_initializePauser(_pauserRegistry, _initialPausedStatus);
8585
}
8686

87-
// This function is to be run only on upgrade
88-
// If a new contract is deployed, this function should be removed
89-
// Because this new value is also added in the initializer
90-
function initializeAggregator(
91-
address _alignedAggregator
92-
) public reinitializer(2) {
93-
setAggregator(_alignedAggregator);
94-
}
95-
96-
// Just to be used to upgrade contracts without the pausable functionality
97-
// Once the contract is pausable this method is not needed anymore
98-
function initializePauser(
99-
IPauserRegistry _pauserRegistry,
100-
uint256 _initialPausedStatus
101-
) public reinitializer(3) {
102-
_initializePauser(_pauserRegistry, _initialPausedStatus);
103-
}
87+
// Reinitializers:
88+
// The following reinitializers have been run in testnet, so their code should remain in the codebase.
89+
// But they have not been run in mainnet, so their code should not be deployed here.
90+
91+
// function initializeAggregator( // applied on Testnet
92+
// address _alignedAggregator
93+
// ) public reinitializer(2) {
94+
// setAggregator(_alignedAggregator);
95+
// }
96+
97+
// function initializePauser( // applied on Testnet
98+
// IPauserRegistry _pauserRegistry,
99+
// uint256 _initialPausedStatus
100+
// ) public reinitializer(3) {
101+
// _initializePauser(_pauserRegistry, _initialPausedStatus);
102+
// }
103+
104+
// Current Testnet initializer version: 3
105+
// Current Mainnet initializer version: 1
104106

105107
function createNewTask(
106108
bytes32 batchMerkleRoot,

0 commit comments

Comments
 (0)