Actions2
Overview
This node interacts with WAX blockchain smart contracts, enabling two main operations: executing actions on a smart contract and retrieving data from a smart contract's table. The "Get Table Data" operation allows users to query blockchain tables for stored data, which is useful for reading state or records maintained by smart contracts.
Common scenarios include:
- Fetching token balances or asset information from standard contracts like
eosio.tokenoratomicassets. - Querying user-specific or global data stored in smart contract tables.
- Integrating blockchain data into workflows for analytics, notifications, or further processing.
For example, you might use this node to retrieve the list of NFTs owned by a user from an NFT contract’s table or to get recent transactions recorded in a contract’s table.
Properties
| Name | Meaning |
|---|---|
| Contract Name | Name of the smart contract to query (e.g., eosio.token, atomicassets). |
| Table Name | Name of the table within the contract to query. |
| Scope | Scope of the table, usually an account name or contract name that defines the context of the table data. |
| Lower Bound | Optional lower bound for the query. Use account names for name key type or numeric strings for i64. Defines the starting point of the query range. |
| Upper Bound | Optional upper bound for the query. Similar format as Lower Bound; defines the end point of the query range. |
| Limit | Maximum number of results to return. Minimum value is 1; default is 50. |
| Key Type | Type of the primary key used for indexing the table. Options: Float128, Float64, I128, I256, I64, Name, Ripemd160, Sha256. Default is i64. |
| Auto Convert Account Names | When Key Type is i64, whether to automatically convert account names in bounds to their i64 representation. Boolean, default true. |
| Index Position | Position of the index to query: 1 for primary index, 2 or higher for secondary indexes. Default is 1. |
| API Endpoint | URL of the WAX blockchain API endpoint to send the query to. Default is https://wax.greymass.com. |
Output
The output JSON contains the following fields:
success: Boolean indicating if the query was successful.operation: The operation performed, here always"getTable".contract: The smart contract name queried.table: The table name queried.scope: The scope used in the query.queryParams: The full set of parameters sent to the blockchain API, including converted bounds and other options.originalBounds: The originallowerBoundandupperBoundvalues as input by the user.convertedBounds: The possibly converted bounds after applying automatic conversion (e.g., account names to i64).autoConvert: Boolean indicating if auto-conversion was applied.rows: Array of rows returned from the table query.more: Boolean indicating if there are more rows available beyond the limit.next_key: A key string to be used for pagination in subsequent queries.
No binary data is output by this operation.
Dependencies
- Requires access to a WAX blockchain API endpoint (default:
https://wax.greymass.com). - Uses the
eosjslibrary to interact with the blockchain. - No special credentials are required for the "Get Table Data" operation.
- The node expects network connectivity to the specified API endpoint.
Troubleshooting
- Invalid character in name error: If the
lowerBoundorupperBoundcontains invalid characters when auto-converting account names toi64, the node will throw an error. Ensure bounds are valid account names or numeric strings depending on the key type. - Failed to convert bounds: Conversion errors occur if the input does not match expected formats. Double-check the formatting of bounds.
- API endpoint unreachable: Network issues or incorrect endpoint URLs will cause failures. Verify the endpoint URL and network connectivity.
- Empty or no rows returned: This may indicate no matching data in the queried table/scope or incorrect bounds/index position.
- Limit too high: Setting an excessively high limit may cause slow responses or timeouts. Use reasonable limits.
If the node encounters an error and "Continue On Fail" is enabled, it will output an error object with details instead of stopping execution.