Skip to main content
Version: Next

Function: bnToUint256()

bnToUint256(bn): Uint256

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

Convert BigNumberish (string | number | bigint) to Uint256 Legacy support Export

Parameters

bn

BigNumberish

value to convert to Uint256

Returns

Uint256

Uint256 object representing the BigNumberish value

Example

const result = uint256.bnToUint256(1000000000n);
// result = {"low": "0x3b9aca00", "high": "0x0"}