Querying the Blockchain
hmy provides several subcommands under the blockchain subcommand which let you query the blockchain.
List of available commands
By using ./hmy blockchain help command we can see that the following options are available:
Here are some examples of the above commands that you will use frequently:
transaction-by-hash
Checking the hash of your transaction to see the transaction data and if the transaction has been completed
Using the Binary:
Using the Shell Wrapper:
Example:
transaction-receipt
Get information about a finalized transaction:
Using the Binary:
Using the Shell Wrapper:
Example:
latest-header command
Checking the network status, last block, epoch, leaders, based on the shard number:
Using the Binary:
Using the Shell Wrapper:
Example:
block-by-number
Using the Binary:
Using the Shell Wrapper:
Example:
Last updated
Was this helpful?