polkadot-launch
Please read Substrate to Polkadot SDK page first.
The polkadot-launch
program enables you to set up a local relay chain and parachain test network.
Before you use polkadot-launch
, you must have the binary files for a relay chain and a collator available in the bin
folder.
You can generate the relay chain and collator binary files by cloning the rococo-v1
branch of the polkadot
and cumulus
projects in the same root directory as the polkadot-launch
repository.
For detailed instructions about how to clone, compile, and copy the required binary files, see the README in the polkadot-launch
repository.
The polkadot-launch
program also requires you to provide a configuration file that defines the properties of the test network you want to set up.
The configuration file can be a JSON or a JavaScript file.
You can find examples for both JSON and JavaScript configuration files in the polkadot-launch
repository.
Before you begin
Before you use polkadot-launch
to set up a local test network, you need to prepare your environment with the required files:
- Download and compile the
polkadot
relay chain and copypolkadot
binary to thepolkadot-launch/bin
directory. - Download and compile the
polkadot-collator
and copypolkadot-collator
binary to thepolkadot-launch/bin
directory. - Prepare a configuration file with the properties for your test network.
See the documentation in in the polkadot-launch
repository for additional informmation abot performing these steps.
Installation
To install the polkadot-launch
program:
- Open a terminal shell on your computer.
-
Clone the
polkadot-launch
repository by running the following command:git clone https://github.com/paritytech/polkadot-launch.git
-
Change to the root directory of the
polkadot-launch
repository by running the following command:cd polkadot-launch
-
Verify that you have either
yarn
ornpm
installed by running either of the following commands:yarn --version
or
npm --version
-
Install polkadot-launch by running either of the following commands:
yarn global add polkadot-launch
or
npm i polkadot-launch -g
- Verify the properties in your configuration file reflect the location of the relay chain and collator binaries.
Basic command usage
The basic syntax for running {polkadot-launch
} commands is:
polkadot-launch <configuration-file> [flag]
Flags
You can use the following optional flags with the polkadot-launch
command.
Flag | Description |
---|---|
-h, --help | Displays usage information. |
-V, --version | Displays version information. |
For additional information about using polkadot-launch
, see the README in the polkadot-launch
repository.