Tools
Developers building with Substrate can use a number of tools depending on where they are in their development cycle.
try-runtime
The try-runtime
tool is built to query a snapshot of runtime storage, using an in-memory-externalities to store state.
In this way, it enables runtime engineers to write tests for a specified runtime state, for testing against real chain state before going to production.
It is designed to be used as a command line interface to specify at which block to query state.
In its simplest form, try-runtime
is a tool that enables:
- Connecting to a remote node and calling into some runtime API.
- Scraping the specified state from a node at a given block.
- Writing tests for that data.
memory profiler
Memory profiling enables you to understand the memory allocation and behavior of your blockchain applications over time in Substrate-based clients. It identifies method calls in the context of how memory was allocated, combining this information with the number of allocated objects. In addition, profiling can be used to analyze memory leaks, identify where memory consumption is happening, define temporary allocations, and investigate excessive memory fragmentation within applications.
The profiler we recommend is koute's memory profiler.
subkey
Subkey is a public key cryptographic utility that is developed within Substrate itself. Its main feature is to generate and inspect key pairs, currently supporting these schemes:
- sr25519: Schorr signatures on the Ristretto group
- ed25519: SHA-512 (SHA-2) on Curve25519
- secp256k1: ECDSA signatures on secp256k1
All keys in Substrate based networks (like polkadot) use the SS58 address encoding format that is the primary user-facing way to interact with keys.
Subkey also allows restoring keys from mnemonics and raw seeds; signing and verifying signatures on a message; and signing and verifying signatures for encoded transactions.
sr tool
srtool allows building WASM runtimes in a deterministic way, allowing CIs and users to produce a strictly identical WASM runtime.
subxt
A library to submit extrinsics to a Substrate node via RPC. Go to documentation.
tx wrapper
Tools for FRAME chain builders to publish chain specific offline transaction generation libraries. Go to documentation.
sub flood
A tool that floods a Substrate node with transactions. Go to documentation.
Substrate archive
A tool Run alongside a Substrate-backed chain to index all Blocks, State, and Extrinsic data into PostgreSQL. Go to documentation
Sidecar
A REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework. Go to documentation.
Polkadot launch
A simple CLI tool to launch a local Polkadot test network. Go to Documentation.
Polkadot-JS
The Polkadot-JS project is a collection of tools, interfaces, and libraries around Polkadot and Substrate. While the project is named after "Polkadot", these tools, interfaces, and libraries are fully compatible with any Substrate based chain.
Polkadot-JS API
The API provides application developers the ability to query a node and interact with the Polkadot or Substrate chains using Javascript. Go to documentation.
The Polkadot-JS API is a library of interfaces for communicating with Polkadot and Substrate nodes.
Polkadot-JS Apps
The Polkadot-JS Apps is a flexible UI for interacting with a Polkadot or Substrate based node. Go to documentation.
This is pre-built user-facing application, allowing access to all features available on Substrate chains.
To connect the Polkadot-JS Apps to your local node, you must go into Settings
and change the
"endpoint to connect to" to Local Node (127.0.0.1:9944)
.
If you are connected to the Polkadot-JS Apps over a secure HTTPS connection, you will need to use a browser which also supports bridging to an insecure WebSocket endpoint. For example, Google Chrome supports this, but Mozilla Firefox does not.
Polkadot-JS extension
The Polkadot-JS Extension is a simple proof-of-concept for managing accounts in a browser extension and allowing the signing of extrinsics using these accounts. It also provides a simple interface for interacting with extension-compliant dApps.
Different ways to use the extension: