Skip to content

Commit

Permalink
Add default implementation for OnNewAccount and OnKilledAccount for e…
Browse files Browse the repository at this point in the history
…mpty tuple (#63)
  • Loading branch information
dmitrylavrenov committed Oct 12, 2023
1 parent d7f5b62 commit 85989ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frame/evm-system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,16 @@ pub trait OnNewAccount<AccountId> {
fn on_new_account(who: &AccountId);
}

impl<AccountId> OnNewAccount<AccountId> for () {
fn on_new_account(_who: &AccountId) {}
}

/// Interface to handle account killing.
pub trait OnKilledAccount<AccountId> {
/// The account with the given id was reaped.
fn on_killed_account(who: &AccountId);
}

impl<AccountId> OnKilledAccount<AccountId> for () {
fn on_killed_account(_who: &AccountId) {}
}

0 comments on commit 85989ea

Please sign in to comment.