Skip to content

Commit

Permalink
feat: add OpenGov to Centrifuge chain
Browse files Browse the repository at this point in the history
fix: centrifuge toml

chore: minor centrifuge chain improvements

refactor: Centrifuge OpenGov

centrifuge: finalize opengov

centrifuge: fix cargo tml
  • Loading branch information
wischli committed May 13, 2024
1 parent e79ba4e commit 6dcab24
Show file tree
Hide file tree
Showing 15 changed files with 2,024 additions and 323 deletions.
5 changes: 5 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,13 @@ pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-feat
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-elections-phragmen = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
Expand All @@ -202,6 +204,7 @@ pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", default-
pallet-uniques = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
Expand Down
4 changes: 4 additions & 0 deletions libs/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ sp-std = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-collective = { workspace = true }
pallet-membership = { workspace = true }

# cumulus primitives dependencies
cumulus-primitives-core = { workspace = true }
Expand All @@ -45,6 +46,7 @@ std = [
"frame-support/std",
"frame-system/std",
"pallet-collective/std",
"pallet-membership/std",
"scale-info/std",
"serde/std",
"sp-arithmetic/std",
Expand All @@ -60,12 +62,14 @@ runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-membership/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"staging-xcm-executor/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-collective/try-runtime",
"pallet-membership/try-runtime",
"sp-runtime/try-runtime",
]
12 changes: 10 additions & 2 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use serde::{Deserialize, Serialize};
use sp_core::{crypto::UncheckedInto, sr25519, Encode, Pair, Public, H160};
use sp_runtime::{
traits::{IdentifyAccount, Verify},
FixedPointNumber,
BoundedVec, FixedPointNumber,
};
use staging_xcm::{
latest::{MultiLocation, NetworkId},
Expand Down Expand Up @@ -373,7 +373,7 @@ fn centrifuge_genesis(
orml_tokens: centrifuge_runtime::OrmlTokensConfig { balances: vec![] },
elections: centrifuge_runtime::ElectionsConfig { members: vec![] },
council: centrifuge_runtime::CouncilConfig {
members: council_members,
members: council_members.clone(),
phantom: Default::default(),
},
fees: centrifuge_runtime::FeesConfig {
Expand Down Expand Up @@ -468,6 +468,14 @@ fn centrifuge_genesis(
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
technical_committee: centrifuge_runtime::TechnicalCommitteeConfig {
members: council_members.clone(),
phantom: Default::default(),
},
technical_committee_membership: centrifuge_runtime::TechnicalCommitteeMembershipConfig {
members: BoundedVec::truncate_from(council_members),
phantom: Default::default(),
},
}
}

Expand Down
23 changes: 14 additions & 9 deletions runtime/centrifuge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ serde = { workspace = true, optional = true }
static_assertions = { workspace = true }

sp-api = { workspace = true }
sp-arithmetic = { workspace = true }
sp-block-builder = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-core = { workspace = true }
Expand Down Expand Up @@ -90,6 +91,7 @@ pallet-bridge = { workspace = true }
pallet-collator-allowlist = { workspace = true }
pallet-collator-selection = { workspace = true }
pallet-collective = { workspace = true }
pallet-conviction-voting = { workspace = true }
pallet-democracy = { workspace = true }
pallet-elections-phragmen = { workspace = true }
pallet-ethereum = { workspace = true }
Expand Down Expand Up @@ -117,6 +119,7 @@ pallet-pool-registry = { workspace = true }
pallet-pool-system = { workspace = true }
pallet-preimage = { workspace = true }
pallet-proxy = { workspace = true }
pallet-referenda = { workspace = true }
pallet-remarks = { workspace = true }
pallet-restricted-tokens = { workspace = true }
pallet-restricted-xtokens = { workspace = true }
Expand All @@ -133,6 +136,7 @@ pallet-treasury = { workspace = true }
pallet-uniques = { workspace = true }
pallet-utility = { workspace = true }
pallet-vesting = { workspace = true }
pallet-whitelist = { workspace = true }
pallet-xcm = { workspace = true }
pallet-xcm-transactor = { workspace = true }
parachain-info = { workspace = true }
Expand All @@ -150,9 +154,9 @@ std = [
"scale-info/std",
"serde/std",
"log/std",

# Substrate related
"sp-api/std",
"sp-arithmetic/std",
"sp-runtime/std",
"sp-block-builder/std",
"sp-consensus-aura/std",
Expand Down Expand Up @@ -187,14 +191,12 @@ std = [
"pallet-transaction-payment-rpc-runtime-api/std",
"polkadot-runtime-common/std",
"polkadot-parachain-primitives/std",

# Locals
"cfg-primitives/std",
"cfg-traits/std",
"cfg-types/std",
"runtime-common/std",
"liquidity-pools-gateway-routers/std",

# Pallet list
"axelar-gateway-precompile/std",
"chainbridge/std",
Expand All @@ -217,6 +219,7 @@ std = [
"pallet-collator-allowlist/std",
"pallet-collator-selection/std",
"pallet-collective/std",
"pallet-conviction-voting/std",
"pallet-democracy/std",
"pallet-elections-phragmen/std",
"pallet-ethereum/std",
Expand Down Expand Up @@ -244,6 +247,7 @@ std = [
"pallet-pool-system/std",
"pallet-preimage/std",
"pallet-proxy/std",
"pallet-referenda/std",
"pallet-remarks/std",
"pallet-restricted-tokens/std",
"pallet-restricted-xtokens/std",
Expand All @@ -260,6 +264,7 @@ std = [
"pallet-uniques/std",
"pallet-utility/std",
"pallet-vesting/std",
"pallet-whitelist/std",
"pallet-xcm/std",
"pallet-xcm-transactor/std",
"parachain-info/std",
Expand All @@ -270,7 +275,6 @@ runtime-benchmarks = [
"frame-system-benchmarking/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"cumulus-pallet-session-benchmarking/runtime-benchmarks",

# Substrate related
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
Expand All @@ -281,14 +285,12 @@ runtime-benchmarks = [
"xcm-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",

# Locals
"cfg-primitives/runtime-benchmarks",
"cfg-traits/runtime-benchmarks",
"cfg-types/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"liquidity-pools-gateway-routers/runtime-benchmarks",

# Pallet list
"axelar-gateway-precompile/runtime-benchmarks",
"chainbridge/runtime-benchmarks",
Expand All @@ -304,6 +306,7 @@ runtime-benchmarks = [
"pallet-collator-allowlist/runtime-benchmarks",
"pallet-collator-selection/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-conviction-voting/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
"pallet-elections-phragmen/runtime-benchmarks",
"pallet-ethereum/runtime-benchmarks",
Expand All @@ -330,6 +333,7 @@ runtime-benchmarks = [
"pallet-pool-system/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-remarks/runtime-benchmarks",
"pallet-restricted-tokens/runtime-benchmarks",
"pallet-restricted-xtokens/runtime-benchmarks",
Expand All @@ -344,29 +348,27 @@ runtime-benchmarks = [
"pallet-uniques/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-whitelist/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"pallet-xcm-transactor/runtime-benchmarks",
]

try-runtime = [
# Enabling optional
"frame-try-runtime/try-runtime",

# Substrate related
"sp-runtime/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"frame-executive/try-runtime",
"fp-self-contained/try-runtime",
"polkadot-runtime-common/try-runtime",

# Locals
"cfg-primitives/try-runtime",
"cfg-traits/try-runtime",
"cfg-types/try-runtime",
"runtime-common/try-runtime",
"liquidity-pools-gateway-routers/try-runtime",

# Pallet list
"axelar-gateway-precompile/try-runtime",
"chainbridge/try-runtime",
Expand All @@ -389,6 +391,7 @@ try-runtime = [
"pallet-collator-allowlist/try-runtime",
"pallet-collator-selection/try-runtime",
"pallet-collective/try-runtime",
"pallet-conviction-voting/try-runtime",
"pallet-democracy/try-runtime",
"pallet-elections-phragmen/try-runtime",
"pallet-ethereum/try-runtime",
Expand Down Expand Up @@ -416,6 +419,7 @@ try-runtime = [
"pallet-pool-system/try-runtime",
"pallet-preimage/try-runtime",
"pallet-proxy/try-runtime",
"pallet-referenda/try-runtime",
"pallet-remarks/try-runtime",
"pallet-restricted-tokens/try-runtime",
"pallet-restricted-xtokens/try-runtime",
Expand All @@ -432,6 +436,7 @@ try-runtime = [
"pallet-uniques/try-runtime",
"pallet-utility/try-runtime",
"pallet-vesting/try-runtime",
"pallet-whitelist/try-runtime",
"pallet-xcm/try-runtime",
"pallet-xcm-transactor/try-runtime",
"parachain-info/try-runtime",
Expand Down
Loading

0 comments on commit 6dcab24

Please sign in to comment.