-
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.
Merge branch 'bridge-next-gen' into ron/transact-from-eth-to-sub
- Loading branch information
Showing
73 changed files
with
3,616 additions
and
1,294 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
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 |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
// 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 {AgentExecutor} from "../src/AgentExecutor.sol"; | ||
import {Gateway} from "../src//Gateway.sol"; | ||
import {ParaID} from "../src//Types.sol"; | ||
import {Script} from "forge-std/Script.sol"; | ||
import {stdJson} from "forge-std/StdJson.sol"; | ||
|
||
|
@@ -24,9 +24,18 @@ contract DeployGatewayLogic is Script { | |
bytes32 bridgeHubAgentID = vm.envBytes32("BRIDGE_HUB_AGENT_ID"); | ||
|
||
uint8 foreignTokenDecimals = uint8(vm.envUint("FOREIGN_TOKEN_DECIMALS")); | ||
uint128 maxDestinationFee = uint128(vm.envUint("RESERVE_TRANSFER_MAX_DESTINATION_FEE")); | ||
|
||
AgentExecutor executor = new AgentExecutor(); | ||
new Gateway(address(beefyClient), address(executor), bridgeHubParaID, bridgeHubAgentID, foreignTokenDecimals); | ||
|
||
new Gateway( | ||
address(beefyClient), | ||
address(executor), | ||
bridgeHubParaID, | ||
bridgeHubAgentID, | ||
foreignTokenDecimals, | ||
maxDestinationFee | ||
); | ||
|
||
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
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]> | ||
pragma solidity 0.8.23; | ||
|
||
import {Upgrade} from "./Upgrade.sol"; | ||
import {IInitializable} from "./interfaces/IInitializable.sol"; | ||
import {IUpgradable} from "./interfaces/IUpgradable.sol"; | ||
import {IShell} from "./interfaces/IShell.sol"; | ||
|
||
// address recoveryOperator = vm.envOr("RECOVERY_OPERATOR", address(0)); | ||
|
||
contract Shell is IShell, IUpgradable, IInitializable { | ||
address public immutable operator; | ||
|
||
error Unauthorised(); | ||
|
||
constructor(address _operator) { | ||
operator = _operator; | ||
} | ||
|
||
function upgrade(address impl, bytes32 implCodeHash, bytes calldata initializerParams) external { | ||
if (msg.sender != operator) { | ||
revert Unauthorised(); | ||
} | ||
Upgrade.upgrade(impl, implCodeHash, initializerParams); | ||
} | ||
|
||
function initialize(bytes memory params) external {} | ||
} |
Oops, something went wrong.