Categorygithub.com/zupzup/smart-contracts-with-go
modulepackage
0.0.0-20200221091926-8b299f5cdb52
Repository: https://github.com/zupzup/smart-contracts-with-go.git
Documentation: pkg.go.dev

# README

smart-contracts-with-go

A simple example of how to deploy and interact with ETH smart contracts using Go on a simulated Blockchain.

Prerequisites

  • solc
  • geth (go-ethereum)
go get github.com/ethereum/go-ethereum
cd $GOPATH/src/github.com/ethereum/go-ethereum/
make
make devtools

Generating contract.go

abigen --sol=Contract.sol --pkg=main --out=contract.go

Running

go build . && ./smart-contracts-with-go

# Functions

DeployWinnerTakesAll deploys a new Ethereum contract, binding an instance of WinnerTakesAll to it.
NewWinnerTakesAll creates a new instance of WinnerTakesAll, bound to a specific deployed contract.
NewWinnerTakesAllCaller creates a new read-only instance of WinnerTakesAll, bound to a specific deployed contract.
NewWinnerTakesAllFilterer creates a new log filterer instance of WinnerTakesAll, bound to a specific deployed contract.
NewWinnerTakesAllTransactor creates a new write-only instance of WinnerTakesAll, bound to a specific deployed contract.

# Constants

WinnerTakesAllABI is the input ABI used to generate the binding from.
WinnerTakesAllBin is the compiled bytecode used for deploying new contracts.

# Structs

WinnerTakesAll is an auto generated Go binding around an Ethereum contract.
WinnerTakesAllCaller is an auto generated read-only Go binding around an Ethereum contract.
WinnerTakesAllCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
WinnerTakesAllCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
WinnerTakesAllFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
WinnerTakesAllPayedOutTo represents a PayedOutTo event raised by the WinnerTakesAll contract.
WinnerTakesAllPayedOutToIterator is returned from FilterPayedOutTo and is used to iterate over the raw logs and unpacked data for PayedOutTo events raised by the WinnerTakesAll contract.
WinnerTakesAllProjectSubmitted represents a ProjectSubmitted event raised by the WinnerTakesAll contract.
WinnerTakesAllProjectSubmittedIterator is returned from FilterProjectSubmitted and is used to iterate over the raw logs and unpacked data for ProjectSubmitted events raised by the WinnerTakesAll contract.
WinnerTakesAllProjectSupported represents a ProjectSupported event raised by the WinnerTakesAll contract.
WinnerTakesAllProjectSupportedIterator is returned from FilterProjectSupported and is used to iterate over the raw logs and unpacked data for ProjectSupported events raised by the WinnerTakesAll contract.
WinnerTakesAllRaw is an auto generated low-level Go binding around an Ethereum contract.
WinnerTakesAllSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
WinnerTakesAllTransactor is an auto generated write-only Go binding around an Ethereum contract.
WinnerTakesAllTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
WinnerTakesAllTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.