Is it possible to attach with geth
to ganache-cli
?
I start ganache-cli
like this:
ganache-cli --db ~/ganache -i 15
Then I try to attach to the chain like this:
geth --datadir ~/ganache/ --networkid 15 attach
This is the error I get:
Fatal: Unable to attach to remote geth: dial unix /root/ganache/geth.ipc: connect: no such file or directory
If I start a private chain using geth
directly, I can attach to it without any problems.
geth --datadir ~/mychain --rpc --rpcapi eth,net,web3 --nodiscover --networkid 15 --bootnodes {URI}
geth --datadir ~/mychain --networkid 15 attach
Best Answer
If you are running ganache at 8545:
geth attach http://127.0.0.1:8545