Alchemy Logo

bigIntClamp

function bigIntClamp(value, lower, upper): bigint;

Defined in: aa-sdk/core/src/utils/bigint.ts:41

Given a bigint and a min-max range, returns the min-max clamped bigint value

ParameterTypeDescription
valueBigNumberisha bigint value to clamp
loweranylower bound min max tuple value
upperanyupper bound min max tuple value

bigint

the clamped bigint value per given range

Was this page helpful?