mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
Submit (& sign) extrinsics from the runtime. (#3514)
* Abstract constructing extrinsic and signing. * Initial impl of signer. * Implement get payload. * Clean up the code. * Improve docs. * Bump version. * Update core/sr-primitives/src/generic/unchecked_extrinsic.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Fix tests & address grumbles. * Fix build. * Fix runtime tests. * Fix bound test. * Fix bound test.
This commit is contained in:
committed by
Gavin Wood
parent
0cae7217d8
commit
feecfc856d
@@ -187,6 +187,7 @@ pub struct ExtrinsicWrapper<Xt>(Xt);
|
||||
|
||||
impl<Xt> traits::Extrinsic for ExtrinsicWrapper<Xt> {
|
||||
type Call = ();
|
||||
type SignaturePayload = ();
|
||||
|
||||
fn is_signed(&self) -> Option<bool> {
|
||||
None
|
||||
@@ -274,13 +275,14 @@ impl<Call: Codec + Sync + Send, Context, Extra> Checkable<Context> for TestXt<Ca
|
||||
}
|
||||
impl<Call: Codec + Sync + Send, Extra> traits::Extrinsic for TestXt<Call, Extra> {
|
||||
type Call = Call;
|
||||
type SignaturePayload = (u64, Extra);
|
||||
|
||||
fn is_signed(&self) -> Option<bool> {
|
||||
Some(self.0.is_some())
|
||||
}
|
||||
|
||||
fn new_unsigned(_c: Call) -> Option<Self> {
|
||||
None
|
||||
fn new(c: Call, sig: Option<Self::SignaturePayload>) -> Option<Self> {
|
||||
Some(TestXt(sig, c))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user