mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Migrate fee payment from Currency to fungible (#2292)
Part of https://github.com/paritytech/polkadot-sdk/issues/226 Related https://github.com/paritytech/polkadot-sdk/issues/1833 - Deprecate `CurrencyAdapter` and introduce `FungibleAdapter` - Deprecate `ToStakingPot` and replace usage with `ResolveTo` - Required creating a new `StakingPotAccountId` struct that implements `TypedGet` for the staking pot account ID - Update parachain common utils `DealWithFees`, `ToAuthor` and `AssetsToBlockAuthor` implementations to use `fungible` - Update runtime XCM Weight Traders to use `ResolveTo` instead of `ToStakingPot` - Update runtime Transaction Payment pallets to use `FungibleAdapter` instead of `CurrencyAdapter` - [x] Blocked by https://github.com/paritytech/polkadot-sdk/pull/1296, needs the `Unbalanced::decrease_balance` fix
This commit is contained in:
@@ -71,6 +71,9 @@ use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||
use pallet_nfts::PalletFeatures;
|
||||
use pallet_nis::WithMaximumOf;
|
||||
use pallet_session::historical as pallet_session_historical;
|
||||
// Can't use `FungibleAdapter` here until Treasury pallet migrates to fungibles
|
||||
// <https://github.com/paritytech/polkadot-sdk/issues/226>
|
||||
#[allow(deprecated)]
|
||||
pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment};
|
||||
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
||||
use pallet_tx_pause::RuntimeCallNameOf;
|
||||
@@ -549,6 +552,9 @@ parameter_types! {
|
||||
pub MaximumMultiplier: Multiplier = Bounded::max_value();
|
||||
}
|
||||
|
||||
// Can't use `FungibleAdapter` here until Treasury pallet migrates to fungibles
|
||||
// <https://github.com/paritytech/polkadot-sdk/issues/226>
|
||||
#[allow(deprecated)]
|
||||
impl pallet_transaction_payment::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type OnChargeTransaction = CurrencyAdapter<Balances, DealWithFees>;
|
||||
|
||||
Reference in New Issue
Block a user