// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.13; // Portal's interface from their docs interface IPortalTokenBridge { struct Transfer { uint8 payloadID; uint256 amount; bytes32 tokenAddress; uint16 tokenChain; bytes32 to; uint16 toChain; uint256 fee; } struct TransferWithPayload { uint8 payloadID; uint256 amount; bytes32 tokenAddress; uint16 tokenChain; bytes32 to; uint16 toChain; bytes32 fromAddress; bytes payload; } struct AssetMeta { uint8 payloadID; bytes32 tokenAddress; uint16 tokenChain; uint8 decimals; bytes32 symbol; bytes32 name; } struct RegisterChain { bytes32 module; uint8 action; uint16 chainId; uint16 emitterChainID; bytes32 emitterAddress; } struct UpgradeContract { bytes32 module; uint8 action; uint16 chainId; bytes32 newContract; } struct RecoverChainId { bytes32 module; uint8 action; uint256 evmChainId; uint16 newChainId; } event ContractUpgraded( address indexed oldContract, address indexed newContract ); function transferTokensWithPayload( address token, uint256 amount, uint16 recipientChain, bytes32 recipient, uint32 nonce, bytes memory payload ) external payable returns (uint64 sequence); function completeTransferWithPayload( bytes memory encodedVm ) external returns (bytes memory); function parseTransferWithPayload( bytes memory encoded ) external pure returns (TransferWithPayload memory transfer); function wrappedAsset( uint16 tokenChainId, bytes32 tokenAddress ) external view returns (address); function isWrappedAsset(address token) external view returns (bool); }