-
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.
feat(fc-pallet-pass): first benchmark
- Loading branch information
Showing
4 changed files
with
77 additions
and
7 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,10 +1,23 @@ | ||
use crate::Config; | ||
use fc_traits_authn::HashedUserId; | ||
use sp_runtime::traits::StaticLookup; | ||
|
||
// pub type HashedUserId<T> = <T as frame_system::Config>::Hash; | ||
pub type ContextOf<T, I> = | ||
<<<T as Config<I>>::Authenticator as fc_traits_authn::Authenticator>::Challenger as fc_traits_authn::Challenger>::Context; | ||
pub type DeviceOf<T, I> = | ||
<<T as Config<I>>::Authenticator as fc_traits_authn::Authenticator>::Device; | ||
pub type CredentialOf<T, I> = <DeviceOf<T, I> as fc_traits_authn::UserAuthenticator>::Credential; | ||
pub type DeviceAttestationOf<T, I> = | ||
<<T as Config<I>>::Authenticator as fc_traits_authn::Authenticator>::DeviceAttestation; | ||
pub type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source; | ||
|
||
#[cfg(feature = "runtime-benchmarks")] | ||
pub trait BenchmarkHelper<T, I = ()> | ||
where | ||
T: Config<I>, | ||
I: 'static, | ||
{ | ||
fn device_attestation(device_id: fc_traits_authn::DeviceId) -> DeviceAttestationOf<T, I>; | ||
fn credential(user_id: HashedUserId) -> CredentialOf<T, I>; | ||
} |