Skip to content

nuke-web3/pause-subxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subxt minimal demo

Demo of subxt using the tx-pause pallet.

Preparation

Before you can run the examples from the CLI included, you need to perform a few steps:

Build a node with the kitchen sink included 😉

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

Get your networks's metadata with subxt-cli

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!)

Run this demo

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:

pause-tx-result.png

About

Demo of subxt using the tx-pause pallet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages