2021-10-05 11:08:04 +02:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.7.0;
|
2021-10-06 16:51:46 +02:00
|
|
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
2021-10-05 11:08:04 +02:00
|
|
|
|
|
|
|
// https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#call-a-method-in-another-chain-using-the-amb-bridge
|
|
|
|
interface IAMB {
|
|
|
|
function messageSender() external view returns (address);
|
|
|
|
|
|
|
|
function messageSourceChainId() external view returns (bytes32);
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IOmniBridge {
|
|
|
|
function bridgeContract() external view returns (IAMB);
|
|
|
|
}
|
2021-10-06 16:51:46 +02:00
|
|
|
|
|
|
|
interface IERC6777 is IERC20 {
|
|
|
|
function transferAndCall(
|
|
|
|
address,
|
|
|
|
uint256,
|
|
|
|
bytes calldata
|
|
|
|
) external returns (bool);
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IERC20Receiver {
|
|
|
|
function onTokenBridged(
|
|
|
|
IERC6777 token,
|
|
|
|
uint256 value,
|
|
|
|
bytes calldata data
|
|
|
|
) external;
|
|
|
|
}
|