func (it *VotingVotedIterator) Next() bool {
	if it.fail != nil {
		return false
	}
	if it.done {
		select {
		case log := <-it.logs:
			it.Event = new(VotingVoted)
			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
				it.fail = err
				return false
			}
			it.Event.Raw = log
			return true
		default:
			return false
		}
	}
	select {
	case log := <-it.logs:
		it.Event = new(VotingVoted)
		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
			it.fail = err
			return false
		}
		it.Event.Raw = log
		return true
	case err := <-it.sub.Err():
		it.done = true
		it.fail = err
		return it.Next()
	}
}
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.
package voting
import (
	"math/big"
	"strings"
	ethereum "github.com/ethereum/go-ethereum"
	"github.com/ethereum/go-ethereum/accounts/abi"
	"github.com/ethereum/go-ethereum/accounts/abi/bind"
	"github.com/ethereum/go-ethereum/common"
	"github.com/ethereum/go-ethereum/core/types"
	"github.com/ethereum/go-ethereum/event"
)
var (
	_ = big.NewInt
	_ = strings.NewReader
	_ = ethereum.NotFound
	_ = abi.U256
	_ = bind.Bind
	_ = common.Big1
	_ = types.BloomLookup
	_ = event.NewSubscription
)
const VotingABI = "[{\"name\":\"CandidateAdded\",\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"kind\",\"indexed\":true},{\"type\":\"address\",\"name\":\"owner\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"voteBy\",\"indexed\":false,\"unit\":\"sec\"}],\"anonymous\":false,\"type\":\"event\"},{\"name\":\"CandidateRemoved\",\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\",\"indexed\":true}],\"anonymous\":false,\"type\":\"event\"},{\"name\":\"Voted\",\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\",\"indexed\":true},{\"type\":\"address\",\"name\":\"voter\",\"indexed\":true}],\"anonymous\":false,\"type\":\"event\"},{\"outputs\":[],\"inputs\":[{\"type\":\"address\",\"name\":\"market_token_addr\"}],\"constant\":false,\"payable\":false,\"type\":\"constructor\"},{\"name\":\"getPrivileged\",\"outputs\":[{\"type\":\"address\",\"name\":\"out\"},{\"type\":\"address\",\"name\":\"out\"},{\"type\":\"address\",\"name\":\"out\"}],\"inputs\":[],\"constant\":true,\"payable\":false,\"type\":\"function\",\"gas\":1044},{\"name\":\"setPrivileged\",\"outputs\":[],\"inputs\":[{\"type\":\"address\",\"name\":\"parameterizer\"},{\"type\":\"address\",\"name\":\"datatrust\"},{\"type\":\"address\",\"name\":\"listing\"}],\"constant\":false,\"payable\":false,\"type\":\"function\",\"gas\":106646},{\"name\":\"hasPrivilege\",\"outputs\":[{\"type\":\"bool\",\"name\":\"out\"}],\"inputs\":[{\"type\":\"address\",\"name\":\"sender\"}],\"constant\":true,\"payable\":false,\"type\":\"function\",\"gas\":1691},{\"name\":\"candidateIs\",\"outputs\":[{\"type\":\"bool\",\"name\":\"out\"}],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"},{\"type\":\"uint256\",\"name\":\"kind\"}],\"constant\":true,\"payable\":false,\"type\":\"function\",\"gas\":867},{\"name\":\"isCandidate\",\"outputs\":[{\"type\":\"bool\",\"name\":\"out\"}],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"}],\"constant\":true,\"payable\":false,\"type\":\"function\",\"gas\":903},{\"name\":\"getCandidate\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"out\"},{\"type\":\"address\",\"name\":\"out\"},{\"type\":\"uint256\",\"unit\":\"wei\",\"name\":\"out\"},{\"type\":\"uint256\",\"unit\":\"sec\",\"name\":\"out\"},{\"type\":\"uint256\",\"name\":\"out\"},{\"type\":\"uint256\",\"name\":\"out\"}],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"}],\"constant\":true,\"payable\":false,\"type\":\"function\",\"gas\":3021},{\"name\":\"getCandidateOwner\",\"outputs\":[{\"type\":\"address\",\"name\":\"out\"}],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"}],\"constant\":true,\"payable\":false,\"type\":\"function\",\"gas\":954},{\"name\":\"addCandidate\",\"outputs\":[],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"},{\"type\":\"uint256\",\"name\":\"kind\"},{\"type\":\"address\",\"name\":\"owner\"},{\"type\":\"uint256\",\"unit\":\"wei\",\"name\":\"stake\"},{\"type\":\"uint256\",\"unit\":\"sec\",\"name\":\"vote_by\"}],\"constant\":false,\"payable\":false,\"type\":\"function\",\"gas\":184267},{\"name\":\"removeCandidate\",\"outputs\":[],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"}],\"constant\":false,\"payable\":false,\"type\":\"function\",\"gas\":123796},{\"name\":\"didPass\",\"outputs\":[{\"type\":\"bool\",\"name\":\"out\"}],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"},{\"type\":\"uint256\",\"name\":\"plurality\"}],\"constant\":true,\"payable\":false,\"type\":\"function\",\"gas\":3372},{\"name\":\"pollClosed\",\"outputs\":[{\"type\":\"bool\",\"name\":\"out\"}],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"}],\"constant\":true,\"payable\":false,\"type\":\"function\",\"gas\":1566},{\"name\":\"vote\",\"outputs\":[],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"},{\"type\":\"uint256\",\"name\":\"option\"}],\"constant\":false,\"payable\":false,\"type\":\"function\",\"gas\":77945},{\"name\":\"transferStake\",\"outputs\":[],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"},{\"type\":\"address\",\"name\":\"addr\"}],\"constant\":false,\"payable\":false,\"type\":\"function\",\"gas\":58486},{\"name\":\"getStake\",\"outputs\":[{\"type\":\"uint256\",\"unit\":\"wei\",\"name\":\"out\"}],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"},{\"type\":\"address\",\"name\":\"addr\"}],\"constant\":true,\"payable\":false,\"type\":\"function\",\"gas\":1240},{\"name\":\"unstake\",\"outputs\":[],\"inputs\":[{\"type\":\"bytes32\",\"name\":\"hash\"}],\"constant\":false,\"payable\":false,\"type\":\"function\",\"gas\":24283}]"
const VotingBin = `0x740100000000000000000000000000000000000000006020526f7fffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff8000000000000000000000000000000060605274012a05f1fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffed5fa0e000000000000000000000000000000000060a0526020610cf76101403934156100a157600080fd5b6020610cf760c03960c05160205181106100ba57600080fd5b503360035561014051600255610cdf56600436101561000d57610c0e565b600035601c52740100000000000000000000000000000000000000006020526f7fffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff8000000000000000000000000000000060605274012a05f1fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffed5fa0e000000000000000000000000000000000060a05263d4c1753960005114156100e45734156100ba57600080fd5b6060610140526101606004548152600554816020015260065481604001525061014051610160f350005b6389015c73600051141561017c5734156100fd57600080fd5b600435602051811061010e57600080fd5b50602435602051811061012057600080fd5b50604435602051811061013257600080fd5b50600354331461014157600080fd5b6004541561014e57600080fd5b6005541561015b57600080fd5b6006541561016857600080fd5b600435600455602435600555604435600655005b6000156101b4575b61016052610140526005546101405114600454610140511417600654610140511417600052600051610160515650005b63b7bf210c600051141561020f5734156101cd57600080fd5b60043560205181106101de57600080fd5b506357b6e7b661014052600435610160526101605160065801610184565b6101c0526101c05160005260206000f350005b63af61f760600051141561025057341561022857600080fd5b602435600060043560e05260c052604060c02060c052602060c020541460005260206000f350005b63b89694c6600051141561029457341561026957600080fd5b60006001600060043560e05260c052604060c02060c052602060c0200154141560005260206000f350005b63dfb6419f60005114156103825734156102ad57600080fd5b60c061014052610160600060043560e05260c052604060c02060c052602060c0205481526001600060043560e05260c052604060c02060c052602060c020015481602001526002600060043560e05260c052604060c02060c052602060c020015481604001526003600060043560e05260c052604060c02060c052602060c020015481606001526004600060043560e05260c052604060c02060c052602060c020015481608001526005600060043560e05260c052604060c02060c052602060c02001548160a001525061014051610160f350005b63eb3014fd60005114156103c257341561039b57600080fd5b6001600060043560e05260c052604060c02060c052602060c020015460005260206000f350005b63bb12c49e60005114156105ab5734156103db57600080fd5b60443560205181106103ec57600080fd5b506357b6e7b66101405233610160526101605160065801610184565b6101c0526101c05161041957600080fd5b6001600060043560e05260c052604060c02060c052602060c02001541561043f57600080fd5b600160243518156104dd576002543b61045757600080fd5b600254301861046557600080fd5b60206102a060646323b872dd6101e052604435610200523061022052606435610240526101fc60006002545af161049b57600080fd5b6000506102a050600160443560e05260c052604060c02060043560e05260c052604060c020805460643582540110156104d357600080fd5b6064358154018155505b42608435420110156104ee57600080fd5b60843542016102c052602435600060043560e05260c052604060c02060c052602060c020556044356001600060043560e05260c052604060c02060c052602060c02001556064356002600060043560e05260c052604060c02060c052602060c02001556102c0516003600060043560e05260c052604060c02060c052602060c02001556102c0516102e0526044356024356004357f51baeaa00f5969dc416d8e5299022ac3886d317d13685d1c6906ced9bac71b0260206102e0a4005b6389bb617c60005114156106835734156105c457600080fd5b6357b6e7b66101405233610160526101605160065801610184565b6101c0526101c0516105f057600080fd5b60006001600060043560e05260c052604060c02060c052602060c02001541861061857600080fd5b600060043560e05260c052604060c02060c052602060c020600081556000600182015560006002820155600060038201556000600482015560006005820155506004357fb314642ce4aa3156c1090458cfccabff50f32bc85d110d7799c369e1a660bcf460006000a2005b638f354b7960005114156107ce57341561069c57600080fd5b60006001600060043560e05260c052604060c02060c052602060c0200154186106c457600080fd5b426003600060043560e05260c052604060c02060c052602060c0200154106106eb57600080fd5b6004600060043560e05260c052604060c02060c052602060c020015461014052610140516005600060043560e05260c052604060c02060c052602060c02001546101405101101561073b57600080fd5b6005600060043560e05260c052604060c02060c052602060c020015461014051016101605261016051151561077b576024351560005260206000f36107cc565b6024356101605161078b57600080fd5b610160516101405115156107a05760006107c0565b6064610140516064610140510204146107b857600080fd5b606461014051025b04101560005260206000f35b005b63327322c860005114156108385734156107e757600080fd5b60006001600060043560e05260c052604060c02060c052602060c02001541861080f57600080fd5b426003600060043560e05260c052604060c02060c052602060c02001541060005260206000f350005b639ef1204c60005114156109f857341561085157600080fd5b60006001600060043560e05260c052604060c02060c052602060c02001541861087957600080fd5b426003600060043560e05260c052604060c02060c052602060c0200154116108a057600080fd5b6002600060043560e05260c052604060c02060c052602060c0200154610140526002543b6108cd57600080fd5b60025430186108db57600080fd5b602061022060646323b872dd610160523361018052306101a052610140516101c05261017c60006002545af161091057600080fd5b6000506102205060013360e05260c052604060c02060043560e05260c052604060c020805461014051825401101561094757600080fd5b6101405181540181555060016024351415610996576004600060043560e05260c052604060c02060c052602060c0200180546001825401101561098957600080fd5b60018154018155506109cc565b6005600060043560e05260c052604060c02060c052602060c020018054600182540110156109c357600080fd5b60018154018155505b336004357f0b2f654b7e608ce51a82ce8157e79c350ed670605e8985266ad89fc85060e74960006000a3005b63b6b692066000511415610ae5573415610a1157600080fd5b6024356020518110610a2257600080fd5b506006543314610a3157600080fd5b60016001600060043560e05260c052604060c02060c052602060c020015460e05260c052604060c02060043560e05260c052604060c0205461014052600060016001600060043560e05260c052604060c02060c052602060c020015460e05260c052604060c02060043560e05260c052604060c02055600160243560e05260c052604060c02060043560e05260c052604060c0208054610140518254011015610ad957600080fd5b61014051815401815550005b635399ab4c6000511415610b3a573415610afe57600080fd5b6024356020518110610b0f57600080fd5b50600160243560e05260c052604060c02060043560e05260c052604060c0205460005260206000f350005b6371ed5d1a6000511415610c0d573415610b5357600080fd5b6001600060043560e05260c052604060c02060c052602060c020015415610b7957600080fd5b60013360e05260c052604060c02060043560e05260c052604060c0205461014052600060013360e05260c052604060c02060043560e05260c052604060c020556002543b610bc657600080fd5b6002543018610bd457600080fd5b6020610200604463a9059cbb610160523361018052610140516101a05261017c60006002545af1610c0457600080fd5b60005061020050005b5b60006000fd5b6100cb610cdf036100cb6000396100cb610cdf036000f3`
func DeployVoting(auth *bind.TransactOpts, backend bind.ContractBackend, market_token_addr common.Address) (common.Address, *types.Transaction, *Voting, error) {
	parsed, err := abi.JSON(strings.NewReader(VotingABI))
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(VotingBin), backend, market_token_addr)
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	return address, tx, &Voting{VotingCaller: VotingCaller{contract: contract}, VotingTransactor: VotingTransactor{contract: contract}, VotingFilterer: VotingFilterer{contract: contract}}, nil
}
type Voting struct {
	VotingCaller      
	VotingTransactor  
	VotingFilterer    
}
type VotingCaller struct {
	contract *bind.BoundContract  
}
type VotingTransactor struct {
	contract *bind.BoundContract  
}
type VotingFilterer struct {
	contract *bind.BoundContract  
}
type VotingSession struct {
	Contract     *Voting            
	CallOpts     bind.CallOpts      
	TransactOpts bind.TransactOpts  
}
type VotingCallerSession struct {
	Contract *VotingCaller  
	CallOpts bind.CallOpts  
}
type VotingTransactorSession struct {
	Contract     *VotingTransactor  
	TransactOpts bind.TransactOpts  
}
type VotingRaw struct {
	Contract *Voting  
}
type VotingCallerRaw struct {
	Contract *VotingCaller  
}
type VotingTransactorRaw struct {
	Contract *VotingTransactor  
}
func NewVoting(address common.Address, backend bind.ContractBackend) (*Voting, error) {
	contract, err := bindVoting(address, backend, backend, backend)
	if err != nil {
		return nil, err
	}
	return &Voting{VotingCaller: VotingCaller{contract: contract}, VotingTransactor: VotingTransactor{contract: contract}, VotingFilterer: VotingFilterer{contract: contract}}, nil
}
func NewVotingCaller(address common.Address, caller bind.ContractCaller) (*VotingCaller, error) {
	contract, err := bindVoting(address, caller, nil, nil)
	if err != nil {
		return nil, err
	}
	return &VotingCaller{contract: contract}, nil
}
func NewVotingTransactor(address common.Address, transactor bind.ContractTransactor) (*VotingTransactor, error) {
	contract, err := bindVoting(address, nil, transactor, nil)
	if err != nil {
		return nil, err
	}
	return &VotingTransactor{contract: contract}, nil
}
func NewVotingFilterer(address common.Address, filterer bind.ContractFilterer) (*VotingFilterer, error) {
	contract, err := bindVoting(address, nil, nil, filterer)
	if err != nil {
		return nil, err
	}
	return &VotingFilterer{contract: contract}, nil
}
func bindVoting(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
	parsed, err := abi.JSON(strings.NewReader(VotingABI))
	if err != nil {
		return nil, err
	}
	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}
