pub trait Storage {
// Required methods
fn reset(&mut self);
fn read_object(&self, id: &ObjectID) -> Option<&Object>;
fn record_execution_results(&mut self, results: ExecutionResults);
fn save_loaded_runtime_objects(
&mut self,
loaded_runtime_objects: BTreeMap<ObjectID, DynamicallyLoadedObjectMetadata>,
);
fn save_wrapped_object_containers(
&mut self,
wrapped_object_containers: BTreeMap<ObjectID, ObjectID>,
);
fn check_coin_deny_list(
&self,
receiving_funds_type_and_owners: BTreeMap<TypeTag, BTreeSet<SuiAddress>>,
) -> DenyListResult;
fn record_generated_object_ids(&mut self, generated_ids: BTreeSet<ObjectID>);
}
Expand description
An abstraction of the (possibly distributed) store for objects, and (soon) events and transactions
Required Methods§
fn reset(&mut self)
fn read_object(&self, id: &ObjectID) -> Option<&Object>
fn record_execution_results(&mut self, results: ExecutionResults)
fn save_loaded_runtime_objects( &mut self, loaded_runtime_objects: BTreeMap<ObjectID, DynamicallyLoadedObjectMetadata>, )
fn save_wrapped_object_containers( &mut self, wrapped_object_containers: BTreeMap<ObjectID, ObjectID>, )
Sourcefn check_coin_deny_list(
&self,
receiving_funds_type_and_owners: BTreeMap<TypeTag, BTreeSet<SuiAddress>>,
) -> DenyListResult
fn check_coin_deny_list( &self, receiving_funds_type_and_owners: BTreeMap<TypeTag, BTreeSet<SuiAddress>>, ) -> DenyListResult
Given the set of all coin types and owners that are receiving the coins during execution, Check coin denylist v2, and return the number of non-gas-coin owners.