Skip to main content

pop_chains/
lib.rs

1// SPDX-License-Identifier: GPL-3.0
2
3#![doc = include_str!("../README.md")]
4
5/// Account management and utility functions.
6mod accounts;
7/// Provides functionality for benchmarking.
8pub mod bench;
9/// Provides functionality for building chain binaries and runtime artifacts.
10mod build;
11/// Provides functionality to construct, encode, sign, and submit chain extrinsics.
12mod call;
13/// Deployment providers' metadata and utility functions.
14mod deployer_providers;
15/// Error types and handling for the crate.
16mod errors;
17/// Code generation utilities.
18mod generator;
19/// Functionality for creating new blockchain implementations.
20mod new_chain;
21/// Tools for creating new runtime pallets.
22mod new_pallet;
23/// Provides functionality for running runtime-only parachains.
24pub mod omni_node;
25/// A registry of parachains.
26pub mod registry;
27/// Relay chain interaction and management.
28mod relay;
29/// Template definitions and processing.
30mod templates;
31/// Common traits used throughout the crate.
32mod traits;
33/// Provides functionality for testing runtime upgrades.
34pub mod try_runtime;
35/// Provides functionality for launching a local network.
36pub mod up;
37/// General utility functions and helpers.
38pub mod utils;
39
40pub use bench::{
41	BenchmarkingCliCommand, GENESIS_BUILDER_DEV_PRESET, GenesisBuilderPolicy,
42	PalletExtrinsicsRegistry, binary::*, generate_binary_benchmarks,
43	generate_omni_bencher_benchmarks, generate_pallet_benchmarks, get_runtime_path,
44	load_pallet_extrinsics,
45};
46pub use build::{
47	ChainSpec, ChainSpecBuilder, binary_path, build_chain, build_project,
48	export_wasm_file_with_node, generate_genesis_state_file_with_node,
49	generate_plain_chain_spec_with_node, generate_raw_chain_spec_with_node, is_supported, runtime,
50	runtime::DeterministicBuilder, runtime_binary_path,
51};
52pub use call::{
53	CallData, construct_extrinsic, construct_proxy_extrinsic, construct_sudo_extrinsic,
54	decode_call_data, encode_call_data,
55	metadata::{
56		CallItem, Constant, Function, Pallet, Storage,
57		action::{Action, supported_actions},
58		find_callable_by_name, find_pallet_by_name,
59		params::{Param, field_to_param, type_to_param},
60		parse_chain_metadata, parse_dispatchable_arguments, raw_value_to_string,
61		render_storage_key_values,
62	},
63	parse_and_format_events, set_up_client, sign_and_submit_extrinsic, submit_signed_extrinsic,
64};
65pub use deployer_providers::{DeploymentProvider, SupportedChains};
66pub use errors::Error;
67pub use indexmap::IndexSet;
68pub use new_chain::instantiate_template_dir;
69pub use new_pallet::{TemplatePalletConfig, create_pallet_template, new_pallet_options::*};
70pub use relay::{RelayChain, Reserved, clear_dmpq};
71pub use try_runtime::{
72	TryRuntimeCliCommand, binary::*, parse, parse_try_state_string, run_try_runtime,
73	shared_parameters::*, state, try_state_details, try_state_label, upgrade_checks_details,
74};
75// External exports from subxt.
76pub use subxt::{
77	OnlineClient, SubstrateConfig,
78	blocks::ExtrinsicEvents,
79	tx::{DynamicPayload, Payload},
80};
81pub use templates::{ChainTemplate, Config, Provider};
82pub use utils::helpers::{get_preset_names, is_initial_endowment_valid};
83/// Information about the Node. External export from Zombienet-SDK.
84pub use zombienet_sdk::NetworkNode;
85
86const PASSET_HUB_SPEC_JSON: &str = include_str!("../artifacts/passet-hub-spec.json");
87fn get_passet_hub_spec_content() -> &'static str {
88	PASSET_HUB_SPEC_JSON
89}