mirror of
https://github.com/luxfi/api.git
synced 2026-09-24 00:24:53 +00:00
v1.1.11
The set was Uint32, Uint64, Float64. Two widths the chain actually uses were missing, so callers reached past this package for both. Uint16 is what platformvm's API already asks for today. Uint256 is the width the EVM carries. A wei value, a token balance or a supply does not fit in 64 bits — an 18-decimal balance passes 2^64 at about 18.4 tokens — so every such field arriving here had to become a bare string or a hand-rolled big.Int. It is uint256.Int rather than big.Int because a fixed-size value cannot be nil and does not allocate; the module was already in the graph. Every numeric here is a QUOTED decimal, which is the point of the package: a JSON number is a float64, and a uint64 above 2^53 does not survive one. The test asserts Uint64 REFUSES a value it cannot hold, which is the failure Uint256 exists to prevent. Unquoting was written out once per type and is now read in one place. Adding two more types would have made five copies of it.
Languages
Go
79.5%
Cap'n Proto
12.8%
ZAP
7.7%