-
Notifications
You must be signed in to change notification settings - Fork 104
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
4186034
commit ac06ee1
Showing
3 changed files
with
95 additions
and
41 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,33 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]> | ||
pragma solidity 0.8.23; | ||
|
||
import {AgentExecutor} from "./AgentExecutor.sol"; | ||
import {Gateway} from "./Gateway.sol"; | ||
import {ParaID} from "./Types.sol"; | ||
import {Script} from "forge-std/Script.sol"; | ||
import {stdJson} from "forge-std/StdJson.sol"; | ||
|
||
contract DeployGateway is Script { | ||
using stdJson for string; | ||
|
||
function setUp() public {} | ||
|
||
function run() public { | ||
uint256 privateKey = vm.envUint("PRIVATE_KEY"); | ||
address deployer = vm.rememberKey(privateKey); | ||
vm.startBroadcast(deployer); | ||
|
||
address beefyClient = vm.envAddress("BEEFY_CLIENT_CONTRACT_ADDRESS"); | ||
|
||
ParaID bridgeHubParaID = ParaID.wrap(uint32(vm.envUint("BRIDGE_HUB_PARAID"))); | ||
bytes32 bridgeHubAgentID = vm.envBytes32("BRIDGE_HUB_AGENT_ID"); | ||
|
||
uint8 foreignTokenDecimals = uint8(vm.envUint("FOREIGN_TOKEN_DECIMALS")); | ||
|
||
AgentExecutor executor = new AgentExecutor(); | ||
new Gateway(address(beefyClient), address(executor), bridgeHubParaID, bridgeHubAgentID, foreignTokenDecimals); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
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