Skip to content

Commit

Permalink
fix: benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshvarma committed Oct 27, 2023
1 parent 608cc5a commit e702a4d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pallets/unified-accounts/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<T>::claim_default_evm_address(
RawOrigin::Signed(caller.clone()).into()
Expand All @@ -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::<T>::claim_default_evm_address(
RawOrigin::Signed(caller.clone()).into()
Expand All @@ -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::<T>::claim_default_evm_address(
RawOrigin::Signed(caller.clone()).into()
Expand All @@ -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::<T>::claim_default_evm_address(
RawOrigin::Signed(caller.clone()).into()
Expand Down

0 comments on commit e702a4d

Please sign in to comment.