I am having difficulty seeing any events for my contract. They show up in etherscan but not when trying to view them using web3. I am running a light node. Do I need a full or fast node to have access to these events?

I am also using the python implementation of web3: https://github.com/pipermerriam/web3.py

Using the following code. I can confirm my transaction is in-between the block limits provided to the filter.

from web3 import Web3, HTTPProvider, IPCProvider
import json
ROPSTEN_RPC = 'http://localhost:8546'
ContractWithEvents = '0x...'
ABI = json.loads("""[{...}]""")
web3 = Web3(HTTPProvider(ROPSTEN_RPC))
contract = web3.eth.contract(address=ContractWithEvents, abi=ABI)
contract.pastEvents('newUpload', filter_params={'fromBlock':1564421, 'toBlock':1564441}).get()

This returns an empty list. When there is at least 1 event fired according to etherscan.

  • From my experience a light node was not enough, but a fast node worked to query events.
    – Ismael
    Aug 29, 2017 at 16:59
  • v cool, thanks. was suspecting (dreading) that answer Aug 29, 2017 at 17:02


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.