Trait parity_rpc::v1::dispatch::Dispatcher
source · [−]pub trait Dispatcher: Send + Sync + Clone {
fn fill_optional_fields(
&self,
request: TransactionRequest,
default_sender: Address,
force_nonce: bool
) -> BoxFuture<FilledTransactionRequest>;
fn sign<P>(
&self,
filled: FilledTransactionRequest,
signer: &Arc<dyn Accounts>,
password: SignWith,
post_sign: P
) -> BoxFuture<P::Item>
where
P: PostSign + 'static,
<P::Out as IntoFuture>::Future: Send;
fn enrich(&self, _: SignedTransaction) -> RpcRichRawTransaction;
fn dispatch_transaction(
&self,
signed_transaction: PendingTransaction
) -> Result<H256>;
}
Expand description
Has the capability to dispatch, sign, and decrypt.
Requires a clone implementation, with the implication that it be cheap; usually just bumping a reference count or two.
Required methods
fn fill_optional_fields(
&self,
request: TransactionRequest,
default_sender: Address,
force_nonce: bool
) -> BoxFuture<FilledTransactionRequest>
fn fill_optional_fields(
&self,
request: TransactionRequest,
default_sender: Address,
force_nonce: bool
) -> BoxFuture<FilledTransactionRequest>
Fill optional fields of a transaction request, fetching gas price but not nonce.
Sign the given transaction request without dispatching, fetching appropriate nonce.
fn enrich(&self, _: SignedTransaction) -> RpcRichRawTransaction
fn enrich(&self, _: SignedTransaction) -> RpcRichRawTransaction
Converts a SignedTransaction
into RichRawTransaction
fn dispatch_transaction(
&self,
signed_transaction: PendingTransaction
) -> Result<H256>
fn dispatch_transaction(
&self,
signed_transaction: PendingTransaction
) -> Result<H256>
“Dispatch” a local transaction.