R5 Console
Overview
The R5 Console is an easy-to-use CLI interface for interacting with your R5 node, and it also supports connecting to remote RPCs via the flag --rpcurl RPC_URL
. It is an excellent tool for quick querying and testing via JSON-RPC
methods.
Starting the Console
You can start the console via the R5 Relayer by adding the --r5console
flag:
If you wan to connect to a remote RPC or is running your local node on a different port than 8545
, you will need to initiate the binary directly (often found within the /bin
directory) with the --rpcurl
flag:
It supports both http
and https
connections, and uses http://localhost:8545
as its default RPC URL.
Supported Queries
The console supports all JSON-RPC
queries available from the RPC node it is connected to. There are two ways in which you can structure your queries: a) Full JSON; or b) Simplified.
Full JSON Queries
You can submit full JSON queries in line, such as like in the example below:
Simplified Queries
You can use simplified queries by typing the method followed by its parameters, in order. For example:
Converting HEX to DEC in Responses
The console has a built-in HEX-to-DEC converter that you can use to convert the HEX numerals in your response to decimals. It doesn't work with all queries, but it's an easy way to make the printed responses easier to read. To activate the converter, add the --trydec
token after your query. For example:
For simplified queries, and for full JSON queries:
Response Format
The responses are printed on the screen in JSON
format, for example, for a query such as:
We can expect a response similar to:
Last updated