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

# isSolanaGasSponsorshipEnabled

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

`isSolanaGasSponsorshipEnabled` returns whether SVM gas sponsorship is turned on in your project settings.

<Note>
  You don't need to call this before sending a transaction. [`signAndSendTransaction`](/docs/javascript/reference/solana/signing-sending-transactions) already sponsors gas automatically when the project setting is on and the wallet supports it. Use this function for UI affordances (e.g. labeling a button "Send (Sponsored)") or analytics.
</Note>

## Usage

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={"system"}
    import { isSolanaGasSponsorshipEnabled } from '@dynamic-labs-sdk/solana';

    if (isSolanaGasSponsorshipEnabled()) {
      console.log('SVM gas sponsorship is enabled for this project');
    }
    ```
  </Tab>

  <Tab title="React">
    ```tsx theme={"system"}
    import { isSolanaGasSponsorshipEnabled, signAndSendTransaction, isSolanaWalletAccount } from '@dynamic-labs-sdk/solana';
    import { useGetWalletAccounts } from '@dynamic-labs-sdk/react-hooks';

    function SendButton({ transaction }) {
      const { data: walletAccounts = [] } = useGetWalletAccounts();
      const walletAccount = walletAccounts.find(isSolanaWalletAccount);
      const sponsored = isSolanaGasSponsorshipEnabled();

      const handleSend = async () => {
        if (!walletAccount) return;
        await signAndSendTransaction({ transaction, walletAccount });
      };

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

## Return value

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

## Requirements

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

## Related functions

* [SVM Gas Sponsorship](/docs/javascript/reference/solana/svm-gas-sponsorship)
* [Signing and Sending Transactions](/docs/javascript/reference/solana/signing-sending-transactions)
* [Adding Solana Extensions](/docs/javascript/reference/solana/adding-solana-extensions)
