Skip to content

Commit 5d0a9d9

Browse files
committed
fix: configure admin explicitly
1 parent d3fc5c5 commit 5d0a9d9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

script/Zenith.s.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ contract DeployZenith is Script {
1010
// deploy NO VERIFY: forge script DeployZenith --sig "run()" --rpc-url $RPC --private-key $RAW_PRIVATE_KEY --broadcast
1111
function run() public {
1212
vm.broadcast();
13-
new Zenith{salt: "zenith"}();
13+
new Zenith{salt: "zenith"}(msg.sender);
1414
}
1515
}

src/Zenith.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ contract Zenith is HostPassage, AccessControlDefaultAdminRules {
3535
// TODO: can an off-chain observer easily get the blob data from the transaction using the blob indices?
3636
event BlockSubmitted(uint256 indexed sequence, address indexed sequencer, uint32[] blobIndices);
3737

38-
// @notice Sets the deployer as the Admin role.
38+
// @notice Initializes the Admin role.
3939
// @dev See `AccessControlDefaultAdminRules` for information on contract administration.
4040
// - Admin role can grant and revoke Sequencer roles.
4141
// - Admin role can be transferred via two-step process with a 1 day timelock.
42-
constructor() AccessControlDefaultAdminRules(1 days, msg.sender) {}
42+
// @param admin - the address that will be the initial admin.
43+
constructor(address admin) AccessControlDefaultAdminRules(1 days, admin) {}
4344

4445
// @notice Submit a rollup block with block data stored in 4844 blobs.
4546
// @dev Blocks are submitted by Builders, with an attestation to the block data signed by a Sequencer.

test/Zenith.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ contract ZenithTest is Test {
1212
event BlockSubmitted(uint256 indexed sequence, address indexed sequencer, uint32[] blobIndices);
1313

1414
function setUp() public {
15-
target = new Zenith();
15+
target = new Zenith(address(this));
1616
target.grantRole(target.SEQUENCER_ROLE(), vm.addr(sequencerKey));
1717
}
1818

0 commit comments

Comments
 (0)