Closed zeddee closed 5 years ago
it appears that instead of solc --abi --bin ...
, we can just invoke
abigen --sol helloworld.sol --pkg main --out helloworld.go
to produce a .go
binding file that contains the necessary abi
and bin
values that we would get going about the long way.
We don't have to replace the steps, because it's useful for the reader to know what goes into creating the .go
binding file, but attaching this one-liner would be helpful.
source: https://medium.com/coinmonks/unit-testing-solidity-contracts-on-ethereum-with-go-3cc924091281
the article uses solc ^0.4.23 and abigen from geth 1.8.7
if you're okay with this, I'll continue updating the PR (and make other PRs re: later chapters)
reviewing..
@zeddee the abigen --sol helloworld.sol --pkg main --out helloworld.go
example would be great for sure. You can make a separate PR for this if you like and would be happy to merge
Also thanks for this PR 👍
glad to help! will have to slot this on my todo list — a bit busy at the moment. will try to get it done ✨
Corrections:
-o
flag, necessary to get solc to output binary files instead of printing to terminal (https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html)Improvements: