Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
518 changes: 259 additions & 259 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion parachain-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ parameter_types! {
}

impl pallet_transaction_payment::Config for Runtime {
type Event = Event;
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
type WeightToFee = WeightToFee;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
Expand Down Expand Up @@ -475,7 +476,7 @@ construct_runtime!(

// Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 11,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,

// Collator support. The order of these 4 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Expand Down
3 changes: 2 additions & 1 deletion parachains/runtimes/assets/statemine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ parameter_types! {
}

impl pallet_transaction_payment::Config for Runtime {
type Event = Event;
type OnChargeTransaction =
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
type WeightToFee = WeightToFee;
Expand Down Expand Up @@ -556,7 +557,7 @@ construct_runtime!(

// Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 11,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,
AssetTxPayment: pallet_asset_tx_payment::{Pallet} = 12,
Comment on lines +560 to 561
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, if someone paid a transaction fee with an asset, would this still emit an event? I.e., should we also add Event<T> to AssetTxPayment?

I know it could be a bit beyond the scope of strictly a pallet_transaction_payment event, but I think it would be confusing for users to see events for one type of fee and not for another. Would it make sense to expand paritytech/substrate#11618 to include an event for pallet_asset_tx_payment as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, sure. Lets do a follow up PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good , I would like to continue the job.


// Collator support. the order of these 5 are important and shall not change.
Expand Down
3 changes: 2 additions & 1 deletion parachains/runtimes/assets/statemint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ parameter_types! {
}

impl pallet_transaction_payment::Config for Runtime {
type Event = Event;
type OnChargeTransaction =
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
type WeightToFee = WeightToFee;
Expand Down Expand Up @@ -586,7 +587,7 @@ construct_runtime!(

// Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 11,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,
AssetTxPayment: pallet_asset_tx_payment::{Pallet} = 12,

// Collator support. the order of these 5 are important and shall not change.
Expand Down
3 changes: 2 additions & 1 deletion parachains/runtimes/assets/westmint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ parameter_types! {
}

impl pallet_transaction_payment::Config for Runtime {
type Event = Event;
type OnChargeTransaction =
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
type WeightToFee = WeightToFee;
Expand Down Expand Up @@ -546,7 +547,7 @@ construct_runtime!(

// Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 11,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,
AssetTxPayment: pallet_asset_tx_payment::{Pallet} = 12,

// Collator support. the order of these 5 are important and shall not change.
Expand Down
3 changes: 2 additions & 1 deletion parachains/runtimes/contracts/contracts-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ impl pallet_balances::Config for Runtime {
}

impl pallet_transaction_payment::Config for Runtime {
type Event = Event;
type OnChargeTransaction =
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
type WeightToFee = WeightToFee;
Expand Down Expand Up @@ -330,7 +331,7 @@ construct_runtime!(

// Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 10,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 11,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,

// Collator support. The order of these 5 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
Expand Down
3 changes: 2 additions & 1 deletion parachains/runtimes/testing/rococo-parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ parameter_types! {
}

impl pallet_transaction_payment::Config for Runtime {
type Event = Event;
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
type WeightToFee = IdentityFee<Balance>;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
Expand Down Expand Up @@ -519,7 +520,7 @@ construct_runtime! {
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},

ParachainSystem: cumulus_pallet_parachain_system::{
Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned,
Expand Down
1 change: 1 addition & 0 deletions test/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ parameter_types! {
}

impl pallet_transaction_payment::Config for Runtime {
type Event = Event;
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
type WeightToFee = IdentityFee<Balance>;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
Expand Down