Skip to content

Commit 4d78c10

Browse files
committed
feat: add OpenGov to Centrifuge chain
fix: centrifuge toml chore: minor centrifuge chain improvements refactor: Centrifuge OpenGov centrifuge: finalize opengov centrifuge: fix cargo tml cfg: fix clippy test
1 parent 7ef53e8 commit 4d78c10

13 files changed

+2015
-323
lines changed

Cargo.lock

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/src/chain_spec.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use serde::{Deserialize, Serialize};
4343
use sp_core::{crypto::UncheckedInto, sr25519, Encode, Pair, Public, H160};
4444
use sp_runtime::{
4545
traits::{IdentifyAccount, Verify},
46-
FixedPointNumber,
46+
BoundedVec, FixedPointNumber,
4747
};
4848
use staging_xcm::{
4949
latest::{MultiLocation, NetworkId},
@@ -373,7 +373,7 @@ fn centrifuge_genesis(
373373
orml_tokens: centrifuge_runtime::OrmlTokensConfig { balances: vec![] },
374374
elections: centrifuge_runtime::ElectionsConfig { members: vec![] },
375375
council: centrifuge_runtime::CouncilConfig {
376-
members: council_members,
376+
members: council_members.clone(),
377377
phantom: Default::default(),
378378
},
379379
fees: centrifuge_runtime::FeesConfig {
@@ -468,6 +468,14 @@ fn centrifuge_genesis(
468468
safe_xcm_version: Some(SAFE_XCM_VERSION),
469469
..Default::default()
470470
},
471+
technical_committee: centrifuge_runtime::TechnicalCommitteeConfig {
472+
members: council_members.clone(),
473+
phantom: Default::default(),
474+
},
475+
technical_committee_membership: centrifuge_runtime::TechnicalCommitteeMembershipConfig {
476+
members: BoundedVec::truncate_from(council_members),
477+
phantom: Default::default(),
478+
},
471479
}
472480
}
473481

runtime/centrifuge/Cargo.toml

+14-9
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ serde = { workspace = true, optional = true }
2020
static_assertions = { workspace = true }
2121

2222
sp-api = { workspace = true }
23+
sp-arithmetic = { workspace = true }
2324
sp-block-builder = { workspace = true }
2425
sp-consensus-aura = { workspace = true }
2526
sp-core = { workspace = true }
@@ -90,6 +91,7 @@ pallet-bridge = { workspace = true }
9091
pallet-collator-allowlist = { workspace = true }
9192
pallet-collator-selection = { workspace = true }
9293
pallet-collective = { workspace = true }
94+
pallet-conviction-voting = { workspace = true }
9395
pallet-democracy = { workspace = true }
9496
pallet-elections-phragmen = { workspace = true }
9597
pallet-ethereum = { workspace = true }
@@ -117,6 +119,7 @@ pallet-pool-registry = { workspace = true }
117119
pallet-pool-system = { workspace = true }
118120
pallet-preimage = { workspace = true }
119121
pallet-proxy = { workspace = true }
122+
pallet-referenda = { workspace = true }
120123
pallet-remarks = { workspace = true }
121124
pallet-restricted-tokens = { workspace = true }
122125
pallet-restricted-xtokens = { workspace = true }
@@ -133,6 +136,7 @@ pallet-treasury = { workspace = true }
133136
pallet-uniques = { workspace = true }
134137
pallet-utility = { workspace = true }
135138
pallet-vesting = { workspace = true }
139+
pallet-whitelist = { workspace = true }
136140
pallet-xcm = { workspace = true }
137141
pallet-xcm-transactor = { workspace = true }
138142
parachain-info = { workspace = true }
@@ -150,9 +154,9 @@ std = [
150154
"scale-info/std",
151155
"serde/std",
152156
"log/std",
153-
154157
# Substrate related
155158
"sp-api/std",
159+
"sp-arithmetic/std",
156160
"sp-runtime/std",
157161
"sp-block-builder/std",
158162
"sp-consensus-aura/std",
@@ -187,14 +191,12 @@ std = [
187191
"pallet-transaction-payment-rpc-runtime-api/std",
188192
"polkadot-runtime-common/std",
189193
"polkadot-parachain-primitives/std",
190-
191194
# Locals
192195
"cfg-primitives/std",
193196
"cfg-traits/std",
194197
"cfg-types/std",
195198
"runtime-common/std",
196199
"liquidity-pools-gateway-routers/std",
197-
198200
# Pallet list
199201
"axelar-gateway-precompile/std",
200202
"chainbridge/std",
@@ -217,6 +219,7 @@ std = [
217219
"pallet-collator-allowlist/std",
218220
"pallet-collator-selection/std",
219221
"pallet-collective/std",
222+
"pallet-conviction-voting/std",
220223
"pallet-democracy/std",
221224
"pallet-elections-phragmen/std",
222225
"pallet-ethereum/std",
@@ -244,6 +247,7 @@ std = [
244247
"pallet-pool-system/std",
245248
"pallet-preimage/std",
246249
"pallet-proxy/std",
250+
"pallet-referenda/std",
247251
"pallet-remarks/std",
248252
"pallet-restricted-tokens/std",
249253
"pallet-restricted-xtokens/std",
@@ -260,6 +264,7 @@ std = [
260264
"pallet-uniques/std",
261265
"pallet-utility/std",
262266
"pallet-vesting/std",
267+
"pallet-whitelist/std",
263268
"pallet-xcm/std",
264269
"pallet-xcm-transactor/std",
265270
"parachain-info/std",
@@ -270,7 +275,6 @@ runtime-benchmarks = [
270275
"frame-system-benchmarking/runtime-benchmarks",
271276
"frame-benchmarking/runtime-benchmarks",
272277
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
273-
274278
# Substrate related
275279
"sp-runtime/runtime-benchmarks",
276280
"sp-staking/runtime-benchmarks",
@@ -281,14 +285,12 @@ runtime-benchmarks = [
281285
"xcm-primitives/runtime-benchmarks",
282286
"polkadot-runtime-common/runtime-benchmarks",
283287
"polkadot-parachain-primitives/runtime-benchmarks",
284-
285288
# Locals
286289
"cfg-primitives/runtime-benchmarks",
287290
"cfg-traits/runtime-benchmarks",
288291
"cfg-types/runtime-benchmarks",
289292
"runtime-common/runtime-benchmarks",
290293
"liquidity-pools-gateway-routers/runtime-benchmarks",
291-
292294
# Pallet list
293295
"axelar-gateway-precompile/runtime-benchmarks",
294296
"chainbridge/runtime-benchmarks",
@@ -304,6 +306,7 @@ runtime-benchmarks = [
304306
"pallet-collator-allowlist/runtime-benchmarks",
305307
"pallet-collator-selection/runtime-benchmarks",
306308
"pallet-collective/runtime-benchmarks",
309+
"pallet-conviction-voting/runtime-benchmarks",
307310
"pallet-democracy/runtime-benchmarks",
308311
"pallet-elections-phragmen/runtime-benchmarks",
309312
"pallet-ethereum/runtime-benchmarks",
@@ -330,6 +333,7 @@ runtime-benchmarks = [
330333
"pallet-pool-system/runtime-benchmarks",
331334
"pallet-preimage/runtime-benchmarks",
332335
"pallet-proxy/runtime-benchmarks",
336+
"pallet-referenda/runtime-benchmarks",
333337
"pallet-remarks/runtime-benchmarks",
334338
"pallet-restricted-tokens/runtime-benchmarks",
335339
"pallet-restricted-xtokens/runtime-benchmarks",
@@ -344,29 +348,27 @@ runtime-benchmarks = [
344348
"pallet-uniques/runtime-benchmarks",
345349
"pallet-utility/runtime-benchmarks",
346350
"pallet-vesting/runtime-benchmarks",
351+
"pallet-whitelist/runtime-benchmarks",
347352
"pallet-xcm/runtime-benchmarks",
348353
"pallet-xcm-transactor/runtime-benchmarks",
349354
]
350355

351356
try-runtime = [
352357
# Enabling optional
353358
"frame-try-runtime/try-runtime",
354-
355359
# Substrate related
356360
"sp-runtime/try-runtime",
357361
"frame-support/try-runtime",
358362
"frame-system/try-runtime",
359363
"frame-executive/try-runtime",
360364
"fp-self-contained/try-runtime",
361365
"polkadot-runtime-common/try-runtime",
362-
363366
# Locals
364367
"cfg-primitives/try-runtime",
365368
"cfg-traits/try-runtime",
366369
"cfg-types/try-runtime",
367370
"runtime-common/try-runtime",
368371
"liquidity-pools-gateway-routers/try-runtime",
369-
370372
# Pallet list
371373
"axelar-gateway-precompile/try-runtime",
372374
"chainbridge/try-runtime",
@@ -389,6 +391,7 @@ try-runtime = [
389391
"pallet-collator-allowlist/try-runtime",
390392
"pallet-collator-selection/try-runtime",
391393
"pallet-collective/try-runtime",
394+
"pallet-conviction-voting/try-runtime",
392395
"pallet-democracy/try-runtime",
393396
"pallet-elections-phragmen/try-runtime",
394397
"pallet-ethereum/try-runtime",
@@ -416,6 +419,7 @@ try-runtime = [
416419
"pallet-pool-system/try-runtime",
417420
"pallet-preimage/try-runtime",
418421
"pallet-proxy/try-runtime",
422+
"pallet-referenda/try-runtime",
419423
"pallet-remarks/try-runtime",
420424
"pallet-restricted-tokens/try-runtime",
421425
"pallet-restricted-xtokens/try-runtime",
@@ -432,6 +436,7 @@ try-runtime = [
432436
"pallet-uniques/try-runtime",
433437
"pallet-utility/try-runtime",
434438
"pallet-vesting/try-runtime",
439+
"pallet-whitelist/try-runtime",
435440
"pallet-xcm/try-runtime",
436441
"pallet-xcm-transactor/try-runtime",
437442
"parachain-info/try-runtime",

0 commit comments

Comments
 (0)