Skip to main content
isSolanaGasSponsorshipEnabled returns whether SVM gas sponsorship is turned on in your project settings.
You don’t need to call this before sending a transaction. signAndSendTransaction 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

import { isSolanaGasSponsorshipEnabled } from '@dynamic-labs-sdk/solana';

if (isSolanaGasSponsorshipEnabled()) {
  console.log('SVM gas sponsorship is enabled for this project');
}

Return value

TypeDescription
booleantrue if SVM gas sponsorship is enabled, false otherwise

Requirements

  • A Dynamic Client must be initialized before calling this function
  • SVM gas sponsorship must be enabled in the Dynamic Dashboard under Settings > Embedded Wallets