Data Type
The structures and enumerations used in Protocolink contracts.
NONE
: Do not wrap the native token when Protocolink executes the protocol operation.WRAP_BEFORE
: Wrap the native token before Protocolink executes the protocol operation.UNWRAP_AFTER
: Unwrap the token after Protocolink executes the protocol operation.
token
: The address of the input token.balanceBps
: The value represents how much percentage of the token balance will be used. The base is10_000
which means7_000
represents 70% of the token balance. If you want to use a fixed amount instead, set this value to0
.amountOrOffset
: The value represents the fixed token amount in use whenbalanceBps
is set to0
. Otherwise, it represents the byte offset for replacing the amount value in theLogic.data
. If the amount value does not need to be replaced, setamountOrOffset
to1<<255
.
Check more details at #execute-transactions-with-balancelink.
to
: The contract address that Protocolink interacts with.data
: The transaction data to execute.inputs
: The token addresses and amounts expected to be used in the transaction.wrapMode
: Specifies whether the native tokens need to be wrapped (e.g., ETH to WETH). If the native tokens need to be wrapped, set it toWRAP_BEFORE
. If the tokens need to be unwrapped after the transaction data is executed, set it toUNWRAP_AFTER
. Otherwise, set it toNONE
.approveTo
: Authorize a contract address, such as Paraswap TokenTransferProxy, that does not equal theto
address. If theapproveTo
address equals theto
address, fill in theapproveTo
address withaddress(0)
.callback
: The callback address is provided to a flash loan contract to execute subsequent operations.
permit2Datas
: The Permit2 data for pulling tokens from the user address.logics
: The operations for Protocolink to interact with other protocols.tokensReturn
: The specified tokens should be sent back to the user address at the end of the transaction.nonce
: A one-time used value to prevent signature replay attack.deadline
: The signature expiration time.
token
: The fee token address.amount
: The fee amount.metadata
: The fee source that is used only for events.
logics
: The operations for Protocolink to interact with other protocols.fees
: The fees that are charged by Protocolink.referrals
: The receivers of the fees and the fee rates.deadline
: The signature expiration time.
permit2Datas
: The Permit2 data for pulling tokens from the user address.logicBatch
: The operations for Protocolink to interact with other protocols.tokensReturn
: The specified tokens should be sent back to the user address at the end of the transaction.nonce
: A one-time used value to prevent signature replay attack.deadline
: The signature expiration time.
delegatee
: The delegatee address.expiry
: The delegation expiration time.nonce
: A one-time used value to prevent signature replay attack.deadline
: The signature expiration time.
expiry
: The delegation expiration time.nonce
: A one-time used value to prevent signature replay attack.
Last updated