Raw units vs display strings
Use string literals for token amounts that may move value. The string parser is decimal-exact and rejects scientific notation, negative values, and excess fractional precision.
- Use parse_units('2500', 6) for 2,500 USDC-style tokens.
- Use parse_ether for ETH and WETH amounts with the fixed 18-decimal scale.
- Use format_units or format_ether when you need display strings from raw integer balances.
- Do not pass FLOAT or DOUBLE values for capital-moving token amounts; those overloads are convenience-only and inherit floating point ambiguity before conversion.
Local SQL