Function: validateFeePortionConstraints()
Gala Launchpad SDK 9.0.0-rc.5 / index / validateFeePortionConstraints
Function: validateFeePortionConstraints()
validateFeePortionConstraints(
minFee,maxFee,fieldName):void
Defined in: packages/launchpad-sdk/dist/utils/validation-patterns.d.ts:721
Validates reverse bonding curve fee portion bounds.
Ensures that:
- minFee >= 0.1 (minimum fee portion)
- maxFee <= 0.5 (maximum fee portion)
- minFee <= maxFee (logical ordering)
Parameters
minFee
string | number
Minimum fee portion (0.1 to 0.5)
maxFee
string | number
Maximum fee portion (0.1 to 0.5)
fieldName
string
Field name for error messages
Returns
void
Throws
If constraints are violated
Examples
// Valid: min=0.1, max=0.5
validateFeePortionConstraints('0.1', '0.5', 'reverseBondingCurve');
// Invalid: max > 0.5
validateFeePortionConstraints(0.1, 0.6, 'feeConfig'); // throws
// Invalid: min < 0.1
validateFeePortionConstraints(0.05, 0.5, 'feeConfig'); // throws
// Invalid: min > max
validateFeePortionConstraints(0.4, 0.2, 'feeConfig'); // throws