mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 14:57:56 +00:00
Expose information about the extrinsic in the metadata (#4774)
* Expose information about the extrinsic in the metadata This pr exposes some information about the extrinsic used in the runtime via metadata. The following information are exposed: - Version of the extrinsic - List of all signed extensions used by the extrinsic. * Increment `spec_version`
This commit is contained in:
@@ -960,6 +960,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckWeight<T> {
|
||||
type AdditionalSigned = ();
|
||||
type DispatchInfo = DispatchInfo;
|
||||
type Pre = ();
|
||||
const IDENTIFIER: &'static str = "CheckWeight";
|
||||
|
||||
fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { Ok(()) }
|
||||
|
||||
@@ -1040,6 +1041,7 @@ impl<T: Trait> SignedExtension for CheckNonce<T> {
|
||||
type AdditionalSigned = ();
|
||||
type DispatchInfo = DispatchInfo;
|
||||
type Pre = ();
|
||||
const IDENTIFIER: &'static str = "CheckNonce";
|
||||
|
||||
fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { Ok(()) }
|
||||
|
||||
@@ -1124,6 +1126,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckEra<T> {
|
||||
type AdditionalSigned = T::Hash;
|
||||
type DispatchInfo = DispatchInfo;
|
||||
type Pre = ();
|
||||
const IDENTIFIER: &'static str = "CheckEra";
|
||||
|
||||
fn validate(
|
||||
&self,
|
||||
@@ -1180,6 +1183,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckGenesis<T> {
|
||||
type AdditionalSigned = T::Hash;
|
||||
type DispatchInfo = DispatchInfo;
|
||||
type Pre = ();
|
||||
const IDENTIFIER: &'static str = "CheckGenesis";
|
||||
|
||||
fn additional_signed(&self) -> Result<Self::AdditionalSigned, TransactionValidityError> {
|
||||
Ok(<Module<T>>::block_hash(T::BlockNumber::zero()))
|
||||
@@ -1215,6 +1219,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckVersion<T> {
|
||||
type AdditionalSigned = u32;
|
||||
type DispatchInfo = DispatchInfo;
|
||||
type Pre = ();
|
||||
const IDENTIFIER: &'static str = "CheckVersion";
|
||||
|
||||
fn additional_signed(&self) -> Result<Self::AdditionalSigned, TransactionValidityError> {
|
||||
Ok(<Module<T>>::runtime_version().spec_version)
|
||||
|
||||
Reference in New Issue
Block a user