> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# isEvmGasSponsorshipEnabled

> Check if EVM gas sponsorship is enabled for your project.

Use `isEvmGasSponsorshipEnabled` to check if EVM gas sponsorship is enabled in your project settings before attempting to send sponsored transactions.

## Usage

```javascript theme={"system"}
import {
  isEvmGasSponsorshipEnabled,
  sendSponsoredTransaction,
} from '@dynamic-labs-sdk/evm';
import { createWalletClientForWalletAccount } from '@dynamic-labs-sdk/evm/viem';

const send = async (walletAccount, calls, transaction) => {
  if (isEvmGasSponsorshipEnabled()) {
    // Use sponsored transaction
    const { transactionHash } = await sendSponsoredTransaction({
      walletAccount,
      calls,
    });
    return transactionHash;
  }

  // Fall back to a regular user-paid transaction via viem
  const walletClient = await createWalletClientForWalletAccount({ walletAccount });
  return walletClient.sendTransaction(transaction);
};
```

## Return value

| Type      | Description                                                 |
| --------- | ----------------------------------------------------------- |
| `boolean` | `true` if EVM gas sponsorship is enabled, `false` otherwise |

## Requirements

* A [Dynamic Client](/javascript/reference/client/create-dynamic-client) must be initialized before calling this function
* EVM gas sponsorship must be enabled in the [Dynamic Dashboard](https://app.dynamic.xyz) under **Settings** > **Embedded Wallets**

## React

`isEvmGasSponsorshipEnabled` is synchronous and works the same in React. Use it inside a button handler to decide which send path to take:

```tsx theme={"system"}
import {
  isEvmGasSponsorshipEnabled,
  sendSponsoredTransaction,
  isEvmWalletAccount,
} from '@dynamic-labs-sdk/evm';
import { createWalletClientForWalletAccount } from '@dynamic-labs-sdk/evm/viem';
import { useGetWalletAccounts } from '@dynamic-labs-sdk/react-hooks';

function SendButton({ calls, transaction }) {
  const { data: walletAccounts = [] } = useGetWalletAccounts();
  const walletAccount = walletAccounts.find(isEvmWalletAccount);

  const handleSend = async () => {
    if (!walletAccount) return;

    if (isEvmGasSponsorshipEnabled()) {
      await sendSponsoredTransaction({ walletAccount, calls });
      return;
    }

    const walletClient = await createWalletClientForWalletAccount({ walletAccount });
    await walletClient.sendTransaction(transaction);
  };

  return (
    <button onClick={handleSend} disabled={!walletAccount}>
      Send {isEvmGasSponsorshipEnabled() ? '(Sponsored)' : ''}
    </button>
  );
}
```

## Related functions

* [EVM Gas Sponsorship](/javascript/reference/evm/evm-gas-sponsorship)
* [Getting a Viem WalletClient](/javascript/reference/evm/getting-viem-wallet-client)
* [isSolanaGasSponsorshipEnabled](/javascript/reference/solana/is-solana-gas-sponsorship-enabled)
