MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.83k stars 4.83k forks source link

Unable to send 0 GWEI Gas Cost via Custom RPC Endpoint #10619

Open christineRPM opened 3 years ago

christineRPM commented 3 years ago

Describe the bug

Hello there! The SKALE Network does not have a gas cost for end-users, and Gas Price (GWEI) has always been set to 0. Recently, as of MetaMask version 9.1.1, dApp developers are now unable to use MetaMask to process transactions for their end-users; and now while using MetaMask to send a transaction, they are receiving the following error.

EthQuery - RPC Error - Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":0,"data":null,"message":"Transaction gas price lower than current eth_gasPrice."}}}'

Steps to reproduce (REQUIRED) Steps to reproduce the behavior, libraries used with version number, and/or any setup information to easily reproduce:

  1. Go to https://codesandbox.io/s/metamask-wallet-integration-skale-dev-docs-k77zj to get a SKALE Network custom RPC added to your list of MetaMask (version 9.1.1) Networks. Or alternatively, add the following Custom RPC Endpoint to your MetaMask
    Endpoint: https://dev-testnet-v1-0.skalelabs.com
    Chain ID: 344435
  2. Then go to https://faucet.skale.network to get SKALE Chain (sETH) in your wallet using https://dev-testnet-v1-0.skalelabs.com as your SKALE endpoint.
  3. Next open MetaMask and try to send sETH you just acquired from your wallet to another wallet.
  4. See error EthQuery - RPC Error - Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":0,"data":null,"message":"Transaction gas price lower than current eth_gasPrice."}}}'

Expected behavior The transaction has always been successful in MetaMask up to now, and the expected behavior is to receive a confirmed and successfully sent transaction.

Screenshots metamask-skale-issue

Screen Shot 2021-03-10 at 6 10 09 AM

Browser details (please complete the following information):

jacobc-eth commented 3 years ago

Hi @christineRPM, could you clarify for us how Skale uses 0 gwei? We checked and it looks like Skale was using 1,000 gwei in this example (see screenshot)

Screenshot from 2021-03-16 12-36-55

Gudahtt commented 3 years ago

I was unable to find any reference to the string "Transaction gas price lower than current eth_gasPrice" in our codebase or in any dependencies. I suspect this error is coming from the network.

christineRPM commented 3 years ago

Hello @Gudahtt & @jacobcantele - thanks for looking into this. As a workaround, I've had our engineers temporarily add in 1000 GWEI. However , if you try adding in this SKALE endpoint that I did not have updated you will see the issue:

https://dev-testnet-v1-1.skalelabs.com Chain ID: 344435

brad-decker commented 3 years ago

still seeing that price set for https://dev-testnet-v1-1.skalelabs.com using https://inspector.open-rpc.org/ @christineRPM 🤔

christineRPM commented 3 years ago

When you try using the MetaMask plugin - are you also not seeing an error? If you send me your wallet I can send you sETH to test or alternatively you can also get sETH from the faucet here: https://faucet.skale.network

Here is the error that I receive when switching using the custom RPC and then attempting to send sETH in the MEtaMask plugin.

metamask issue

bschorchit commented 1 year ago

Is this still an issue, @christineRPM ?