mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
Refactor: extract functions and types for creating extrinsics (#138)
* Extract extrinsic * Extract extrinsic types to own module * Fix compiler errors * Fix warnings * Fmt * Pin wabt-sys to 0.7.1, it fails (on my machine) with 0.7.2 * Fix up tests * Fmt * Reexport RuntimeVersion
This commit is contained in:
+1
-16
@@ -27,7 +27,7 @@ use sp_runtime::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
extra::{
|
||||
extrinsic::{
|
||||
DefaultExtra,
|
||||
SignedExtra,
|
||||
},
|
||||
@@ -40,7 +40,6 @@ use crate::{
|
||||
sudo::Sudo,
|
||||
system::System,
|
||||
},
|
||||
Encoded,
|
||||
};
|
||||
|
||||
/// Runtime trait.
|
||||
@@ -51,20 +50,6 @@ pub trait Runtime: System + Sized + Send + Sync + 'static {
|
||||
type Extra: SignedExtra<Self> + Send + Sync + 'static;
|
||||
}
|
||||
|
||||
/// Extra type.
|
||||
pub type Extra<T> = <<T as Runtime>::Extra as SignedExtra<T>>::Extra;
|
||||
|
||||
/// UncheckedExtrinsic type.
|
||||
pub type UncheckedExtrinsic<T> = sp_runtime::generic::UncheckedExtrinsic<
|
||||
<T as System>::Address,
|
||||
Encoded,
|
||||
<T as Runtime>::Signature,
|
||||
Extra<T>,
|
||||
>;
|
||||
|
||||
/// SignedPayload type.
|
||||
pub type SignedPayload<T> = sp_runtime::generic::SignedPayload<Encoded, Extra<T>>;
|
||||
|
||||
/// Concrete type definitions compatible with those in the default substrate `node_runtime`
|
||||
///
|
||||
/// # Note
|
||||
|
||||
Reference in New Issue
Block a user