Hi!
I’m trying to deploy my smart contracts using remix and MetaMask and constantly get the error
“Gas estimation failed”
{“jsonrpc”:“2.0”,“error”:“Invalid params: unknown field type, expected one of from, to, gasPrice, gas, value, data, nonce.”,“id”:3748195990031828}
I’ve tried to clear the cache, and hard reload the browser (I’m using the latest version of Chrome on MacOS), but I still have the same result.
I managed to deploy the same contracts a few months ago and everything was fine.
Does MetaMask still work with remix?
What issue may have happened?
Hi @hunter727 are you sure you have enough gas money, what network are you testing on. Usually this error is due to the lack of funds on the account. You need some to pay for gas
@Bonniefied check your wallet activity on explorer and see if you spot anything suspicious if you don’t recognise the transaction address with https://revoke.cash/
Unfortunately, the open issue on remix is not related to my one, thanks.
Just for test reason, I’ve tried to deploy this simple contract and have the same issue:
// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.8.20 and less than 0.9.0
pragma solidity ^0.8.20;
contract HelloWorld {
string public greet = "Hello World!";
}
error
{"jsonrpc":"2.0","error":"Invalid params: unknown field `type`, expected one of `from`, `to`, `gasPrice`, `gas`, `value`, `data`, `nonce`.","id":3748195990031828}
This sounds like the issue does not depend on smart contract code, but related either to MetaMask API or Remix.
Have you tried reaching out to remix community, I’ve tested it too and had the same error you had I tested again yesterday my error changed I think there is something with remix
If you are having issues with remix maybe try deploying with hardhat or foundry
it is possible to “send transaction anyway” while deploying smart contracts from remix
I’ve found, that in that case deploying is finally successful (even if the gas estimation error appears) if the compiler version is less than 0.8.20. it is probably because the blockchain network doesn’t support shanghai evm
but I have no luck in verifying those smart contracts
Blockchain network we use is Bloxberg (sorry, I’m not able to place URL here)
going back to the issue with JSON RPC error - I’ve tried to deploy smart contracts to Goerli test network and managed to do that without any errors. It makes me think that the issue related to Bloxberg network but not to remix/MetaMask.
What network have you used trying to reproduce the issue?
Thanks for sharing that’s interesting, I used goerli and ethereum mainnet, I’m not familiar with Bloxberg network. Maybe you could check with the Bloxberg community