Core

Structs & enums used in the contract

struct Action {
ActionType actionType;
bytes32 protocolName;
uint256 adapterIndex;
address[] tokens;
uint256[] amounts;
AmountType[] amountTypes;
bytes data;
}
struct Output {
address token;
uint256 amount;
}
enum ActionType { None, Deposit, Withdraw }
enum AmountType { None, Relative, Absolute }

Functions

executeActions

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

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

Parameter

Description

actions

Array of actions to be executed on Core contract.

requiredOutputs

Array of required token amounts to be returned after the execution of all the actions from actions array.

account

Address of the user that receives the resulting tokens.

actualOutputs

Array of actual token amounts to be returned after the execution of all the actions from actions array (note: only tokens from requiredOutputs are listed).