Skip to main content
Version: Next

Function: isUint256()

isUint256(bn): boolean

Defined in: src/utils/uint256.ts:34

Test BigNumberish is in the range[0, 2**256-1] Legacy support Export

Parameters

bn

BigNumberish

value to test

Returns

boolean

True if the input value is in the range[0, 2**256-1], false otherwise

Example

const result = uint256.isUint256(12345n);
// result = true
const result1 = uint256.isUint256(-1);
// result1 = false