Skip to content

Commit

Permalink
feat: move Region back to lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitdevos committed Jun 6, 2024
1 parent 2943335 commit 9041db9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 1 addition & 7 deletions runtime/src/configs/logion_config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use codec::{Decode, Encode, MaxEncodedLen};
use cumulus_primitives_core::Weight;
use frame_support::{PalletId, parameter_types};
use frame_support::pallet_prelude::{ConstU32, TypeInfo};
Expand All @@ -21,7 +20,7 @@ use sp_io::hashing::sha2_256;
use sp_runtime::Permill;
use sp_runtime::traits::{AccountIdConversion, ConvertInto, IdentityLookup};
use sp_std::prelude::*;
use crate::{DAYS, LGNT};
use crate::{DAYS, LGNT, Region};
use crate::{AccountId, Balance, Balances, BlockNumber, CommunityTreasury, EthereumAddress, Hash, LoAuthorityList, LocId, LogionLoc, LogionTreasury, OriginCaller, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SponsorshipId, System, TokenIssuance, weights};
use crate::configs::{CertificateFee, CertificateFeeDistributionKey, FileStorageByteFee, FileStorageEntryFee, FileStorageFeeDistributionKey, IdentityLocLegalFeeDistributionKey, InflationAmount, InflationDistributionKey, OtherLocLegalFeeDistributionKey, RecurentFeeDistributionKey, RewardDistributor, ValueFeeDistributionKey};

Expand All @@ -33,11 +32,6 @@ parameter_types! {
pub const MaxPeerIdLength: u32 = 128;
}

#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, Copy, MaxEncodedLen)]
pub enum Region {
Europe,
}

impl sp_std::str::FromStr for Region {
type Err = ();

Expand Down
7 changes: 7 additions & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub mod apis;
mod configs;
mod weights;

use codec::{Decode, Encode, MaxEncodedLen};
use sp_core::H160;
use sp_runtime::{create_runtime_str, generic, impl_opaque_keys, traits::{
BlakeTwo256, IdentifyAccount,
Expand All @@ -27,6 +28,7 @@ use frame_support::{
constants::WEIGHT_REF_TIME_PER_SECOND, Weight,
},
};
use frame_support::pallet_prelude::TypeInfo;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill, Percent};

Expand Down Expand Up @@ -99,6 +101,11 @@ pub type UncheckedExtrinsic =
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;

#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo, Copy, MaxEncodedLen)]
pub enum Region {
Europe,
}

/// All migrations of the runtime, aside from the ones declared in the pallets.
///
/// This can be a tuple of types, each implementing `OnRuntimeUpgrade`.
Expand Down

0 comments on commit 9041db9

Please sign in to comment.