index/interfaces/CalculateBuyAmountForGraduationOptions.md
Options for calculating buy amount for graduation
Graduation requires purchasing all remaining tokens in the pool. Performance optimization: provide currentSupply to avoid fetching pool details twice.
Example
import { CALCULATION_MODES } from '@gala-chain/launchpad-sdk';
// Basic usage (fetches pool details internally)
const cost = await sdk.calculateBuyAmountForGraduation({ tokenName: 'anime' });
// Performance-optimized (reuse fetched pool details)
const poolDetails = await sdk.fetchPoolDetailsForCalculation('anime');
const cost = await sdk.calculateBuyAmountForGraduation({
tokenName: 'anime',
calculateAmountMode: CALCULATION_MODES.LOCAL,
currentSupply: poolDetails.currentSupply
});
Properties
calculate amount mode current supply token name