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 4ce4ec5 commit 4c70c88
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 @@ -177,8 +177,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 4c70c88

Please sign in to comment.