Struct substreams_ethereum_core::scalar::EthBigInt
source · pub struct EthBigInt { /* private fields */ }Implementations§
source§impl EthBigInt
impl EthBigInt
pub fn new(i: BigInt) -> EthBigInt
pub fn get_big_int(&self) -> BigInt
pub fn to_decimal(&self, decimals: u64) -> BigDecimal
Trait Implementations§
source§impl From<U128> for EthBigInt
impl From<U128> for EthBigInt
source§fn from(value: U128) -> EthBigInt
fn from(value: U128) -> EthBigInt
This implementation assumes that U128 represents an unsigned U128,
and not a signed U128 (aka int128 in Solidity). Right now, this is
all we need (for block numbers). If it ever becomes necessary to
handle signed U128s, we should add the same
{to,from}_{signed,unsigned}_u128 methods that we have for U256.
source§impl From<U64> for EthBigInt
impl From<U64> for EthBigInt
source§fn from(value: U64) -> EthBigInt
fn from(value: U64) -> EthBigInt
This implementation assumes that U64 represents an unsigned U64,
and not a signed U64 (aka int64 in Solidity). Right now, this is
all we need (for block numbers). If it ever becomes necessary to
handle signed U64s, we should add the same
{to,from}_{signed,unsigned}_u64 methods that we have for U64.
source§impl Ord for EthBigInt
impl Ord for EthBigInt
source§impl PartialEq<EthBigInt> for EthBigInt
impl PartialEq<EthBigInt> for EthBigInt
source§impl PartialOrd<EthBigInt> for EthBigInt
impl PartialOrd<EthBigInt> for EthBigInt
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more