Structs & enums used in the contract

// The struct consists of name of the protocol adapter,
// action type, array of token amounts,
// and some additional data (depends on the protocol).
struct Action {
    bytes32 protocolAdapterName;
    ActionType actionType;
    TokenAmount[] tokenAmounts;
    bytes data;

// The struct consists of token address
// and its absolute amount.
struct AbsoluteTokenAmount {
    address token;
    uint256 amount;

enum ActionType { None, Deposit, Withdraw }

enum AmountType { None, Relative, Absolute }



The main function for interaction with Core contract. For smart contract integration without Router contract, this function should be used.

function executeActions(
    Action[] actions,
    AbsoluteTokenAmount[] requiredOutputs,
    address payable account
) payable returns (AbsoluteTokenAmount[] actualOutputs)

Last updated