tryethernal / ethernal

Ethernal is a block explorer for EVM-based chains. In a few seconds, spin up a fully-featured explorer for your L1/L2 rollup/testnet. Compatible with Optimism, ZK, Anvil, Hardhat, Geth...
https://www.tryethernal.com
Other
211 stars 51 forks source link

Read/write contract buttons are all disabled #385

Open jesobreira opened 1 week ago

jesobreira commented 1 week ago

I'm facing an issue that, on a Ganache network, chainId 1337, with Metamask set up to use Ganache as well, when I upload the ABI of a deployed contract, the buttons show all disabled.

Not sure if it is related but the only weird thing I see on the console is:

Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)

However, if I run this on the console to enable all buttons:

document.querySelectorAll("#interactions button").forEach(button => button.classList.remove("v-btn--disabled") || (button.disabled = false));

Then they all work well, getting the right response from the blockchain...

antoinedc commented 1 week ago

Hey, Is it still greyed out if you refresh the page? I'm looking into this now

antoinedc commented 1 week ago

I'm having troubles reproducing it though. Do you think you could record a quick video of this, please? Or describe all the steps you are taking?

jesobreira commented 1 week ago

Company is a little too strict for sharing screenshots but I'm gonna try.

On the meanwhile, I suspect the issue is due to a different chainId... Our testing network uses chainId 1337, but it seems Ethernal wants it to be 5777. I'm not sure if I searched enough or not, but I'd say there's no way to specify a different one?

So I get this error on the top of the contract function calls page:

Invalid chain id 0x539 (1337), expecting 0x1691 (5777). Click here to switch network in Metamask.

The "Click here" does nothing, but it shows the error I posted on the original message in the console.

antoinedc commented 1 week ago

Ah yes, chainId might be the issue! Unfortunately there is no way to update it in the UI yet. Can you come in the discord channel, so we can talk privately, and I'll be able to update your account? Also, for the metamask button, if it does nothing, can you take a look at the logs in the console? There might be something here?