pub struct BlockChanges {Show 14 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,
}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: DCIUpdateImplementations§
Source§impl BlockChanges
impl BlockChanges
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
Trait Implementations§
Source§impl Clone for BlockChanges
impl Clone for BlockChanges
Source§fn clone(&self) -> BlockChanges
fn clone(&self) -> BlockChanges
Returns a duplicate of the value. Read more
1.0.0 · 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 BlockChanges
impl Debug for BlockChanges
Source§impl Default for BlockChanges
impl Default for BlockChanges
Source§fn default() -> BlockChanges
fn default() -> BlockChanges
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BlockChanges
impl<'de> Deserialize<'de> for BlockChanges
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 BlockChanges
impl From<BlockAggregatedChanges> for BlockChanges
Source§fn from(value: BlockAggregatedChanges) -> Self
fn from(value: BlockAggregatedChanges) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BlockChanges
impl PartialEq for BlockChanges
Source§impl Serialize for BlockChanges
impl Serialize for BlockChanges
impl StructuralPartialEq for BlockChanges
Auto Trait Implementations§
impl !Freeze for BlockChanges
impl RefUnwindSafe for BlockChanges
impl Send for BlockChanges
impl Sync for BlockChanges
impl Unpin for BlockChanges
impl UnwindSafe for BlockChanges
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