> For the complete documentation index, see [llms.txt](https://intensity-labs.gitbook.io/integration-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://intensity-labs.gitbook.io/integration-docs/integration-guide-sdk/one-shot/executing-transactions.md).

# Executing Transactions

Execute transactions to fulfill your users' intents.

Once you [know the route](/integration-docs/integration-guide-sdk/one-shot/fetch-quote.md) you'd like to utilize, you need to execute that transaction<br>

To execute a transaction, you'll need to input the result of the `fetchQuote` function.

<pre class="language-tsx" data-full-width="false"><code class="lang-tsx">// 1. Fetch quote
const quote = await client.fetchQuote({
      srcChain: 1, // Ethereum
      destChain: 8453, // Base
      srcToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
      destToken: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', // WBTC
      amount: '1000000000000000000', // 1 ETH
      senderAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
      affiliateWallet: '0x123...',
      affiliateFee: '1',
      slippage: 0.5,
      destinationAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
});

// 2. Check if quote is valid
    if (!quote.status) {
      console.error('Invalid quote:', quote.error);
      return;
    }

// 3. Approve Tokens 
const hash = await signer.writeContract({
      address: tokenIn.address,
      abi: erc20Abi,
<strong>      functionName: 'approve',
</strong>      args: [quote.calldatas.to, maxUint256],
      account: signer.account,
      chain: chain, //srcChain
});

// 4. Estimate Gas 
const estimatedGas = await provider.estimateGas({
      to: quote.calldatas.to,
      data: quote.calldatas.data,
      value: BigInt(quote.calldatas?.value ?? 0),
      account: signer.account,
      blockTag: 'latest',
});

// Increase estimated gas by 20%
const gas = BigInt(Math.ceil(Number(estimatedGas) * 1.2));


// 5. Execute Transaction 
const hash = await signer.sendTransaction({
      to: quote.calldatas.to,
      data: quote.calldatas.data,
<strong>      value: BigInt(quote.calldatas?.value ?? 0),
</strong>      account: signer.account,
      gas,
      chain,
});
</code></pre>
