pub trait DomainsApi<Block: BlockT, DomainHeader: HeaderT>: Core<Block> {
Show 28 methods
// Provided methods
fn submit_bundle_unsigned(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
opaque_bundle: OpaqueBundle<NumberFor<Block>, Block::Hash, DomainHeader, Balance>,
) -> Result<(), ApiError> { ... }
fn submit_receipt_unsigned(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
singleton_receipt: SealedSingletonReceipt<NumberFor<Block>, Block::Hash, DomainHeader, Balance>,
) -> Result<(), ApiError> { ... }
fn extract_successful_bundles(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
extrinsics: Vec<Block::Extrinsic>,
) -> Result<OpaqueBundles<Block, DomainHeader, Balance>, ApiError> { ... }
fn extrinsics_shuffling_seed(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Randomness, ApiError> { ... }
fn domain_runtime_code(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<Vec<u8>>, ApiError> { ... }
fn runtime_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<RuntimeId>, ApiError> { ... }
fn runtime_upgrades(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Vec<RuntimeId>, ApiError> { ... }
fn domain_instance_data(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<(DomainInstanceData, NumberFor<Block>)>, ApiError> { ... }
fn domain_timestamp(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Moment, ApiError> { ... }
fn timestamp(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Moment, ApiError> { ... }
fn consensus_transaction_byte_fee(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Balance, ApiError> { ... }
fn consensus_chain_byte_fee(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Balance, ApiError> { ... }
fn domain_tx_range(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<U256, ApiError> { ... }
fn genesis_state_root(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<H256>, ApiError> { ... }
fn head_receipt_number(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<HeaderNumberFor<DomainHeader>, ApiError> { ... }
fn oldest_unconfirmed_receipt_number(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<HeaderNumberFor<DomainHeader>>, ApiError> { ... }
fn domain_bundle_limit(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<DomainBundleLimit>, ApiError> { ... }
fn non_empty_er_exists(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<bool, ApiError> { ... }
fn domain_best_number(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<HeaderNumberFor<DomainHeader>>, ApiError> { ... }
fn execution_receipt(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
receipt_hash: HeaderHashFor<DomainHeader>,
) -> Result<Option<ExecutionReceiptFor<DomainHeader, Block, Balance>>, ApiError> { ... }
fn domain_operators(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<(BTreeMap<OperatorId, Balance>, Vec<OperatorId>)>, ApiError> { ... }
fn receipt_hash(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
domain_number: HeaderNumberFor<DomainHeader>,
) -> Result<Option<HeaderHashFor<DomainHeader>>, ApiError> { ... }
fn latest_confirmed_domain_block(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<(HeaderNumberFor<DomainHeader>, HeaderHashFor<DomainHeader>)>, ApiError> { ... }
fn is_bad_er_pending_to_prune(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
receipt_hash: HeaderHashFor<DomainHeader>,
) -> Result<bool, ApiError> { ... }
fn storage_fund_account_balance(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
operator_id: OperatorId,
) -> Result<Balance, ApiError> { ... }
fn is_domain_runtime_upgraded_since(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
at: NumberFor<Block>,
) -> Result<Option<bool>, ApiError> { ... }
fn domain_sudo_call(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<Vec<u8>>, ApiError> { ... }
fn last_confirmed_domain_block_receipt(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<ExecutionReceiptFor<DomainHeader, Block, Balance>>, ApiError> { ... }
}
Expand description
APIs used to access the domains pallet.
Provided Methods§
Sourcefn submit_bundle_unsigned(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
opaque_bundle: OpaqueBundle<NumberFor<Block>, Block::Hash, DomainHeader, Balance>,
) -> Result<(), ApiError>
fn submit_bundle_unsigned( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, opaque_bundle: OpaqueBundle<NumberFor<Block>, Block::Hash, DomainHeader, Balance>, ) -> Result<(), ApiError>
Submits the transaction bundle via an unsigned extrinsic.
fn submit_receipt_unsigned( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, singleton_receipt: SealedSingletonReceipt<NumberFor<Block>, Block::Hash, DomainHeader, Balance>, ) -> Result<(), ApiError>
Sourcefn extract_successful_bundles(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
extrinsics: Vec<Block::Extrinsic>,
) -> Result<OpaqueBundles<Block, DomainHeader, Balance>, ApiError>
fn extract_successful_bundles( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, extrinsics: Vec<Block::Extrinsic>, ) -> Result<OpaqueBundles<Block, DomainHeader, Balance>, ApiError>
Extracts the bundles successfully stored from the given extrinsics.
Sourcefn extrinsics_shuffling_seed(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Randomness, ApiError>
fn extrinsics_shuffling_seed( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Randomness, ApiError>
Generates a randomness seed for extrinsics shuffling.
Sourcefn domain_runtime_code(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<Vec<u8>>, ApiError>
fn domain_runtime_code( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<Vec<u8>>, ApiError>
Returns the current WASM bundle for the given domain_id
.
Sourcefn runtime_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<RuntimeId>, ApiError>
fn runtime_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<RuntimeId>, ApiError>
Returns the runtime id for the given domain_id
.
Sourcefn runtime_upgrades(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Vec<RuntimeId>, ApiError>
fn runtime_upgrades( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Vec<RuntimeId>, ApiError>
Returns the list of runtime upgrades in the current block. Only present in API versions 2 and later.
Sourcefn domain_instance_data(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<(DomainInstanceData, NumberFor<Block>)>, ApiError>
fn domain_instance_data( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<(DomainInstanceData, NumberFor<Block>)>, ApiError>
Returns the domain instance data for the given domain_id
.
Sourcefn domain_timestamp(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Moment, ApiError>
fn domain_timestamp( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Moment, ApiError>
Returns the current timestamp at the current height.
Sourcefn timestamp(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Moment, ApiError>
👎Deprecated since 3: Use domain_timestamp()
instead
fn timestamp( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Moment, ApiError>
domain_timestamp()
insteadReturns the current timestamp at the current height.
Sourcefn consensus_transaction_byte_fee(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Balance, ApiError>
fn consensus_transaction_byte_fee( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Balance, ApiError>
Returns the consensus transaction byte fee that will used to charge the domain transaction for consensus chain storage fees.
Sourcefn consensus_chain_byte_fee(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Balance, ApiError>
👎Deprecated since 3: Use consensus_transaction_byte_fee()
instead
fn consensus_chain_byte_fee( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Balance, ApiError>
consensus_transaction_byte_fee()
insteadReturns the consensus chain byte fee that will used to charge the domain transaction for consensus chain storage fees.
Sourcefn domain_tx_range(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<U256, ApiError>
fn domain_tx_range( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<U256, ApiError>
Returns the current Tx range for the given domain Id.
Sourcefn genesis_state_root(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<H256>, ApiError>
fn genesis_state_root( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<H256>, ApiError>
Returns the genesis state root if not pruned.
Sourcefn head_receipt_number(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<HeaderNumberFor<DomainHeader>, ApiError>
fn head_receipt_number( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<HeaderNumberFor<DomainHeader>, ApiError>
Returns the best execution chain number.
Sourcefn oldest_unconfirmed_receipt_number(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<HeaderNumberFor<DomainHeader>>, ApiError>
fn oldest_unconfirmed_receipt_number( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<HeaderNumberFor<DomainHeader>>, ApiError>
Returns the block number of oldest unconfirmed execution receipt.
Sourcefn domain_bundle_limit(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<DomainBundleLimit>, ApiError>
fn domain_bundle_limit( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<DomainBundleLimit>, ApiError>
Returns the domain bundle limit of the given domain.
Sourcefn non_empty_er_exists(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<bool, ApiError>
fn non_empty_er_exists( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<bool, ApiError>
Returns true if there are any ERs in the challenge period with non empty extrinsics.
Sourcefn domain_best_number(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<HeaderNumberFor<DomainHeader>>, ApiError>
fn domain_best_number( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<HeaderNumberFor<DomainHeader>>, ApiError>
Returns the current best block number for the domain.
Sourcefn execution_receipt(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
receipt_hash: HeaderHashFor<DomainHeader>,
) -> Result<Option<ExecutionReceiptFor<DomainHeader, Block, Balance>>, ApiError>
fn execution_receipt( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, receipt_hash: HeaderHashFor<DomainHeader>, ) -> Result<Option<ExecutionReceiptFor<DomainHeader, Block, Balance>>, ApiError>
Returns the execution receipt with the given hash.
Sourcefn domain_operators(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<(BTreeMap<OperatorId, Balance>, Vec<OperatorId>)>, ApiError>
fn domain_operators( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<(BTreeMap<OperatorId, Balance>, Vec<OperatorId>)>, ApiError>
Returns the current epoch and the next epoch operators of the given domain.
Sourcefn receipt_hash(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
domain_number: HeaderNumberFor<DomainHeader>,
) -> Result<Option<HeaderHashFor<DomainHeader>>, ApiError>
fn receipt_hash( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, domain_number: HeaderNumberFor<DomainHeader>, ) -> Result<Option<HeaderHashFor<DomainHeader>>, ApiError>
Returns the execution receipt hash of the given domain and domain block number.
Sourcefn latest_confirmed_domain_block(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<(HeaderNumberFor<DomainHeader>, HeaderHashFor<DomainHeader>)>, ApiError>
fn latest_confirmed_domain_block( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<(HeaderNumberFor<DomainHeader>, HeaderHashFor<DomainHeader>)>, ApiError>
Returns the latest confirmed domain block number and hash.
Sourcefn is_bad_er_pending_to_prune(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
receipt_hash: HeaderHashFor<DomainHeader>,
) -> Result<bool, ApiError>
fn is_bad_er_pending_to_prune( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, receipt_hash: HeaderHashFor<DomainHeader>, ) -> Result<bool, ApiError>
Returns if the receipt is exist and pending to prune
Sourcefn storage_fund_account_balance(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
operator_id: OperatorId,
) -> Result<Balance, ApiError>
fn storage_fund_account_balance( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, operator_id: OperatorId, ) -> Result<Balance, ApiError>
Returns the balance of the storage fund account.
Sourcefn is_domain_runtime_upgraded_since(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
at: NumberFor<Block>,
) -> Result<Option<bool>, ApiError>
fn is_domain_runtime_upgraded_since( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, at: NumberFor<Block>, ) -> Result<Option<bool>, ApiError>
Returns true if the given domain’s runtime code has been upgraded since at
.
Sourcefn domain_sudo_call(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<Vec<u8>>, ApiError>
fn domain_sudo_call( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<Vec<u8>>, ApiError>
Returns the domain sudo calls for the given domain, if any.
Sourcefn last_confirmed_domain_block_receipt(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<ExecutionReceiptFor<DomainHeader, Block, Balance>>, ApiError>
fn last_confirmed_domain_block_receipt( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<ExecutionReceiptFor<DomainHeader, Block, Balance>>, ApiError>
Returns the last confirmed domain block execution receipt.