pallet_frequency_tx_payment/types.rs
1extern crate alloc;
2use alloc::vec::Vec;
3
4/// Gets stable weights for a capacity Call
5pub trait GetStableWeight<RuntimeCall, Weight> {
6 /// Get stable weights for Call
7 fn get_stable_weight(call: &RuntimeCall) -> Option<Weight>;
8
9 /// Get inner calls from a Call if any exist,
10 /// e.g. in case of `pay_with_capacity` and `pay_with_capacity_batch_all`
11 fn get_inner_calls(outer_call: &RuntimeCall) -> Option<Vec<&RuntimeCall>>;
12}
13
14/// Filters calls that match Msa::add_public_key_to_msa
15pub trait GetAddKeyData<RuntimeCall, AccountId, MessageSourceId> {
16 /// If the call matches Msa::add_public_key_to_msa, return the owner account id and msa id
17 /// from the call parameters
18 fn get_add_key_data(call: &RuntimeCall) -> Option<(AccountId, AccountId, MessageSourceId)>;
19}