-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3628ae7
commit ed709d7
Showing
2 changed files
with
12,962 additions
and
15,955 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.24; | ||
|
||
import "forge-std/src/Script.sol"; | ||
import "forge-std/src/console2.sol"; | ||
|
||
import "../contracts/L1/SequencerRegistry.sol"; | ||
import "../contracts/common/AddressManager.sol"; | ||
|
||
contract SetSequencer is Script { | ||
uint256 public ownerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
|
||
address public proxyAddress = vm.envAddress("PROXY_ADDRESS"); | ||
|
||
address public addr = vm.envAddress("ADDRESS"); | ||
|
||
bool public enabled = vm.envBool("ENABLED"); | ||
|
||
SequencerRegistry proxy; | ||
|
||
function run() external { | ||
require(ownerPrivateKey != 0, "PRIVATE_KEY not set"); | ||
require(proxyAddress != address(0), "PROXY_ADDRESS not set"); | ||
require(addr != address(0), "ADDR NOT SET"); | ||
|
||
vm.startBroadcast(ownerPrivateKey); | ||
|
||
proxy = SequencerRegistry(payable(proxyAddress)); | ||
|
||
address[] memory addresses = [addr]; | ||
bool[] memory enabledAddresses = [enabled]; | ||
proxy.setSequencers(addresses, enabledAddresses); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
Oops, something went wrong.