Actions11
Overview
The node enables interaction with Ethereum Virtual Machine (EVM) compatible blockchains, focusing here on the Contract Interaction operation. It allows users to call smart contract methods either in a read-only manner (no gas required) or as a write transaction (which modifies blockchain state and requires gas). This is useful for automating blockchain workflows such as querying contract data, executing token transfers, updating contract states, or triggering contract functions programmatically.
Common scenarios include:
- Reading token balances or contract states without spending gas.
- Writing transactions to update contract variables, mint tokens, or execute decentralized finance (DeFi) operations.
- Attaching native tokens (ETH, BNB, etc.) when calling payable contract methods.
- Customizing gas fees and nonce management for advanced transaction control.
Example: Calling an ERC20 token contract's balanceOf method to check a user's balance (read), or invoking a transfer method to send tokens (write).
Properties
| Name | Meaning |
|---|---|
| Wallet Source | Choose which wallet to use for this transaction: - Credential Wallet: Use the wallet from credential settings. - Input Private Key: Provide a private key directly for this transaction. |
| Private Key | The private key to use for this specific transaction (required if "Input Private Key" is selected). Can be with or without the 0x prefix. |
| Contract Address | The address of the smart contract to interact with. |
| Contract ABI | The contract's Application Binary Interface (ABI) in JSON format, describing available methods and events. |
| Contract Operation | Select the type of contract call: - Read: Call a read-only function (no gas required). - Write: Call a function that modifies the blockchain (requires gas). |
| Method | The exact name of the contract method to call. |
| Arguments | JSON array of arguments to pass to the method, e.g., ["0x123...", 100]. |
| Value Transfer Options | Options related to attaching native tokens to the contract call (only for write operations): - Attach Native Token (boolean) - Value (amount of native token to attach, e.g., 0.01 ETH) |
| Gas Settings | How to determine gas parameters: - Auto (Estimated): Let the network estimate gas. - Manual: Set gas limit and fees manually. |
| Gas Limit | Gas limit for the transaction (used only if manual gas settings are selected). Default is 200000. |
| Max Fee Per Gas (Gwei) | Maximum fee per gas unit in Gwei (manual gas setting). |
| Max Priority Fee Per Gas (Gwei) | Maximum priority fee per gas unit in Gwei (manual gas setting). |
| No Execution, Estimate Gas Only | If enabled, only estimates the gas required for the transaction without actually executing it. Useful for previewing costs. |
| Transaction Management | Advanced options for managing the transaction: - Manual Nonce: Specify a nonce manually (-1 to auto-manage). - Max Attempts: Number of retries if transaction fails (default 3). - Replacement Fee Boost (%): Percentage increase for gas fees if replacing a stuck transaction (default 10%). |
Output
The node outputs an array of JSON objects corresponding to each input item processed. For Contract Interaction:
- For read operations, the output JSON contains the result returned by the contract method call, decoded according to the ABI.
- For write operations, the output includes transaction details such as transaction hash, status, gas used, and optionally receipt information if the transaction was executed.
- If "Estimate Gas Only" is enabled, the output will contain the estimated gas amount without sending the transaction.
If binary data is involved (not typical for contract interaction), it would be summarized accordingly, but this node primarily deals with JSON data representing blockchain responses.
Dependencies
- Requires an API key credential for an Ethereum-compatible RPC provider (e.g., Infura, Alchemy, or a self-hosted node).
- Uses the
etherslibrary for blockchain interactions. - Requires proper configuration of the RPC URL and private key in credentials or via direct input.
- The user must provide a valid contract ABI and address.
- Gas fee and nonce management depend on network conditions and user settings.
Troubleshooting
- Invalid Private Key Provided: If the private key is malformed or incorrect, the node throws an error indicating invalid private key. Ensure the key is correct and includes or excludes the
0xprefix consistently. - Incorrect ABI Format: The contract ABI must be valid JSON. Parsing errors occur if the ABI is malformed. Validate the ABI before input.
- Method Not Found: If the specified method does not exist in the ABI or is misspelled, the call will fail. Double-check method names against the ABI.
- Gas Estimation Fails: If the network cannot estimate gas (e.g., due to contract revert or invalid parameters), the node may throw an error. Try manual gas settings or verify method arguments.
- Nonce Conflicts: When using manual nonce management, ensure the nonce is correct to avoid transaction replacement or failure.
- Insufficient Funds: Write operations require enough native tokens to pay gas fees. Insufficient balance will cause transaction failures.
- Network Connectivity Issues: RPC URL misconfiguration or network downtime can cause request failures.