Blockchain Explorer
Actions22
- Account Actions
- Block Actions
- Contract Actions
- Gas Actions
- Stat Actions
- Token Actions
- Transaction Actions
Overview
This node interacts with multiple blockchain networks through their explorer APIs that are compatible with Etherscan. Specifically, for the Gas resource and the Get Gas Oracle operation, it fetches gas oracle data from the selected blockchain network. This data typically includes information about current gas prices, recommended gas fees for different transaction speeds, and other related metrics.
Use cases include:
- Monitoring gas price trends on various blockchains to optimize transaction costs.
- Dynamically adjusting transaction fees in decentralized applications based on real-time gas oracle data.
- Providing users with up-to-date gas fee recommendations before submitting transactions.
For example, a user might select the Ethereum network and use this node to retrieve the current gas oracle data to decide whether to speed up or delay a transaction depending on network congestion.
Properties
| Name | Meaning |
|---|---|
| Network | The blockchain network to query. Options: Arbitrum, Avalanche, Binance Smart Chain, Celo, Cronos, Ethereum, Fantom, Moonbeam, Optimism, Polygon |
Output
The output JSON contains the following fields:
network: The blockchain network queried (e.g., "ethereum").resource: The resource type, here always"gas".operation: The operation performed, here"getGasOracle".- Additional fields returned by the blockchain explorer API's gas oracle endpoint, which typically include:
- Suggested gas prices for different transaction speeds (e.g., safe low, standard, fast).
- Estimated base fee or gas limit parameters.
- Other gas-related metrics as provided by the API.
The exact structure depends on the underlying blockchain explorer API response but generally provides comprehensive gas fee data.
No binary data is output by this node.
Dependencies
- Requires an API key credential for accessing the blockchain explorer API service.
- The node uses the Axios HTTP client to make requests to the blockchain explorer API.
- The user must configure the node with a valid API key credential that grants access to the explorer API endpoints.
- No additional environment variables are required beyond the API key credential.
Troubleshooting
API Error Responses: If the API returns a status of
"0"with a message other than"OK", the node throws an error with the API's error message. This usually indicates invalid parameters, rate limiting, or issues with the API key.- Resolution: Verify the API key validity, ensure correct network selection, and check parameter correctness.
Network Selection Issues: Selecting an unsupported or incorrect network value may cause the API call to fail.
- Resolution: Use one of the supported networks listed in the properties.
Credential Errors: Missing or invalid API credentials will prevent successful API calls.
- Resolution: Ensure the API key credential is properly configured and linked to the node.
Rate Limits: Frequent requests may hit API rate limits imposed by the blockchain explorer service.
- Resolution: Implement request throttling or upgrade the API plan if available.