diff --git a/cli/README.md b/cli/README.md index ce7fdadc688..813dc2b9f7b 100644 --- a/cli/README.md +++ b/cli/README.md @@ -7,10 +7,10 @@ USAGE: subxt FLAGS: --h, --help +-h, --help Prints help information - -V, --version + -V, --version Prints version information @@ -37,9 +37,9 @@ OPTIONS: ## Codegen -Use to invoke the `subxt-codegen` crate which is used by `subxt-macro` to generate the the runtime API and types. Useful -for troubleshooting codegen as an alternative to `cargo expand`, and also provides the possibility of customizing the -generated code if the macro does not produce the desired API. e.g. +Use to invoke the `subxt-codegen` crate which is used by `subxt-macro` to generate the runtime API and types. Useful +for troubleshooting codegen as an alternative to `cargo expand`, and also provides the possibility of customizing the +generated code if the macro does not produce the desired API. e.g. `subxt codegen | rustfmt --edition=2018 --emit=stdout` @@ -48,10 +48,10 @@ USAGE: subxt codegen [OPTIONS] OPTIONS: - -f, --file + -f, --file the path to the encoded metadata file - --url + --url the url of the substrate node to query for metadata for codegen ``` diff --git a/examples/examples/custom_type_derives.rs b/examples/examples/custom_type_derives.rs index a09c3d56e6f..0b4bde67c61 100644 --- a/examples/examples/custom_type_derives.rs +++ b/examples/examples/custom_type_derives.rs @@ -20,7 +20,7 @@ runtime_metadata_path = "examples/polkadot_metadata.scale", // We can add (certain) custom derives to the generated types by providing // a comma separated list to the below attribute. Most useful for adding `Clone`: - generated_type_derives = "Clone, Hash" + generated_type_derives = "Clone" )] pub mod polkadot {} diff --git a/examples/examples/polkadot_metadata.scale b/examples/examples/polkadot_metadata.scale index 678aba31610..23731c0635f 100644 Binary files a/examples/examples/polkadot_metadata.scale and b/examples/examples/polkadot_metadata.scale differ diff --git a/examples/examples/submit_and_watch.rs b/examples/examples/submit_and_watch.rs index d8a2b8d4a13..fb62f136ef3 100644 --- a/examples/examples/submit_and_watch.rs +++ b/examples/examples/submit_and_watch.rs @@ -70,7 +70,7 @@ async fn simple_transfer() -> Result<(), Box> { balance_transfer.find_first_event::()?; if let Some(event) = transfer_event { - println!("Balance transfer success: value: {:?}", event.2); + println!("Balance transfer success: value: {:?}", event); } else { println!("Failed to find Balances::Transfer Event"); } @@ -119,7 +119,7 @@ async fn simple_transfer_separate_events() -> Result<(), Box()?; if let Some(event) = transfer_event { - println!("Balance transfer success: value: {:?}", event.2); + println!("Balance transfer success: value: {:?}", event); } else { println!("Failed to find Balances::Transfer Event"); } @@ -166,7 +166,7 @@ async fn handle_transfer_events() -> Result<(), Box> { if let Some(event) = transfer_event { println!( "Balance transfer is now in block (but not finalized): value: {:?}", - event.2 + event ); } else { println!("Failed to find Balances::Transfer Event"); @@ -185,7 +185,7 @@ async fn handle_transfer_events() -> Result<(), Box> { events.find_first_event::()?; if let Some(event) = transfer_event { - println!("Balance transfer success: value: {:?}", event.2); + println!("Balance transfer success: value: {:?}", event); } else { println!("Failed to find Balances::Transfer Event"); } diff --git a/examples/examples/transfer_subscribe.rs b/examples/examples/transfer_subscribe.rs index 316d27248bc..c89d588a102 100644 --- a/examples/examples/transfer_subscribe.rs +++ b/examples/examples/transfer_subscribe.rs @@ -62,7 +62,7 @@ async fn main() -> Result<(), Box> { &mut &raw.data[..], ); if let Ok(e) = event { - println!("Balance transfer success: value: {:?}", e.2); + println!("Balance transfer success: value: {:?}", e); } else { println!("Failed to subscribe to Balances::Transfer Event"); } diff --git a/subxt/tests/integration/codegen/mod.rs b/subxt/tests/integration/codegen/mod.rs index 0c4beca5894..0c75e3e7e7e 100644 --- a/subxt/tests/integration/codegen/mod.rs +++ b/subxt/tests/integration/codegen/mod.rs @@ -20,7 +20,7 @@ /// Generate by: /// /// - run `polkadot --dev --tmp` node locally -/// - `cargo run --release -p subxt-cli -- codegen | rustfmt --edition=2018 --emit=stdout > tests/integration/codegen/polkadot.rs` +/// - `cargo run --release -p subxt-cli -- codegen | rustfmt --edition=2018 --emit=stdout > subxt/tests/integration/codegen/polkadot.rs` #[rustfmt::skip] #[allow(clippy::all)] mod polkadot;