Skip to content

Commit e26e2d3

Browse files
committed
feat: Chainlink Emergency Oracle update for ccc rev 4
1 parent 5507577 commit e26e2d3

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// SPDX-License-Identifier: BUSL-1.1
2+
pragma solidity ^0.8.8;
3+
4+
import {CrossChainControllerWithEmergencyMode} from '../../CrossChainControllerWithEmergencyMode.sol';
5+
import {IReinitialize} from './IReinitialize.sol';
6+
7+
/**
8+
* @title CrossChainControllerWithEmergencyModeUpgradeRev4
9+
* @author BGD Labs
10+
* @notice Contract inheriting from CrossChainControllerWithEmergencyMode with the addition of re initialization method
11+
* @dev reinitializer is not used on parent CrossChainController, so this contract is needed to be able to initialize CCC with a new implementation
12+
* @dev it initializes the new implementation with the addition of the required Chainlink Emergency Oracle address
13+
*/
14+
contract CrossChainControllerWithEmergencyModeUpgradeRev4 is
15+
CrossChainControllerWithEmergencyMode,
16+
IReinitialize
17+
{
18+
constructor(address clEmergencyOracle) CrossChainControllerWithEmergencyMode(clEmergencyOracle) {}
19+
20+
/// @inheritdoc IReinitialize
21+
function initializeRevision(address chainlinkEmergencyOracle) external reinitializer(4) {
22+
_updateCLEmergencyOracle(chainlinkEmergencyOracle);
23+
}
24+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
/**
5+
* @title IReinitialize
6+
* @author BGD Labs
7+
* @notice interface containing re initialization method
8+
*/
9+
interface IReinitialize {
10+
/**
11+
* @notice method called to re initialize the proxy
12+
* @param chainlinkEmergencyOracle address of the Chainlink emergency oracle
13+
*/
14+
function initializeRevision(address chainlinkEmergencyOracle) external;
15+
}

0 commit comments

Comments
 (0)