Quote, build, approve (if needed), send, and confirm a swap in one call.
The swap transaction hash and the receipt.
const { hash, receipt, quote } = await executeSwap(hood, { tokenIn: TESTNET_ADDRESSES.weth, tokenOut: TESTNET_STOCK_TOKENS.NFLX, amountIn: parseEther('0.0001'),}) Copy
const { hash, receipt, quote } = await executeSwap(hood, { tokenIn: TESTNET_ADDRESSES.weth, tokenOut: TESTNET_STOCK_TOKENS.NFLX, amountIn: parseEther('0.0001'),})
Quote, build, approve (if needed), send, and confirm a swap in one call.