class Gas {

  public static Gas valueOf(UInt256 value) {
    if (value.compareTo(UINT256_MAX_CONSTANT) <= 0) {
      return CONSTANTS[value.intValue()];
    }
    if (!value.fitsLong()) {
      throw new IllegalArgumentException("Gas value cannot be larger than 2^63 - 1");
    }
    return new Gas(value.toLong());
  }

  private  Gas(long value);

}