mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-23 00:18:00 +00:00
06cfb211a9
* cli: Add chainSpec command Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli/chainSpec: Move to dedicated module Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Compute the state root hash Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Remove code substitutes Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * artifacts: Update polkadot.json Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * scripts: Generate the chain spec Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Remove testing artifacts Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Fix clippy Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Apply rustfmt Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Introduce feature flag for smoldot dependency Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Rename chain-spec to chain-spec-pruning Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * scripts: Update chain-spec command Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
27 lines
1.6 KiB
Bash
Executable File
27 lines
1.6 KiB
Bash
Executable File
# # Generates the 3 metadata files in `/artifacts` and the polkadot.rs file for integration tests
|
|
#
|
|
# This script is to be run from the root of the repository: `scripts/artifacts.sh`
|
|
#
|
|
# It expects a local polkadot node to be running a JSON-RPC HTTP server at 127.0.0.1:9933
|
|
# A local polkadot node can be run via:
|
|
# ```
|
|
# git clone https://github.com/paritytech/polkadot.git
|
|
# cd polkadot
|
|
# cargo build --release
|
|
# ./target/release/polkadot --dev --tmp
|
|
# ```
|
|
|
|
# get the full metadata
|
|
cargo run --bin subxt metadata --version 15 > artifacts/polkadot_metadata_full.scale
|
|
# use it to generate polkadot.rs
|
|
cargo run --bin subxt codegen --file artifacts/polkadot_metadata_full.scale | rustfmt > testing/integration-tests/src/full_client/codegen/polkadot.rs
|
|
# generate a metadata file that only contains a few pallets that we need for our examples.
|
|
cargo run --bin subxt metadata --file artifacts/polkadot_metadata_full.scale --pallets "Balances,Staking,System,Multisig,Timestamp,ParaInherent" > artifacts/polkadot_metadata_small.scale
|
|
# generate a metadata file that contains no pallets
|
|
cargo run --bin subxt metadata --file artifacts/polkadot_metadata_full.scale --pallets "" > artifacts/polkadot_metadata_tiny.scale
|
|
# generate a metadata file that only contains some custom metadata
|
|
cargo run --bin generate-custom-metadata > artifacts/metadata_with_custom_values.scale
|
|
|
|
# Generate the polkadot chain spec.
|
|
cargo run --features chain-spec-pruning --bin subxt chain-spec --url wss://rpc.polkadot.io:443 --output-file artifacts/demo_chain_specs/polkadot.json --state-root-hash --remove-substitutes
|