Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol): upgrade script #18334

Merged
merged 14 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions packages/protocol/script/layer1/DeployHeklaL2Contracts.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "test/shared/DeployCapability.sol";
import "src/shared/bridge/Bridge.sol";
import "src/shared/common/AddressManager.sol";
import "../../contracts/layer2/hekla/HeklaTaikoL2.sol";
import "../../contracts/shared/tokenvault/BridgedERC20V2.sol";

contract DeployHeklaL2Contracts 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 {
// TaikoL2
address heklaTaikoL2 = address(new HeklaTaikoL2());
// Bridge
address bridge = address(new Bridge());
// Address manager
address addressManager = address(new AddressManager());
// Bridged ERC20 V2
address bridgedERC20V2 = address(new BridgedERC20V2());
// Register to SharedAddressManager
register("0x1670090000000000000000000000000000000006", B_BRIDGED_ERC20, bridgedERC20V2);

console2.log("> hekla_taiko_l2@", heklaTaikoL2);
console2.log("> bridge@", bridge);
console2.log("> address_manager@", addressManager);
console2.log("> bridged_erc20_v2@", bridgedERC20V2);
}
}
1 change: 1 addition & 0 deletions packages/protocol/script/layer1/UpgradeHeklaOntakeL2.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "src/shared/bridge/Bridge.sol";
import "src/shared/common/AddressManager.sol";
import "test/shared/thirdparty/Multicall3.sol";
import "src/layer2/DelegateOwner.sol";
import { BridgedERC20V2 } from "../../contracts/shared/tokenvault/BridgedERC20V2.sol";
YoGhurt111 marked this conversation as resolved.
Show resolved Hide resolved

contract UpgradeHeklaOntakeL2 is DeployCapability {
address public delegateOwner = 0x95F6077C7786a58FA070D98043b16DF2B1593D2b;
Expand Down
Loading