-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up dependencies and fix primitives no_std build (#535)
* fix readme * udpate .toml * add reamdes and update tomls * remove unused deps * fix spacing indent * move frame-metadata to crates.io * fix positioning * remove unused substrate deps * fix primitvies * taplo fmt * update expected error * remove error check
- Loading branch information
Showing
14 changed files
with
76 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,11 @@ version = "0.11.0" | |
authors = ["Supercomputing Systems AG <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
repository = "https://github.com/scs/substrate-api-client" | ||
description = "Json-rpc client with helper functions compatible with any Substrate node" | ||
readme = "README.md" | ||
keywords = ["json", "rpc"] | ||
categories = ["no-std", "wasm"] | ||
|
||
|
||
[workspace] | ||
|
@@ -21,6 +26,7 @@ members = [ | |
# crates.io no_std | ||
codec = { package = "parity-scale-codec", version = "3.2.1", default-features = false, features = ['derive'] } | ||
derive_more = { version = "0.99.5" } | ||
frame-metadata = { version = "15.1", default-features = false, features = ["v14", "serde_full", "decode"] } | ||
hex = { version = "0.4.3", default-features = false, features = ["alloc"] } | ||
log = { version = "0.4.14", default-features = false } | ||
serde = { version = "1.0.136", default-features = false, features = ["derive"] } | ||
|
@@ -36,7 +42,6 @@ tungstenite = { version = "0.18.0", optional = true, features = ["native-tls"] } | |
ws = { version = "0.9.2", optional = true, features = ["ssl"] } | ||
|
||
# Substrate no_std dependencies | ||
frame-metadata = { default-features = false, git = "https://github.com/paritytech/frame-metadata", features = ["v14", "serde_full", "decode"] } | ||
sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
|
@@ -63,14 +68,14 @@ disable_target_static_assertions = [ | |
std = [ | ||
# crates.io no_std | ||
"codec/std", | ||
"frame-metadata/std", | ||
"hex/std", | ||
"log/std", | ||
"serde/std", | ||
"serde_json/std", | ||
# crates.io std only | ||
"url", | ||
# substrate no_std | ||
"frame-metadata/std", | ||
"sp-core/std", | ||
"sp-runtime/std", | ||
"sp-runtime-interface/std", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,30 +4,26 @@ version = "0.3.0" | |
authors = ["Supercomputing Systems AG <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
repository = "https://github.com/scs/substrate-api-client" | ||
description = "Macros for creating Substrate extrsinics and rpc calls" | ||
readme = "README.md" | ||
categories = ["no-std"] | ||
|
||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ['derive'] } | ||
log = { version = "0.4.14", default-features = false } | ||
|
||
# substrate | ||
sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
|
||
# need to add this for the app_crypto macro | ||
sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate.git", features = ["full_crypto"], branch = "master" } | ||
|
||
# local | ||
ac-primitives = { path = "../primitives", default-features = false } | ||
|
||
[features] | ||
default = ["std"] | ||
# To support `no_std` builds in non-32 bit environments. | ||
disable_target_static_assertions = [ | ||
"ac-primitives/disable_target_static_assertions", | ||
] | ||
std = [ | ||
"codec/std", | ||
"log/std", | ||
# substrate | ||
"sp-core/std", | ||
"sp-runtime/std", | ||
"sp-application-crypto/std", | ||
# local | ||
"ac-primitives/std", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# ac_primitives | ||
|
||
This crate is a submodule of the [substrate-api-client](https://github.com/scs/substrate-api-client). It contains macro definition for creating Substrate extrinsic and rpc calls for the api-client. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
[package] | ||
name = "ac-node-api" | ||
version = "0.3.0" | ||
authors = ["Supercomputing Systems AG <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
repository = "https://github.com/scs/substrate-api-client" | ||
description = "Substrate node type definitions and helpers for the substrate-api-client" | ||
readme = "README.md" | ||
categories = ["no-std"] | ||
|
||
[dependencies] | ||
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } | ||
codec = { package = "parity-scale-codec", version = "3.2.1", features = ["derive", "bit-vec"], default-features = false } | ||
derive_more = { version = "0.99.17" } | ||
either = { version = "1.6.1", default-features = false } | ||
frame-metadata = { version = "15.1", default-features = false, features = ["v14", "serde_full", "decode"] } | ||
hex = { version = "0.4.3", default-features = false } | ||
log = { version = "0.4.14", default-features = false } | ||
scale-info = { version = "2.0.1", features = ["derive", "decode", "bitvec"], default-features = false } | ||
serde = { version = "1.0.136", features = ["derive"], default-features = false } | ||
serde_json = { version = "1.0.79", default-features = false, features = ["alloc"] } | ||
|
||
# substrate | ||
frame-metadata = { default-features = false, git = "https://github.com/paritytech/frame-metadata", features = ["v14", "serde_full", "decode"] } | ||
sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
|
||
|
@@ -27,7 +32,6 @@ sp-runtime-interface = { default-features = false, git = "https://github.com/par | |
# local | ||
ac-primitives = { path = "../primitives", default-features = false } | ||
|
||
|
||
[features] | ||
default = ["std"] | ||
# To support `no_std` builds in non-32 bit environments. | ||
|
@@ -38,13 +42,13 @@ std = [ | |
"bitvec/std", | ||
"codec/std", | ||
"either/default", | ||
"frame-metadata/std", | ||
"hex/std", | ||
"log/std", | ||
"scale-info/std", | ||
"serde/std", | ||
"serde_json/std", | ||
# substrate | ||
"frame-metadata/std", | ||
"sp-core/std", | ||
"sp-runtime/std", | ||
# no_std support | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ac_node_api | ||
|
||
This crate is a submodule of the [substrate-api-client](https://github.com/scs/substrate-api-client). It contains Substrate node specific types and helpers such as: | ||
- Strorage keys (key hash, double map, ..) | ||
- Metadata | ||
- Runtime Events | ||
- Runtime Errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +4,29 @@ version = "0.6.0" | |
authors = ["Supercomputing Systems AG <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
repository = "https://github.com/scs/substrate-api-client" | ||
description = "Substrate-api-client primitive types" | ||
readme = "README.md" | ||
categories = ["no-std"] | ||
|
||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ['derive'] } | ||
hex = { version = "0.4.3", default-features = false, features = ["alloc"] } | ||
impl-serde = { version = "0.4", default-features = false } | ||
primitive-types = { version = "0.12.1", default-features = false, features = ["serde_no_std", "scale-info"] } | ||
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } | ||
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] } | ||
serde_json = { version = "1.0", default-features = false, features = ["alloc"] } | ||
|
||
# substrate no_std | ||
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
sp-weights = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
# need to add this for the app_crypto macro | ||
sp-application-crypto = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
|
||
# substrate std / wasm only | ||
frame-system = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } | ||
|
@@ -34,9 +41,12 @@ sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "ma | |
|
||
[features] | ||
default = ["std"] | ||
# To support `no_std` builds in non-32 bit environments. | ||
disable_target_static_assertions = [ | ||
"sp-runtime-interface/disable_target_static_assertions", | ||
] | ||
std = [ | ||
"codec/std", | ||
"hex/std", | ||
"primitive-types/std", | ||
"scale-info/std", | ||
"serde/std", | ||
|
@@ -46,6 +56,8 @@ std = [ | |
"sp-runtime/std", | ||
"sp-staking/std", | ||
"sp-version/std", | ||
# app_crypto macro | ||
"sp-application-crypto/std", | ||
# substrate std | ||
"frame-system", | ||
"pallet-assets", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# ac_primitives | ||
|
||
This crate is a submodule of the [substrate-api-client](https://github.com/scs/substrate-api-client). It contains primitives types and helpers used by the api-client and its submodules. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters