mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(api): add StorageProvider trait (#97)
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
mod block;
|
||||
mod storage;
|
||||
|
||||
pub use block::BlockProvider;
|
||||
pub use storage::StorageProvider;
|
||||
|
||||
8
crates/interfaces/src/provider/storage.rs
Normal file
8
crates/interfaces/src/provider/storage.rs
Normal 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>>;
|
||||
}
|
||||
Reference in New Issue
Block a user