ballot

package
v0.0.0-...-2488a48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BallotABI = BallotMetaData.ABI

BallotABI is the input ABI used to generate the binding from. Deprecated: Use BallotMetaData.ABI instead.

View Source
var BallotBin = BallotMetaData.Bin

BallotBin is the compiled bytecode used for deploying new contracts. Deprecated: Use BallotMetaData.Bin instead.

View Source
var BallotMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"proposalNames\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"voteCount\",\"type\":\"uint256\"}],\"name\":\"NewProposal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"chairperson\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"giveRightToVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"voteCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"voters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"vote\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"winnerName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"winnerName_\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"winningProposal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningProposal_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
	Bin: "0x60806040523480156200001157600080fd5b5060405162001586380380620015868339818101604052810190620000379190620003b2565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555060005b8151811015620001e657600260405180604001604052808484815181106200010f576200010e62000403565b5b6020026020010151815260200160008152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550503373ffffffffffffffffffffffffffffffffffffffff167f4913a1b403184a1c69ab16947e9f4c7a1e48c069dccde91f2bf550ea77becc5b838381518110620001ae57620001ad62000403565b5b60200260200101516000604051620001c89291906200049a565b60405180910390a28080620001dd90620004f6565b915050620000e2565b505062000544565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620002528262000207565b810181811067ffffffffffffffff8211171562000274576200027362000218565b5b80604052505050565b600062000289620001ee565b905062000297828262000247565b919050565b600067ffffffffffffffff821115620002ba57620002b962000218565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b620002e581620002d0565b8114620002f157600080fd5b50565b6000815190506200030581620002da565b92915050565b6000620003226200031c846200029c565b6200027d565b90508083825260208201905060208402830185811115620003485762000347620002cb565b5b835b81811015620003755780620003608882620002f4565b8452602084019350506020810190506200034a565b5050509392505050565b600082601f83011262000397576200039662000202565b5b8151620003a98482602086016200030b565b91505092915050565b600060208284031215620003cb57620003ca620001f8565b5b600082015167ffffffffffffffff811115620003ec57620003eb620001fd565b5b620003fa848285016200037f565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6200043d81620002d0565b82525050565b6000819050919050565b6000819050919050565b6000819050919050565b6000620004826200047c620004768462000443565b62000457565b6200044d565b9050919050565b620004948162000461565b82525050565b6000604082019050620004b1600083018562000432565b620004c0602083018462000489565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000503826200044d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620005395762000538620004c7565b5b600182019050919050565b61103280620005546000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063609ff1bd1161005b578063609ff1bd146101145780639e7b8d6114610132578063a3ec138d1461014e578063e2ba53f01461018157610088565b80630121b93f1461008d578063013cf08b146100a95780632e4176cf146100da5780635c19a95c146100f8575b600080fd5b6100a760048036038101906100a291906109e5565b61019f565b005b6100c360048036038101906100be91906109e5565b6102e6565b6040516100d1929190610a3a565b60405180910390f35b6100e261031a565b6040516100ef9190610aa4565b60405180910390f35b610112600480360381019061010d9190610aeb565b61033e565b005b61011c6106da565b6040516101299190610b18565b60405180910390f35b61014c60048036038101906101479190610aeb565b610762565b005b61016860048036038101906101639190610aeb565b610919565b6040516101789493929190610b4e565b60405180910390f35b610189610976565b6040516101969190610b93565b60405180910390f35b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000154141561022a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022190610c0b565b60405180910390fd5b8060010160009054906101000a900460ff161561027c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027390610c77565b60405180910390fd5b60018160010160006101000a81548160ff0219169083151502179055508181600201819055508060000154600283815481106102bb576102ba610c97565b5b906000526020600020906002020160010160008282546102db9190610cf5565b925050819055505050565b600281815481106102f657600080fd5b90600052602060002090600202016000915090508060000154908060010154905082565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16156103d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ca90610d97565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610442576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043990610e03565b60405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105b257600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156105ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a490610e6f565b60405180910390fd5b610443565b60018160010160006101000a81548160ff021916908315150217905550818160010160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060010160009054906101000a900460ff16156106b5578160000154600282600201548154811061068957610688610c97565b5b906000526020600020906002020160010160008282546106a99190610cf5565b925050819055506106d5565b81600001548160000160008282546106cd9190610cf5565b925050819055505b505050565b6000806000905060005b60028054905081101561075d57816002828154811061070657610705610c97565b5b906000526020600020906002020160010154111561074a576002818154811061073257610731610c97565b5b90600052602060002090600202016001015491508092505b808061075590610e8f565b9150506106e4565b505090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e790610f4a565b60405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900460ff1615610880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087790610fb6565b60405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154146108cf57600080fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555050565b60016020528060005260406000206000915090508060000154908060010160009054906101000a900460ff16908060010160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154905084565b600060026109826106da565b8154811061099357610992610c97565b5b906000526020600020906002020160000154905090565b600080fd5b6000819050919050565b6109c2816109af565b81146109cd57600080fd5b50565b6000813590506109df816109b9565b92915050565b6000602082840312156109fb576109fa6109aa565b5b6000610a09848285016109d0565b91505092915050565b6000819050919050565b610a2581610a12565b82525050565b610a34816109af565b82525050565b6000604082019050610a4f6000830185610a1c565b610a5c6020830184610a2b565b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610a8e82610a63565b9050919050565b610a9e81610a83565b82525050565b6000602082019050610ab96000830184610a95565b92915050565b610ac881610a83565b8114610ad357600080fd5b50565b600081359050610ae581610abf565b92915050565b600060208284031215610b0157610b006109aa565b5b6000610b0f84828501610ad6565b91505092915050565b6000602082019050610b2d6000830184610a2b565b92915050565b60008115159050919050565b610b4881610b33565b82525050565b6000608082019050610b636000830187610a2b565b610b706020830186610b3f565b610b7d6040830185610a95565b610b8a6060830184610a2b565b95945050505050565b6000602082019050610ba86000830184610a1c565b92915050565b600082825260208201905092915050565b7f486173206e6f20726967687420746f20766f7465000000000000000000000000600082015250565b6000610bf5601483610bae565b9150610c0082610bbf565b602082019050919050565b60006020820190508181036000830152610c2481610be8565b9050919050565b7f416c726561647920766f7465642e000000000000000000000000000000000000600082015250565b6000610c61600e83610bae565b9150610c6c82610c2b565b602082019050919050565b60006020820190508181036000830152610c9081610c54565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610d00826109af565b9150610d0b836109af565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610d4057610d3f610cc6565b5b828201905092915050565b7f596f7520616c726561647920766f7465642e0000000000000000000000000000600082015250565b6000610d81601283610bae565b9150610d8c82610d4b565b602082019050919050565b60006020820190508181036000830152610db081610d74565b9050919050565b7f53656c662d64656c65676174696f6e20697320646973616c6c6f7765642e0000600082015250565b6000610ded601e83610bae565b9150610df882610db7565b602082019050919050565b60006020820190508181036000830152610e1c81610de0565b9050919050565b7f466f756e64206c6f6f7020696e2064656c65676174696f6e2e00000000000000600082015250565b6000610e59601983610bae565b9150610e6482610e23565b602082019050919050565b60006020820190508181036000830152610e8881610e4c565b9050919050565b6000610e9a826109af565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610ecd57610ecc610cc6565b5b600182019050919050565b7f4f6e6c79206368616972706572736f6e2063616e20676976652072696768742060008201527f746f20766f74652e000000000000000000000000000000000000000000000000602082015250565b6000610f34602883610bae565b9150610f3f82610ed8565b604082019050919050565b60006020820190508181036000830152610f6381610f27565b9050919050565b7f54686520766f74657220616c726561647920766f7465642e0000000000000000600082015250565b6000610fa0601883610bae565b9150610fab82610f6a565b602082019050919050565b60006020820190508181036000830152610fcf81610f93565b905091905056fea2646970667358221220567adabd19edc7ae85073705af2aa994f6314b7b5debc74f9c25841a1c6bd9e164736f6c637828302e382e31322d646576656c6f702e323032322e312e32302b636f6d6d69742e30623961623333660059",
}

