Skip to content

Commit

Permalink
connectors: POC v0
Browse files Browse the repository at this point in the history
Squashed all commits so far. Here we miss the XCM integration with
xcm-transactor that builds and sends the XCM message to Moonbeam.
  • Loading branch information
NunoAlexandre committed Sep 19, 2022
1 parent d899a8d commit a98017b
Show file tree
Hide file tree
Showing 21 changed files with 2,410 additions and 249 deletions.
1,044 changes: 801 additions & 243 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ members = [
"pallets/anchors",
"pallets/claims",
"pallets/collator-allowlist",
"pallets/connectors",
"pallets/crowdloan-claim",
"pallets/crowdloan-reward",
"pallets/migration",
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-q3gwCT8dCrkMshGhHnMDPjuYXjbZJbyJwcnCaRElcIU=";
cargoSha256 = "sha256-B2BrlXTxOrWA1GPCxPEIPIAgv5xVy6xJcdVGcZyiHeA=";

nativeBuildInputs = with pkgs; [ clang git-mock pkg-config ];
buildInputs = with pkgs; [ openssl ] ++ (
Expand Down
2 changes: 1 addition & 1 deletion libs/traits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub trait PoolNAV<PoolId, Amount> {

/// A trait that support pool inspection operations such as pool existence checks and pool admin of permission set.
pub trait PoolInspect<AccountId, CurrencyId> {
type PoolId: Parameter + Member + Debug + Copy + Default + TypeInfo;
type PoolId: Parameter + Member + Debug + Copy + Default + TypeInfo + Encode + Decode;
type TrancheId: Parameter + Member + Debug + Copy + Default + TypeInfo;
type Rate;
type Moment;
Expand Down
102 changes: 102 additions & 0 deletions pallets/connectors/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[package]
authors = ["Centrifuge <[email protected]>"]
description = 'Centrifuge Connectors Pallet'
edition = '2018'
license = "LGPL-3.0"
name = 'pallet-connectors'
repository = "https://github.com/centrifuge/centrifuge-chain/pallets/connectors"
version = '0.0.1'

[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 }
hex = { version = "0.4.3", default_features = false }
ethabi = { version = "16.0", default-features = false }
scale-info = { version = "2.0", default-features = false, features = ["derive"] }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
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" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }

# Substrate crates
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }

# Optional dependencies for benchmarking
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , optional = true , branch = "polkadot-v0.9.26" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , optional = true, branch = "polkadot-v0.9.26" }
pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false , optional = true, branch = "polkadot-v0.9.26" }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, optional = true, branch = "polkadot-v0.9.26" }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, optional = true, branch = "polkadot-v0.9.26" }

# Our custom pallets
cfg-primitives = { path = "../../libs/primitives", default-features = false }
cfg-types = { path = "../../libs/types", default-features = false }
cfg-traits = { path = "../../libs/traits", default-features = false }
runtime-common = { path = "../../runtime/common", default-features = false }

# Polkadot
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" }

pallet-xcm-transactor = { git = "https://github.com/NunoAlexandre/moonbeam", default-features = false, branch = "unfork" }
pallet-ethereum-xcm = { git = "https://github.com/NunoAlexandre/moonbeam", default-features = false, branch = "unfork" }
xcm-primitives = { git = "https://github.com/NunoAlexandre/moonbeam", default-features = false, branch = "unfork" }
pallet-ethereum = { git = "https://github.com/NunoAlexandre/frontier", branch = "polkadot-v0.9.26", default-features = false }

[dev-dependencies]
hex = "0.4.3"
serde = { version = "1.0.102" }

# Our pallets
pallet-pools = { path = "../pools", default-features = false}
pallet-loans = { path = "../loans", default-features = false}
pallet-interest-accrual = { path = "../interest-accrual", default-features = false}
pallet-permissions = { path = "../permissions", default-features = false}

# Substrate crates & pallets
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }

# Orml crates
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = true, branch = "polkadot-v0.9.26" }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.26" }

# Local crates
runtime-common = { path = "../../runtime/common", default-features = true }

[features]
default = ['std']
runtime-benchmarks = [
"frame-benchmarking",
"pallet-balances",
"orml-tokens",
"orml-traits",
]
std = [
'codec/std',
'cfg-types/std',
'cfg-traits/std',
'frame-support/std',
'frame-system/std',
'sp-std/std',
'sp-runtime/std',
'orml-tokens/std',
'orml-traits/std',
'pallet-balances/std',
'runtime-common/std',
'xcm/std',
'pallet-xcm-transactor/std',
'pallet-ethereum-xcm/std',
'pallet-ethereum/std',
'xcm-primitives/std',
'ethabi/std',
'pallet-interest-accrual/std',
'pallet-permissions/std',
'pallet-loans/std',
'pallet-pools/std',
'pallet-uniques/std'
]
Loading

0 comments on commit a98017b

Please sign in to comment.