diff --git a/Cargo.toml b/Cargo.toml index cc653a45ecb5b..7eda6d6a98cfd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,8 +17,7 @@ keywords = ["parity", "substrate", "blockchain"] include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"] [features] -kusama = [] -default = ["kusama"] +default = [] client = ["substrate-subxt-client"] # enable this feature to run tests which require a local dev chain node diff --git a/README.md b/README.md index 5da16a331d059..4a78b1febedb7 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,6 @@ A library to **sub**mit e**xt**rinsics to a [substrate](https://github.com/parit See [examples](./examples). -If you use `#[derive(Call)]` without `#[module]` in the same module, you will get errors -complaining about an undefined method with a name starting with `with_`. - **Alternatives** [substrate-api-client](https://github.com/scs/substrate-api-client) provides similar functionality. diff --git a/proc-macro/src/lib.rs b/proc-macro/src/lib.rs index c6daa1e68a871..2ca3e4531bdbf 100644 --- a/proc-macro/src/lib.rs +++ b/proc-macro/src/lib.rs @@ -133,6 +133,10 @@ decl_derive!( /// /// Under the hood the implementation calls [submit()](../substrate_subxt/struct.Client.html#method.submit) and /// [watch()](../substrate_subxt/struct.Client.html#method.watch) respectively. + /// + /// *N.B.* You must use the `#[derive(Call)]` macro with `#[module]` in the same module or you will get errors + /// about undefined method with a name starting with `with_`. + #[proc_macro_error] call ); fn call(s: Structure) -> TokenStream { diff --git a/src/frame/system.rs b/src/frame/system.rs index 7e9e163e8a2f7..7c6db4dba4000 100644 --- a/src/frame/system.rs +++ b/src/frame/system.rs @@ -96,15 +96,7 @@ pub trait System { type Hashing: Hash; /// The user account identifier type for the runtime. - type AccountId: Parameter - + Member - + MaybeSerialize - + Debug - + MaybeDisplay - + Encode - + Decode - + Ord - + Default; + type AccountId: Parameter + Member + MaybeSerialize + MaybeDisplay + Ord + Default; /// The address type. This instead of `::Source`. #[module(ignore)] diff --git a/src/runtimes.rs b/src/runtimes.rs index cb8b9133a8ed1..0fde9ba6851e1 100644 --- a/src/runtimes.rs +++ b/src/runtimes.rs @@ -52,7 +52,6 @@ impl sp_runtime::BoundToRuntimeAppPublic for Grandpa { use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; -#[cfg(feature = "kusama")] mod validator_app { use application_crypto::{ app_crypto, @@ -62,11 +61,9 @@ mod validator_app { } /// Parachain marker struct -#[cfg(feature = "kusama")] #[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct Parachains; -#[cfg(feature = "kusama")] impl sp_runtime::BoundToRuntimeAppPublic for Parachains { type Public = validator_app::Public; }