hoodchain - v0.1.0
    Preparing search index...

    Function executeSwap

    • Quote, build, approve (if needed), send, and confirm a swap in one call.

      Parameters

      Returns Promise<
          {
              amountOutMinimum: bigint;
              hash: `0x${string}`;
              quote: SwapQuote;
              receipt: TransactionReceipt;
          },
      >

      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'),
      })