tuweni / org.apache.tuweni.units.ethereum / Gas

Gas

class Gas (source)

A unit measure of Gas as used by the Ethereum VM.

Functions

add

fun add(other: Gas): Gas

compareTo

fun compareTo(other: Long): Int

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

priceFor

fun priceFor(gasPrice: Wei): Wei

The price of this amount of gas given the provided price per unit of gas.

toBytes

fun toBytes(): Bytes

toLong

fun toLong(): Long

toMinimalBytes

fun toMinimalBytes(): Bytes

toString

fun toString(): String

valueOf

static fun valueOf(value: UInt256): Gas
static fun valueOf(value: Long): Gas
static fun valueOf(value: BigInteger): Gas

Return a Gas containing the specified value.