input tokenis the token being swapped, and the
output tokenis 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+blockIntervalis 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
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.
addressof the operations' input token.
amountof 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
true, the percentage is expressed in reference to the
total supplyof the input token. If the value is
false, only the amount is expressed.
addressof the AMM chosen to be used for possible token swap operations. If the
ammPluginaddress 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
liquidityPoolAddresses-> array containing the liquidity pool token
addressesof 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
liquidityPoolAddressescontaining OS/ETH LP
addressin the fist position and ETH/USDC LP
addressin the second place. The
swapPatharray will contain ETH in the first position and USDC in the second one.
enterInEth-> expresses whether the input token is ETH (
true) or not (
exitInEth-> expresses whether the output token is ETH (
true) or not (
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.