Revert "FRAME: Create TransactionExtension as a replacement for SignedExtension (#2280)" (#3665)

This PR reverts #2280 which introduced `TransactionExtension` to replace
`SignedExtension`.

As a result of the discussion
[here](https://github.com/paritytech/polkadot-sdk/pull/3623#issuecomment-1986789700),
the changes will be reverted for now with plans to reintroduce the
concept in the future.

---------

Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
This commit is contained in:
georgepisaltu
2024-03-13 16:10:59 +02:00
committed by GitHub
parent 60ac5a723c
commit bbd51ce867
350 changed files with 15826 additions and 24304 deletions
+1 -20
View File
@@ -482,7 +482,7 @@ pub trait OriginTrait: Sized {
type Call;
/// The caller origin, overarching type of all pallets origins.
type PalletsOrigin: Send + Sync + Into<Self> + CallerTrait<Self::AccountId> + MaxEncodedLen;
type PalletsOrigin: Into<Self> + CallerTrait<Self::AccountId> + MaxEncodedLen;
/// The AccountId used across the system.
type AccountId;
@@ -496,14 +496,6 @@ pub trait OriginTrait: Sized {
/// Replace the caller with caller from the other origin
fn set_caller_from(&mut self, other: impl Into<Self>);
/// Replace the caller with caller from the other origin
fn set_caller(&mut self, caller: Self::PalletsOrigin);
/// Replace the caller with caller from the other origin
fn set_caller_from_signed(&mut self, caller_account: Self::AccountId) {
self.set_caller(Self::PalletsOrigin::from(RawOrigin::Signed(caller_account)))
}
/// Filter the call if caller is not root, if false is returned then the call must be filtered
/// out.
///
@@ -552,17 +544,6 @@ pub trait OriginTrait: Sized {
fn as_system_ref(&self) -> Option<&RawOrigin<Self::AccountId>> {
self.caller().as_system_ref()
}
/// Extract a reference to the sytsem signer, if that's what the caller is.
fn as_system_signer(&self) -> Option<&Self::AccountId> {
self.caller().as_system_ref().and_then(|s| {
if let RawOrigin::Signed(ref who) = s {
Some(who)
} else {
None
}
})
}
}
#[cfg(test)]