Demo of subxt using the tx-pause pallet.
Before you can run the examples from the CLI included, you need to perform a few steps:
git clone [email protected]:paritytech/substrate.git
# The example used for generation and testing with the included artifacts
git checkout 917961b
# Note you must select a branch that includes these pallets
cd substrate
cargo b -r
# Wait a while....
./target/release/substrate --dev
Install subxt and download the metadata for your node.
cargo install subxt-cli
# With node running separately as setup above,
# run the following from the working dir of
# where you cloned this example:
cd pause-subxt
subxt metadata -f bytes > artifacts/metadata.scale
An example of the artifacts/node-metadata.json for human inspection and artifacts/node-metadata.scale for use in the application is included generated from this commit (that likely not work for other versions of substrate using this pallet!)
We suggest to open a Polkadot.js Explorer for your local node to watch events come in while this example is submitting some test extrinsics are submitted.
From the directory containing this README run:
cargo b -r
# wait....
./target/release/pause-subxt
Example expected output: