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

Fix net_version #1717

Merged
merged 3 commits into from
Nov 7, 2023
Merged

Fix net_version #1717

merged 3 commits into from
Nov 7, 2023

Conversation

DmytroNazarenko
Copy link
Collaborator

@DmytroNazarenko DmytroNazarenko commented Nov 3, 2023

This fix is making net_version JSON RPC call compatible with Ethereum one:
https://ethereum.org/en/developers/docs/apis/json-rpc/#net_version

net_version will return decimal number, not hex string. Example:

> curl -X POST --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":67}' ...
> {"id":67,"jsonrpc":"2.0","result":"4660"}

Tests:

  • Added unit test
  • Tested on local setup

@DmytroNazarenko DmytroNazarenko linked an issue Nov 3, 2023 that may be closed by this pull request
@DmytroNazarenko DmytroNazarenko marked this pull request as ready for review November 6, 2023 13:55
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

❗ No coverage uploaded for pull request base (v3.17.2@e412fa1). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             v3.17.2    #1717   +/-   ##
==========================================
  Coverage           ?   45.17%           
==========================================
  Files              ?      352           
  Lines              ?    51439           
  Branches           ?        0           
==========================================
  Hits               ?    23235           
  Misses             ?    28204           
  Partials           ?        0           

@DmytroNazarenko DmytroNazarenko merged commit 4861254 into v3.17.2 Nov 7, 2023
8 checks passed
@DmytroNazarenko DmytroNazarenko deleted the enhancement/net-version-number branch November 7, 2023 17:15
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Net_version incorrect format of result
4 participants