Skip to content

JsonRpcProvider returns empty response #4450

Answered by ricmoo
NickStein85 asked this question in Q&A
Discussion options

You must be logged in to vote

The result isn’t empty. It depends on your environment and its implementation of console.log.

So, any of the values defined by getters are present, but they are not enumerated by console.log (in node.js; generally the interactive log in a web browser is far more attentive).

This is because a getter can have side-effects, and no one wants console.log to mutate the state of an object.

I also believe, _isProvider is no longer a property in v6. Instead, the focus is on capability-checking; e.g. if an object has a estimateGas function then it will be used during ContractRunner. As a result method signatures have been adjusted to make sure the arguments and return types are shared across possib…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@NickStein85
Comment options

@kypanz
Comment options

Answer selected by NickStein85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #4449 on November 01, 2023 15:46.