Skip to content
Advertisement

The transaction declared chain ID 5777, but the connected node is on 1337

I am trying to deploy my SimpleStorage.sol contract to a ganache local chain by making a transaction using python. It seems to have trouble connecting to the chain.

JavaScript

It seems to be connected to the ganache chain because it prints the nonce, but when I build and try to print the transaction here is the entire traceback call I am receiving

JavaScript

Advertisement

Answer

Had this issue myself, apparently it’s some sort of Ganache CLI error but the simplest fix I could find was to change the network id in Ganache through settings>server to 1337. It restarts the session so you’d then need to change the address and private key variable.

If it’s the same tutorial I’m doing, you’re likely to come unstuck after this… the code for transaction should be:

JavaScript

Otherwise you get a value error if you don’t set the gasPrice

Advertisement