Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Add TransactionPayment event to Pallet Tranascation Payment #11595

@shawntabrizi

Description

@shawntabrizi

There have been many issues from various people, all asking how to get the transaction fee of a Substrate transaction.

Currently, the only events that are emitted are those from the Balances pallet, which are not specific enough to determine the actual transaction fee in all cases.

We should add a simple event to the Transaction Payment Pallet which emits exactly the final transaction fee, tip, and user to clarify all of this.

Something like:

#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
	TransactionPayment { account: T::AccountId, fee: BalanceOf<T>, tip: BalanceOf<T> },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coderZ6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions