Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: no matching event (argument="topichash" #733

Closed
wighawag opened this issue Feb 20, 2020 · 4 comments
Closed

Error: no matching event (argument="topichash" #733

wighawag opened this issue Feb 20, 2020 · 4 comments
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.

Comments

@wighawag
Copy link

There seems to be an issue in latest ethers.js v5. It looks like it try to parse event from the log even if these come from contract down the chain (and not from the contract whose abi is known)

Error: no matching event (argument="topichash", value="0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", code=INVALID_ARGUMENT, version=abi/5.0.0-beta.145)
    at Logger.makeError (ethers.esm.js:3551)
    at Logger.throwError (ethers.esm.js:3560)
    at Logger.throwArgumentError (ethers.esm.js:3563)
    at Interface.getEvent (ethers.esm.js:7386)
    at Interface.parseLog (ethers.esm.js:7611)
    at ethers.esm.js:8042
    at Array.map (<anonymous>)
    at ethers.esm.js:8040

Looking at the code I guess it should filter out log that originate from a different address than the contract address :

receipt.events = receipt.logs.map((log) => {

But it would be cool if we could somehow set address to abi mapping in ethers so ethers could parse these automatically

@wighawag
Copy link
Author

Actually, maybe it should still try to decode the event and simply return null.

That way, we can easily support such event by adding the event to the contract ABI.

@ricmoo
Copy link
Member

ricmoo commented Feb 20, 2020

Exactly my thoughts.

Thanks for the PR. I’ll get to it today. :)

@ricmoo ricmoo added bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. labels Feb 20, 2020
@ricmoo ricmoo removed the on-deck This Enhancement or Bug is currently being worked on. label Feb 26, 2020
@ricmoo
Copy link
Member

ricmoo commented Feb 26, 2020

This has been published in the latest version. Give it a go and let me know if you have any problems. :)

@ricmoo
Copy link
Member

ricmoo commented Mar 6, 2020

I'm going to close this now. If you have any issues, please feel free to reopen.

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

No branches or pull requests

2 participants