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
@@ -30,7 +30,6 @@ use frame_support::{
StorageNoopGuard,
};
use frame_system::Event as SysEvent;
use sp_runtime::traits::DispatchTransaction;
const ID_1: LockIdentifier = *b"1 ";
const ID_2: LockIdentifier = *b"2 ";
@@ -241,17 +240,17 @@ fn lock_should_work_reserve() {
TokenError::Frozen
);
assert_noop!(Balances::reserve(&1, 1), Error::<Test>::LiquidityRestrictions,);
assert!(ChargeTransactionPayment::<Test>::validate_and_prepare(
assert!(<ChargeTransactionPayment<Test> as SignedExtension>::pre_dispatch(
ChargeTransactionPayment::from(1),
Some(1).into(),
&1,
CALL,
&info_from_weight(Weight::from_parts(1, 0)),
1,
)
.is_err());
assert!(ChargeTransactionPayment::<Test>::validate_and_prepare(
assert!(<ChargeTransactionPayment<Test> as SignedExtension>::pre_dispatch(
ChargeTransactionPayment::from(0),
Some(1).into(),
&1,
CALL,
&info_from_weight(Weight::from_parts(1, 0)),
1,
@@ -272,17 +271,17 @@ fn lock_should_work_tx_fee() {
TokenError::Frozen
);
assert_noop!(Balances::reserve(&1, 1), Error::<Test>::LiquidityRestrictions,);
assert!(ChargeTransactionPayment::<Test>::validate_and_prepare(
assert!(<ChargeTransactionPayment<Test> as SignedExtension>::pre_dispatch(
ChargeTransactionPayment::from(1),
Some(1).into(),
&1,
CALL,
&info_from_weight(Weight::from_parts(1, 0)),
1,
)
.is_err());
assert!(ChargeTransactionPayment::<Test>::validate_and_prepare(
assert!(<ChargeTransactionPayment<Test> as SignedExtension>::pre_dispatch(
ChargeTransactionPayment::from(0),
Some(1).into(),
&1,
CALL,
&info_from_weight(Weight::from_parts(1, 0)),
1,