@@ -32,9 +32,10 @@ use frame_support::{
3232 pallet_prelude:: Get ,
3333 parameter_types,
3434 traits:: {
35- AsEnsureOriginWithArg , ConstBool , ConstU128 , ConstU16 , ConstU32 , Currency , EitherOfDiverse ,
36- EqualPrivilegeOnly , Everything , Imbalance , InstanceFilter , KeyOwnerProofSystem ,
37- LockIdentifier , Nothing , OnUnbalanced , U128CurrencyToVote , WithdrawReasons ,
35+ fungible:: ItemOf , AsEnsureOriginWithArg , ConstBool , ConstU128 , ConstU16 , ConstU32 ,
36+ Currency , EitherOfDiverse , EqualPrivilegeOnly , Everything , Imbalance , InstanceFilter ,
37+ KeyOwnerProofSystem , LockIdentifier , Nothing , OnUnbalanced , U128CurrencyToVote ,
38+ WithdrawReasons ,
3839 } ,
3940 weights:: {
4041 constants:: { BlockExecutionWeight , ExtrinsicBaseWeight , RocksDbWeight , WEIGHT_PER_SECOND } ,
@@ -53,6 +54,7 @@ use pallet_grandpa::{
5354 fg_primitives, AuthorityId as GrandpaId , AuthorityList as GrandpaAuthorityList ,
5455} ;
5556use pallet_im_online:: sr25519:: AuthorityId as ImOnlineId ;
57+ use pallet_nis:: WithMaximumOf ;
5658use pallet_session:: historical:: { self as pallet_session_historical} ;
5759pub use pallet_transaction_payment:: { CurrencyAdapter , Multiplier , TargetedFeeAdjustment } ;
5860use pallet_transaction_payment:: { FeeDetails , RuntimeDispatchInfo } ;
@@ -1464,28 +1466,37 @@ parameter_types! {
14641466 pub const QueueCount : u32 = 300 ;
14651467 pub const MaxQueueLen : u32 = 1000 ;
14661468 pub const FifoQueueLen : u32 = 500 ;
1467- pub const Period : BlockNumber = 30 * DAYS ;
1468- pub const MinFreeze : Balance = 100 * DOLLARS ;
1469+ pub const NisBasePeriod : BlockNumber = 30 * DAYS ;
1470+ pub const MinBid : Balance = 100 * DOLLARS ;
1471+ pub const MinReceipt : Perquintill = Perquintill :: from_percent( 1 ) ;
14691472 pub const IntakePeriod : BlockNumber = 10 ;
1470- pub const MaxIntakeBids : u32 = 10 ;
1473+ pub MaxIntakeWeight : Weight = MAXIMUM_BLOCK_WEIGHT / 10 ;
1474+ pub const ThawThrottle : ( Perquintill , BlockNumber ) = ( Perquintill :: from_percent( 25 ) , 5 ) ;
1475+ pub Target : Perquintill = Perquintill :: zero( ) ;
1476+ pub const NisPalletId : PalletId = PalletId ( * b"py/nis " ) ;
14711477}
14721478
1473- impl pallet_gilt:: Config for Runtime {
1479+ impl pallet_nis:: Config for Runtime {
1480+ type WeightInfo = pallet_nis:: weights:: SubstrateWeight < Runtime > ;
14741481 type RuntimeEvent = RuntimeEvent ;
14751482 type Currency = Balances ;
14761483 type CurrencyBalance = Balance ;
1477- type AdminOrigin = frame_system:: EnsureRoot < AccountId > ;
1484+ type FundOrigin = frame_system:: EnsureSigned < AccountId > ;
1485+ type Counterpart = ItemOf < Assets , ConstU32 < 9u32 > , AccountId > ;
1486+ type CounterpartAmount = WithMaximumOf < ConstU128 < 21_000_000_000_000_000_000u128 > > ;
14781487 type Deficit = ( ) ;
1479- type Surplus = ( ) ;
14801488 type IgnoredIssuance = IgnoredIssuance ;
1489+ type Target = Target ;
1490+ type PalletId = NisPalletId ;
14811491 type QueueCount = QueueCount ;
14821492 type MaxQueueLen = MaxQueueLen ;
14831493 type FifoQueueLen = FifoQueueLen ;
1484- type Period = Period ;
1485- type MinFreeze = MinFreeze ;
1494+ type BasePeriod = NisBasePeriod ;
1495+ type MinBid = MinBid ;
1496+ type MinReceipt = MinReceipt ;
14861497 type IntakePeriod = IntakePeriod ;
1487- type MaxIntakeBids = MaxIntakeBids ;
1488- type WeightInfo = pallet_gilt :: weights :: SubstrateWeight < Runtime > ;
1498+ type MaxIntakeWeight = MaxIntakeWeight ;
1499+ type ThawThrottle = ThawThrottle ;
14891500}
14901501
14911502parameter_types ! {
@@ -1668,7 +1679,7 @@ construct_runtime!(
16681679 Assets : pallet_assets,
16691680 Mmr : pallet_mmr,
16701681 Lottery : pallet_lottery,
1671- Gilt : pallet_gilt ,
1682+ Nis : pallet_nis ,
16721683 Uniques : pallet_uniques,
16731684 TransactionStorage : pallet_transaction_storage,
16741685 VoterList : pallet_bags_list:: <Instance1 >,
@@ -1772,7 +1783,7 @@ mod benches {
17721783 [ pallet_election_provider_support_benchmarking, EPSBench :: <Runtime >]
17731784 [ pallet_elections_phragmen, Elections ]
17741785 [ pallet_fast_unstake, FastUnstake ]
1775- [ pallet_gilt , Gilt ]
1786+ [ pallet_nis , Nis ]
17761787 [ pallet_grandpa, Grandpa ]
17771788 [ pallet_identity, Identity ]
17781789 [ pallet_im_online, ImOnline ]
0 commit comments