How I Learnt To Code

I was working as a Facility Manager in a luxurious real estate firm in Ikoyi, Lagos, where I was charged with the responsibility of taking care of the day-to-day maintenance of buildings and ensuring…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Logging Events on Ethereum

A quick insight into dealing with Ethereum events for logging purposes.

When trying to look up some Ethereum Events using Web3.py for forwarding reasons I had some problems.

Why use events and how:

How to use Ethereum events with Python:

For our use-case, this is kind of useless as it requires a TX receipt which we do not have in our case (or in any case when you don't save a TX receipt, which is in most cases).

As it turns out you can not use an Infura HTTP api if you would like to listen to events but you must use Websocket as a Web3 provider!!! A big help if you want to do it using INFURA:

Also Infura documentation for EVENTS, HELPFUL:

Filtering events proved to be more difficult than expected as the provided documentation is quite clumsy and there are a few helpful must-know tricks.

On Event Filters and how to use them:

Thus it is best to not rely on it and lookup if deposits are new by yourself locally! (looking up block numbers, or maybe id’s …)

PROBLEM with web3.py and websockets providers for INFURA is described here:

Add a comment

Related posts:

Bringt Tesla das Ende der deutschen Automobilindustrie?

Lange wurde Tesla von der deutschen Automobilindustrie nur belächelt und als nicht überlebensfähig angesehen. Ganz nach dem Sprichwort „Totgesagte leben länger“ hat sich das innovative Unternehmen…

Go to an Open window hosted event

Halloween is one of the most fun days to celebrate especially when you are a student. The concept extracted from my previous entry will be “art” because me and my boyfriend decided to dress up like…

TRUTH AND CONSEQUENCES

A friend of mine died 24 hours ago. His name is Ian. It was through my role at Homeless Youth Alliance that I met Ian. Because of his past, his history, the circumstances in which he lived, his…