Ethereum Blockchain

Hi …i`m use NodeMCU esp8266wifi
How can I use ganache instead of Robsten testnet in this board?because HTTPS support (required to connect to infura nodes) is not available for esp8266wifi…
Meaning that I use RPC_URL = ‘(’ instead of infura API key…

and in this command What is the alternative to the ROPSTEN word?
tx.set_chain(ethereum.ROPSTEN) # Test network

Hello @Abanoub_Asaad,

We never tested the Ethereum library with ganache, however you should be able to connect to it using something like this:

from blockchain.ethereum import rpc
    # setup rpc client
    eth = rpc.RPC("")
    # retrieve network id

The device should connect to ganache and print the network id that you can use in place of ROPSTEN constant. I think that ganache allows you to change the network id in the configuration.


thank you for your reply
did as you told, however, I still cannot submit any transactions on my network using ganache configurations

When the transaction command is reached, it returns the code from the beginning to wifi connection

Hi @Abanoub_Asaad,

I think you are getting some unhandled exception during the connection. Try to put the transaction code between a try…except block and see what happens.

Keep us posted,