input token
is the token being swapped, and the output token
is the token the input token is being swapped for. So, for example, if the operation will swap USDC for OS, USDC is the input token and OS is the output token.
If the operation involves a transfer, we have only one token, so the input-output dichotomy does not apply.name
-> represents the name of the contract.blockInterval
-> the interval of time (expressed in blocks) that must pass between each execution of an operation.lastBlock
-> It can be populated to program a delayed operation start. In this way the first Operation cannot be executed until the lastBlock+blockInterval
is reached. If it is set as 0 the first Operation can be performed at any time. In both cases, all subsequent operations can be executed every blockInterval
.callerRewardPercentage
-> the reward the executor will receive. Allows the creation of an incentive for executing the operation with a public call, not only the call by the internal hosting of the contract. The executor can freely choose to be rewarded with either input or output tokens; for example, if the operation swaps OS (input token) for ETH (output token), he can choose to be rewarded in either.inputTokenAddress
-> address
of the operations' input token.inputTokenAmount
-> amount
of the input token.inputTokenAmountIsPercentage
-> boolean value that expresses whether the amount of the input token (previous field) is expressed as a percentage value (true
) or not (false
). If the InputTokenAmountIsPercentage
value is true
, the percentage is expressed in reference to the total supply
of the input token. If the value is false
, only the amount is expressed.ammPlugin
-> address
of the AMM chosen to be used for possible token swap operations. If the ammPlugin
address is passed as the Uniswap v3 swap router address, Uniswap v3 is used to perform the Operation. This field is equal to address(0)
if the operation is a transfer
. liquidityPoolAddresses
-> array containing the liquidity pool token addresses
of a swap operation (so this field is only populated if a swap operation is involved). The first element of the array must necessarily contain the input token.swapPath
-> This array contains the path that the swap operation must follow (so this field is only populated if a swap operation is involved). So for example, if you have an operation that swaps OS to ETH and then to USDC, you'll have the liquidityPoolAddresses
containing OS/ETH LP address
in the fist position and ETH/USDC LP address
in the second place. The swapPath
array will contain ETH in the first position and USDC in the second one.enterInEth
-> expresses whether the input token is ETH (true
) or not (false
).exitInEth
-> expresses whether the output token is ETH (true
) or not (false
).receivers
-> array that contains the addresses of the various receivers in case of a transfer operation. If it is passed as address(0)
, a burn operation is performed.receiversPercentages
-> array that contains the percentages of the various receivers in case of a transfer operation. The length of this array must be equal to receivers array length -1
, the last percentage is in fact calculated automatically.