Expose request ids used by WebSocketProvider #1018
Labels
enhancement
New feature or improvement.
fixed/complete
This Bug is fixed or Enhancement is complete and published.
Can the
WebSocketProvider
class expose the ids of its requests? This is handy for correlating requests with responses in application logs.Two ways this can be done are:
Move the
NextId
variable to a readonly property on theWebSocketProvider
classethers.js/packages/providers/src.ts/websocket-provider.ts
Line 31 in 5fcd03f
Just use
_nextId
on theJsonRpcProvider
class thatWebSocketProvider
extends.ethers.js/packages/providers/src.ts/json-rpc-provider.ts
Line 224 in 5fcd03f
Here's an example from my extension of the
JsonRpcProvider
classThe text was updated successfully, but these errors were encountered: