pub struct SnapshotParameters<'a> {
pub chain: Chain,
pub protocol_system: &'a str,
pub components: &'a HashMap<ComponentId, ProtocolComponent>,
pub entrypoints: Option<&'a HashMap<String, Vec<(EntryPointWithTracingParams, TracingResult)>>>,
pub contract_ids: &'a [Bytes],
pub block_number: u64,
pub include_balances: bool,
pub include_tvl: bool,
}Expand description
Request body for fetching a snapshot of protocol states and VM storage.
This struct helps to coordinate fetching multiple pieces of related data (protocol states, contract storage, TVL, entry points).
Fields§
§chain: ChainWhich chain to fetch snapshots for
protocol_system: &'a strProtocol system name, required for correct state resolution
components: &'a HashMap<ComponentId, ProtocolComponent>Components to fetch protocol states for
entrypoints: Option<&'a HashMap<String, Vec<(EntryPointWithTracingParams, TracingResult)>>>Traced entry points data mapped by component id
contract_ids: &'a [Bytes]Contract addresses to fetch VM storage for
block_number: u64Block number for versioning
include_balances: boolWhether to include balance information
include_tvl: boolWhether to fetch TVL data
Implementations§
Source§impl<'a> SnapshotParameters<'a>
impl<'a> SnapshotParameters<'a>
pub fn new( chain: Chain, protocol_system: &'a str, components: &'a HashMap<ComponentId, ProtocolComponent>, contract_ids: &'a [Bytes], block_number: u64, ) -> Self
Sourcepub fn include_balances(self, include_balances: bool) -> Self
pub fn include_balances(self, include_balances: bool) -> Self
Set whether to include balance information (default: true)
Sourcepub fn include_tvl(self, include_tvl: bool) -> Self
pub fn include_tvl(self, include_tvl: bool) -> Self
Set whether to fetch TVL data (default: true)
pub fn entrypoints( self, entrypoints: &'a HashMap<String, Vec<(EntryPointWithTracingParams, TracingResult)>>, ) -> Self
Trait Implementations§
Source§impl<'a> Clone for SnapshotParameters<'a>
impl<'a> Clone for SnapshotParameters<'a>
Source§fn clone(&self) -> SnapshotParameters<'a>
fn clone(&self) -> SnapshotParameters<'a>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SnapshotParameters<'a>
impl<'a> Debug for SnapshotParameters<'a>
Source§impl<'a> PartialEq for SnapshotParameters<'a>
impl<'a> PartialEq for SnapshotParameters<'a>
impl<'a> StructuralPartialEq for SnapshotParameters<'a>
Auto Trait Implementations§
impl<'a> Freeze for SnapshotParameters<'a>
impl<'a> RefUnwindSafe for SnapshotParameters<'a>
impl<'a> Send for SnapshotParameters<'a>
impl<'a> Sync for SnapshotParameters<'a>
impl<'a> Unpin for SnapshotParameters<'a>
impl<'a> UnwindSafe for SnapshotParameters<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)