Ethernaut - error: insufficient funds when trying to read from a contract

I've been doing the ethernaut challenges for the last couple of weeks which has been going fine. I was able to create new contract instances, submit solutions and most importantly just read the public contract values. But a couple of days ago something must have changed. Now, a simple read attempt, something like contract.info() or contract.owner() results in the following error:

Error in RPC response:,err: insufficient funds for gas * price + value: address [my_address] have 102280985514528259 want 419957231288000000 (supplied gas 2000000)

I've already reinstalled metamask and even tried it on a completely fresh machine but it results in the same error. The error message is also confusing on another level - I'm just trying to read a value - that shouldn't cost any gas, right?

Thanks in advance

I've changed literally nothing and it works again. So I suppose it must have been something with the network (or maybe the ethernaut challenges themselves).

1 Like

I get this error also using the Ropsten network with Metamask.

So just getting started with the enthernaut is a problem. Problems using online and local versions also.

Too bad this looks like a worthwhile learning tool.

I was able to get the localhost version to run, after adding assert json for imports.

File deploy_contract.mjs:
import * as gamedata from '../src/gamedata/gamedata.json' assert {type: "json"};
import * as EthernautABI from 'contracts/build/contracts/Ethernaut.sol/Ethernaut.json' assert {type: "json"};

File constants.js:
adding assert to line "import * as pkgJSON from '../package.json';:
then removing when starting ethernaut