File tree 3 files changed +33
-68
lines changed
3 files changed +33
-68
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {ScrollChain} from "../../src/L1/rollup/ScrollChain.sol";
21
21
import {ScrollOwner} from "../../src/misc/ScrollOwner.sol " ;
22
22
import {Whitelist} from "../../src/L2/predeploys/Whitelist.sol " ;
23
23
24
- import {SystemSignerRegistry } from "../../src/L1/system-contract/SystemSignerRegistry .sol " ;
24
+ import {SystemConfig } from "../../src/L1/system-contract/SystemConfig .sol " ;
25
25
26
26
27
27
// solhint-disable max-states-count
@@ -282,12 +282,12 @@ contract InitializeL1ScrollOwner is Script {
282
282
283
283
function configSystemContract () internal {
284
284
// If we already have deployed it, just do:
285
- SystemSignerRegistry sys = SystemSignerRegistry (SYSTEM_CONTRACT_ADDR);
285
+ SystemConfig sys = SystemConfig (SYSTEM_CONTRACT_ADDR);
286
286
287
287
// sys has a normal constructor that set the "owner" to `ScrollOwner`.
288
288
// Now we want to let the Security Council call `addSigner(...)` with no delay.
289
289
bytes4 [] memory selectors = new bytes4 [](1 );
290
- selectors[0 ] = sys.addSigner .selector ;
290
+ selectors[0 ] = sys.updateSigner .selector ;
291
291
292
292
owner.updateAccess (
293
293
SYSTEM_CONTRACT_ADDR, // the system contract
Original file line number Diff line number Diff line change
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
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments