Skip to content
Snippets Groups Projects

upgrade substrate to monthly-2022-01

Merged Éloïs requested to merge elois-upgrade-substrate into master
8 files
+ 96
23
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -19,6 +19,8 @@ macro_rules! pallets_config {
@@ -19,6 +19,8 @@ macro_rules! pallets_config {
{$($custom:tt)*} => {
{$($custom:tt)*} => {
$($custom)*
$($custom)*
 
// SYSTEM //
 
impl frame_system::Config for Runtime {
impl frame_system::Config for Runtime {
/// The basic call filter to use in dispatchable.
/// The basic call filter to use in dispatchable.
type BaseCallFilter = frame_support::traits::Everything;
type BaseCallFilter = frame_support::traits::Everything;
@@ -71,28 +73,41 @@ macro_rules! pallets_config {
@@ -71,28 +73,41 @@ macro_rules! pallets_config {
type MaxConsumers = frame_support::traits::ConstU32<16>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}
}
impl pallet_grandpa::Config for Runtime {
// SCHEDULER //
type Event = Event;
type Call = Call;
type KeyOwnerProofSystem = ();
type KeyOwnerProof =
<Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
KeyTypeId,
GrandpaId,
)>>::IdentificationTuple;
type HandleEquivocation = ();
parameter_types! {
 
pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) *
 
BlockWeights::get().max_block;
 
pub const MaxScheduledPerBlock: u32 = 50;
 
}
 
/// Used the compare the privilege of an origin inside the scheduler.
 
pub struct OriginPrivilegeCmp;
 
impl frame_support::traits::PrivilegeCmp<OriginCaller> for OriginPrivilegeCmp {
 
fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option<core::cmp::Ordering> {
 
if left == right {
 
Some(core::cmp::Ordering::Equal)
 
} else {
 
None
 
}
 
}
 
}
 
impl pallet_scheduler::Config for Runtime {
 
type Event = Event;
 
type Origin = Origin;
 
type PalletsOrigin = OriginCaller;
 
type Call = Call;
 
type MaximumWeight = MaximumSchedulerWeight;
 
type ScheduleOrigin = frame_system::EnsureSigned<AccountId>;
 
type OriginPrivilegeCmp = OriginPrivilegeCmp;
 
type MaxScheduledPerBlock = MaxScheduledPerBlock;
 
type WeightInfo = pallet_scheduler::weights::SubstrateWeight<Runtime>;
 
type PreimageProvider = ();
 
type NoPreimagePostponement = ();
 
}
type WeightInfo = ();
// MONEY //
type MaxAuthorities = MaxAuthorities;
impl pallet_balances::Config for Runtime {
}
impl pallet_balances::Config for Runtime {
type MaxLocks = MaxLocks;
type MaxLocks = MaxLocks;
type MaxReserves = ();
type MaxReserves = ();
type ReserveIdentifier = [u8; 8];
type ReserveIdentifier = [u8; 8];
@@ -114,6 +129,29 @@ macro_rules! pallets_config {
@@ -114,6 +129,29 @@ macro_rules! pallets_config {
type FeeMultiplierUpdate = ();
type FeeMultiplierUpdate = ();
}
}
 
// CONSENSUS //
 
 
impl pallet_grandpa::Config for Runtime {
 
type Event = Event;
 
type Call = Call;
 
 
type KeyOwnerProofSystem = ();
 
 
type KeyOwnerProof =
 
<Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
 
 
type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
 
KeyTypeId,
 
GrandpaId,
 
)>>::IdentificationTuple;
 
 
type HandleEquivocation = ();
 
 
type WeightInfo = ();
 
 
type MaxAuthorities = MaxAuthorities;
 
}
 
// UTILITY //
// UTILITY //
impl pallet_utility::Config for Runtime {
impl pallet_utility::Config for Runtime {
Loading