mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
* Some renames
* Fix
* Fix build for new APIs
* Remove diener
* Fixes
* Fixes
* Fix integration tests
* Fixes
* fix nis issuance
* Update Cargo.toml
* Polkadot doesn't have freezes/holds yet
* No networks use freezes/holds
* update lockfile for {"substrate"}
* Fix tests
There are more failing tests; just starting with the easy ones.
Reserved balance does not count towards ED anymore, therefore reducing
all the reserves by ED (1).
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fixes for Polkadot pallets
* Fix parachains benchmarks
* Update Substrate
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -34,6 +34,7 @@ use runtime_common::{
|
||||
paras_registrar, paras_sudo_wrapper, prod_or_fast, slots, BlockHashCount, BlockLength,
|
||||
SlowAdjustingFeeUpdate,
|
||||
};
|
||||
use scale_info::TypeInfo;
|
||||
use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*};
|
||||
|
||||
use runtime_parachains::{
|
||||
@@ -281,6 +282,10 @@ impl pallet_balances::Config for Runtime {
|
||||
type MaxReserves = MaxReserves;
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
||||
type FreezeIdentifier = ();
|
||||
type MaxFreezes = ConstU32<1>;
|
||||
type HoldIdentifier = HoldReason;
|
||||
type MaxHolds = ConstU32<1>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -1169,7 +1174,6 @@ impl pallet_balances::Config<NisCounterpartInstance> for Runtime {
|
||||
type ExistentialDeposit = ConstU128<10_000_000_000>; // One RTC cent
|
||||
type AccountStore = StorageMapShim<
|
||||
pallet_balances::Account<Runtime, NisCounterpartInstance>,
|
||||
frame_system::Provider<Runtime>,
|
||||
AccountId,
|
||||
pallet_balances::AccountData<u128>,
|
||||
>;
|
||||
@@ -1177,10 +1181,13 @@ impl pallet_balances::Config<NisCounterpartInstance> for Runtime {
|
||||
type MaxReserves = ConstU32<4>;
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo<Runtime>;
|
||||
type HoldIdentifier = ();
|
||||
type FreezeIdentifier = ();
|
||||
type MaxHolds = ConstU32<0>;
|
||||
type MaxFreezes = ConstU32<0>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub IgnoredIssuance: Balance = Treasury::pot();
|
||||
pub const NisBasePeriod: BlockNumber = 30 * DAYS;
|
||||
pub const MinBid: Balance = 100 * UNITS;
|
||||
pub MinReceipt: Perquintill = Perquintill::from_rational(1u64, 10_000_000u64);
|
||||
@@ -1189,7 +1196,27 @@ parameter_types! {
|
||||
pub const ThawThrottle: (Perquintill, BlockNumber) = (Perquintill::from_percent(25), 5);
|
||||
pub storage NisTarget: Perquintill = Perquintill::zero();
|
||||
pub const NisPalletId: PalletId = PalletId(*b"py/nis ");
|
||||
pub const NisReserveId: [u8; 8] = *b"py/nis ";
|
||||
pub const NisHoldReason: HoldReason = HoldReason::Nis(HoldReasonNis::NftReceipt);
|
||||
}
|
||||
|
||||
/// A reason for placing a hold on funds.
|
||||
#[derive(
|
||||
Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, Debug, TypeInfo,
|
||||
)]
|
||||
pub enum HoldReason {
|
||||
/// Some reason of the NIS pallet.
|
||||
#[codec(index = 38)]
|
||||
Nis(HoldReasonNis),
|
||||
}
|
||||
|
||||
/// A reason for the NIS pallet placing a hold on funds.
|
||||
#[derive(
|
||||
Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, Debug, TypeInfo,
|
||||
)]
|
||||
pub enum HoldReasonNis {
|
||||
/// The NIS Pallet has reserved it for a non-fungible receipt.
|
||||
#[codec(index = 0)]
|
||||
NftReceipt = 0,
|
||||
}
|
||||
|
||||
impl pallet_nis::Config for Runtime {
|
||||
@@ -1201,7 +1228,7 @@ impl pallet_nis::Config for Runtime {
|
||||
type Counterpart = NisCounterpartBalances;
|
||||
type CounterpartAmount = WithMaximumOf<ConstU128<21_000_000_000_000_000_000u128>>;
|
||||
type Deficit = (); // Mint
|
||||
type IgnoredIssuance = IgnoredIssuance;
|
||||
type IgnoredIssuance = ();
|
||||
type Target = NisTarget;
|
||||
type PalletId = NisPalletId;
|
||||
type QueueCount = ConstU32<300>;
|
||||
@@ -1213,7 +1240,7 @@ impl pallet_nis::Config for Runtime {
|
||||
type IntakePeriod = IntakePeriod;
|
||||
type MaxIntakeWeight = MaxIntakeWeight;
|
||||
type ThawThrottle = ThawThrottle;
|
||||
type ReserveId = NisReserveId;
|
||||
type HoldReason = NisHoldReason;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
|
||||
Reference in New Issue
Block a user