pub struct BlockAggregatedChanges {Show 15 fields
pub extractor: String,
pub chain: Chain,
pub block: Block,
pub finalized_block_height: u64,
pub revert: bool,
pub new_tokens: HashMap<Bytes, ResponseToken>,
pub account_updates: HashMap<Bytes, AccountUpdate>,
pub state_updates: HashMap<String, ProtocolStateDelta>,
pub new_protocol_components: HashMap<String, ProtocolComponent>,
pub deleted_protocol_components: HashMap<String, ProtocolComponent>,
pub component_balances: HashMap<String, TokenBalances>,
pub account_balances: HashMap<Bytes, HashMap<Bytes, AccountBalance>>,
pub component_tvl: HashMap<String, f64>,
pub dci_update: DCIUpdate,
pub partial_block_index: Option<u32>,
}Expand description
A container for updates grouped by account/component.
Fields§
§extractor: String§chain: Chain§block: Block§finalized_block_height: u64§revert: bool§new_tokens: HashMap<Bytes, ResponseToken>§account_updates: HashMap<Bytes, AccountUpdate>§state_updates: HashMap<String, ProtocolStateDelta>§new_protocol_components: HashMap<String, ProtocolComponent>§deleted_protocol_components: HashMap<String, ProtocolComponent>§component_balances: HashMap<String, TokenBalances>§account_balances: HashMap<Bytes, HashMap<Bytes, AccountBalance>>§component_tvl: HashMap<String, f64>§dci_update: DCIUpdate§partial_block_index: Option<u32>The index of the partial block. None if it’s a full block.
Implementations§
Source§impl BlockAggregatedChanges
impl BlockAggregatedChanges
pub fn new( extractor: &str, chain: Chain, block: Block, finalized_block_height: u64, revert: bool, account_updates: HashMap<Bytes, AccountUpdate>, state_updates: HashMap<String, ProtocolStateDelta>, new_protocol_components: HashMap<String, ProtocolComponent>, deleted_protocol_components: HashMap<String, ProtocolComponent>, component_balances: HashMap<String, HashMap<Bytes, ComponentBalance>>, account_balances: HashMap<Bytes, HashMap<Bytes, AccountBalance>>, dci_update: DCIUpdate, ) -> Self
pub fn merge(self, other: Self) -> Self
pub fn get_block(&self) -> &Block
pub fn is_revert(&self) -> bool
pub fn filter_by_component<F: Fn(&str) -> bool>(&mut self, keep: F)
pub fn filter_by_contract<F: Fn(&Bytes) -> bool>(&mut self, keep: F)
pub fn n_changes(&self) -> usize
pub fn drop_state(&self) -> Self
pub fn is_partial_block(&self) -> bool
Trait Implementations§
Source§impl Clone for BlockAggregatedChanges
impl Clone for BlockAggregatedChanges
Source§fn clone(&self) -> BlockAggregatedChanges
fn clone(&self) -> BlockAggregatedChanges
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockAggregatedChanges
impl Debug for BlockAggregatedChanges
Source§impl Default for BlockAggregatedChanges
impl Default for BlockAggregatedChanges
Source§fn default() -> BlockAggregatedChanges
fn default() -> BlockAggregatedChanges
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BlockAggregatedChanges
impl<'de> Deserialize<'de> for BlockAggregatedChanges
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<BlockAggregatedChanges> for BlockAggregatedChanges
impl From<BlockAggregatedChanges> for BlockAggregatedChanges
Source§fn from(value: BlockAggregatedChanges) -> Self
fn from(value: BlockAggregatedChanges) -> Self
Converts to this type from the input type.
Source§impl From<BlockAggregatedChanges> for BlockAggregatedChanges
impl From<BlockAggregatedChanges> for BlockAggregatedChanges
Source§fn from(value: BlockAggregatedChanges) -> Self
fn from(value: BlockAggregatedChanges) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BlockAggregatedChanges
impl PartialEq for BlockAggregatedChanges
Source§fn eq(&self, other: &BlockAggregatedChanges) -> bool
fn eq(&self, other: &BlockAggregatedChanges) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BlockAggregatedChanges
impl Serialize for BlockAggregatedChanges
impl StructuralPartialEq for BlockAggregatedChanges
Auto Trait Implementations§
impl !Freeze for BlockAggregatedChanges
impl RefUnwindSafe for BlockAggregatedChanges
impl Send for BlockAggregatedChanges
impl Sync for BlockAggregatedChanges
impl Unpin for BlockAggregatedChanges
impl UnsafeUnpin for BlockAggregatedChanges
impl UnwindSafe for BlockAggregatedChanges
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more