Skip to content

Commit 1227fb6

Browse files
committed
Keep only curent signer
1 parent 9cfaad5 commit 1227fb6

File tree

3 files changed

+32
-67
lines changed

3 files changed

+32
-67
lines changed

scripts/foundry/InitializeL1ScrollOwner.s.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {ScrollChain} from "../../src/L1/rollup/ScrollChain.sol";
2121
import {ScrollOwner} from "../../src/misc/ScrollOwner.sol";
2222
import {Whitelist} from "../../src/L2/predeploys/Whitelist.sol";
2323

24-
import {SystemSignerRegistry} from "../../src/L1/system-contract/SystemSignerRegistry.sol";
24+
import {SystemConfig} from "../../src/L1/system-contract/SystemConfig.sol";
2525

2626

2727
// solhint-disable max-states-count
@@ -282,7 +282,7 @@ contract InitializeL1ScrollOwner is Script {
282282

283283
function configSystemContract() internal {
284284
// If we already have deployed it, just do:
285-
SystemSignerRegistry sys = SystemSignerRegistry(SYSTEM_CONTRACT_ADDR);
285+
SystemConfig sys = SystemConfig(SYSTEM_CONTRACT_ADDR);
286286

287287
// sys has a normal constructor that set the "owner" to `ScrollOwner`.
288288
// Now we want to let the Security Council call `addSigner(...)` with no delay.
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity =0.8.24;
3+
4+
import "@openzeppelin/contracts/access/Ownable.sol";
5+
6+
contract SystemConfig is Ownable {
7+
8+
address public currentSigner;
9+
10+
constructor(address _owner) {
11+
_transferOwnership(_owner);
12+
}
13+
14+
/**
15+
* @dev Update the current signer.
16+
* Only the owner can call this function.
17+
* @param _newSigner The address of the new authorized signer.
18+
*/
19+
function updateSigner(address _newSigner) external onlyOwner {
20+
currentSigner = _newSigner;
21+
}
22+
23+
/**
24+
* @dev Return the current authorized signer.
25+
* @return The authorized signer address.
26+
*/
27+
function getSigner() external view returns (address) {
28+
return currentSigner;
29+
}
30+
}

src/L1/system-contract/SystemSignerRegistry.sol

-65
This file was deleted.

0 commit comments

Comments
 (0)