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

feat: add support for some json rpc queries #341

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

yutianwu
Copy link
Collaborator

Description

This pr adds support for some json rpc queries:

  • eth_gasPrice
  • eth_getCode
  • eth_estimateGas
  • eth_call
  • eth_getTransactionCount
  • eth_sendRawTransaction

The handlers will only return dummy results since we will not support those queries. The reason for this pr is it will fix the error message complained by Metamask when transferring BNB to other accounts. It will tell users to use DCellar to transfer BNB instead of Metamask.

Rationale

Add support for some json rpc queries and fix Metamask error message.

Example

n/a

Changes

Notable changes:

  • add support for some json rpc queries

go.sum Outdated
@@ -1889,6 +1887,8 @@ github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/yutianwu/greenfield-cometbft v0.0.0-20231023130834-fdf67a7829c3 h1:TU3XeI23YuSBPps5+Xybl4YlUMfbm6h30ZYMhd7xsk0=
github.com/yutianwu/greenfield-cometbft v0.0.0-20231023130834-fdf67a7829c3/go.mod h1:43yICrTxu90VjEUpQN23bsqi9mua5m5sFQq/ekHwN9s=
github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo=
github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you false add the types/txt file, please remove it.

go.mod Outdated
@@ -170,7 +170,7 @@ replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.23.0

github.com/cometbft/cometbft => github.com/bnb-chain/greenfield-cometbft v0.0.3
github.com/cometbft/cometbft => github.com/yutianwu/greenfield-cometbft v0.0.0-20231023130834-fdf67a7829c3
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please change this after cometbft is merged.

@unclezoro unclezoro added this pull request to the merge queue Nov 1, 2023
Merged via the queue into bnb-chain:develop with commit a3c24a5 Nov 1, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants