From e702a4d1195e3ec48d30c861186877256835b708 Mon Sep 17 00:00:00 2001 From: Ashutosh Varma Date: Fri, 27 Oct 2023 15:51:59 +0530 Subject: [PATCH] fix: benchmarks --- pallets/unified-accounts/src/benchmarking.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pallets/unified-accounts/src/benchmarking.rs b/pallets/unified-accounts/src/benchmarking.rs index bec5f65d59..0ea2fe6e15 100644 --- a/pallets/unified-accounts/src/benchmarking.rs +++ b/pallets/unified-accounts/src/benchmarking.rs @@ -88,6 +88,10 @@ mod benchmarks { fn to_account_id() { let caller: T::AccountId = whitelisted_caller(); let evm_address = T::DefaultNativeToEvm::into_h160(caller.clone()); + assert_ok!(T::Currency::mint_into( + &caller, + T::AccountMappingStorageFee::get() + )); // claim mapping assert_ok!(Pallet::::claim_default_evm_address( RawOrigin::Signed(caller.clone()).into() @@ -103,6 +107,10 @@ mod benchmarks { fn to_account_id_or_default() { let caller: T::AccountId = whitelisted_caller(); let evm_address = T::DefaultNativeToEvm::into_h160(caller.clone()); + assert_ok!(T::Currency::mint_into( + &caller, + T::AccountMappingStorageFee::get() + )); // claim mapping assert_ok!(Pallet::::claim_default_evm_address( RawOrigin::Signed(caller.clone()).into() @@ -119,6 +127,10 @@ mod benchmarks { #[benchmark] fn to_h160() { let caller: T::AccountId = whitelisted_caller(); + assert_ok!(T::Currency::mint_into( + &caller, + T::AccountMappingStorageFee::get() + )); // claim mapping assert_ok!(Pallet::::claim_default_evm_address( RawOrigin::Signed(caller.clone()).into() @@ -133,6 +145,10 @@ mod benchmarks { #[benchmark] fn to_h160_or_default() { let caller: T::AccountId = whitelisted_caller(); + assert_ok!(T::Currency::mint_into( + &caller, + T::AccountMappingStorageFee::get() + )); // claim mapping assert_ok!(Pallet::::claim_default_evm_address( RawOrigin::Signed(caller.clone()).into()