BallotMetaData contains all meta data concerning the Ballot contract.

Functions

This section is empty.

Types

type Ballot

type Ballot struct {
	BallotCaller     // Read-only binding to the contract
	BallotTransactor // Write-only binding to the contract
	BallotFilterer   // Log filterer for contract events
}

Ballot is an auto generated Go binding around an Ethereum contract.

func DeployBallot

func DeployBallot(auth *bind.TransactOpts, backend bind.ContractBackend, proposalNames [][32]byte) (common.Address, *types.Transaction, *Ballot, error)

DeployBallot deploys a new Ethereum contract, binding an instance of Ballot to it.

func NewBallot

func NewBallot(address common.Address, backend bind.ContractBackend) (*Ballot, error)

NewBallot creates a new instance of Ballot, bound to a specific deployed contract.

type BallotCaller

type BallotCaller struct {
	// contains filtered or unexported fields
}

BallotCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewBallotCaller

func NewBallotCaller(address common.Address, caller bind.ContractCaller) (*BallotCaller, error)

NewBallotCaller creates a new read-only instance of Ballot, bound to a specific deployed contract.

func (*BallotCaller) Chairperson

func (_Ballot *BallotCaller) Chairperson(opts *bind.CallOpts) (common.Address, error)

Chairperson is a free data retrieval call binding the contract method 0x2e4176cf.

