From 222dd5fca5c68672b6b3c73431893a9d45874fc7 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov <39522748+dmitrylavrenov@users.noreply.github.com> Date: Wed, 17 May 2023 12:04:29 +0300 Subject: [PATCH] Add default implementation for OnNewAccount and OnKilledAccount for empty tuple (#63) --- frame/evm-system/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frame/evm-system/src/lib.rs b/frame/evm-system/src/lib.rs index b8585ca470..0910a82ee5 100644 --- a/frame/evm-system/src/lib.rs +++ b/frame/evm-system/src/lib.rs @@ -178,8 +178,16 @@ pub trait OnNewAccount { fn on_new_account(who: &AccountId); } +impl OnNewAccount for () { + fn on_new_account(_who: &AccountId) {} +} + /// Interface to handle account killing. pub trait OnKilledAccount { /// The account with the given id was reaped. fn on_killed_account(who: &AccountId); } + +impl OnKilledAccount for () { + fn on_killed_account(_who: &AccountId) {} +}