1

Setup Web SDK

Make sure you completed the Getting Started guide.

2

Setup your Gas Tank (for Mainnet only)

If you plan to send transactions on mainnet, you need to setup your gas tank. Go to Gas Sponsorhip to learn how to setup your gas tank.

All Sequence smart wallet transactions are sponsored by default on testnets.

3

Send a sponsored transaction

Next, we’ll create a simple component to send a sponsored transaction.

import React, { useState, useEffect } from 'react';
import { Button, Card, Select, Text } from '@0xsequence/design-system';
import { useAccount, useSendTransaction } from 'wagmi';

export const SponsoredTransactionExample = () => {
  const { address } = useAccount();

  const {
    sendTransaction,
    isPending,
    isSuccess,
    data: txHash
  } = useSendTransaction();

  const sendSponsoredTx = () => {
    if (!address) return;
    // Sending a dummy tx
    sendTransaction({
      to: address,
      value: BigInt(0),
      gas: null
    });
  };

  return (
    <>
      <div>
        <Text>Address: {address}</Text>
        <Button onClick={sendSponsored}>Send Sponsored</Button>
        {isPending && <Text>Pending...</Text>}
        {isSuccess && <Text>Success! Tx Hash: {txHash}</Text>}
      </div>
    </>
  )
}

Congratulations! You’ve just learned how to send a sponsored transaction using Sequence Kit.