-
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.
feat(protocol): scripts to deploy new mainnet implementation contracts (
#18356) Co-authored-by: Gavin Yu <[email protected]>
- Loading branch information
1 parent
4fb79a2
commit 269759b
Showing
4 changed files
with
68 additions
and
2 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
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 |
---|---|---|
|
@@ -7,6 +7,6 @@ import "../based/TaikoL2.sol"; | |
/// @custom:security-contact [email protected] | ||
contract MainnetTaikoL2 is TaikoL2 { | ||
function ontakeForkHeight() public pure override returns (uint64) { | ||
return 374_400; // = 7200 * 52 | ||
return 538_304; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
packages/protocol/script/layer1/UpdateMainnetOntakeL1.s.sol
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,45 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.24; | ||
|
||
import "test/shared/DeployCapability.sol"; | ||
import "src/layer1/mainnet/multirollup/MainnetSharedAddressManager.sol"; | ||
import "src/layer1/mainnet/multirollup/MainnetSignalService.sol"; | ||
import "src/layer1/mainnet/multirollup/MainnetBridge.sol"; | ||
import "src/layer1/mainnet/rollup/MainnetRollupAddressManager.sol"; | ||
import "src/layer1/mainnet/rollup/MainnetTaikoL1.sol"; | ||
import "src/layer1/mainnet/rollup/MainnetTierRouter.sol"; | ||
import "src/layer1/mainnet/rollup/verifiers/MainnetSgxVerifier.sol"; | ||
import "src/layer1/provers/GuardianProver.sol"; | ||
import "src/layer1/mainnet/rollup/MainnetProverSet.sol"; | ||
|
||
contract UpgradeMainnetOntakeL1 is DeployCapability { | ||
uint256 public privateKey = vm.envUint("PRIVATE_KEY"); | ||
|
||
modifier broadcast() { | ||
require(privateKey != 0, "invalid private key"); | ||
vm.startBroadcast(privateKey); | ||
_; | ||
vm.stopBroadcast(); | ||
} | ||
|
||
function run() external broadcast { | ||
// MainnetSharedAddressManager | ||
console2.log(address(new MainnetSharedAddressManager())); | ||
// MainnetSignalService | ||
console2.log(address(new MainnetSignalService())); | ||
// MainnetBridge | ||
console2.log(address(new MainnetBridge())); | ||
// MainnetRollupAddressManager | ||
console2.log(address(new MainnetRollupAddressManager())); | ||
// MainnetTaikoL1 | ||
console2.log(address(new MainnetTaikoL1())); | ||
// MainnetTierRouter | ||
console2.log(address(new MainnetTierRouter(0x68d30f47F19c07bCCEf4Ac7FAE2Dc12FCa3e0dC9))); | ||
// MainnetSgxVerifier | ||
console2.log(address(new MainnetSgxVerifier())); | ||
// GuardianProver | ||
console2.log(address(new GuardianProver())); | ||
// MainnetProverSet | ||
console2.log(address(new MainnetProverSet())); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
packages/protocol/script/layer2/UpdateMainnetOntakeL2.s.sol
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,21 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.24; | ||
|
||
import "test/shared/DeployCapability.sol"; | ||
import "src/layer2/mainnet/MainnetTaikoL2.sol"; | ||
|
||
contract UpgradeMainnetOntakeL2 is DeployCapability { | ||
uint256 public privateKey = vm.envUint("PRIVATE_KEY"); | ||
|
||
modifier broadcast() { | ||
require(privateKey != 0, "invalid private key"); | ||
vm.startBroadcast(privateKey); | ||
_; | ||
vm.stopBroadcast(); | ||
} | ||
|
||
function run() external broadcast { | ||
// MainnetTaikoL2 | ||
console2.log(address(new MainnetTaikoL2())); | ||
} | ||
} |