Make Pay trait from salaries pallet more generic (#13609)

* Make Pay trait from salaries pallet more generic

* Rename and add missing

* Update frame/support/src/traits/tokens/pay.rs

* Update pay.rs

* Update pay.rs

* Update pay.rs

* Add better documentation for the AssetKind associated type

---------

Co-authored-by: Gavin Wood <gavin@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
Francisco Aguirre
2023-03-15 18:04:28 -03:00
committed by GitHub
parent fd6b971d22
commit 33fd17061e
5 changed files with 122 additions and 74 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ use frame_support::{
parameter_types,
traits::{
fungible::ItemOf,
tokens::{nonfungibles_v2::Inspect, GetSalary},
tokens::{nonfungibles_v2::Inspect, GetSalary, PayFromAccount},
AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU16, ConstU32, Currency, EitherOfDiverse,
EqualPrivilegeOnly, Everything, Imbalance, InstanceFilter, KeyOwnerProofSystem,
LockIdentifier, Nothing, OnUnbalanced, U128CurrencyToVote, WithdrawReasons,
@@ -56,7 +56,7 @@ use pallet_election_provider_multi_phase::SolutionAccuracyOf;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use pallet_nfts::PalletFeatures;
use pallet_nis::WithMaximumOf;
use pallet_session::historical::{self as pallet_session_historical};
use pallet_session::historical as pallet_session_historical;
pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment};
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
use sp_api::impl_runtime_apis;
@@ -1567,7 +1567,7 @@ impl GetSalary<u16, AccountId, Balance> for SalaryForRank {
impl pallet_salary::Config for Runtime {
type WeightInfo = ();
type RuntimeEvent = RuntimeEvent;
type Paymaster = pallet_salary::PayFromAccount<Balances, TreasuryAccount>;
type Paymaster = PayFromAccount<Balances, TreasuryAccount>;
type Members = RankedCollective;
type Salary = SalaryForRank;
type RegistrationPeriod = ConstU32<200>;