Skip to content
Merged
Prev Previous commit
Next Next commit
Make some packages no_std compatible
  • Loading branch information
MOZGIII committed Aug 19, 2022
commit a4deea5b9379d101ebb3e1ad4c0ee6d26d7c3df2
12 changes: 8 additions & 4 deletions crates/crypto-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ edition = "2021"
publish = false

[dependencies]
pallet-im-online = { git = "https://github.com/humanode-network/substrate", branch = "master" }
sp-consensus-babe = { git = "https://github.com/humanode-network/substrate", branch = "master" }
sp-finality-grandpa = { git = "https://github.com/humanode-network/substrate", branch = "master" }
sp-runtime = { git = "https://github.com/humanode-network/substrate", branch = "master" }
pallet-im-online = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" }
sp-consensus-babe = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" }
sp-finality-grandpa = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" }
sp-runtime = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" }

[features]
default = ["std"]
std = ["pallet-im-online/std", "sp-consensus-babe/std", "sp-finality-grandpa/std", "sp-runtime/std"]
2 changes: 2 additions & 0 deletions crates/crypto-utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Various crypto helper functions.

#![cfg_attr(not(feature = "std"), no_std)]

use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use sp_consensus_babe::AuthorityId as BabeId;
use sp_finality_grandpa::AuthorityId as GrandpaId;
Expand Down
16 changes: 10 additions & 6 deletions crates/eip712-common-test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ version = "0.1.0"
edition = "2021"

[dependencies]
eip712-common = { version = "0.1", path = "../eip712-common" }
primitives-ethereum = { version = "0.1", path = "../primitives-ethereum" }
eip712-common = { default-features = false, version = "0.1", path = "../eip712-common" }
primitives-ethereum = { default-features = false, version = "0.1", path = "../primitives-ethereum" }

eth-eip-712 = { package = "eip-712", version = "=0.1.0" }
eth-eip-712 = { package = "eip-712", version = "=0.1.0", optional = true }
hex-literal = "0.3"
secp256k1 = "0.22"
serde_json = "1"
sp-core = { git = "https://github.com/humanode-network/substrate", branch = "master" }
secp256k1 = { version = "0.22", optional = true }
serde_json = { version = "1", optional = true }
sp-core = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" }

[features]
default = ["std"]
std = ["eth-eip-712", "secp256k1", "serde_json", "eip712-common/std", "primitives-ethereum/std", "sp-core/std"]
2 changes: 2 additions & 0 deletions crates/eip712-common-test-utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Common test utils for EIP-712 typed data message construction and signature verification.

#![cfg_attr(not(feature = "std"), no_std)]

use eip712_common::*;
use primitives_ethereum::{EcdsaSignature, EthereumAddress};
pub use sp_core::{crypto::Pair, ecdsa, H256, U256};
Expand Down
4 changes: 2 additions & 2 deletions crates/humanode-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ substrate-wasm-builder = { git = "https://github.com/humanode-network/substrate"
[dependencies]
author-ext-api = { version = "0.1", path = "../author-ext-api", default-features = false }
bioauth-flow-api = { version = "0.1", path = "../bioauth-flow-api", default-features = false }
crypto-utils = { version = "0.1", path = "../crypto-utils", optional = true }
crypto-utils = { version = "0.1", path = "../crypto-utils", default-features = false, optional = true }
eip712-account-claim = { version = "0.1", path = "../eip712-account-claim", default-features = false }
eip712-common = { version = "0.1", path = "../eip712-common", default-features = false }
eip712-common-test-utils = { version = "0.1", path = "../eip712-common-test-utils", optional = true }
eip712-common-test-utils = { version = "0.1", path = "../eip712-common-test-utils", default-features = false, optional = true }
eip712-token-claim = { version = "0.1", path = "../eip712-token-claim", default-features = false }
frontier-api = { version = "0.1", path = "../frontier-api", default-features = false }
keystore-bioauth-account-id = { version = "0.1", path = "../keystore-bioauth-account-id", default-features = false }
Expand Down