Actions2
Overview
This node enables interaction with WAX blockchain smart contracts by either executing actions on a contract or querying data from a contract's table. It is useful for automating blockchain operations such as token transfers, asset management, or reading contract state within an n8n workflow.
Common scenarios:
- Sending tokens or assets by executing transfer actions on a smart contract.
- Querying user balances or asset metadata stored in smart contract tables.
- Automating blockchain-based workflows that require reading or writing contract data.
Practical example:
- Execute the
transferaction on theeosio.tokencontract to send tokens from one account to another. - Retrieve rows from the
accountstable of a token contract to check token balances for a specific user.
Properties
| Name | Meaning |
|---|---|
| Contract Name | The name of the smart contract to interact with (e.g., eosio.token, atomicassets). |
| API Endpoint | The URL of the WAX blockchain API endpoint to connect to (default: https://wax.greymass.com). |
Additional properties depend on the selected operation:
When Operation = Execute Action
| Name | Meaning |
|---|---|
| Action Name | The name of the smart contract action to execute (e.g., transfer). |
| Action Data | JSON object containing the data payload to send with the action. |
| Authorization | One or more authorization entries specifying the actor account and permission level (active, owner, or custom) required to authorize the action. |
| Memo (Optional) | Optional memo string to include with the transaction. |
When Operation = Get Table Data
| Name | Meaning |
|---|---|
| Table Name | The name of the smart contract table to query. |
| Scope | The scope of the table, usually an account or contract name defining the data partition. |
| Lower Bound | Optional lower bound for the query; can be an account name or number depending on key type. |
| Upper Bound | Optional upper bound for the query; can be an account name or number depending on key type. |
| Limit | Maximum number of rows to return (minimum 1). |
| Key Type | The type of the primary key used for indexing the table. Options: float128, float64, i128, i256, i64, name, ripemd160, sha256. |
| Auto Convert Account Names | Whether to automatically convert account names to numeric format when key type is i64. |
| Index Position | The index position to use for the query (1 for primary index, 2+ for secondary indexes). |
Output
The node outputs an array of JSON objects, each representing the result of processing an input item.
For Execute Action:
success: Boolean indicating if the action was executed successfully.operation:"executeAction".contract: The contract name.action: The action name executed.actionData: The JSON data sent with the action.authorization: Array of authorization objects used.memo: Optional memo string.transaction: Contains transaction details includingtransaction_idand processed block info if available, or raw response otherwise.
For Get Table Data:
success: Boolean indicating if the query succeeded.operation:"getTable".contract: The contract name.table: The table name queried.scope: The scope used.queryParams: Parameters used for the query.originalBounds: The original lower and upper bounds provided.convertedBounds: Bounds after any automatic conversion.autoConvert: Whether auto-conversion was applied.rows: Array of rows returned from the table.more: Boolean indicating if more rows are available beyond the limit.next_key: Key to use for fetching the next page of results if applicable.
The node does not output binary data.
Dependencies
- Requires an API authentication token (private key credential) to sign transactions when executing actions.
- Connects to a specified WAX blockchain API endpoint (default:
https://wax.greymass.com). - Uses the
eosjslibrary for blockchain RPC calls and transaction signing. - Requires proper network access to the WAX API endpoint.
Troubleshooting
- Invalid character in name error: Occurs if contract, scope, or account names contain invalid characters. Ensure names only use allowed characters
[.12345abcdefghijklmnopqrstuvwxyz]and are up to 12 characters long. - Invalid JSON in action data: If the JSON provided for action data is malformed, the node will throw an error. Validate JSON syntax before running.
- Failed to convert bounds to i64: When using
i64key type with auto-convert enabled, non-numeric bounds must be valid account names. Invalid names cause conversion errors. - Authorization errors: Ensure the private key corresponds to the actor account and permission specified in the authorization property.
- Network or endpoint errors: Verify the API endpoint URL is correct and reachable.
- Transaction execution failures: May occur due to insufficient permissions, incorrect action data, or blockchain state issues. Check the error message for details.
To resolve errors, verify all inputs carefully, ensure credentials are correct, and confirm connectivity to the WAX API endpoint.