Trait fc_rpc::StorageOverride
source · pub trait StorageOverride<Block>: Send + Syncwhere
Block: Block,{
// Required methods
fn account_code_at(
&self,
block_hash: <Block as Block>::Hash,
address: H160
) -> Option<Vec<u8>>;
fn storage_at(
&self,
block_hash: <Block as Block>::Hash,
address: H160,
index: U256
) -> Option<H256>;
fn current_block(
&self,
block_hash: <Block as Block>::Hash
) -> Option<Block<TransactionV2>>;
fn current_receipts(
&self,
block_hash: <Block as Block>::Hash
) -> Option<Vec<ReceiptV3>>;
fn current_transaction_statuses(
&self,
block_hash: <Block as Block>::Hash
) -> Option<Vec<TransactionStatus>>;
fn elasticity(&self, block_hash: <Block as Block>::Hash) -> Option<Permill>;
fn is_eip1559(&self, block_hash: <Block as Block>::Hash) -> bool;
}
Expand description
Something that can fetch Ethereum-related data. This trait is quite similar to the runtime API, and indeed oe implementation of it uses the runtime API. Having this trait is useful because it allows optimized implementations that fetch data from a State Backend with some assumptions about pallet-ethereum’s storage schema. Using such an optimized implementation avoids spawning a runtime and the overhead associated with it.
Required Methods§
sourcefn account_code_at(
&self,
block_hash: <Block as Block>::Hash,
address: H160
) -> Option<Vec<u8>>
fn account_code_at( &self, block_hash: <Block as Block>::Hash, address: H160 ) -> Option<Vec<u8>>
For a given account address, returns pallet_evm::AccountCodes.
sourcefn storage_at(
&self,
block_hash: <Block as Block>::Hash,
address: H160,
index: U256
) -> Option<H256>
fn storage_at( &self, block_hash: <Block as Block>::Hash, address: H160, index: U256 ) -> Option<H256>
For a given account address and index, returns pallet_evm::AccountStorages.
sourcefn current_block(
&self,
block_hash: <Block as Block>::Hash
) -> Option<Block<TransactionV2>>
fn current_block( &self, block_hash: <Block as Block>::Hash ) -> Option<Block<TransactionV2>>
Return the current block.
sourcefn current_receipts(
&self,
block_hash: <Block as Block>::Hash
) -> Option<Vec<ReceiptV3>>
fn current_receipts( &self, block_hash: <Block as Block>::Hash ) -> Option<Vec<ReceiptV3>>
Return the current receipt.
sourcefn current_transaction_statuses(
&self,
block_hash: <Block as Block>::Hash
) -> Option<Vec<TransactionStatus>>
fn current_transaction_statuses( &self, block_hash: <Block as Block>::Hash ) -> Option<Vec<TransactionStatus>>
Return the current transaction status.
sourcefn elasticity(&self, block_hash: <Block as Block>::Hash) -> Option<Permill>
fn elasticity(&self, block_hash: <Block as Block>::Hash) -> Option<Permill>
Return the base fee at the given height.
sourcefn is_eip1559(&self, block_hash: <Block as Block>::Hash) -> bool
fn is_eip1559(&self, block_hash: <Block as Block>::Hash) -> bool
Return true
if the request BlockId is post-eip1559.