pub trait StateRead: Send + Sync {
Show 36 methods
// Required methods
fn multi_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
transactions: &'life1 [TransactionDigest],
effects: &'life2 [TransactionDigest],
) -> Pin<Box<dyn Future<Output = StateReadResult<KVStoreTransactionData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_object_read(
&self,
object_id: &ObjectID,
) -> StateReadResult<ObjectRead>;
fn get_past_object_read(
&self,
object_id: &ObjectID,
version: SequenceNumber,
) -> StateReadResult<PastObjectRead>;
fn get_object<'life0, 'life1, 'async_trait>(
&'life0 self,
object_id: &'life1 ObjectID,
) -> Pin<Box<dyn Future<Output = StateReadResult<Option<Object>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_epoch_store_one_call_per_task(
&self,
) -> Guard<Arc<AuthorityPerEpochStore>>;
fn get_dynamic_fields(
&self,
owner: ObjectID,
cursor: Option<ObjectID>,
limit: usize,
) -> StateReadResult<Vec<(ObjectID, DynamicFieldInfo)>>;
fn get_cache_reader(&self) -> &Arc<dyn ObjectCacheRead>;
fn get_object_store(&self) -> &Arc<dyn ObjectStore + Send + Sync>;
fn get_backing_package_store(
&self,
) -> &Arc<dyn BackingPackageStore + Send + Sync>;
fn get_owner_objects(
&self,
owner: SuiAddress,
cursor: Option<ObjectID>,
filter: Option<SuiObjectDataFilter>,
) -> StateReadResult<Vec<ObjectInfo>>;
fn query_events<'life0, 'life1, 'async_trait>(
&'life0 self,
kv_store: &'life1 Arc<TransactionKeyValueStore>,
query: EventFilter,
cursor: Option<EventID>,
limit: usize,
descending: bool,
) -> Pin<Box<dyn Future<Output = StateReadResult<Vec<SuiEvent>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn dry_exec_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: TransactionData,
transaction_digest: TransactionDigest,
) -> Pin<Box<dyn Future<Output = StateReadResult<(DryRunTransactionBlockResponse, BTreeMap<ObjectID, (ObjectRef, Object, WriteKind)>, TransactionEffects, Option<ObjectID>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn dev_inspect_transaction_block<'life0, 'async_trait>(
&'life0 self,
sender: SuiAddress,
transaction_kind: TransactionKind,
gas_price: Option<u64>,
gas_budget: Option<u64>,
gas_sponsor: Option<SuiAddress>,
gas_objects: Option<Vec<ObjectRef>>,
show_raw_txn_data_and_effects: Option<bool>,
skip_checks: Option<bool>,
) -> Pin<Box<dyn Future<Output = StateReadResult<DevInspectResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_subscription_handler(&self) -> Arc<SubscriptionHandler>;
fn get_owner_objects_with_limit(
&self,
owner: SuiAddress,
cursor: Option<ObjectID>,
limit: usize,
filter: Option<SuiObjectDataFilter>,
) -> StateReadResult<Vec<ObjectInfo>>;
fn get_transactions<'life0, 'life1, 'async_trait>(
&'life0 self,
kv_store: &'life1 Arc<TransactionKeyValueStore>,
filter: Option<TransactionFilter>,
cursor: Option<TransactionDigest>,
limit: Option<usize>,
reverse: bool,
) -> Pin<Box<dyn Future<Output = StateReadResult<Vec<TransactionDigest>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_dynamic_field_object_id(
&self,
owner: ObjectID,
name_type: TypeTag,
name_bcs_bytes: &[u8],
) -> StateReadResult<Option<ObjectID>>;
fn get_staked_sui<'life0, 'async_trait>(
&'life0 self,
owner: SuiAddress,
) -> Pin<Box<dyn Future<Output = StateReadResult<Vec<StakedSui>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_state(&self) -> StateReadResult<SuiSystemState>;
fn get_or_latest_committee(
&self,
epoch: Option<BigInt<u64>>,
) -> StateReadResult<Committee>;
fn get_bridge(&self) -> StateReadResult<Bridge>;
fn find_publish_txn_digest(
&self,
package_id: ObjectID,
) -> StateReadResult<TransactionDigest>;
fn get_owned_coins(
&self,
owner: SuiAddress,
cursor: (String, u64, ObjectID),
limit: usize,
one_coin_type_only: bool,
) -> StateReadResult<Vec<SuiCoin>>;
fn get_executed_transaction_and_effects<'life0, 'async_trait>(
&'life0 self,
digest: TransactionDigest,
kv_store: Arc<TransactionKeyValueStore>,
) -> Pin<Box<dyn Future<Output = StateReadResult<(Transaction, TransactionEffects)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_balance<'life0, 'async_trait>(
&'life0 self,
owner: SuiAddress,
coin_type: TypeTag,
) -> Pin<Box<dyn Future<Output = StateReadResult<TotalBalance>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_all_balance<'life0, 'async_trait>(
&'life0 self,
owner: SuiAddress,
) -> Pin<Box<dyn Future<Output = StateReadResult<Arc<HashMap<TypeTag, TotalBalance>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_verified_checkpoint_by_sequence_number(
&self,
sequence_number: CheckpointSequenceNumber,
) -> StateReadResult<VerifiedCheckpoint>;
fn get_checkpoint_contents(
&self,
digest: CheckpointContentsDigest,
) -> StateReadResult<CheckpointContents>;
fn get_verified_checkpoint_summary_by_digest(
&self,
digest: CheckpointDigest,
) -> StateReadResult<VerifiedCheckpoint>;
fn deprecated_multi_get_transaction_checkpoint(
&self,
digests: &[TransactionDigest],
) -> StateReadResult<Vec<Option<(EpochId, CheckpointSequenceNumber)>>>;
fn deprecated_get_transaction_checkpoint(
&self,
digest: &TransactionDigest,
) -> StateReadResult<Option<(EpochId, CheckpointSequenceNumber)>>;
fn multi_get_checkpoint_by_sequence_number(
&self,
sequence_numbers: &[CheckpointSequenceNumber],
) -> StateReadResult<Vec<Option<VerifiedCheckpoint>>>;
fn get_total_transaction_blocks(&self) -> StateReadResult<u64>;
fn get_checkpoint_by_sequence_number(
&self,
sequence_number: CheckpointSequenceNumber,
) -> StateReadResult<Option<VerifiedCheckpoint>>;
fn get_latest_checkpoint_sequence_number(
&self,
) -> StateReadResult<CheckpointSequenceNumber>;
fn get_chain_identifier(&self) -> StateReadResult<ChainIdentifier>;
}
Expand description
Trait for AuthorityState methods commonly used by at least two api.