diff --git a/precompiles/src/testing/account.rs b/precompiles/src/testing/account.rs index 17aec289a0..ad83047713 100644 --- a/precompiles/src/testing/account.rs +++ b/precompiles/src/testing/account.rs @@ -22,7 +22,7 @@ use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use sp_core::{Decode, Encode, MaxEncodedLen, H160, H256}; -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug)] #[derive(Serialize, Deserialize, derive_more::Display)] #[derive(Encode, Decode, MaxEncodedLen, TypeInfo)] pub struct MockAccount(pub H160); @@ -82,6 +82,12 @@ impl From<[u8; 20]> for MockAccount { } } +impl From for MockAccount { + fn from(address: u64) -> MockAccount { + MockAccount::from_u64(address) + } +} + impl AddressMapping for MockAccount { fn into_account_id(address: H160) -> MockAccount { address.into()