Skip to content

Commit 5dc3551

Browse files
committed
Added pallet_glutton
1 parent 70f0a29 commit 5dc3551

File tree

8 files changed

+35
-1
lines changed

8 files changed

+35
-1
lines changed

Cargo.lock

Lines changed: 20 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ frame-system-rpc-runtime-api = { default-features = false, git = "https://github
144144
frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2412-1" }
145145
pallet-aura = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2412-1" }
146146
pallet-balances = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2412-1" }
147+
pallet-glutton = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2412-1" }
147148
pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2412-1" }
148149
pallet-session = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2412-1" }
149150
pallet-sudo = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2412-1" }

node/node/src/staging.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ pub fn staging_genesis(
152152
main_chain_scripts: sp_native_token_management::MainChainScripts::read_from_env()?,
153153
..Default::default()
154154
},
155+
glutton: Default::default(),
155156
test_helper_pallet: TestHelperPalletConfig {
156157
participation_data_release_period: 30,
157158
..Default::default()

node/node/src/template_chain_spec.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub fn chain_spec() -> Result<ChainSpec, envy::Error> {
4242
main_chain_scripts: sp_native_token_management::MainChainScripts::read_from_env()?,
4343
..Default::default()
4444
},
45+
glutton: Default::default(),
4546
test_helper_pallet: TestHelperPalletConfig {
4647
participation_data_release_period: 30,
4748
..Default::default()

node/node/src/testnet.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ pub fn testnet_genesis(
204204
main_chain_scripts: sp_native_token_management::MainChainScripts::read_from_env()?,
205205
..Default::default()
206206
},
207+
glutton: Default::default(),
207208
test_helper_pallet: TestHelperPalletConfig {
208209
participation_data_release_period: 30,
209210
..Default::default()

node/runtime/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ serde_json = { workspace = true, default-features = false, features = [
2323
pallet-aura = { workspace = true }
2424
pallet-balances = { workspace = true }
2525
frame-support = { workspace = true }
26+
pallet-glutton = { workspace = true }
2627
pallet-grandpa = { workspace = true }
2728
pallet-partner-chains-session = { workspace = true, features = ["pallet-session-compat"] }
2829
pallet-session = { workspace = true }
@@ -113,6 +114,7 @@ std = [
113114
"pallet-aura/std",
114115
"pallet-balances/std",
115116
"pallet-block-production-log/std",
117+
"pallet-glutton/std",
116118
"pallet-grandpa/std",
117119
"pallet-sudo/std",
118120
"pallet-partner-chains-session/std",

node/runtime/src/genesis_config_presets.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ fn testnet_genesis(
5757
pallet_session: Default::default(),
5858
session: Default::default(),
5959
native_token_management: Default::default(),
60+
glutton: Default::default(),
6061
};
6162

6263
serde_json::to_value(config).expect("Could not build genesis config.")

node/runtime/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use frame_support::{
2424
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, IdentityFee},
2525
BoundedVec,
2626
};
27+
use frame_system::EnsureRoot;
2728
use opaque::SessionKeys;
2829
use pallet_grandpa::AuthorityId as GrandpaId;
2930
use pallet_session_validator_management::session_manager::ValidatorManagementSessionManager;
@@ -524,6 +525,12 @@ impl pallet_block_participation::Config for Runtime {
524525
const TARGET_INHERENT_ID: InherentIdentifier = TestHelperPallet::INHERENT_IDENTIFIER;
525526
}
526527

528+
impl pallet_glutton::Config for Runtime {
529+
type RuntimeEvent = RuntimeEvent;
530+
type WeightInfo = pallet_glutton::weights::SubstrateWeight<Runtime>;
531+
type AdminOrigin = EnsureRoot<AccountId>;
532+
}
533+
527534
impl crate::test_helper_pallet::Config for Runtime {}
528535

529536
// Create the runtime by composing the FRAME pallets that were previously configured.
@@ -551,6 +558,7 @@ construct_runtime!(
551558
// The order matters!! pallet_partner_chains_session needs to come last for correct initialization order
552559
Session: pallet_partner_chains_session,
553560
NativeTokenManagement: pallet_native_token_management,
561+
Glutton: pallet_glutton,
554562
TestHelperPallet: crate::test_helper_pallet,
555563
}
556564
);

0 commit comments

Comments
 (0)