Fatal:No destination package specified(–pkg)
gpt让我去改GOPATH,不需要,别乱动。
The next step is run abigen to generate contract binding for Go application:
abigen --bin=contracts/erc20/MyToken.bin \ --abi=contracts/erc20/MyToken.abi \ --pkg=erc20 \ --out=contracts/erc20/MyToken.go
真实原因:
The problem is example command I provide is target for Mac/Linux. In Windows, they don’t use “\” that use to split long command into multiple lines.
To solve this problem, you can remove “\” characters from command and put into one line. The modified command will looks like this:
abigen --bin=contracts/erc20/MyToken.bin --abi=contracts/erc20/MyToken.abi --pkg=erc20 --out=contracts/erc20/MyToken.go
You don’t need to worry about GOPATH, leave it to default settings value.