diff --git a/macro/Cargo.toml b/macro/Cargo.toml index d8f7f1f238..4457b5d2e8 100644 --- a/macro/Cargo.toml +++ b/macro/Cargo.toml @@ -34,4 +34,4 @@ pretty_assertions = "0.6.1" subxt = { path = ".." } trybuild = "1.0.38" -sp-keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate/" } +sp-keyring = { git = "https://github.com/paritytech/substrate/", branch = "master" } diff --git a/src/extrinsic/extra.rs b/src/extrinsic/extra.rs index c4a75ec7ba..29c4e38682 100644 --- a/src/extrinsic/extra.rs +++ b/src/extrinsic/extra.rs @@ -25,7 +25,10 @@ use core::{ use scale_info::TypeInfo; use sp_runtime::{ generic::Era, - traits::SignedExtension, + traits::{ + DispatchInfoOf, + SignedExtension, + }, transaction_validity::TransactionValidityError, }; @@ -68,6 +71,15 @@ where ) -> Result { Ok(self.1) } + fn pre_dispatch( + self, + _who: &Self::AccountId, + _call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> Result { + Ok(()) + } } /// Ensure the transaction version registered in the transaction is the same as at present. @@ -99,6 +111,15 @@ where ) -> Result { Ok(self.1) } + fn pre_dispatch( + self, + _who: &Self::AccountId, + _call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> Result { + Ok(()) + } } /// Check genesis hash @@ -130,6 +151,15 @@ where ) -> Result { Ok(self.1) } + fn pre_dispatch( + self, + _who: &Self::AccountId, + _call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> Result { + Ok(()) + } } /// Check for transaction mortality. @@ -163,6 +193,15 @@ where ) -> Result { Ok(self.1) } + fn pre_dispatch( + self, + _who: &Self::AccountId, + _call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> Result { + Ok(()) + } } /// Nonce check and increment to give replay protection for transactions. @@ -184,6 +223,15 @@ where ) -> Result { Ok(()) } + fn pre_dispatch( + self, + _who: &Self::AccountId, + _call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> Result { + Ok(()) + } } /// Resource limit check. @@ -205,6 +253,15 @@ where ) -> Result { Ok(()) } + fn pre_dispatch( + self, + _who: &Self::AccountId, + _call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> Result { + Ok(()) + } } /// Require the transactor pay for themselves and maybe include a tip to gain additional priority @@ -230,6 +287,15 @@ impl SignedExtension for ChargeAssetTxPayment { ) -> Result { Ok(()) } + fn pre_dispatch( + self, + _who: &Self::AccountId, + _call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> Result { + Ok(()) + } } /// Trait for implementing transaction extras for a runtime. @@ -318,4 +384,13 @@ impl SignedExtension for DefaultEx ) -> Result { self.extra().additional_signed() } + fn pre_dispatch( + self, + _who: &Self::AccountId, + _call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> Result { + Ok(()) + } }