Skip to content

Commit

Permalink
Add feature for contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Niederb committed Apr 6, 2023
1 parent 866ea76 commit 868969d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@ jsonrpsee-client = ["std", "jsonrpsee", "futures"]
tungstenite-client = ["std", "tungstenite"]
ws-client = ["std", "ws"]
staking-xt = ["std", "ac-primitives/staking-xt"]
contracts-xt = ["std", "ac-primitives/contracts-xt"]
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "ma
sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" }

# local deps
substrate-api-client = { path = "..", features = ["tungstenite-client", "ws-client", "staking-xt"] }
substrate-api-client = { path = "..", features = ["tungstenite-client", "ws-client", "staking-xt", "contracts-xt"] }
4 changes: 2 additions & 2 deletions primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ std = [
"frame-system",
"pallet-assets",
"pallet-balances",
"pallet-contracts",
]
staking-xt = ["pallet-staking"]
staking-xt = ["std", "pallet-staking"]
contracts-xt = ["std", "pallet-contracts"]
2 changes: 1 addition & 1 deletion primitives/src/pallet_traits/pallet_contracts_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub trait ContractsConfig: FrameSystemConfig {
type MaxStorageKeyLen: Get<u32>;
}

#[cfg(feature = "std")]
#[cfg(feature = "contracts-xt")]
impl<T> ContractsConfig for T
where
T: pallet_contracts::Config,
Expand Down
2 changes: 2 additions & 0 deletions src/extrinsic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
//! Offers some predefined extrinsics for common runtime modules.

pub use balances::BalancesExtrinsics;
#[cfg(feature = "contracts-xt")]
pub use contracts::ContractsExtrinsics;
#[cfg(feature = "staking-xt")]
pub use staking::StakingExtrinsics;
pub use utility::UtilityExtrinsics;

pub mod balances;
#[cfg(feature = "contracts-xt")]
pub mod contracts;
pub mod offline_extrinsic;
#[cfg(feature = "staking-xt")]
Expand Down
1 change: 1 addition & 0 deletions testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ substrate-api-client = { path = "..", features = [
"tungstenite-client",
"ws-client",
"staking-xt",
"contracts-xt",
] }

[features]
Expand Down

0 comments on commit 868969d

Please sign in to comment.