Code examples used in the Documentation
Examples for accessing JSON RPC through HTTP or WebSockets. The examples expect Polkadot node running and listening for RPC and WS requests on the localhost (i.e. default node options)
Show current head
cd rpc ./gradlew run
Follow updates to the current head (use
Ctrl+C
to exit)cd rpc ./gradlew run -PmainClass=FollowState
Describe runtime
cd rpc ./gradlew run -PmainClass=DescribeRuntime
A web-based explorer of the Runtime Metadata. The examples expect Polkadot node running and listening for RPC requests on the localhost (i.e. default node options)
cd runtime-explorer ./gradlew bootRun
Check account status and/or make a transfer of the balance to another address.
For the development network, transfer random amount for Alice to Bob
cd balance ./gradlew run
Note
|
To run a development network use: polkadot --dev
|
Transfer using real network (ex. Kusama)
cd balance ./gradlew run --args="wss://cc3-5.kusama.network SENDER_KEY_SEED RECIPIENT_ADDRESS"
Warning
|
If you use on a real network please be aware that it executes the transfer without any additional confirmation from you |