https://github.com/filiprokita/eth-transaction-inspector
A Python script designed to interact with the Ethereum network via Infura, fetching and displaying information about a specific transaction.
https://github.com/filiprokita/eth-transaction-inspector
blockchain crypto cryptocurrency decentralized-technology defi ethereum ethereum-api infura python smart-contracts transaction-details web3
Last synced: 7 months ago
JSON representation
A Python script designed to interact with the Ethereum network via Infura, fetching and displaying information about a specific transaction.
- Host: GitHub
- URL: https://github.com/filiprokita/eth-transaction-inspector
- Owner: FilipRokita
- License: mit
- Created: 2025-01-22T09:20:03.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-01-22T10:33:43.000Z (9 months ago)
- Last Synced: 2025-01-22T10:33:50.844Z (9 months ago)
- Topics: blockchain, crypto, cryptocurrency, decentralized-technology, defi, ethereum, ethereum-api, infura, python, smart-contracts, transaction-details, web3
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ETH Transaction Inspector
A Python script that connects to the Ethereum network using Infura and retrieves details of a specified transaction.
## Features
- Connects to the Ethereum mainnet using the Infura API.
- Retrieves and displays the following transaction details:
- **To Address**: The recipient of the transaction.
- **Gas Price**: The gas price paid for the transaction (in wei).
- **Input Call Data**: The data sent with the transaction, displayed in hexadecimal format.
- Handles errors gracefully, including invalid transaction hashes or connectivity issues.## Prerequisites
1. Python 3.12 or later installed.
2. An Infura (MetaMask Developer) account with a registered project.
3. Installed required Python dependencies.## Installation
1. Clone this repository.
2. Install the required Python libraries:
```bash
pip install -r requirements.txt
```
3. Create a `.env` file in the script directory and add your Infura URL:
```
INFURA_URL=https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID
```## Usage
1. Change `transaction_hash` in `eth-transaction-inspector.py`
2. Run the script:
```bash
python eth-transaction-inspector.py
```## Author
[Filip Rokita](https://www.filiprokita.com/)