fc_storage::overrides

Trait StorageOverride

Source
pub trait StorageOverride<Block: BlockT>: Send + Sync {
    // Required methods
    fn account_code_at(
        &self,
        at: Block::Hash,
        address: Address,
    ) -> Option<Vec<u8>>;
    fn account_storage_at(
        &self,
        at: Block::Hash,
        address: Address,
        index: U256,
    ) -> Option<H256>;
    fn current_block(&self, at: Block::Hash) -> Option<BlockV3>;
    fn current_receipts(&self, at: Block::Hash) -> Option<Vec<ReceiptV4>>;
    fn current_transaction_statuses(
        &self,
        at: Block::Hash,
    ) -> Option<Vec<TransactionStatus>>;
    fn elasticity(&self, at: Block::Hash) -> Option<Permill>;
    fn is_eip1559(&self, at: Block::Hash) -> bool;
}
Expand description

This trait is used to obtain Ethereum-related data.

Required Methods§

Source

fn account_code_at(&self, at: Block::Hash, address: Address) -> Option<Vec<u8>>

Return the code with the given address.

Source

fn account_storage_at( &self, at: Block::Hash, address: Address, index: U256, ) -> Option<H256>

Return the storage data with the given address and storage index.

Source

fn current_block(&self, at: Block::Hash) -> Option<BlockV3>

Return the current ethereum block.

Source

fn current_receipts(&self, at: Block::Hash) -> Option<Vec<ReceiptV4>>

Return the current ethereum transaction receipt.

Source

fn current_transaction_statuses( &self, at: Block::Hash, ) -> Option<Vec<TransactionStatus>>

Return the current ethereum transaction status.

Source

fn elasticity(&self, at: Block::Hash) -> Option<Permill>

Return the elasticity multiplier at the given post-eip1559 block.

Source

fn is_eip1559(&self, at: Block::Hash) -> bool

Return true if the request block is post-eip1559.

Implementors§

Source§

impl<B, C> StorageOverride<B> for RuntimeApiStorageOverride<B, C>
where B: BlockT, C: ProvideRuntimeApi<B> + Send + Sync, C::Api: EthereumRuntimeRPCApi<B>,

Source§

impl<B, C, BE> StorageOverride<B> for StorageOverrideHandler<B, C, BE>
where B: BlockT, C: ProvideRuntimeApi<B> + StorageProvider<B, BE> + Send + Sync + 'static, C::Api: EthereumRuntimeRPCApi<B>, BE: Backend<B> + 'static,

Source§

impl<B, C, BE> StorageOverride<B> for fc_storage::overrides::SchemaV1StorageOverride<B, C, BE>
where B: BlockT, C: StorageProvider<B, BE> + Send + Sync, BE: Backend<B>,

Source§

impl<B, C, BE> StorageOverride<B> for fc_storage::overrides::SchemaV1StorageOverrideRef<'_, B, C, BE>
where B: BlockT, C: StorageProvider<B, BE> + Send + Sync, BE: Backend<B>,

Source§

impl<B, C, BE> StorageOverride<B> for fc_storage::overrides::SchemaV2StorageOverride<B, C, BE>
where B: BlockT, C: StorageProvider<B, BE> + Send + Sync, BE: Backend<B>,

Source§

impl<B, C, BE> StorageOverride<B> for fc_storage::overrides::SchemaV2StorageOverrideRef<'_, B, C, BE>
where B: BlockT, C: StorageProvider<B, BE> + Send + Sync, BE: Backend<B>,

Source§

impl<B, C, BE> StorageOverride<B> for fc_storage::overrides::SchemaV3StorageOverride<B, C, BE>
where B: BlockT, C: StorageProvider<B, BE> + Send + Sync, BE: Backend<B>,

Source§

impl<B, C, BE> StorageOverride<B> for fc_storage::overrides::SchemaV3StorageOverrideRef<'_, B, C, BE>
where B: BlockT, C: StorageProvider<B, BE> + Send + Sync, BE: Backend<B>,