Subwasm
![](/project/2021/04/subwasm/featured.png)
subwasm
is an essential utility for Substrate developers and users. It allows inspecting any Substrate WASM runttime.
A WASM Blob is by nature not very readable. Prior the development of subwasm
, a running node was required to inspect a
runtime.
subwasm
voids this requirements. It is a Rust utility that allows inspecting a Substrate WASM runtime without
having to run a node. It can be used to extract metadata, call some of the functions, and inspect the storage of a Substrate runtime and
would not even require an internet connection (assuming you already have a runtime locally).
subwasm
is used within srtool to extract metadata from a runtime that was
just built.
subwasm
allows knowing exaxctly the content of a runtime without the need to run a node. It is a great tool for users
and for automation.
You may install subwasm
using homebrew or cargo or build it yourself:
brew tap chevdor/subwasm https://github.com/chevdor/subwasm
brew install subwasm
cargo install --locked --git https://github.com/chevdor/subwasm
You may then use it to inspect a runtime. subwasm
can also fetch a runtime from a chain. Wondering what is the current
runtime version ?
subwasm version --chain dot
will fetch the metadata of the Polkadot runtime, then show you the runtime version:
specifications : polkadot v1003004
implementation : parity-polkadot v0
transaction : v26
authoring : v0
You can find the project at: https://github.com/chevdor/subwasm and see how to list pallets, query the details of a specific pallet, retrieve the entire metadata in various formats and much more.