all files / contracts/lib/ InterchainCalls.sol

100% Statements 0/0
100% Branches 0/0
100% Functions 0/0
100% Lines 0/0
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                                                               
// SPDX-License-Identifier: MIT
 
pragma solidity ^0.8.0;
 
library InterchainCalls {
    /**
     * @dev An interchain call to be executed at the destination chain
     * @param destinationChain destination chain
     * @param destinationContract destination contract
     * @param gas The amount of native token to transfer to the target contract as gas payment for the interchain call
     * @param calls An array of calls to be executed at the destination chain
     */
    struct InterchainCall {
        string destinationChain;
        string destinationContract;
        uint256 gas;
        Call[] calls;
    }
 
    /**
     * @dev A call to be executed at the destination chain
     * @param target The address of the contract to call
     * @param value The amount of native token to transfer to the target contract
     * @param callData The data to pass to the target contract
     */
    struct Call {
        address target;
        uint256 value;
        bytes callData;
    }
}