Skip to content

Commit

Permalink
WIP:
Browse files Browse the repository at this point in the history
  • Loading branch information
dkuanyshbaev committed Nov 25, 2024
1 parent d1b0959 commit 3d3e111
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ pallet-collective = { version = "38.0.0", default-features = false }
pallet-democracy = { version = "38.0.0", default-features = false }
pallet-membership = { version = "38.0.0", default-features = false }
pallet-multisig = { version = "38.0.0", default-features = false }
pallet-migrations = { version = "8.0.0", default-features = false }
pallet-preimage = { version = "38.0.0", default-features = false }
pallet-scheduler = { version = "39.0.0", default-features = false }
pallet-treasury = { version = "37.0.0", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions runtime/dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ frame-system-rpc-runtime-api = { workspace = true }
frame-system-benchmarking = { workspace = true, optional = true }
pallet-membership = { workspace = true }
pallet-multisig = { workspace = true }
pallet-migrations = { workspace = true }
pallet-utility = { workspace = true }
pallet-vesting = { workspace = true }
pallet-timestamp = { workspace = true }
Expand Down
40 changes: 40 additions & 0 deletions runtime/dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ use frame_system::{
EnsureRoot, EnsureSigned,
};
use pallet_grandpa::{fg_primitives, AuthorityList as GrandpaAuthorityList};
use pallet_identity::legacy::IdentityInfo;
use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment};
use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, RuntimeDispatchInfo};
use robonomics_primitives::{
Expand Down Expand Up @@ -143,6 +144,25 @@ parameter_types! {
pub SS58Prefix: u8 = 32;
}

// parameter_types! {
// pub MbmServiceWeight: Weight = Perbill::from_percent(80) * RuntimeBlockWeights::get().max_block;
// }
//
// impl pallet_migrations::Config for Runtime {
// type RuntimeEvent = RuntimeEvent;
// #[cfg(not(feature = "runtime-benchmarks"))]
// type Migrations = ();
// // Benchmarks need mocked migrations to guarantee that they succeed.
// #[cfg(feature = "runtime-benchmarks")]
// type Migrations = pallet_migrations::mock_helpers::MockedMigrations;
// type CursorMaxLen = ConstU32<65_536>;
// type IdentifierMaxLen = ConstU32<256>;
// type MigrationStatusHandler = ();
// type FailedMigrationHandler = frame_support::migrations::FreezeChainOnFailedMigration;
// type MaxServiceWeight = MbmServiceWeight;
// type WeightInfo = pallet_migrations::weights::SubstrateWeight<Runtime>;
// }

impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = RuntimeBlockWeights;
Expand All @@ -167,6 +187,12 @@ impl frame_system::Config for Runtime {
type MaxConsumers = ConstU32<16>;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type SingleBlockMigrations = ();
//type MultiBlockMigrator = pallet_migrations::Pallet<Runtime>;
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

parameter_types! {
Expand Down Expand Up @@ -327,12 +353,15 @@ impl pallet_grandpa::Config for Runtime {

type KeyOwnerProof = sp_core::Void;
type EquivocationReportSystem = ();

//type MaxNominators = ConstU32<0>;
}

parameter_types! {
pub const BasicDeposit: Balance = 10 * XRT; // 258 bytes on-chain
pub const FieldDeposit: Balance = 250 * COASE; // 66 bytes on-chain
pub const SubAccountDeposit: Balance = 2 * XRT; // 53 bytes on-chain
//pub const ByteDeposit: Balance = deposit(0, 1);
pub const MaxSubAccounts: u32 = 100;
pub const MaxAdditionalFields: u32 = 100;
pub const MaxRegistrars: u32 = 20;
Expand All @@ -348,6 +377,17 @@ impl pallet_identity::Config for Runtime {
type ForceOrigin = MoreThanHalfTechnicals;
type RegistrarOrigin = MoreThanHalfTechnicals;
type WeightInfo = ();

//type ByteDeposit = ByteDeposit;
type SubAccountDeposit = SubAccountDeposit;
type IdentityInformation = IdentityInfo<MaxAdditionalFields>;
type OffchainSignature = Signature;

//type SigningPublicKey = /* Type */;
//type UsernameAuthorityOrigin = /* Type */;
//type PendingUsernameExpiration = /* Type */;
//type MaxSuffixLength = /* Type */;
//type MaxUsernameLength = /* Type */;
}

parameter_types! {
Expand Down

0 comments on commit 3d3e111

Please sign in to comment.