Skip to content

Non-whitelisted methods: Treat them as unsupported. #4796

Open
@andrewpeters9

Description

@andrewpeters9

Ethers Version

6.13.1

Describe the Problem

  • Some networks do not support eth_newFilter, this issue was addressed here:
  • However, some networks support the method, but an individual RPC (particularly public) can choose to not whitelist it
  • When sending eth_newFilter to some public Abitrum RPCs, such as https://sepolia.optimism.io/ instead of returning:
    • the {{method}} method does not exist
    • they instead return rpc method is not whitelisted

The quick fix for this would be allowing this line to also match for rpc method is not whitelisted

1dc8986#diff-864f267214cf0d0dd7bdcf86d9da9cb2fd4f4df51f75d17351f26594adc7d6b0R964

Errors

could not coalesce error (error={ "code": -32001, "message": "rpc method is not whitelisted" }, payload={ "id": 5, "jsonrpc": "2.0", "method": "eth_newFilter", "params": [ { "address": [ "{{OMMITTED}}" ], "topics": [ "{{OMMITTED}}", null, "{{OMMITTED}}" ] } ] }, code=UNKNOWN_ERROR, version=6.13.2)

Environment

node.js (v12 or newer)

Environment (Other)

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement.next-patchIssues scheduled for the next arch release.on-deckThis Enhancement or Bug is currently being worked on.v6Issues regarding v6

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions