Skip to content

Commit

Permalink
fix file comments
Browse files Browse the repository at this point in the history
  • Loading branch information
haerdib committed Jul 12, 2023
1 parent 0fbf87b commit 60c4685
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 30 deletions.
9 changes: 4 additions & 5 deletions examples/examples/benchmark_bulk_xt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

//! This example floods the node with a series of transactions.

// run this against test node with
// > substrate-test-node --dev --execution native --ws-port 9979 -ltxpool=debug

use kitchensink_runtime::{AccountId, BalancesCall, RuntimeCall};
use sp_keyring::AccountKeyring;
use substrate_api_client::{
Expand All @@ -26,8 +23,10 @@ use substrate_api_client::{
Api, SubmitExtrinsic,
};

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

// Define an extrinsic signer type which sets the generic types of the `GenericExtrinsicSigner`.
// This way, the types don't have to be reassigned with every usage of this type and makes
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/check_extrinsic_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ use substrate_api_client::{
Api, GetAccountInformation, SubmitAndWatch, TransactionStatus, XtStatus,
};

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

type Hash = <AssetRuntimeConfig as Config>::Hash;

Expand Down
8 changes: 5 additions & 3 deletions examples/examples/compose_extrinsic_offline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

//! This example shows how to use the compose_extrinsic_offline macro which generates an extrinsic
//! without asking the node for nonce and does not need to know the metadata
//! without asking the node for nonce and does not need to know the metadata.

use kitchensink_runtime::{BalancesCall, RuntimeCall};
use sp_keyring::AccountKeyring;
Expand All @@ -25,8 +25,10 @@ use substrate_api_client::{
Api, GetChainInfo, SubmitAndWatch, XtStatus,
};

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

#[tokio::main]
async fn main() {
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/contract_instantiate_with_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ use substrate_api_client::{
SubmitAndWatch, XtStatus,
};

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

#[allow(unused)]
#[derive(Decode)]
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/get_account_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ type BalanceOf<T> = <<T as pallet_identity::Config>::Currency as Currency<
type MaxRegistrarsOf<T> = <T as pallet_identity::Config>::MaxRegistrars;
type MaxAdditionalFieldsOf<T> = <T as pallet_identity::Config>::MaxAdditionalFields;

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

#[tokio::main]
async fn main() {
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/get_blocks_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ async fn main() {
println!("Please compile this example with `--no-default-features` for it to run properly.")
}

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

#[cfg(not(feature = "sync-examples"))]
#[tokio::main]
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/get_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ use substrate_api_client::{
Api, GetAccountInformation, GetStorage,
};

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

type AccountInfo = GenericAccountInfo<
<AssetRuntimeConfig as Config>::Index,
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/print_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

use substrate_api_client::{ac_primitives::AssetRuntimeConfig, rpc::JsonrpseeClient, Api};

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

#[tokio::main]
async fn main() {
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/staking_batch_payout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ use substrate_api_client::{

const MAX_BATCHED_TRANSACTION: u32 = 9;

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

pub type EraIndex = u32;

Expand Down
6 changes: 4 additions & 2 deletions examples/examples/subscribe_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ use substrate_api_client::{
// Replace this crate by your own if you run a custom substrate node to get your custom events.
use kitchensink_runtime::RuntimeEvent;

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

#[tokio::main]
async fn main() {
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/sudo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ use substrate_api_client::{
Api, GetAccountInformation, SubmitAndWatch, XtStatus,
};

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

// Define an extrinsic signer type which sets the generic types of the `GenericExtrinsicSigner`.
// This way, the types don't have to be reassigned with every usage of this type and makes
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/transfer_with_tungstenite_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ use substrate_api_client::{
Api, GetAccountInformation, SubmitAndWatch, XtStatus,
};

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

fn main() {
env_logger::init();
Expand Down
6 changes: 4 additions & 2 deletions examples/examples/transfer_with_ws_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ use substrate_api_client::{
Api, GetAccountInformation, SubmitAndWatch, XtStatus,
};

// To test this example in CI, we run it against the Substrate kitchensink node. Therefore, we use the AssetRuntimeConfig
// ! Careful: Most runtimes uses plain as tips, they need a polkadot config.
// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
// ! However, most Substrate runtimes do not use the asset pallet at all. So if you run an example against your own node
// you most likely should use `DefaultRuntimeConfig` instead.

fn main() {
env_logger::init();
Expand Down

0 comments on commit 60c4685

Please sign in to comment.