get_table_by_scope
The get_table_by_scope method retrieves the table scope for a specified smart contract on the EOS blockchain.
It allows developers and applications to inspect table structures, analyze data distribution, and efficiently query contract-related information.
This method is especially useful for contracts that maintain multiple scopes such as user balances, configurations, or staking records.
Its filtering and pagination options provide flexibility for large datasets.
Example use cases:
Smart Contract Interaction
Developers use this method to fetch table scope information for a contract, ensuring accurate smart contract interaction and verification.
Data Analysis & Management
Useful for analyzing contract state, tracking changes, or reviewing how data is organized within various scopes.
Enhanced Querying
Filtering options such as lowerBound, upperBound, and limit enable efficient querying of only the most relevant rows.
Parameters
The getTableByScope method accepts the following parameters:
parameter | type | description |
|---|---|---|
code | string | The account name of the smart contract whose table scopes will be returned. |
table | string | Optional filter to specify the table name to query. |
lowerBound | string | Returns the first element not less than this value. |
upperBound | string | Returns the first element greater than this value. |
limit | integer | Maximum number of rows to return. Default is 10. |
reverse | boolean | If true, returns results in reverse order. Default is false. |
showPayer | boolean | If true, includes the RAM payer responsible for storing each row. Default is false. |
Returns
The method returns an object containing an array of table scope entries and pagination info.
field | description |
|---|---|
rows | Array of table scope objects containing code, scope, table, payer, and count values. |
more | A continuation key indicating if more rows are available beyond the current page. |
JSON-RPC Request Example
Response Example