pub trait DiemValidatorInterface: Sync {
    // Required methods
    fn get_account_state_by_version(
        &self,
        account: AccountAddress,
        version: Version
    ) -> Result<Option<AccountState>>;
    fn get_events(
        &self,
        key: &EventKey,
        start_seq: u64,
        limit: u64
    ) -> Result<Vec<EventWithProof>>;
    fn get_committed_transactions(
        &self,
        start: Version,
        limit: u64
    ) -> Result<Vec<Transaction>>;
    fn get_latest_version(&self) -> Result<Version>;
    fn get_version_by_account_sequence(
        &self,
        account: AccountAddress,
        seq: u64
    ) -> Result<Option<Version>>;

    // Provided methods
    fn get_diem_framework_modules_by_version(
        &self,
        version: Version
    ) -> Result<Vec<CompiledModule>> { ... }
    fn get_admin_accounts(
        &self,
        version: Version
    ) -> Result<Vec<(AccountAddress, AccountState)>> { ... }
}

Required Methods§

Provided Methods§

source

fn get_diem_framework_modules_by_version( &self, version: Version ) -> Result<Vec<CompiledModule>>

source

fn get_admin_accounts( &self, version: Version ) -> Result<Vec<(AccountAddress, AccountState)>>

Get the account states of the most critical accounts, including:

  1. Diem Framework code address
  2. Diem Root address
  3. Treasury Compliance address
  4. All validator addresses

Implementors§