This site requires Javascript to be enabled.


The math functions utilized by CosmWasm are based on standard Rust, but helper functions are provided for u128, u64, and decimals.


A lightweight u128 wrapper utilizing string-based JSON encoding/decoding, enabling the complete u128 range for clients that process JSON numbers as floats, such as JavaScript and jq.


A thin layer encompassing u64, which employs strings for JSON encoding and decoding, allowing the complete u64 range to be utilized by clients that change JSON numbers to floats, such as JavaScript and jq.


A fixed-point decimal value featuring 18 fractional digits; for example, Decimal(1_000_000_000_000_000_000) == 1.0. The largest possible value that can be represented is 340282366920938463463.374607431768211455 (equivalent to (2^128 - 1) / 10^18).