-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[orml-vesting-benchmarks] change upstream benchmark so that they fit …
…our runtime
- Loading branch information
Showing
8 changed files
with
72 additions
and
91 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mod utils; | ||
|
||
// module benchmarking | ||
mod orml_vesting; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
pub use crate::{AccountId, Balances, Runtime, BAJUN}; | ||
use frame_support::dispatch::RawOrigin; | ||
pub use parity_scale_codec::Encode; | ||
use sp_runtime::traits::{AccountIdConversion, StaticLookup}; | ||
|
||
pub fn get_vesting_account() -> AccountId { | ||
crate::TreasuryPalletId::get().into_account_truncating() | ||
} | ||
|
||
pub fn lookup_of_account( | ||
who: AccountId, | ||
) -> <<Runtime as frame_system::Config>::Lookup as StaticLookup>::Source { | ||
<Runtime as frame_system::Config>::Lookup::unlookup(who) | ||
} | ||
|
||
pub fn set_balance(account: AccountId, schedule_amount: u128) { | ||
Balances::force_set_balance(RawOrigin::Root.into(), account.into(), schedule_amount).unwrap(); | ||
} | ||
|
||
#[cfg(test)] | ||
pub mod tests { | ||
use sp_runtime::BuildStorage; | ||
|
||
pub fn new_test_ext() -> sp_io::TestExternalities { | ||
frame_system::GenesisConfig::<crate::Runtime>::default() | ||
.build_storage() | ||
.unwrap() | ||
.into() | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters