Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(contract): remove reinitializers from AlignedLayerServiceManager #1770

Open
wants to merge 3 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
128 changes: 0 additions & 128 deletions contracts/script/upgrade/AlignedLayerPauserUpgrader.s.sol

This file was deleted.

114 changes: 0 additions & 114 deletions contracts/script/upgrade/AlignedLayerUpgradeAddAggregator.s.sol

This file was deleted.

Large diffs are not rendered by default.

38 changes: 0 additions & 38 deletions contracts/scripts/upgrade_add_aggregator_to_service_manager.sh

This file was deleted.

32 changes: 0 additions & 32 deletions contracts/scripts/upgrade_add_pausable_to_service_manager.sh

This file was deleted.

38 changes: 20 additions & 18 deletions contracts/src/core/AlignedLayerServiceManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ contract AlignedLayerServiceManager is
address _alignedAggregator,
IPauserRegistry _pauserRegistry,
uint256 _initialPausedStatus
) public initializer {
) public initializer { // Applied on Testnet & Mainnet
if (_initialOwner == address(0)) {
revert InvalidAddress("initialOwner");
}
Expand All @@ -84,23 +84,25 @@ contract AlignedLayerServiceManager is
_initializePauser(_pauserRegistry, _initialPausedStatus);
}

// This function is to be run only on upgrade
// If a new contract is deployed, this function should be removed
// Because this new value is also added in the initializer
function initializeAggregator(
address _alignedAggregator
) public reinitializer(2) {
setAggregator(_alignedAggregator);
}

// Just to be used to upgrade contracts without the pausable functionality
// Once the contract is pausable this method is not needed anymore
function initializePauser(
IPauserRegistry _pauserRegistry,
uint256 _initialPausedStatus
) public reinitializer(3) {
_initializePauser(_pauserRegistry, _initialPausedStatus);
}
// Reinitializers:
// The following reinitializers have been run in testnet, so their code should remain in the codebase.
// But they have not been run in mainnet, so their code should not be deployed here.

// function initializeAggregator( // applied on Testnet
// address _alignedAggregator
// ) public reinitializer(2) {
// setAggregator(_alignedAggregator);
// }

// function initializePauser( // applied on Testnet
// IPauserRegistry _pauserRegistry,
// uint256 _initialPausedStatus
// ) public reinitializer(3) {
// _initializePauser(_pauserRegistry, _initialPausedStatus);
// }

// Current Testnet initializer version: 3
// Current Mainnet initializer version: 1

function createNewTask(
bytes32 batchMerkleRoot,
Expand Down
Loading