mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
Pallet Indices (#7137)
This commit is contained in:
@@ -32,9 +32,7 @@ benchmarks! {
|
||||
_ { }
|
||||
|
||||
claim {
|
||||
// Index being claimed
|
||||
let i in 0 .. 1000;
|
||||
let account_index = T::AccountIndex::from(i);
|
||||
let account_index = T::AccountIndex::from(SEED);
|
||||
let caller: T::AccountId = whitelisted_caller();
|
||||
T::Currency::make_free_balance_be(&caller, BalanceOf::<T>::max_value());
|
||||
}: _(RawOrigin::Signed(caller.clone()), account_index)
|
||||
@@ -43,13 +41,11 @@ benchmarks! {
|
||||
}
|
||||
|
||||
transfer {
|
||||
// Index being claimed
|
||||
let i in 0 .. 1000;
|
||||
let account_index = T::AccountIndex::from(i);
|
||||
let account_index = T::AccountIndex::from(SEED);
|
||||
// Setup accounts
|
||||
let caller: T::AccountId = whitelisted_caller();
|
||||
T::Currency::make_free_balance_be(&caller, BalanceOf::<T>::max_value());
|
||||
let recipient: T::AccountId = account("recipient", i, SEED);
|
||||
let recipient: T::AccountId = account("recipient", 0, SEED);
|
||||
T::Currency::make_free_balance_be(&recipient, BalanceOf::<T>::max_value());
|
||||
// Claim the index
|
||||
Indices::<T>::claim(RawOrigin::Signed(caller.clone()).into(), account_index)?;
|
||||
@@ -59,9 +55,7 @@ benchmarks! {
|
||||
}
|
||||
|
||||
free {
|
||||
// Index being claimed
|
||||
let i in 0 .. 1000;
|
||||
let account_index = T::AccountIndex::from(i);
|
||||
let account_index = T::AccountIndex::from(SEED);
|
||||
// Setup accounts
|
||||
let caller: T::AccountId = whitelisted_caller();
|
||||
T::Currency::make_free_balance_be(&caller, BalanceOf::<T>::max_value());
|
||||
@@ -73,13 +67,11 @@ benchmarks! {
|
||||
}
|
||||
|
||||
force_transfer {
|
||||
// Index being claimed
|
||||
let i in 0 .. 1000;
|
||||
let account_index = T::AccountIndex::from(i);
|
||||
let account_index = T::AccountIndex::from(SEED);
|
||||
// Setup accounts
|
||||
let original: T::AccountId = account("original", 0, SEED);
|
||||
T::Currency::make_free_balance_be(&original, BalanceOf::<T>::max_value());
|
||||
let recipient: T::AccountId = account("recipient", i, SEED);
|
||||
let recipient: T::AccountId = account("recipient", 0, SEED);
|
||||
T::Currency::make_free_balance_be(&recipient, BalanceOf::<T>::max_value());
|
||||
// Claim the index
|
||||
Indices::<T>::claim(RawOrigin::Signed(original).into(), account_index)?;
|
||||
@@ -89,9 +81,7 @@ benchmarks! {
|
||||
}
|
||||
|
||||
freeze {
|
||||
// Index being claimed
|
||||
let i in 0 .. 1000;
|
||||
let account_index = T::AccountIndex::from(i);
|
||||
let account_index = T::AccountIndex::from(SEED);
|
||||
// Setup accounts
|
||||
let caller: T::AccountId = whitelisted_caller();
|
||||
T::Currency::make_free_balance_be(&caller, BalanceOf::<T>::max_value());
|
||||
|
||||
Reference in New Issue
Block a user