parseU256 static method

BigInt parseU256({
  1. Object? value,
})

Parses a value into an unsigned 256-bit integer (0–2^256−1).

Implementation

static BigInt parseU256({Object? value}) {
  try {
    final toint = BigintUtils.parse(value);
    return toint.asUint256;
  } catch (e) {
    throw BcsSerializationException(
        "Invalid value for move type 'U256': Expected an unsigned 256-bit integer (0–2^256−1).",
        details: {"value": "$value"});
  }
}