ethereum / web3.py

A python interface for interacting with the Ethereum blockchain and ecosystem.
http://web3py.readthedocs.io
MIT License
5.01k stars 1.71k forks source link

Multiple events found #1804

Closed Activity00 closed 8 months ago

Activity00 commented 3 years ago

What was wrong?

/usr/local/lib/python3.7/site-packages/web3/_utils/contracts.py in find_matching_event_abi raise ValueError("Multiple events found")

https://etherscan.io/tx/0x59054d383a9b3dd5289ebd994bc6fb95dd66fee741a33f1da9aa9a0b4a04a086#eventlog same name event

pipermerriam commented 3 years ago

@Activity00 it is helpful for you to supply more context for this. Can you supply the actual code you are using that triggered this error?

@kclowes here's where we need an API for retrieving an event directly by it's topic which a brief scan of the code suggests that 1) we might have never implemented a way to retrieve events that have duplicate names and 2) That we have inadequate documentation on the different ways there are to access an event.

kclowes commented 3 years ago

Yeah, I believe there is a half-baked PR up to allow overloaded events, but it still needs more work. And more documentation is always good! cc @marcgarreau to add to the tutorial/blog post list

wolovim commented 3 years ago

An attempt was made (https://github.com/ethereum/web3.py/pull/1705), but after digging in a bit, we found that a larger effort was required. Details/suggestions for how to go about it are in the PR. I just added a help wanted label, which I should've done before moving on to other priorities.

pacrob commented 8 months ago

Dup of #1704. Closing.