Skip to content

Commit

Permalink
Refactor primitives, common-types, common-traits, runtime-common (cen…
Browse files Browse the repository at this point in the history
…trifuge#965)


Co-authored-by: Nuno Alexandre <hi@nunoalexandre.com>
  • Loading branch information
mustermeiszer and NunoAlexandre authored Sep 14, 2022
1 parent a7b0c6f commit 798b800
Show file tree
Hide file tree
Showing 231 changed files with 5,069 additions and 3,851 deletions.
298 changes: 124 additions & 174 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ members = [
"pallets/interest-accrual",
"pallets/keystore",
"pallets/investments",
"libs/common-traits",
"libs/common-types",
"libs/traits",
"libs/types",
"libs/proofs",
"libs/primitives",
"runtime/altair",
"runtime/centrifuge",
"runtime/common",
Expand Down Expand Up @@ -125,7 +126,7 @@ node-inspect = { git = "https://github.com/paritytech/substrate", branch = "polk
pallet-anchors = { path = "./pallets/anchors" }
pallet-loans = { path = "./pallets/loans" }
pallet-pools = { path = "./pallets/pools" }
common-types = { path = "./libs/common-types" }
cfg-types = { path = "./libs/types" }

# frame dependencies
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
Expand Down Expand Up @@ -155,7 +156,7 @@ altair-runtime = { path = "runtime/altair" }
centrifuge-runtime = { path = "runtime/centrifuge" }
development-runtime = { path = "runtime/development" }
runtime-common = { path = "runtime/common" }
node-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
cfg-primitives = { path = "libs/primitives" }

# benchmarking
frame-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.26" }
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
};

# This is a hash of all the Cargo dependencies, for reproducibility.
cargoSha256 = "sha256-cR0wDbc3hJr0wXUbOKjsBppVmQQLLPeZs4O/j3f1MBc=";
cargoSha256 = "sha256-GE+oVLoSq2GHK2wqCtHG0uVcSa17xeTXLC0XNZ9F5fg";

nativeBuildInputs = with pkgs; [ clang git-mock pkg-config ];
buildInputs = with pkgs; [ openssl ] ++ (
Expand Down
237 changes: 0 additions & 237 deletions libs/common-types/src/tests.rs

This file was deleted.

61 changes: 0 additions & 61 deletions libs/common-types/src/tokens.rs

This file was deleted.

46 changes: 46 additions & 0 deletions libs/primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[package]
authors = ["Centrifuge <admin@centrifuge.io>"]
description = 'Primitive types for Centrifuge'
edition = '2021'
license = "LGPL-3.0"
name = 'cfg-primitives'
repository = "https://github.com/centrifuge/centrifuge-chain/proofs"
version = '2.0.0'

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']

[dependencies]
codec = { package = 'parity-scale-codec', version = '3.0.0', features = ['derive'] , default-features = false }
scale-info = { version = "2.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.119" }

# substrate primitives dependencies
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }

# substrate frame dependencies
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }


[features]
default = ['std']
runtime-benchmarks = []
std = [
'codec/std',
'sp-std/std',
'scale-info/std',
'sp-core/std',
'frame-support/std',
'sp-runtime/std',
'sp-runtime/std',
'frame-system/std',
'pallet-collective/std',
'sp-consensus-aura/std'
]


Loading

0 comments on commit 798b800

Please sign in to comment.