-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Feature request to allow for customisation of defaulters.
In my project I want to be able to use custom defaulter implementation that does not use node HTTP API but rather connect to starknet state database directly.
API change proposal:
starknet_devnet_core::starknet::defaulter::StarknetDefaulter::register_defaulter(
"sqlite",
SQLiteStateReader::new_sqlite_state_reader,
)
SQLiteStateReader should implement OriginReader trait
pub trait OriginReader: std::fmt::Debug + Send + Sync {
fn get_storage_at(
&self,
contract_address: ContractAddress,
key: StorageKey,
) -> StateResult<Felt>;
fn get_nonce_at(&self, contract_address: ContractAddress) -> StateResult<Nonce>;
fn get_compiled_class(&self, class_hash: ClassHash) -> StateResult<RunnableCompiledClass>;
fn get_class_hash_at(&self, contract_address: ContractAddress) -> StateResult<ClassHash>;
}
Metadata
Metadata
Assignees
Labels
No labels