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

Allow nodes that fail to include removed in event logs. #3959

Closed
handanyolak opened this issue Apr 10, 2023 · 4 comments
Closed

Allow nodes that fail to include removed in event logs. #3959

handanyolak opened this issue Apr 10, 2023 · 4 comments
Assignees
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@handanyolak
Copy link

Ethers Version

6.3.0

Search Terms

invalid value for value.removed

Describe the Problem

I upgrade ethers today from v5 to v6.
everything works correctly but the events of contracts not working correctly for me.

e.g. I'm trying to get Approval events of a standard ERC20 token.

but when the Approval event is fired, I see this message on my console.

btw, I use ethers with typechain (I don't know if it is important)
@typechain/ethers-v6: 0.3.0
typechain: 8.1.1

Application: Vue 3
Chain: Ganache
Wallet: Metamask

Code Snippet

erc20.on(
  erc20.filters.Approval,
  (owner, spender, value) => {
    console.log('owner', owner)
  }
)

Contract ABI

No response

Errors

@TODO Error: invalid value for value.removed (invalid boolean; undefined (argument="value", value=null, code=INVALID_ARGUMENT, version=6.3.0)) (value={ "address": "0x3ff0c88213b1c69121b614dafe8f6eff336ebd19", "blockHash": "0x8596a66a031520f66f96ed6cdd8f4da04532e7b1fba75b46f2c35e26c5d8fdd7", "blockNumber": "0x7c", "data": "0x0000000000000000000000000000000000000000000000000000000000000000", "logIndex": "0x0", "topics": [ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", "0x000000000000000000000000e627ba1d98037b2aeb207761a4d57dcd43d0cf1e", "0x000000000000000000000000dfab784d4b6da084dafbd032c7c8b3c03347aff1" ], "transactionHash": "0x0ce35a745d0e73457a37e3e948607f78ad409e4d088be48b6a40185ddf8bf750", "transactionIndex": "0x0", "type": "mined" }, code=BAD_DATA, version=6.3.0)
    at makeError (errors.ts:663:21)
    at assert (errors.ts:680:25)
    at format.ts:58:17
    at formatLog (format.ts:107:12)
    at BrowserProvider._wrapLog (abstract-provider.ts:487:24)
    at FilterIdEventSubscriber._emitResults (subscriber-filterid.ts:160:49)
    at FilterIdEventSubscriber.poll_fn3 (subscriber-filterid.ts:96:24)

Environment

Ganache

Environment (Other)

No response

@handanyolak handanyolak added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Apr 10, 2023
@ricmoo
Copy link
Member

ricmoo commented Apr 10, 2023

I'll look at this first thing tomorrow, because that definitely shouldn't happen.

@ricmoo ricmoo added the on-deck This Enhancement or Bug is currently being worked on. label Apr 10, 2023
@emretepedev
Copy link

emretepedev commented Apr 18, 2023

Same issue here.

invalid value for value.removed

I temporarily removed the removed property from the object in the source code to continue my project development.

Not a good solution but everything works well.

@ricmoo ricmoo changed the title V6 BrowserProvider not working with contract events Allow nodes that fail to include removed in event logs. Apr 19, 2023
@ricmoo ricmoo added enhancement New feature or improvement. and removed investigate Under investigation and may be a bug. labels Apr 19, 2023
@ricmoo
Copy link
Member

ricmoo commented May 20, 2023

Fixed in v6.4.0.

Thanks! :)

@ricmoo ricmoo closed this as completed May 20, 2023
@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels May 20, 2023
@sahfd4eiugf
Copy link

I'm still having a similar issue with v6.9.2.
Tried with and without filters, still no way to get any logs.
This is from hardhat console on localhost:

eth_getLogs

Errors encountered in param 0: Invalid value "0x01210bdc" supplied to : RpcFilterRequest/fromBlock: (QUANTITY | "earliest" | "latest" | "pending" | "safe" | "finalized") | undefined/0: QUANTITY, Invalid value "0x01210bdc" supplied to : RpcFilterRequest/fromBlock: (QUANTITY | "earliest" | "latest" | "pending" | "safe" | "finalized") | undefined/1: "earliest" | "latest" | "pending" | "safe" | "finalized"

Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

4 participants