Blockchain Explorer icon

Blockchain Explorer

Interact with multiple blockchain networks via their explorer APIs (Etherscan-compatible)

Overview

This node interacts with multiple blockchain networks through their explorer APIs that are compatible with Etherscan. Specifically, for the Stat resource and Get Token Supply operation, it retrieves the total supply of a native token on a specified blockchain network.

Common scenarios where this node is beneficial include:

  • Monitoring the circulating supply of a native cryptocurrency on various blockchains.
  • Integrating token supply data into dashboards or analytics tools.
  • Automating alerts or reports based on changes in token supply.

For example, you could use this node to fetch the total supply of Ethereum's native token (ETH) on the Ethereum mainnet or check the total supply of tokens on Polygon or Binance Smart Chain networks.

Properties

Name Meaning
Network The blockchain network to query. Options: Arbitrum, Avalanche, Binance Smart Chain, Celo, Cronos, Ethereum, Fantom, Moonbeam, Optimism, Polygon. Default is Ethereum.
Contract Address The contract address to query. This is required when querying token-related information such as token supply.

Output

The output JSON contains the following fields:

  • network: The selected blockchain network.
  • resource: The resource queried, here it will be "stats".
  • operation: The operation performed, here "getTokenSupply".
  • Other fields returned by the blockchain explorer API, typically including:
    • status: Status of the API response (e.g., "1" for success).
    • message: Message from the API (e.g., "OK").
    • result: The actual token supply value as a string or number.

Example output snippet:

{
  "network": "ethereum",
  "resource": "stats",
  "operation": "getTokenSupply",
  "status": "1",
  "message": "OK",
  "result": "12000000000000000000000000"
}

If the node encounters an error, the output JSON will contain an error field describing the issue.

The node does not output binary data.

Dependencies

  • Requires an API key credential for a blockchain explorer service compatible with Etherscan APIs.
  • The node uses Axios for HTTP requests.
  • The user must configure the node with a valid API key credential for the blockchain explorer service.
  • No additional environment variables are required.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication errors.
    • Incorrect contract address format or unsupported network selection may result in API errors.
    • Rate limiting by the blockchain explorer API if too many requests are made in a short time.
  • Error messages:

    • "API Error: <message>" indicates the blockchain explorer API returned an error. Check the message for details, e.g., invalid parameters or quota exceeded.
    • Network or connectivity errors may occur if the custom base URL or default API endpoint is unreachable.
  • Resolutions:

    • Verify the API key credential is correctly set up and has sufficient permissions.
    • Double-check the contract address and network selection.
    • Implement retry logic or reduce request frequency to avoid rate limits.
    • Ensure internet connectivity and correct API endpoint configuration.

Links and References

Discussion