Skip to content

Commit

Permalink
feat(protocol): scripts to deploy new mainnet implementation contracts (
Browse files Browse the repository at this point in the history
#18356)

Co-authored-by: Gavin Yu <[email protected]>
  • Loading branch information
davidtaikocha and YoGhurt111 authored Oct 31, 2024
1 parent 4fb79a2 commit 269759b
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ contract MainnetTierRouter is ITierRouter, TierProviderBase {
address public immutable DAO_FALLBACK_PROPOSER;

constructor(address _daoFallbackProposer) {
// 0xD3f681bD6B49887A48cC9C9953720903967E9DC0
// 0x68d30f47F19c07bCCEf4Ac7FAE2Dc12FCa3e0dC9
DAO_FALLBACK_PROPOSER = _daoFallbackProposer;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 packages/protocol/script/layer1/UpdateMainnetOntakeL1.s.sol
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 packages/protocol/script/layer2/UpdateMainnetOntakeL2.s.sol
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()));
}
}

0 comments on commit 269759b

Please sign in to comment.