u256
Call Signature
Section titled “Call Signature”u256():
Column<"u256",false,false,false>
Defined in: src/schema/values.ts:137
A u256 column, indexed for equality and range queries once .indexed().
Returns
Section titled “Returns”Column<"u256", false, false, false>
Call Signature
Section titled “Call Signature”u256(
value):U256Value
Defined in: src/schema/values.ts:151
A 256-bit unsigned integer. The type for token amounts and anything else that can outgrow 2⁶⁴ — reach for u64 first for counters, timestamps and block heights.
Parameters
Section titled “Parameters”A non-negative integer, as a bigint, a safe number, or a decimal or 0x hex
string.
string | number | bigint
Returns
Section titled “Returns”Throws
Section titled “Throws”If the value is negative, non-integral, or wider than 256 bits.
Example
Section titled “Example”u256(1_000_000n)u256(Date.now()) // safe integers are acceptedu256("0xf4240") // hex, as it comes back over JSON-RPC