Solidity: function chairperson() view returns(address)

func (*BallotCaller) Proposals

func (_Ballot *BallotCaller) 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 (*BallotCaller) Voters

func (_Ballot *BallotCaller) 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 (*BallotCaller) WinnerName

func (_Ballot *BallotCaller) 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 (*BallotCaller) WinningProposal

func (_Ballot *BallotCaller) WinningProposal(opts *bind.CallOpts) (*big.Int, error)

WinningProposal is a free data retrieval call binding the contract method 0x609ff1bd.

Solidity: function winningProposal() view returns(uint256 winningProposal_)

type BallotCallerRaw

type BallotCallerRaw struct {
	Contract *BallotCaller // Generic read-only contract binding to access the raw methods on
}

BallotCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*BallotCallerRaw) Call

func (_Ballot *BallotCallerRaw) 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 BallotCallerSession

type BallotCallerSession struct {
	Contract *BallotCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

BallotCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*BallotCallerSession) Chairperson

func (_Ballot *BallotCallerSession) Chairperson() (common.Address, error)

Chairperson is a free data retrieval call binding the contract method 0x2e4176cf.

Solidity: function chairperson() view returns(address)

func (*BallotCallerSession) Proposals

func (_Ballot *BallotCallerSession) 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 (*BallotCallerSession) Voters

func (_Ballot *BallotCallerSession) 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 (*BallotCallerSession) WinnerName

func (_Ballot *BallotCallerSession) WinnerName() ([32]byte, error)

WinnerName is a free data retrieval call binding the contract method 0xe2ba53f0.

Solidity: function winnerName() view returns(bytes32 winnerName_)

func (*BallotCallerSession) WinningProposal

func (_Ballot *BallotCallerSession) WinningProposal() (*big.Int, error)

WinningProposal is a free data retrieval call binding the contract method 0x609ff1bd.

Solidity: function winningProposal() view returns(uint256 winningProposal_)

type BallotFilterer

type BallotFilterer struct {
	// contains filtered or unexported fields
}

BallotFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewBallotFilterer

func NewBallotFilterer(address common.Address, filterer bind.ContractFilterer) (*BallotFilterer, error)

NewBallotFilterer creates a new log filterer instance of Ballot, bound to a specific deployed contract.

func (*BallotFilterer) FilterNewProposal

func (_Ballot *BallotFilterer) FilterNewProposal(opts *bind.FilterOpts, from []common.Address) (*BallotNewProposalIterator, error)

FilterNewProposal is a free log retrieval operation binding the contract event 0x4913a1b403184a1c69ab16947e9f4c7a1e48c069dccde91f2bf550ea77becc5b.

Solidity: event NewProposal(address indexed from, bytes32 name, uint256 voteCount)

func (*BallotFilterer) ParseNewProposal

func (_Ballot *BallotFilterer) ParseNewProposal(log types.Log) (*BallotNewProposal, error)

ParseNewProposal is a log parse operation binding the contract event 0x4913a1b403184a1c69ab16947e9f4c7a1e48c069dccde91f2bf550ea77becc5b.

Solidity: event NewProposal(address indexed from, bytes32 name, uint256 voteCount)

func (*BallotFilterer) WatchNewProposal

