pub struct BalanceChange {
pub address: Vec<u8>,
pub old_value: Option<BigInt>,
pub new_value: Option<BigInt>,
pub reason: i32,
pub ordinal: u64,
}
Fields§
§address: Vec<u8>
Address is the address of the account that has changed balance.
old_value: Option<BigInt>
OldValue is the balance of the address before the change. This value can be nil/null/None if there was no previous balance for the address. It is safe in those case(s) to consider the balance as being 0.
If you consume this from a Substreams, you can safely use:
let old_value = old_value.unwrap_or_default();
new_value: Option<BigInt>
NewValue is the balance of the address after the change. This value can be nil/null/None if there was no previous balance for the address after the change. It is safe in those case(s) to consider the balance as being 0.
If you consume this from a Substreams, you can safely use:
let new_value = new_value.unwrap_or_default();
reason: i32
Reason is the reason why the balance has changed. This is useful to determine why the balance has changed and what is the context of the change.
ordinal: u64
The block’s global ordinal when the balance change was recorded, refer to [Block] documentation for further information about ordinals and total ordering.
Implementations§
Source§impl BalanceChange
impl BalanceChange
Trait Implementations§
Source§impl Clone for BalanceChange
impl Clone for BalanceChange
Source§fn clone(&self) -> BalanceChange
fn clone(&self) -> BalanceChange
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BalanceChange
impl Debug for BalanceChange
Source§impl Default for BalanceChange
impl Default for BalanceChange
Source§impl Message for BalanceChange
impl Message for BalanceChange
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.