extractChainId function

int extractChainId(
  1. int v
)

Implementation

int extractChainId(int v) {
  // Ensure `v` is a BigInt
  if (v >= 35) {
    return (v - 35) >> 1;
  } else {
    throw ArgumentError("v parameter does not contain a chain id");
  }
}