-
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): upgrade script (#18334)
Co-authored-by: David <david@taiko.xyz>
- Loading branch information
1 parent
3d12cb2
commit 2c41dd1
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
packages/protocol/script/layer1/DeployHeklaL2Contracts.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,35 @@ | ||
// 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()); | ||
|
||
console2.log("> hekla_taiko_l2@", heklaTaikoL2); | ||
console2.log("> bridge@", bridge); | ||
console2.log("> address_manager@", addressManager); | ||
console2.log("> bridged_erc20_v2@", bridgedERC20V2); | ||
} | ||
} |
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