Documentation ¶
Index ¶
- Constants
- Variables
- type Contract
- type ContractCaller
- func (_Contract *ContractCaller) Chairperson(opts *bind.CallOpts) (common.Address, error)
- func (_Contract *ContractCaller) Proposals(opts *bind.CallOpts, arg0 *big.Int) (struct{ ... }, error)
- func (_Contract *ContractCaller) Voters(opts *bind.CallOpts, arg0 common.Address) (struct{ ... }, error)
- func (_Contract *ContractCaller) WinnerName(opts *bind.CallOpts) ([32]byte, error)
- func (_Contract *ContractCaller) WinningProposal(opts *bind.CallOpts) (*big.Int, error)
- type ContractCallerRaw
- type ContractCallerSession
- func (_Contract *ContractCallerSession) Chairperson() (common.Address, error)
- func (_Contract *ContractCallerSession) Proposals(arg0 *big.Int) (struct{ ... }, error)
- func (_Contract *ContractCallerSession) Voters(arg0 common.Address) (struct{ ... }, error)
- func (_Contract *ContractCallerSession) WinnerName() ([32]byte, error)
- func (_Contract *ContractCallerSession) WinningProposal() (*big.Int, error)
- type ContractFilterer
- type ContractRaw
- func (_Contract *ContractRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_Contract *ContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Contract *ContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type ContractSession
- func (_Contract *ContractSession) Chairperson() (common.Address, error)
- func (_Contract *ContractSession) Delegate(to common.Address) (*types.Transaction, error)
- func (_Contract *ContractSession) GiveRightToVote(voter common.Address) (*types.Transaction, error)
- func (_Contract *ContractSession) Proposals(arg0 *big.Int) (struct{ ... }, error)
- func (_Contract *ContractSession) Vote(proposal *big.Int) (*types.Transaction, error)
- func (_Contract *ContractSession) Voters(arg0 common.Address) (struct{ ... }, error)
- func (_Contract *ContractSession) WinnerName() ([32]byte, error)
- func (_Contract *ContractSession) WinningProposal() (*big.Int, error)
- type ContractTransactor
- func (_Contract *ContractTransactor) Delegate(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error)
- func (_Contract *ContractTransactor) GiveRightToVote(opts *bind.TransactOpts, voter common.Address) (*types.Transaction, error)
- func (_Contract *ContractTransactor) Vote(opts *bind.TransactOpts, proposal *big.Int) (*types.Transaction, error)
- type ContractTransactorRaw
- type ContractTransactorSession
- func (_Contract *ContractTransactorSession) Delegate(to common.Address) (*types.Transaction, error)
- func (_Contract *ContractTransactorSession) GiveRightToVote(voter common.Address) (*types.Transaction, error)
- func (_Contract *ContractTransactorSession) Vote(proposal *big.Int) (*types.Transaction, error)
Constants ¶
const ContractABI = "" /* 2318-byte string literal not displayed */
ContractABI is the input ABI used to generate the binding from.
Variables ¶
var ContractBin = "" /* 4406-byte string literal not displayed */
ContractBin is the compiled bytecode used for deploying new contracts.
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct { ContractCaller // Read-only binding to the contract ContractTransactor // Write-only binding to the contract ContractFilterer // Log filterer for contract events }
Contract is an auto generated Go binding around an Ethereum contract.
func DeployContract ¶
func DeployContract(auth *bind.TransactOpts, backend bind.ContractBackend, proposalNames [][32]byte) (common.Address, *types.Transaction, *Contract, error)
DeployContract deploys a new Ethereum contract, binding an instance of Contract to it.
func NewContract ¶
NewContract creates a new instance of Contract, bound to a specific deployed contract.
type ContractCaller ¶
type ContractCaller struct {
// contains filtered or unexported fields
}
ContractCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewContractCaller ¶
func NewContractCaller(address common.Address, caller bind.ContractCaller) (*ContractCaller, error)
NewContractCaller creates a new read-only instance of Contract, bound to a specific deployed contract.
func (*ContractCaller) Chairperson ¶
Chairperson is a free data retrieval call binding the contract method 0x2e4176cf.
Solidity: function chairperson() view returns(address)
func (*ContractCaller) Proposals ¶
func (_Contract *ContractCaller) Proposals(opts *bind.CallOpts, arg0 *big.Int) (struct { Name [32]byte VoteCount *big.Int }, error)
Proposals is a free data retrieval call binding the contract method 0x013cf08b.
Solidity: function proposals(uint256 ) view returns(bytes32 name, uint256 voteCount)
func (*ContractCaller) Voters ¶
func (_Contract *ContractCaller) Voters(opts *bind.CallOpts, arg0 common.Address) (struct { Weight *big.Int Voted bool Delegate common.Address Vote *big.Int }, error)
Voters is a free data retrieval call binding the contract method 0xa3ec138d.
Solidity: function voters(address ) view returns(uint256 weight, bool voted, address delegate, uint256 vote)
func (*ContractCaller) WinnerName ¶
func (_Contract *ContractCaller) WinnerName(opts *bind.CallOpts) ([32]byte, error)
WinnerName is a free data retrieval call binding the contract method 0xe2ba53f0.
Solidity: function winnerName() view returns(bytes32 winnerName_)
func (*ContractCaller) WinningProposal ¶
WinningProposal is a free data retrieval call binding the contract method 0x609ff1bd.
Solidity: function winningProposal() view returns(uint256 winningProposal_)
type ContractCallerRaw ¶
type ContractCallerRaw struct {
Contract *ContractCaller // Generic read-only contract binding to access the raw methods on
}
ContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*ContractCallerRaw) Call ¶
func (_Contract *ContractCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type ContractCallerSession ¶
type ContractCallerSession struct { Contract *ContractCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
ContractCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*ContractCallerSession) Chairperson ¶
func (_Contract *ContractCallerSession) Chairperson() (common.Address, error)
Chairperson is a free data retrieval call binding the contract method 0x2e4176cf.
Solidity: function chairperson() view returns(address)
func (*ContractCallerSession) Proposals ¶
func (_Contract *ContractCallerSession) Proposals(arg0 *big.Int) (struct { Name [32]byte VoteCount *big.Int }, error)
Proposals is a free data retrieval call binding the contract method 0x013cf08b.
Solidity: function proposals(uint256 ) view returns(bytes32 name, uint256 voteCount)
func (*ContractCallerSession) Voters ¶
func (_Contract *ContractCallerSession) Voters(arg0 common.Address) (struct { Weight *big.Int Voted bool Delegate common.Address Vote *big.Int }, error)
Voters is a free data retrieval call binding the contract method 0xa3ec138d.
Solidity: function voters(address ) view returns(uint256 weight, bool voted, address delegate, uint256 vote)
func (*ContractCallerSession) WinnerName ¶
func (_Contract *ContractCallerSession) WinnerName() ([32]byte, error)
WinnerName is a free data retrieval call binding the contract method 0xe2ba53f0.
Solidity: function winnerName() view returns(bytes32 winnerName_)
func (*ContractCallerSession) WinningProposal ¶
func (_Contract *ContractCallerSession) WinningProposal() (*big.Int, error)
WinningProposal is a free data retrieval call binding the contract method 0x609ff1bd.
Solidity: function winningProposal() view returns(uint256 winningProposal_)
type ContractFilterer ¶
type ContractFilterer struct {
// contains filtered or unexported fields
}
ContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewContractFilterer ¶
func NewContractFilterer(address common.Address, filterer bind.ContractFilterer) (*ContractFilterer, error)
NewContractFilterer creates a new log filterer instance of Contract, bound to a specific deployed contract.
type ContractRaw ¶
type ContractRaw struct {
Contract *Contract // Generic contract binding to access the raw methods on
}
ContractRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*ContractRaw) Call ¶
func (_Contract *ContractRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*ContractRaw) Transact ¶
func (_Contract *ContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ContractRaw) Transfer ¶
func (_Contract *ContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type ContractSession ¶
type ContractSession struct { Contract *Contract // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
ContractSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*ContractSession) Chairperson ¶
func (_Contract *ContractSession) Chairperson() (common.Address, error)
Chairperson is a free data retrieval call binding the contract method 0x2e4176cf.
Solidity: function chairperson() view returns(address)
func (*ContractSession) Delegate ¶
func (_Contract *ContractSession) Delegate(to common.Address) (*types.Transaction, error)
Delegate is a paid mutator transaction binding the contract method 0x5c19a95c.
Solidity: function delegate(address to) returns()
func (*ContractSession) GiveRightToVote ¶
func (_Contract *ContractSession) GiveRightToVote(voter common.Address) (*types.Transaction, error)
GiveRightToVote is a paid mutator transaction binding the contract method 0x9e7b8d61.
Solidity: function giveRightToVote(address voter) returns()
func (*ContractSession) Proposals ¶
func (_Contract *ContractSession) Proposals(arg0 *big.Int) (struct { Name [32]byte VoteCount *big.Int }, error)
Proposals is a free data retrieval call binding the contract method 0x013cf08b.
Solidity: function proposals(uint256 ) view returns(bytes32 name, uint256 voteCount)
func (*ContractSession) Vote ¶
func (_Contract *ContractSession) Vote(proposal *big.Int) (*types.Transaction, error)
Vote is a paid mutator transaction binding the contract method 0x0121b93f.
Solidity: function vote(uint256 proposal) returns()
func (*ContractSession) Voters ¶
func (_Contract *ContractSession) Voters(arg0 common.Address) (struct { Weight *big.Int Voted bool Delegate common.Address Vote *big.Int }, error)
Voters is a free data retrieval call binding the contract method 0xa3ec138d.
Solidity: function voters(address ) view returns(uint256 weight, bool voted, address delegate, uint256 vote)
func (*ContractSession) WinnerName ¶
func (_Contract *ContractSession) WinnerName() ([32]byte, error)
WinnerName is a free data retrieval call binding the contract method 0xe2ba53f0.
Solidity: function winnerName() view returns(bytes32 winnerName_)
func (*ContractSession) WinningProposal ¶
func (_Contract *ContractSession) WinningProposal() (*big.Int, error)
WinningProposal is a free data retrieval call binding the contract method 0x609ff1bd.
Solidity: function winningProposal() view returns(uint256 winningProposal_)
type ContractTransactor ¶
type ContractTransactor struct {
// contains filtered or unexported fields
}
ContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewContractTransactor ¶
func NewContractTransactor(address common.Address, transactor bind.ContractTransactor) (*ContractTransactor, error)
NewContractTransactor creates a new write-only instance of Contract, bound to a specific deployed contract.
func (*ContractTransactor) Delegate ¶
func (_Contract *ContractTransactor) Delegate(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error)
Delegate is a paid mutator transaction binding the contract method 0x5c19a95c.
Solidity: function delegate(address to) returns()
func (*ContractTransactor) GiveRightToVote ¶
func (_Contract *ContractTransactor) GiveRightToVote(opts *bind.TransactOpts, voter common.Address) (*types.Transaction, error)
GiveRightToVote is a paid mutator transaction binding the contract method 0x9e7b8d61.
Solidity: function giveRightToVote(address voter) returns()
func (*ContractTransactor) Vote ¶
func (_Contract *ContractTransactor) Vote(opts *bind.TransactOpts, proposal *big.Int) (*types.Transaction, error)
Vote is a paid mutator transaction binding the contract method 0x0121b93f.
Solidity: function vote(uint256 proposal) returns()
type ContractTransactorRaw ¶
type ContractTransactorRaw struct {
Contract *ContractTransactor // Generic write-only contract binding to access the raw methods on
}
ContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*ContractTransactorRaw) Transact ¶
func (_Contract *ContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ContractTransactorRaw) Transfer ¶
func (_Contract *ContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type ContractTransactorSession ¶
type ContractTransactorSession struct { Contract *ContractTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
ContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*ContractTransactorSession) Delegate ¶
func (_Contract *ContractTransactorSession) Delegate(to common.Address) (*types.Transaction, error)
Delegate is a paid mutator transaction binding the contract method 0x5c19a95c.
Solidity: function delegate(address to) returns()
func (*ContractTransactorSession) GiveRightToVote ¶
func (_Contract *ContractTransactorSession) GiveRightToVote(voter common.Address) (*types.Transaction, error)
GiveRightToVote is a paid mutator transaction binding the contract method 0x9e7b8d61.
Solidity: function giveRightToVote(address voter) returns()
func (*ContractTransactorSession) Vote ¶
func (_Contract *ContractTransactorSession) Vote(proposal *big.Int) (*types.Transaction, error)
Vote is a paid mutator transaction binding the contract method 0x0121b93f.
Solidity: function vote(uint256 proposal) returns()