Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

feat(meta): meta defichain #123

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 218 additions & 1 deletion Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[workspace]
members = [
"meta/meta-consensus",
"meta/meta-defichain",
"meta/meta-defichain/rpc",
"meta/meta-defichain/rpc/runtime-api",
"meta/meta-runtime",
"meta/meta-node",
]
10 changes: 0 additions & 10 deletions meta/meta-consensus/Cargo.toml

This file was deleted.

2 changes: 0 additions & 2 deletions meta/meta-consensus/src/lib.rs

This file was deleted.

Empty file removed meta/meta-consensus/src/tests.rs
Empty file.
26 changes: 26 additions & 0 deletions meta/meta-defichain/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "meta-defichain"
version = "0.1.0"
edition = "2021"

[dependencies]
codec = { default-features = false, version = "3.1.5", features = ["derive", "max-encoded-len"], package = "parity-scale-codec" }
scale-info = { default-features = false, version = "2.1.2", features = ["derive"] }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" }
sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" }

serde = { version = "1.0.144", features = ["derive"], optional = true }

[features]
default = ["std"]
std = [
"codec/std",
"scale-info/std",
"serde",
"frame-support/std",
"frame-system/std",
"sp-api/std",
"sp-runtime/std",
]
18 changes: 18 additions & 0 deletions meta/meta-defichain/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "meta-defichain-rpc"
version = "0.1.0"
edition = "2021"

[dependencies]
jsonrpsee = { version = "0.14.0", features = ["server", "macros"] }

sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" }
sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" }
sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" }

meta-defichain-rpc-runtime-api = { path = "./runtime-api", package = "meta-defichain-rpc-runtime-api"}

[dev-dependencies]
tokio = "1.17.0"
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
substrate-test-runtime-client = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" }
13 changes: 13 additions & 0 deletions meta/meta-defichain/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "meta-defichain-rpc-runtime-api"
version = "0.1.0"
edition = "2021"

[dependencies]
sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" }

[features]
default = ["std"]
std = [
"sp-api/std",
]
7 changes: 7 additions & 0 deletions meta/meta-defichain/rpc/runtime-api/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#![cfg_attr(not(feature = "std"), no_std)]

sp_api::decl_runtime_apis! {
pub trait DefichainApi {
fn get_7() -> u64;
}
}
Loading