Skip to main content

A tool to subscribe and handle Ethereum events

Project description

Event Subscriber

A tool to subscribe and handle Ethereum events.

Installation

pip install event_subscriber

Usage
The event_subscriber command can be used to start the event listener. Here is a step-by-step guide on how to use the tool:

Enter contract address: Provide the Ethereum contract address you want to monitor.

Example
event_subscriber

Follow the prompts to provide the necessary information:
Enter contract address: //Contract address
Enter path to contract ABI file: abi.json
Enter connection URL for Ethereum node (e.g. http://127.0.0.1:8545, default is Ganache http://127.0.0.1:8545: //Make sure you are connecting to a live node or test node like ganache
Enter polling interval in seconds: 2
Enter starting block number for event filter (default is 'latest'): 
Enter ending block number for event filter (default is 'latest'): 
Enter event name to filter for (or leave empty to finish): Withdraw //Examole
Enter event name to filter for (or leave empty to finish): Deposit  //Examole
Enter event name to filter for (or leave empty to finish): 

The tool will then start monitoring the specified events and provide real-time updates in the console.

Optional: Simulate a transaction: If you want to simulate a transaction for testing purposes, you can use the --simulate flag.
event_subscriber --simulate


Use Cases
On-chain monitoring: Keep track of specific events occurring in a smart contract deployed on the Ethereum blockchain.
Development and testing: Use a local Ethereum node like Ganache to test and develop smart contracts by simulating events and transactions.
Purple teaming: Utilize the tool to monitor and analyze potential security threats and attacks on smart contracts in real-time.
Real-time event tracking: Get real-time information about events happening in the contract, such as large withdrawals or deposits.
Incident response: Quickly identify and respond to suspicious activities or anomalies in the contract behavior.


Troubleshooting
If you encounter issues, ensure that:

The Ethereum node URL is correct and accessible.
The contract address and ABI file path are correct.
The polling interval is set to a reasonable value to avoid rate limiting.
For more detailed logs, check the event.log file generated in the working directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

event_subscriber-0.1.5.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

event_subscriber-0.1.5-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file event_subscriber-0.1.5.tar.gz.

File metadata

  • Download URL: event_subscriber-0.1.5.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.16

File hashes

Hashes for event_subscriber-0.1.5.tar.gz
Algorithm Hash digest
SHA256 151ea96f2a35464a5fe732ed1f482cc1cb0e703458f0f6f42aad6dc62af2c7eb
MD5 cc959d61ae9db3b5a706789b8a872a40
BLAKE2b-256 47a52ae597e378fe651b7f8ccd4d51f694993aae26385902d3d45d0b6678463a

See more details on using hashes here.

File details

Details for the file event_subscriber-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for event_subscriber-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 804f3457c390047bcef481a2432a18f5adc72ecefe0248e015f3fd18dd4b87dc
MD5 12a7b3dc442b300534e60edc8a66ce18
BLAKE2b-256 1a57fc0d22523661b49a468150d6de21780f765f338636a108564fd28650fc3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page