Struct oasis_runtime_sdk::modules::consensus_accounts::Module
source · pub struct Module<Consensus: API> { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<Consensus: API> API for Module<Consensus>
impl<Consensus: API> API for Module<Consensus>
source§fn deposit<C: Context>(
ctx: &C,
from: Address,
nonce: u64,
to: Address,
amount: BaseUnits,
) -> Result<(), Error>
fn deposit<C: Context>( ctx: &C, from: Address, nonce: u64, to: Address, amount: BaseUnits, ) -> Result<(), Error>
Transfer from consensus staking account to runtime account. Read more
source§fn withdraw<C: Context>(
ctx: &C,
from: Address,
nonce: u64,
to: Address,
amount: BaseUnits,
) -> Result<(), Error>
fn withdraw<C: Context>( ctx: &C, from: Address, nonce: u64, to: Address, amount: BaseUnits, ) -> Result<(), Error>
Transfer from runtime account to consensus staking account. Read more
source§impl<Consensus: API> BlockHandler for Module<Consensus>
impl<Consensus: API> BlockHandler for Module<Consensus>
source§impl<Consensus: API> InvariantHandler for Module<Consensus>
impl<Consensus: API> InvariantHandler for Module<Consensus>
source§impl<Consensus: API> MethodHandler for Module<Consensus>
impl<Consensus: API> MethodHandler for Module<Consensus>
source§fn prefetch(
prefixes: &mut BTreeSet<Prefix>,
method: &str,
body: Value,
auth_info: &AuthInfo,
) -> DispatchResult<Value, Result<(), RuntimeError>>
fn prefetch( prefixes: &mut BTreeSet<Prefix>, method: &str, body: Value, auth_info: &AuthInfo, ) -> DispatchResult<Value, Result<(), RuntimeError>>
Add storage prefixes to prefetch.
source§fn dispatch_call<C: Context>(
ctx: &C,
method: &str,
body: Value,
) -> DispatchResult<Value, CallResult>
fn dispatch_call<C: Context>( ctx: &C, method: &str, body: Value, ) -> DispatchResult<Value, CallResult>
Dispatch a call.
source§fn dispatch_query<C: Context>(
ctx: &C,
method: &str,
args: Value,
) -> DispatchResult<Value, Result<Value, RuntimeError>>
fn dispatch_query<C: Context>( ctx: &C, method: &str, args: Value, ) -> DispatchResult<Value, Result<Value, RuntimeError>>
Dispatch a query.
source§fn dispatch_message_result<C: Context>(
ctx: &C,
handler_name: &str,
result: MessageResult,
) -> DispatchResult<MessageResult, ()>
fn dispatch_message_result<C: Context>( ctx: &C, handler_name: &str, result: MessageResult, ) -> DispatchResult<MessageResult, ()>
Dispatch a message result.
source§fn supported_methods() -> Vec<MethodHandlerInfo>
fn supported_methods() -> Vec<MethodHandlerInfo>
Lists the names of all RPC methods exposed by this module. The result is informational
only. An empty return vector means that the implementor does not care to list the methods,
or the implementor is a tuple of modules.
source§fn is_expensive_query(_method: &str) -> bool
fn is_expensive_query(_method: &str) -> bool
Checks whether the given query method is tagged as expensive.
source§fn is_allowed_private_km_query(_method: &str) -> bool
fn is_allowed_private_km_query(_method: &str) -> bool
Checks whether the given query is allowed to access private key manager state.
source§fn is_allowed_interactive_call(_method: &str) -> bool
fn is_allowed_interactive_call(_method: &str) -> bool
Checks whether the given call is allowed to be called interactively via read-only
transactions.
source§impl<Consensus: API> MigrationHandler for Module<Consensus>
impl<Consensus: API> MigrationHandler for Module<Consensus>
source§impl<Consensus: API> Module for Module<Consensus>
impl<Consensus: API> Module for Module<Consensus>
§type Parameters = Parameters
type Parameters = Parameters
Module parameters.
source§fn params() -> Self::Parameters
fn params() -> Self::Parameters
Return the module’s parameters.
source§fn set_params(params: Self::Parameters)
fn set_params(params: Self::Parameters)
Set the module’s parameters.
source§impl<Consensus: API> TransactionHandler for Module<Consensus>
impl<Consensus: API> TransactionHandler for Module<Consensus>
source§fn approve_raw_tx<C: Context>(_ctx: &C, _tx: &[u8]) -> Result<(), Error>
fn approve_raw_tx<C: Context>(_ctx: &C, _tx: &[u8]) -> Result<(), Error>
Judge if a raw transaction is good enough to undergo decoding.
This takes place before even decoding the transaction.
source§fn approve_unverified_tx<C: Context>(
_ctx: &C,
_utx: &UnverifiedTransaction,
) -> Result<(), Error>
fn approve_unverified_tx<C: Context>( _ctx: &C, _utx: &UnverifiedTransaction, ) -> Result<(), Error>
Judge if an unverified transaction is good enough to undergo verification.
This takes place before even verifying signatures.
source§fn decode_tx<C: Context>(
_ctx: &C,
_scheme: &str,
_body: &[u8],
) -> Result<Option<Transaction>, Error>
fn decode_tx<C: Context>( _ctx: &C, _scheme: &str, _body: &[u8], ) -> Result<Option<Transaction>, Error>
Decode a transaction that was sent with module-controlled decoding and verify any
signatures. Read more
source§fn authenticate_tx<C: Context>(
_ctx: &C,
_tx: &Transaction,
) -> Result<AuthDecision, Error>
fn authenticate_tx<C: Context>( _ctx: &C, _tx: &Transaction, ) -> Result<AuthDecision, Error>
Authenticate a transaction. Read more
source§fn before_handle_call<C: Context>(_ctx: &C, _call: &Call) -> Result<(), Error>
fn before_handle_call<C: Context>(_ctx: &C, _call: &Call) -> Result<(), Error>
Perform any action after authentication, within the transaction context. Read more
Perform any action after authentication and decoding, within the transaction context. Read more
source§fn after_handle_call<C: Context>(
_ctx: &C,
result: CallResult,
) -> Result<CallResult, Error>
fn after_handle_call<C: Context>( _ctx: &C, result: CallResult, ) -> Result<CallResult, Error>
Perform any action after call, within the transaction context. Read more
source§fn after_dispatch_tx<C: Context>(
_ctx: &C,
_tx_auth_info: &AuthInfo,
_result: &CallResult,
)
fn after_dispatch_tx<C: Context>( _ctx: &C, _tx_auth_info: &AuthInfo, _result: &CallResult, )
Perform any action after dispatching the transaction, in batch context.
Auto Trait Implementations§
impl<Consensus> Freeze for Module<Consensus>
impl<Consensus> RefUnwindSafe for Module<Consensus>where
Consensus: RefUnwindSafe,
impl<Consensus> Send for Module<Consensus>where
Consensus: Send,
impl<Consensus> Sync for Module<Consensus>where
Consensus: Sync,
impl<Consensus> Unpin for Module<Consensus>where
Consensus: Unpin,
impl<Consensus> UnwindSafe for Module<Consensus>where
Consensus: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<M> ModuleInfoHandler for Mwhere
M: Module + MethodHandler,
impl<M> ModuleInfoHandler for Mwhere
M: Module + MethodHandler,
source§fn module_info<C>(_ctx: &C) -> BTreeMap<String, ModuleInfo>where
C: Context,
fn module_info<C>(_ctx: &C) -> BTreeMap<String, ModuleInfo>where
C: Context,
Reports info about the module (or modules, if
Self
is a tuple).