forked from pooltogether/ERC5164
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BridgeToMumbai.s.sol
33 lines (23 loc) · 887 Bytes
/
BridgeToMumbai.s.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.16;
import "forge-std/Script.sol";
import { DeployedContracts } from "../helpers/DeployedContracts.sol";
import { IMessageDispatcher } from "../../src/interfaces/IMessageDispatcher.sol";
import { MessageDispatcherPolygon } from "../../src/ethereum-polygon/EthereumToPolygonDispatcher.sol";
import "../../src/libraries/MessageLib.sol";
import { Greeter } from "../../test/contracts/Greeter.sol";
contract BridgeToMumbai is DeployedContracts {
function bridgeToMumbai() public {
MessageDispatcherPolygon _messageDispatcher = _getMessageDispatcherPolygon();
_messageDispatcher.dispatchMessage(
80001,
address(_getGreeterPolygon()),
abi.encodeCall(Greeter.setGreeting, ("Hello from L1"))
);
}
function run() public {
vm.broadcast();
bridgeToMumbai();
vm.stopBroadcast();
}
}