feat(api): add StorageProvider trait (#97)

This commit is contained in:
Matthias Seitz
2022-10-19 10:56:54 +02:00
committed by GitHub
parent 1e7d3ae57e
commit f672781bfc
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,5 @@
mod block;
mod storage;
pub use block::BlockProvider;
pub use storage::StorageProvider;

View File

@ -0,0 +1,8 @@
use crate::Result;
use reth_primitives::{rpc::BlockId, Address, H256, U256};
/// Provides access to storage data
pub trait StorageProvider {
/// Returns the value from a storage position at a given address and `BlockId`
fn storage_at(&self, address: Address, index: U256, at: BlockId) -> Result<Option<H256>>;
}