Skip to main content

Get Table Information

Overview

This guide explains how to query data from a smart contract's multi-index table using the clio get table command.

Prerequisites

  • Install the currently supported version of clio
info

| The clio tool is bundled with the Wire software. Installing Wire Core will also install the clio tool.

REMINDER

The install process has already set up the wallet for the root user. To interact with clio, ensure you are on the root user. Run sudo su - to switch to the root user.

Command

clio get table <contract> <scope> <table>

Parameters

ParameterDescription
contractThe account name where the contract is deployed
scopeThe scope within the contract
tableThe name of the table to query

Example

Query the abihash table from the sysio contract:

clio get table sysio sysio abihash

Example Output:

{
"rows": [{
"owner": "sysio",
"hash": "38589666191bf8ad1f1c3e9ee0387f4e7d77ed9a410d5f2f35698aaf82e0f94d"
}
],
"more": false,
"next_key": ""
}

Additional Options

Limit the number of rows returned:

clio get table sysio sysio abihash --limit 3

Query with a lower bound:

clio get table sysio sysio abihash --lower sysio

Reference