- Replace
'YOUR_ETHERSCAN_API_KEY'
with your actual Etherscan API key. - Replace
'0xYourTransactionHash'
with the transaction hash you want to query. - This script uses the
eth_getTransactionByHash
endpoint to fetch transaction details, such as gas price, block number, and sender/receiver addresses.
You can also query transaction details directly in your browser by visiting: