This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved fees and rewards logic for messages to Ethereum (paritytech#968
) Co-authored-by: ron <yrong1997@gmail.com> Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
- Loading branch information
1 parent
4f739fd
commit f6a0e86
Showing
53 changed files
with
2,247 additions
and
1,259 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com> | ||
pragma solidity 0.8.20; | ||
|
||
import {WETH9} from "canonical-weth/WETH9.sol"; | ||
import {Script} from "forge-std/Script.sol"; | ||
import {BeefyClient} from "./BeefyClient.sol"; | ||
|
||
import {IGateway} from "./interfaces/IGateway.sol"; | ||
import {GatewayProxy} from "./GatewayProxy.sol"; | ||
import {Gateway} from "./Gateway.sol"; | ||
import {GatewayUpgradeMock} from "../test/mocks/GatewayUpgradeMock.sol"; | ||
import {Agent} from "./Agent.sol"; | ||
import {AgentExecutor} from "./AgentExecutor.sol"; | ||
import {ParaID, Config} from "./Types.sol"; | ||
import {SafeNativeTransfer} from "./utils/SafeTransfer.sol"; | ||
import {stdJson} from "forge-std/StdJson.sol"; | ||
|
||
contract FundAgent is Script { | ||
using SafeNativeTransfer for address payable; | ||
using stdJson for string; | ||
|
||
function setUp() public {} | ||
|
||
function run() public { | ||
uint256 privateKey = vm.envUint("PRIVATE_KEY"); | ||
address deployer = vm.rememberKey(privateKey); | ||
vm.startBroadcast(deployer); | ||
|
||
uint256 initialDeposit = vm.envUint("BRIDGE_HUB_INITIAL_DEPOSIT"); | ||
address gatewayAddress = vm.envAddress("GATEWAY_PROXY_CONTRACT"); | ||
|
||
bytes32 bridgeHubAgentID = vm.envBytes32("BRIDGE_HUB_AGENT_ID"); | ||
bytes32 assetHubAgentID = vm.envBytes32("ASSET_HUB_AGENT_ID"); | ||
|
||
address bridgeHubAgent = IGateway(gatewayAddress).agentOf(bridgeHubAgentID); | ||
address assetHubAgent = IGateway(gatewayAddress).agentOf(assetHubAgentID); | ||
|
||
payable(bridgeHubAgent).safeNativeTransfer(initialDeposit); | ||
payable(assetHubAgent).safeNativeTransfer(initialDeposit); | ||
|
||
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
Oops, something went wrong.