[−][src]Trait frame_system::offchain::SubmitSignedTransaction
A trait to sign and submit transactions in offchain calls.
Associated Types
type Extrinsic: ExtrinsicT<Call = Call> + Encode
Unchecked extrinsic type.
type CreateTransaction: CreateTransaction<T, Self::Extrinsic>
A runtime-specific type to produce signed data for the extrinsic.
type Signer: Signer<<Self::CreateTransaction as CreateTransaction<T, Self::Extrinsic>>::Public, <Self::CreateTransaction as CreateTransaction<T, Self::Extrinsic>>::Signature>
A type used to sign transactions created using CreateTransaction
.
Provided methods
fn sign_and_submit(
call: impl Into<Call>,
public: <Self::CreateTransaction as CreateTransaction<T, Self::Extrinsic>>::Public
) -> Result<(), ()>
call: impl Into<Call>,
public: <Self::CreateTransaction as CreateTransaction<T, Self::Extrinsic>>::Public
) -> Result<(), ()>
Sign given call and submit it to the transaction pool.
Returns Ok
if the transaction was submitted correctly
and Err
if the key for given id
was not found or the
transaction was rejected from the pool.
Implementors
impl<T, E, S, C, Call> SubmitSignedTransaction<T, Call> for TransactionSubmitter<S, C, E> where
T: Trait,
C: CreateTransaction<T, E>,
S: Signer<<C as CreateTransaction<T, E>>::Public, <C as CreateTransaction<T, E>>::Signature>,
E: ExtrinsicT<Call = Call> + Encode,
[src]
T: Trait,
C: CreateTransaction<T, E>,
S: Signer<<C as CreateTransaction<T, E>>::Public, <C as CreateTransaction<T, E>>::Signature>,
E: ExtrinsicT<Call = Call> + Encode,
A blanket implementation to simplify creation of transaction signer & submitter in the runtime.