-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Metamask should give a setting for get gas price directly from node using JSONRPC #7263
Comments
How does Metamask currently determine the pre-set gas price for a transaction? |
i think this issue is not important :D !!! |
We are having the same issue plugging metamask into a different blockchain based on ethereum. It seems that gas price is fetched from https://ethgasstation.info/ which results in too low gas prices in our case. It would be useful to have the option to get it directly from the connected node via RPC. |
@helderjnpinto in your opening message you mentioned that you'd be able to implement this yourself. |
@d10r yes you maybe rigth, i will try get some time to do this PR. |
We use https://ethgasstation.info/ for the suggested gas prices in the UI, but the default gas price is set using a price calculator that looks at the gas prices for the last 40 blocks. That calculator is here. @helderjnpinto I just want to make sure I understand - does it sound like this gas price calculator based on recent blocks would work with the network you're using? Or would you still require it to use |
@Gudahtt Hi, this calculator is great for PoW consensus, in "private" consortium blockchains like in our case, and many companies that use consensus algorithm like IBFT 2.0 Proof-of-Authority (PoA) in case of Hyperledger Besu its a blockchain based on ethereum protocol but the gasPrice is defined this private organization and is like a "fixed" value (can change, but it doesn't vary like gas ethereum mainnet). What i did in this PR #8160 is just configure on network tab one toggle option to get only gasPrice from JSONRPC by default is disabled using metamask logic, and on send transaction get this option in network setting and overwrite all logic of price calculator that metamask have maybe only needs a css ajustments i think. |
I see, that makes sense. Thanks for explaining! |
As of #8575, |
Closing, as we now rely almost exclusively upon The only exception to this is a bug, which is tracked here: #10003 |
What problem are you trying to solve?
There is a bunch of blockchains based on ethereum, like Hyperledger Besu, this blockchains have own gas price and inclusive its possible define 0 as gas price.
Describe the solution you'd like
Metamask should be able when adding a new custom network define the eth_gasPrice if the source is from default metamask source or request to node.
In the Advanced configuration if this setting is defined should be permit 0 gas price.
Additional context
The JSON RPC is this.
https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gasprice
If i have some time this week i will implement this if metamask team give-me a green light to this feature.
Thanks in advance.
The text was updated successfully, but these errors were encountered: