The transaction payment pallet is not that easy to remove since it is used in a lot of different parts of the runtime. If you goal is to remove this pallet, indeed you will need to go through the code of the runtime more manually, and remove all uses of it.
However, if your goal is just to make everything zero fees, you can do that by updating your config of the pallet's WeighToFee
and LengthToFee
types.
Easiest is probably to use ConstantMultiplier
: https://paritytech.github.io/substrate/master/frame_support/weights/struct.ConstantMultiplier.html
Then set the multiplier to zero.
use frame_support::weights::ConstantMultiplier; // ADD THIS TOO
impl pallet_transaction_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction = CurrencyAdapter<Balances, ()>;
type OperationalFeeMultiplier = ConstU8<5>;
type WeightToFee = ConstantMultiplier<Balance, ConstU128<0u128>>;
type LengthToFee = ConstantMultiplier<Balance, ConstU128<0u128>>;
type FeeMultiplierUpdate = ConstFeeMultiplier<FeeMultiplier>;
}