> ## 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.

# 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`](https://docs.dynamic.xyz/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.

## Usage

> [tab] JavaScript
>
> ```javascript theme={"system"}
> import { isSolanaGasSponsorshipEnabled } from '@dynamic-labs-sdk/solana';
>
> if (isSolanaGasSponsorshipEnabled()) {
>   console.log('SVM gas sponsorship is enabled for this project');
> }
> ```

> [tab] 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>
>   );
> }
> ```

## Return value

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

## Requirements

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

## Related functions

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.