I'm running Geth in dev mode locally, like this:
geth --ipcpath test-chain-directory/geth.ipc --datadir test-chain-directory --dev --rpc --rpccorsdomain "*" console
I can send a transaction from the console, and it works, but when I connect MetaMask to http://localhost:8545, sending a transaction from one account to another fails.
I've made sure to run miner.start()
before sending the transaction, but it fails in MetaMask with the following error:
Error: [ethjs-rpc] rpc error with payload {"id":3105471441522,"jsonrpc":"2.0","params":["0x...."],"method":"eth_sendRawTransaction"} Error: invalid sender
The account I'm sending from was one I created via the console, and funded with Eth, before importing into MetaMask, and MetaMask show's balance correctly.
What am I missing?
Best Answer
This comment by skozin and the files in the repo he provided help me to fix the problem:
https://github.com/MetaMask/metamask-extension/issues/2015#issuecomment-345405915
Basically, make sure to set in the genesis.conf :
eip155Block:0 and chainId equals to the networkId (used with geth)