Lesson 4: chain id is different from the one shown on ganache #453
-
Dear all, When I try to print the transaction, I get the error: "web3.exceptions.ValidationError: The transaction declared chain ID 5777, but the connected node is on 1337". The node we are using in the tutorial is 1337, however, the declared chain ID on my ganache app is "5777". As soon as I declare the chain ID to 1337, it works. Thanks a lot!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @CedricVo91 it depends on the network you are using, ganache-cli and brownie networks has the default chainId of 1337, as you are trying to connect brownie with ganache ui (on the ganache interface) you will experience a compatibility issue as brownie (or web3) will expect the chainId remains at 1337. So you might change the chain ID on ganache ui to 1337 as you did, or you can configure a new brownie network declaring explicitly you want to use the chain ID 5777. Note: I mentioned brownie as you'll start using it on lesson 5. Best regards, Cromewar. |
Beta Was this translation helpful? Give feedback.
Hello @CedricVo91 it depends on the network you are using, ganache-cli and brownie networks has the default chainId of 1337, as you are trying to connect brownie with ganache ui (on the ganache interface) you will experience a compatibility issue as brownie (or web3) will expect the chainId remains at 1337.
So you might change the chain ID on ganache ui to 1337 as you did, or you can configure a new brownie network declaring explicitly you want to use the chain ID 5777.
Note: I mentioned brownie as you'll start using it on lesson 5.
Best regards, Cromewar.