Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node operation "List Logs By Transaction Hash EVM" under the "Crypto Transactions" resource interacts with a blockchain API to retrieve event logs associated with a specific Ethereum Virtual Machine (EVM) transaction hash. It is useful for developers, analysts, or blockchain enthusiasts who want to inspect detailed logs emitted by smart contracts during a particular transaction on an EVM-compatible blockchain.

Typical use cases include:

  • Debugging smart contract executions by examining emitted events.
  • Auditing transactions to verify state changes or triggered events.
  • Building analytics dashboards that track specific transaction activities.

For example, given a transaction hash on the Ethereum mainnet, this node can fetch all logs generated by that transaction, helping users understand what happened during its execution.

Properties

Name Meaning
blockchain The target blockchain network (e.g., Ethereum, Binance Smart Chain) where the transaction occurred.
network The specific network environment within the blockchain (e.g., mainnet, testnet).
transactionHash The unique hash identifier of the transaction whose logs are to be retrieved.
context Optional additional context string to provide extra information or metadata for the request.

Output

The node outputs a JSON array where each element corresponds to a log entry related to the specified transaction hash. Each log typically contains details such as:

  • Address of the contract emitting the event.
  • Topics (indexed parameters) of the event.
  • Data payload of the event.
  • Block number and transaction index.
  • Other metadata relevant to the log entry.

If the node supports binary data output, it would represent any raw or encoded data from the logs, but based on the static analysis, the output focuses on JSON-formatted log entries.

Dependencies

  • Requires an API key credential for accessing the Crypto APIs REST API service.
  • The node depends on the external Crypto APIs service to fetch blockchain data.
  • No other external dependencies are indicated in the source code.
  • The node expects the presence of a local JSON specification file (2024-12-12-final.json) describing the API endpoints, which is bundled with the node.

Troubleshooting

  • Operation Not Found Error: If the specified operation cannot be found in the API specification, the node will throw an error indicating the operation is missing. Ensure the operation name matches exactly and the API spec file is present and up-to-date.
  • Invalid Transaction Hash: Providing an incorrect or malformed transaction hash may result in empty results or API errors. Verify the hash format before running.
  • Network or Blockchain Mismatch: Using a transaction hash from one blockchain/network while specifying another may yield no results. Confirm that the blockchain and network properties correspond correctly to the transaction hash.
  • API Authentication Errors: Missing or invalid API credentials will cause authentication failures. Make sure the API key credential is configured properly in n8n.
  • Continue On Fail Behavior: If enabled, the node will return error messages inside the JSON output instead of stopping execution, allowing workflows to handle errors gracefully.

Links and References

Discussion