Skip to content
Example of how to use "Web3" in golang.
Branch: master
Clone or download
Latest commit b4016b1 Jun 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contracts decode log Nov 28, 2017
greeter
.gitignore
README.md
main.go

README.md

Go Web3 Examples

Example of how to use "Web3" in golang.


UPDATE

Check out my little book on Ethereum Development with Go as a better guide.


Synopsis

Shows how to

  • compile a smart contract
  • generate a golang package from the ABI
  • connect to rpc or websocket provider
  • load a contract from it's address
  • load a private key
  • call a contract method
  • subscribe to contract events
  • decode event log

Development

Solidity contract to ABI

solc --abi contracts/Greeter.sol

ABI to Go package

abigen --abi contracts/Greeter.abi --pkg greeter --out greeter.go

Resources

License

MIT

You can’t perform that action at this time.