MULTI_SEND
flag (leveraging battle-tested gnosisSafe transaction builder multisend library), the deSwap API now offers transaction bundling. It's a way to optionally pass multiple transaction calls that will be invoked sequentially one after another on the destination chain after the conversion is done and the target token (the result of a cross-chain swap) is obtained. This opens limitless possibilities for performing custom operations with the target token straight within the same atomic cross-chain transaction!stake()
method, passing the appropriate values to its arguments:_aavePoolAddress=0x794a61358D6845594F94dc1DB02A252b5b4814aD
(AAVE USDC pool on Polygon);_stakeAssetAddress=0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174
(USDC on Polygon);_onBehalfOf
is a user's wallet address;_fallbackAddress
is a user's wallet address (typically the same as above).0x38426877000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001
.
dstChainTxBundle
parameter; separate the address and the call with the comma, and separate each transaction (if there are multiple transactions) with a semicolon:dstChainTxBundle=0xOpErAtOrCoNtRaCtAdDrEsS00000000000000001,0x38426877000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001
dstBaseGasAmount
parameter: this will allow the deSwap API backend to correctly calculate the recommended gas fee to include (former execution fee, a small amount of the intermediary token that incentivizes anyone to execute the transaction on the destination chain).dstChainTokenOutRecipient
parameter to the address of your operator smart contract rather than the user wallet's address. This is extremely important as we agreed that the resulting amount of target tokens will be transferred to the operator smart contract which will be called in the same atomic transaction performing the operation you've encoded above.