miguelmota / ethereum-development-with-go-book

📖 A little guide book on Ethereum Development with Go (golang)
https://goethereumbook.org
Other
1.74k stars 427 forks source link

Invalid sender #44

Closed Kreagentle closed 4 years ago

Kreagentle commented 4 years ago

Good day. I run the code from page but have the answer like:

0x0c98048d
0x0000000000000000000000000725097f0677c83d099dfce69fab02d5e762bec5
0x000000000000000000000000000000000000000000000000000000174876e800
23064
2020/02/06 18:58:33 invalid sender

I check, i write correct private key, address of token and toAddress. I use a private blockchain with geth. Thanks a lot if anyone can help me.

miguelmota commented 4 years ago

The invalid sender in your case is most likely due to the network id not matching the chain id on the private network. See this https://github.com/MetaMask/metamask-extension/issues/2015#issuecomment-345405915 and https://github.com/MetaMask/metamask-extension/issues/1444#issuecomment-375183867 for more info.