Skip to main content

index/functions/formatLaunchpadTokenForDTO.md

formatLaunchpadTokenForDTO(num): string

Format a launchpad token amount for DTO validation (18 decimal limit)

Launchpad tokens use 18 decimal places following ERC-20 standard. This function ensures full precision is maintained for token amounts.

Parameters​

ParameterTypeDescription
numstringToken amount as string

Returns​

string

Formatted string with maximum 18 decimal places

Example​

formatLaunchpadTokenForDTO('1000.123456789012345678') // '1000.123456789012345678'
formatLaunchpadTokenForDTO('0.000000000000000001') // '0.000000000000000001'