Structs, enums, and constants
Structs
Action
protocolAdapterName
— protocol adapter name converted to hex
actionType
— type of action to be executed
tokenAmounts
— array of tokens' addresses to be deposited/withdrawn
data
— additional data required for the action (depends on actionType
, adapterIndex
, and protocolName
).
Parameter of type
address[]
(oraddress
for 1 element) encoded asbytes
and corresponding values.web3.eth.abi.encodeParameter(type, value)
should be used with the following parameters:UNISWAP_EXCHANGE_ADAPTER
ACTION_DEPOSIT
type:
address[]
value:
path
UNISWAP_ADAPTER_ASSET
ACTION_DEPOSIT
type:
address
value:
pairAddress
BALANCER_ASSET_ADAPTER
ACTION_DEPOSIT
type:
address
value:
poolAddress
ACTION_WITHDRAW
type:
address
value:
underlyingTokenAddress
CURVE_ASSET_ADAPTER
ACTION_DEPOSIT
type:
address
value:
poolAddress
ACTION_WITHDRAW
type:
address
value:
underlyingTokenAddress
All other cases:
EMPTY_BYTES
TokenAmount
token
— address of token used for input
amount
— token amount for input (absolute or relative)
absolute amount is passed in wei
relative amount is passed in share (e.g.
0.5
for 50%) multiplied by1e18
(eventually, it's5e17
for 50%)
amountType
— indicator whether amount is absolute or relative