func (_Voting *VotingRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _Voting.Contract.VotingCaller.contract.Call(opts, result, method, params...)
}
func (_Voting *VotingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _Voting.Contract.VotingTransactor.contract.Transfer(opts)
}
func (_Voting *VotingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _Voting.Contract.VotingTransactor.contract.Transact(opts, method, params...)
}
func (_Voting *VotingCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _Voting.Contract.contract.Call(opts, result, method, params...)
}
func (_Voting *VotingTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _Voting.Contract.contract.Transfer(opts)
}
func (_Voting *VotingTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _Voting.Contract.contract.Transact(opts, method, params...)
}
func (_Voting *VotingCaller) CandidateIs(opts *bind.CallOpts, hash [32]byte, kind *big.Int) (bool, error) {
	var (
		ret0 = new(bool)
	)
	out := ret0
	err := _Voting.contract.Call(opts, out, "candidateIs", hash, kind)
	return *ret0, err
}
func (_Voting *VotingSession) CandidateIs(hash [32]byte, kind *big.Int) (bool, error) {
	return _Voting.Contract.CandidateIs(&_Voting.CallOpts, hash, kind)
}
func (_Voting *VotingCallerSession) CandidateIs(hash [32]byte, kind *big.Int) (bool, error) {
	return _Voting.Contract.CandidateIs(&_Voting.CallOpts, hash, kind)
}
func (_Voting *VotingCaller) DidPass(opts *bind.CallOpts, hash [32]byte, plurality *big.Int) (bool, error) {
	var (
		ret0 = new(bool)
	)
	out := ret0
	err := _Voting.contract.Call(opts, out, "didPass", hash, plurality)
	return *ret0, err
}
func (_Voting *VotingSession) DidPass(hash [32]byte, plurality *big.Int) (bool, error) {
	return _Voting.Contract.DidPass(&_Voting.CallOpts, hash, plurality)
}
func (_Voting *VotingCallerSession) DidPass(hash [32]byte, plurality *big.Int) (bool, error) {
	return _Voting.Contract.DidPass(&_Voting.CallOpts, hash, plurality)
}
func (_Voting *VotingCaller) GetCandidate(opts *bind.CallOpts, hash [32]byte) (*big.Int, common.Address, *big.Int, *big.Int, *big.Int, *big.Int, error) {
	var (
		ret0 = new(*big.Int)
		ret1 = new(common.Address)
		ret2 = new(*big.Int)
		ret3 = new(*big.Int)
		ret4 = new(*big.Int)
		ret5 = new(*big.Int)
	)
	out := &[]interface{}{
		ret0,
		ret1,
		ret2,
		ret3,
		ret4,
		ret5,
	}
	err := _Voting.contract.Call(opts, out, "getCandidate", hash)
	return *ret0, *ret1, *ret2, *ret3, *ret4, *ret5, err
}
func (_Voting *VotingSession) GetCandidate(hash [32]byte) (*big.Int, common.Address, *big.Int, *big.Int, *big.Int, *big.Int, error) {
	return _Voting.Contract.GetCandidate(&_Voting.CallOpts, hash)
}
func (_Voting *VotingCallerSession) GetCandidate(hash [32]byte) (*big.Int, common.Address, *big.Int, *big.Int, *big.Int, *big.Int, error) {
	return _Voting.Contract.GetCandidate(&_Voting.CallOpts, hash)
}
func (_Voting *VotingCaller) GetCandidateOwner(opts *bind.CallOpts, hash [32]byte) (common.Address, error) {
	var (
		ret0 = new(common.Address)
	)
	out := ret0
	err := _Voting.contract.Call(opts, out, "getCandidateOwner", hash)
	return *ret0, err
}
func (_Voting *VotingSession) GetCandidateOwner(hash [32]byte) (common.Address, error) {
	return _Voting.Contract.GetCandidateOwner(&_Voting.CallOpts, hash)
}
func (_Voting *VotingCallerSession) GetCandidateOwner(hash [32]byte) (common.Address, error) {
	return _Voting.Contract.GetCandidateOwner(&_Voting.CallOpts, hash)
}
func (_Voting *VotingCaller) GetPrivileged(opts *bind.CallOpts) (common.Address, common.Address, common.Address, error) {
	var (
		ret0 = new(common.Address)
		ret1 = new(common.Address)
		ret2 = new(common.Address)
	)
	out := &[]interface{}{
		ret0,
		ret1,
		ret2,
	}
	err := _Voting.contract.Call(opts, out, "getPrivileged")
	return *ret0, *ret1, *ret2, err
}
func (_Voting *VotingSession) GetPrivileged() (common.Address, common.Address, common.Address, error) {
	return _Voting.Contract.GetPrivileged(&_Voting.CallOpts)
}
func (_Voting *VotingCallerSession) GetPrivileged() (common.Address, common.Address, common.Address, error) {
	return _Voting.Contract.GetPrivileged(&_Voting.CallOpts)
}
func (_Voting *VotingCaller) GetStake(opts *bind.CallOpts, hash [32]byte, addr common.Address) (*big.Int, error) {
	var (
		ret0 = new(*big.Int)
	)
	out := ret0
	err := _Voting.contract.Call(opts, out, "getStake", hash, addr)
	return *ret0, err
}
func (_Voting *VotingSession) GetStake(hash [32]byte, addr common.Address) (*big.Int, error) {
	return _Voting.Contract.GetStake(&_Voting.CallOpts, hash, addr)
}
func (_Voting *VotingCallerSession) GetStake(hash [32]byte, addr common.Address) (*big.Int, error) {
	return _Voting.Contract.GetStake(&_Voting.CallOpts, hash, addr)
}
func (_Voting *VotingCaller) HasPrivilege(opts *bind.CallOpts, sender common.Address) (bool, error) {
	var (
		ret0 = new(bool)
	)
	out := ret0
	err := _Voting.contract.Call(opts, out, "hasPrivilege", sender)
	return *ret0, err
}
func (_Voting *VotingSession) HasPrivilege(sender common.Address) (bool, error) {
	return _Voting.Contract.HasPrivilege(&_Voting.CallOpts, sender)
}
func (_Voting *VotingCallerSession) HasPrivilege(sender common.Address) (bool, error) {
	return _Voting.Contract.HasPrivilege(&_Voting.CallOpts, sender)
}
func (_Voting *VotingCaller) IsCandidate(opts *bind.CallOpts, hash [32]byte) (bool, error) {
	var (
		ret0 = new(bool)
	)
	out := ret0
	err := _Voting.contract.Call(opts, out, "isCandidate", hash)
	return *ret0, err
}
func (_Voting *VotingSession) IsCandidate(hash [32]byte) (bool, error) {
	return _Voting.Contract.IsCandidate(&_Voting.CallOpts, hash)
}
func (_Voting *VotingCallerSession) IsCandidate(hash [32]byte) (bool, error) {
	return _Voting.Contract.IsCandidate(&_Voting.CallOpts, hash)
}
func (_Voting *VotingCaller) PollClosed(opts *bind.CallOpts, hash [32]byte) (bool, error) {
	var (
		ret0 = new(bool)
	)
	out := ret0
	err := _Voting.contract.Call(opts, out, "pollClosed", hash)
	return *ret0, err
}
func (_Voting *VotingSession) PollClosed(hash [32]byte) (bool, error) {
	return _Voting.Contract.PollClosed(&_Voting.CallOpts, hash)
}
func (_Voting *VotingCallerSession) PollClosed(hash [32]byte) (bool, error) {
	return _Voting.Contract.PollClosed(&_Voting.CallOpts, hash)
}
func (_Voting *VotingTransactor) AddCandidate(opts *bind.TransactOpts, hash [32]byte, kind *big.Int, owner common.Address, stake *big.Int, vote_by *big.Int) (*types.Transaction, error) {
	return _Voting.contract.Transact(opts, "addCandidate", hash, kind, owner, stake, vote_by)
}
func (_Voting *VotingSession) AddCandidate(hash [32]byte, kind *big.Int, owner common.Address, stake *big.Int, vote_by *big.Int) (*types.Transaction, error) {
	return _Voting.Contract.AddCandidate(&_Voting.TransactOpts, hash, kind, owner, stake, vote_by)
}
func (_Voting *VotingTransactorSession) AddCandidate(hash [32]byte, kind *big.Int, owner common.Address, stake *big.Int, vote_by *big.Int) (*types.Transaction, error) {
	return _Voting.Contract.AddCandidate(&_Voting.TransactOpts, hash, kind, owner, stake, vote_by)
}
func (_Voting *VotingTransactor) RemoveCandidate(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) {
	return _Voting.contract.Transact(opts, "removeCandidate", hash)
}
func (_Voting *VotingSession) RemoveCandidate(hash [32]byte) (*types.Transaction, error) {
	return _Voting.Contract.RemoveCandidate(&_Voting.TransactOpts, hash)
}
func (_Voting *VotingTransactorSession) RemoveCandidate(hash [32]byte) (*types.Transaction, error) {
	return _Voting.Contract.RemoveCandidate(&_Voting.TransactOpts, hash)
}
func (_Voting *VotingTransactor) SetPrivileged(opts *bind.TransactOpts, parameterizer common.Address, datatrust common.Address, listing common.Address) (*types.Transaction, error) {
	return _Voting.contract.Transact(opts, "setPrivileged", parameterizer, datatrust, listing)
}
func (_Voting *VotingSession) SetPrivileged(parameterizer common.Address, datatrust common.Address, listing common.Address) (*types.Transaction, error) {
	return _Voting.Contract.SetPrivileged(&_Voting.TransactOpts, parameterizer, datatrust, listing)
}
func (_Voting *VotingTransactorSession) SetPrivileged(parameterizer common.Address, datatrust common.Address, listing common.Address) (*types.Transaction, error) {
	return _Voting.Contract.SetPrivileged(&_Voting.TransactOpts, parameterizer, datatrust, listing)
}
func (_Voting *VotingTransactor) TransferStake(opts *bind.TransactOpts, hash [32]byte, addr common.Address) (*types.Transaction, error) {
	return _Voting.contract.Transact(opts, "transferStake", hash, addr)
}
func (_Voting *VotingSession) TransferStake(hash [32]byte, addr common.Address) (*types.Transaction, error) {
	return _Voting.Contract.TransferStake(&_Voting.TransactOpts, hash, addr)
}
func (_Voting *VotingTransactorSession) TransferStake(hash [32]byte, addr common.Address) (*types.Transaction, error) {
	return _Voting.Contract.TransferStake(&_Voting.TransactOpts, hash, addr)
}
func (_Voting *VotingTransactor) Unstake(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) {
	return _Voting.contract.Transact(opts, "unstake", hash)
}
func (_Voting *VotingSession) Unstake(hash [32]byte) (*types.Transaction, error) {
	return _Voting.Contract.Unstake(&_Voting.TransactOpts, hash)
}
func (_Voting *VotingTransactorSession) Unstake(hash [32]byte) (*types.Transaction, error) {
	return _Voting.Contract.Unstake(&_Voting.TransactOpts, hash)
}
func (_Voting *VotingTransactor) Vote(opts *bind.TransactOpts, hash [32]byte, option *big.Int) (*types.Transaction, error) {
	return _Voting.contract.Transact(opts, "vote", hash, option)
}
func (_Voting *VotingSession) Vote(hash [32]byte, option *big.Int) (*types.Transaction, error) {
	return _Voting.Contract.Vote(&_Voting.TransactOpts, hash, option)
}
func (_Voting *VotingTransactorSession) Vote(hash [32]byte, option *big.Int) (*types.Transaction, error) {
	return _Voting.Contract.Vote(&_Voting.TransactOpts, hash, option)
}
type VotingCandidateAddedIterator struct {
	Event *VotingCandidateAdded  
	contract *bind.BoundContract  
	event    string               
	logs chan types.Log         
	sub  ethereum.Subscription  
	done bool                   
	fail error                  
}
func (it *VotingCandidateAddedIterator) Next() bool {
	if it.fail != nil {
		return false
	}
	if it.done {
		select {
		case log := <-it.logs:
			it.Event = new(VotingCandidateAdded)
			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
				it.fail = err
				return false
			}
			it.Event.Raw = log
			return true
		default:
			return false
		}
	}
	select {
	case log := <-it.logs:
		it.Event = new(VotingCandidateAdded)
		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
			it.fail = err
			return false
		}
		it.Event.Raw = log
		return true
	case err := <-it.sub.Err():
		it.done = true
		it.fail = err
		return it.Next()
	}
}
func (it *VotingCandidateAddedIterator) Error() error {
	return it.fail
}
func (it *VotingCandidateAddedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}
type VotingCandidateAdded struct {
	Hash   [32]byte
	Kind   *big.Int
	Owner  common.Address
	VoteBy *big.Int
	Raw    types.Log  
}
func (_Voting *VotingFilterer) FilterCandidateAdded(opts *bind.FilterOpts, hash [][32]byte, kind []*big.Int, owner []common.Address) (*VotingCandidateAddedIterator, error) {
	var hashRule []interface{}
	for _, hashItem := range hash {
		hashRule = append(hashRule, hashItem)
	}
	var kindRule []interface{}
	for _, kindItem := range kind {
		kindRule = append(kindRule, kindItem)
	}
	var ownerRule []interface{}
	for _, ownerItem := range owner {
		ownerRule = append(ownerRule, ownerItem)
	}
	logs, sub, err := _Voting.contract.FilterLogs(opts, "CandidateAdded", hashRule, kindRule, ownerRule)
	if err != nil {
		return nil, err
	}
	return &VotingCandidateAddedIterator{contract: _Voting.contract, event: "CandidateAdded", logs: logs, sub: sub}, nil
}
func (_Voting *VotingFilterer) WatchCandidateAdded(opts *bind.WatchOpts, sink chan<- *VotingCandidateAdded, hash [][32]byte, kind []*big.Int, owner []common.Address) (event.Subscription, error) {
	var hashRule []interface{}
	for _, hashItem := range hash {
		hashRule = append(hashRule, hashItem)
	}
	var kindRule []interface{}
	for _, kindItem := range kind {
		kindRule = append(kindRule, kindItem)
	}
	var ownerRule []interface{}
	for _, ownerItem := range owner {
		ownerRule = append(ownerRule, ownerItem)
	}
	logs, sub, err := _Voting.contract.WatchLogs(opts, "CandidateAdded", hashRule, kindRule, ownerRule)
	if err != nil {
		return nil, err
	}
	return event.NewSubscription(func(quit <-chan struct{}) error {
		defer sub.Unsubscribe()
		for {
			select {
			case log := <-logs:
				event := new(VotingCandidateAdded)
				if err := _Voting.contract.UnpackLog(event, "CandidateAdded", log); err != nil {
					return err
				}
				event.Raw = log
				select {
				case sink <- event:
				case err := <-sub.Err():
					return err
				case <-quit:
					return nil
				}
			case err := <-sub.Err():
				return err
			case <-quit:
				return nil
			}
		}
	}), nil
}
type VotingCandidateRemovedIterator struct {
	Event *VotingCandidateRemoved  
	contract *bind.BoundContract  
	event    string               
	logs chan types.Log         
	sub  ethereum.Subscription  
	done bool                   
	fail error                  
}
func (it *VotingCandidateRemovedIterator) Next() bool {
	if it.fail != nil {
		return false
	}
	if it.done {
		select {
		case log := <-it.logs:
			it.Event = new(VotingCandidateRemoved)
			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
				it.fail = err
				return false
			}
			it.Event.Raw = log
			return true
		default:
			return false
		}
	}
	select {
	case log := <-it.logs:
		it.Event = new(VotingCandidateRemoved)
		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
			it.fail = err
			return false
		}
		it.Event.Raw = log
		return true
	case err := <-it.sub.Err():
		it.done = true
		it.fail = err
		return it.Next()
	}
}
func (it *VotingCandidateRemovedIterator) Error() error {
	return it.fail
}
func (it *VotingCandidateRemovedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}
type VotingCandidateRemoved struct {
	Hash [32]byte
	Raw  types.Log  
}
func (_Voting *VotingFilterer) FilterCandidateRemoved(opts *bind.FilterOpts, hash [][32]byte) (*VotingCandidateRemovedIterator, error) {
	var hashRule []interface{}
	for _, hashItem := range hash {
		hashRule = append(hashRule, hashItem)
	}
	logs, sub, err := _Voting.contract.FilterLogs(opts, "CandidateRemoved", hashRule)
	if err != nil {
		return nil, err
	}
	return &VotingCandidateRemovedIterator{contract: _Voting.contract, event: "CandidateRemoved", logs: logs, sub: sub}, nil
}
func (_Voting *VotingFilterer) WatchCandidateRemoved(opts *bind.WatchOpts, sink chan<- *VotingCandidateRemoved, hash [][32]byte) (event.Subscription, error) {
	var hashRule []interface{}
	for _, hashItem := range hash {
		hashRule = append(hashRule, hashItem)
	}
	logs, sub, err := _Voting.contract.WatchLogs(opts, "CandidateRemoved", hashRule)
	if err != nil {
		return nil, err
	}
	return event.NewSubscription(func(quit <-chan struct{}) error {
		defer sub.Unsubscribe()
		for {
			select {
			case log := <-logs:
				event := new(VotingCandidateRemoved)
				if err := _Voting.contract.UnpackLog(event, "CandidateRemoved", log); err != nil {
					return err
				}
				event.Raw = log
				select {
				case sink <- event:
				case err := <-sub.Err():
					return err
				case <-quit:
					return nil
				}
			case err := <-sub.Err():
				return err
			case <-quit:
				return nil
			}
		}
	}), nil
}
type VotingVotedIterator struct {
	Event *VotingVoted  
	contract *bind.BoundContract  
	event    string               
	logs chan types.Log         
	sub  ethereum.Subscription  
	done bool                   
	fail error                  
}