mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 02:08:02 +00:00
Add pallet names to Events (#10296)
* chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: add pallet names to events * chore: formatted pallet name changes in events * chore: formatted pallet name changes in events * chore: formatted pallet name changes in events * chore: formatted pallet name changes in events * chore: formatted pallet name changes in events * chore: formatted pallet name changes in events * chore: formatted pallet name changes in events * chore: formatted pallet name changes in events * chore: formatted pallet name changes in events * fix: add fix to tests for event variants * chore: modified comments for event variants * chore: modified comments for event variants * chore: modified comments for event variants * chore: modified comments for event variants * chore: modified system pallet event variants * chore: modified system pallet event variants * chore: modified system pallet event variants * chore: modified system pallet event variants * chore: modified system pallet event variants * chore: modified system pallet event variants * chore: modified system pallet event variants * chore: modified system pallet event variants * chore: modified system pallet event variants * chore: updated transaction-storage pallet event variants * chore: updated transaction-storage pallet event variants * chore: formatted contracts pallet * chore: update treasury event variants
This commit is contained in:
@@ -458,7 +458,7 @@ pub mod pallet {
|
||||
) -> DispatchResultWithPostInfo {
|
||||
let who = ensure_signed(origin)?;
|
||||
let hash = T::Hashing::hash(&remark[..]);
|
||||
Self::deposit_event(Event::Remarked(who, hash));
|
||||
Self::deposit_event(Event::Remarked { sender: who, hash });
|
||||
Ok(().into())
|
||||
}
|
||||
}
|
||||
@@ -466,18 +466,18 @@ pub mod pallet {
|
||||
/// Event for the System pallet.
|
||||
#[pallet::event]
|
||||
pub enum Event<T: Config> {
|
||||
/// An extrinsic completed successfully. \[info\]
|
||||
ExtrinsicSuccess(DispatchInfo),
|
||||
/// An extrinsic failed. \[error, info\]
|
||||
ExtrinsicFailed(DispatchError, DispatchInfo),
|
||||
/// An extrinsic completed successfully.
|
||||
ExtrinsicSuccess { dispatch_info: DispatchInfo },
|
||||
/// An extrinsic failed.
|
||||
ExtrinsicFailed { dispatch_error: DispatchError, dispatch_info: DispatchInfo },
|
||||
/// `:code` was updated.
|
||||
CodeUpdated,
|
||||
/// A new \[account\] was created.
|
||||
NewAccount(T::AccountId),
|
||||
/// An \[account\] was reaped.
|
||||
KilledAccount(T::AccountId),
|
||||
/// On on-chain remark happened. \[origin, remark_hash\]
|
||||
Remarked(T::AccountId, T::Hash),
|
||||
/// A new account was created.
|
||||
NewAccount { account: T::AccountId },
|
||||
/// An account was reaped.
|
||||
KilledAccount { account: T::AccountId },
|
||||
/// On on-chain remark happened.
|
||||
Remarked { sender: T::AccountId, hash: T::Hash },
|
||||
}
|
||||
|
||||
/// Old name generated by `decl_event`.
|
||||
@@ -1486,7 +1486,7 @@ impl<T: Config> Pallet<T> {
|
||||
pub fn note_applied_extrinsic(r: &DispatchResultWithPostInfo, mut info: DispatchInfo) {
|
||||
info.weight = extract_actual_weight(r, &info);
|
||||
Self::deposit_event(match r {
|
||||
Ok(_) => Event::ExtrinsicSuccess(info),
|
||||
Ok(_) => Event::ExtrinsicSuccess { dispatch_info: info },
|
||||
Err(err) => {
|
||||
log::trace!(
|
||||
target: "runtime::system",
|
||||
@@ -1494,7 +1494,7 @@ impl<T: Config> Pallet<T> {
|
||||
Self::block_number(),
|
||||
err,
|
||||
);
|
||||
Event::ExtrinsicFailed(err.error, info)
|
||||
Event::ExtrinsicFailed { dispatch_error: err.error, dispatch_info: info }
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1522,13 +1522,13 @@ impl<T: Config> Pallet<T> {
|
||||
/// An account is being created.
|
||||
pub fn on_created_account(who: T::AccountId, _a: &mut AccountInfo<T::Index, T::AccountData>) {
|
||||
T::OnNewAccount::on_new_account(&who);
|
||||
Self::deposit_event(Event::NewAccount(who));
|
||||
Self::deposit_event(Event::NewAccount { account: who });
|
||||
}
|
||||
|
||||
/// Do anything that needs to be done after an account has been killed.
|
||||
fn on_killed_account(who: T::AccountId) {
|
||||
T::OnKilledAccount::on_killed_account(&who);
|
||||
Self::deposit_event(Event::KilledAccount(who));
|
||||
Self::deposit_event(Event::KilledAccount { account: who });
|
||||
}
|
||||
|
||||
/// Determine whether or not it is possible to update the code.
|
||||
|
||||
Reference in New Issue
Block a user