zeekay 084841011e feat(types): the JSON-RPC boundary carries 16- and 256-bit numbers too
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.
2026-08-28 21:22:30 -07:00
2026-01-16 11:52:14 -08:00
2026-08-20 20:20:09 -07:00
2026-08-21 00:19:32 -07:00
2026-07-26 10:01:48 -07:00
2026-01-16 11:52:14 -08:00
S
Description
No description provided
BSD-3-Clause
383 KiB
Languages
Go 79.5%
Cap'n Proto 12.8%
ZAP 7.7%