Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

fix: Update the JSON-RPC to correct the return information. #1006

Merged
merged 6 commits into from
Mar 21, 2022
Merged

fix: Update the JSON-RPC to correct the return information. #1006

merged 6 commits into from
Mar 21, 2022

Conversation

WilliamXieCrypto
Copy link
Contributor

@WilliamXieCrypto WilliamXieCrypto commented Mar 20, 2022

Fixes: #632

Solution:

Before the fix, the "web3_sha3" JSON_RPC endpoint will overwrite the "0x" as "" by using "hexutil.Bytes" as the input parameters, then return same result. After the fix, using "string" as the input parameters will avoid the overwrite and return correct response.

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@WilliamXieCrypto WilliamXieCrypto marked this pull request as ready for review March 21, 2022 07:08
Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! minor comment to move the tests to the new package

tests/rpc/rpc_test.go Outdated Show resolved Hide resolved
@fedekunze fedekunze enabled auto-merge (squash) March 21, 2022 11:35
@fedekunze fedekunze merged commit 01bc2ec into evmos:main Mar 21, 2022
yihuang pushed a commit to yihuang/ethermint that referenced this pull request Mar 22, 2022
* fix: Update the JSON-RPC to correct the return information.

* Update CHANGELOG.md

* update: move the tests to integration_test.go

* refactor the tests and use table tests instead

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
yihuang pushed a commit to yihuang/ethermint that referenced this pull request Mar 24, 2022
* fix: Update the JSON-RPC to correct the return information.

* Update CHANGELOG.md

* update: move the tests to integration_test.go

* refactor the tests and use table tests instead

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
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.

Ambiguity in string format conversion
2 participants