func (_Ballot *BallotFilterer) WatchNewProposal(opts *bind.WatchOpts, sink chan<- *BallotNewProposal, from []common.Address) (event.Subscription, error)

WatchNewProposal is a free log subscription operation binding the contract event 0x4913a1b403184a1c69ab16947e9f4c7a1e48c069dccde91f2bf550ea77becc5b.

Solidity: event NewProposal(address indexed from, bytes32 name, uint256 voteCount)

type BallotNewProposal

type BallotNewProposal struct {
	From      common.Address
	Name      [32]byte
	VoteCount *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

BallotNewProposal represents a NewProposal event raised by the Ballot contract.

type BallotNewProposalIterator

type BallotNewProposalIterator struct {
	Event *BallotNewProposal // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

BallotNewProposalIterator is returned from FilterNewProposal and is used to iterate over the raw logs and unpacked data for NewProposal events raised by the Ballot contract.

func (*BallotNewProposalIterator) Close

func (it *BallotNewProposalIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*BallotNewProposalIterator) Error

func (it *BallotNewProposalIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BallotNewProposalIterator) Next

func (it *BallotNewProposalIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type BallotRaw

type BallotRaw struct {
	Contract *Ballot // Generic contract binding to access the raw methods on
}

BallotRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*BallotRaw) Call

func (_Ballot *BallotRaw) 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 (*BallotRaw) Transact

func (_Ballot *BallotRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*BallotRaw) Transfer

func (_Ballot *BallotRaw) 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 BallotSession

type BallotSession struct {
	Contract     *Ballot           // 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
}

BallotSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*BallotSession) Chairperson

func (_Ballot *BallotSession) Chairperson() (common.Address, error)

Chairperson is a free data retrieval call binding the contract method 0x2e4176cf.

Solidity: function chairperson() view returns(address)

func (*BallotSession) Delegate

func (_Ballot *BallotSession) 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 (*BallotSession) GiveRightToVote

func (_Ballot *BallotSession) 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 (*BallotSession) Proposals

func (_Ballot *BallotSession) 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 (*BallotSession) Vote

func (_Ballot *BallotSession) 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 (*BallotSession) Voters

func (_Ballot *BallotSession) 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 (*BallotSession) WinnerName

func (_Ballot *BallotSession) WinnerName() ([32]byte, error)

WinnerName is a free data retrieval call binding the contract method 0xe2ba53f0.

Solidity: function winnerName() view returns(bytes32 winnerName_)

func (*BallotSession) WinningProposal

func (_Ballot *BallotSession) WinningProposal() (*big.Int, error)

WinningProposal is a free data retrieval call binding the contract method 0x609ff1bd.

Solidity: function winningProposal() view returns(uint256 winningProposal_)

type BallotTransactor

type BallotTransactor struct {
	// contains filtered or unexported fields
}

BallotTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewBallotTransactor

func NewBallotTransactor(address common.Address, transactor bind.ContractTransactor) (*BallotTransactor, error)

NewBallotTransactor creates a new write-only instance of Ballot, bound to a specific deployed contract.

func (*BallotTransactor) Delegate

func (_Ballot *BallotTransactor) 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 (*BallotTransactor) GiveRightToVote

func (_Ballot *BallotTransactor) 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 (*BallotTransactor) Vote

func (_Ballot *BallotTransactor) 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 BallotTransactorRaw

type BallotTransactorRaw struct {
	Contract *BallotTransactor // Generic write-only contract binding to access the raw methods on
}

BallotTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*BallotTransactorRaw) Transact

func (_Ballot *BallotTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*BallotTransactorRaw) Transfer

func (_Ballot *BallotTransactorRaw) 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 BallotTransactorSession

type BallotTransactorSession struct {
	Contract     *BallotTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

BallotTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*BallotTransactorSession) Delegate

func (_Ballot *BallotTransactorSession) 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 (*BallotTransactorSession) GiveRightToVote

func (_Ballot *BallotTransactorSession) 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 (*BallotTransactorSession) Vote

func (_Ballot *BallotTransactorSession) Vote(proposal *big.Int) (*types.Transaction, error)

Vote is a paid mutator transaction binding the contract method 0x0121b93f.

Solidity: function vote(uint256 proposal) returns()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL