Enable gasless transactions for users with sponsored gas fees using popular AA providers + Para. This guide covers how to configure gas sponsorship with various smart account libraries.

Prerequisites

You need a Para-enabled smart account client configured with your AA provider. Gas sponsorship is typically configured during the initial client setup.

Setup Smart Account Libraries

import { createModularAccountAlchemyClient } from "@account-kit/smart-contracts";
import { WalletClientSigner } from "@aa-sdk/core";
import { alchemy } from "@account-kit/infra";

// Gas sponsorship is enabled via the policyId parameter
const client = await createModularAccountAlchemyClient({
  transport: alchemy({ rpcUrl: ALCHEMY_RPC_URL }),
  chain: CHAIN,
  signer: walletClientSigner, // Para-enabled WalletClientSigner
  policyId: GAS_POLICY_ID,    // ← Enables gas sponsorship
  salt,
});

// The gas is automatically sponsored based on your policy
const userOpHash = await client.sendUserOperation({
  uo: {
    target: "0x...",          // Recipient address
    data: "0x",               // Transaction data
    value: 0n                 // ETH value to send
  }
});

// Wait for the transaction to be mined
const receipt = await client.waitForUserOperationReceipt({ hash: userOpHash });

Key Points

  • Gas sponsorship is configured during client setup - Each provider has a specific parameter or configuration that enables sponsorship (policyId, paymasterUrl, apiKey, etc.)
  • Transactions are automatically sponsored - Once configured, transactions sent through the smart account client will have their gas fees covered
  • No ETH required in user wallets - Users can interact with your dApp without holding ETH for gas fees
  • Provider-specific limits may apply - Check your provider’s dashboard for sponsorship limits and policies
  • Smart Wallet Deployment - Providers automatically handle smart wallet deployment if the account does not exist on first transaction