github.com/hyperion-hyn/go-ethereum@v2.4.0+incompatible/permission/bind/voter.go (about) 1 // Code generated - DO NOT EDIT. 2 // This file is a generated binding and any manual changes will be lost. 3 4 package permission 5 6 import ( 7 "math/big" 8 "strings" 9 10 ethereum "github.com/ethereum/go-ethereum" 11 "github.com/ethereum/go-ethereum/accounts/abi" 12 "github.com/ethereum/go-ethereum/accounts/abi/bind" 13 "github.com/ethereum/go-ethereum/common" 14 "github.com/ethereum/go-ethereum/core/types" 15 "github.com/ethereum/go-ethereum/event" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var ( 20 _ = big.NewInt 21 _ = strings.NewReader 22 _ = ethereum.NotFound 23 _ = abi.U256 24 _ = bind.Bind 25 _ = common.Big1 26 _ = types.BloomLookup 27 _ = event.NewSubscription 28 ) 29 30 // VoterManagerABI is the input ABI used to generate the binding from. 31 const VoterManagerABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"getPendingOpDetails\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_vAccount\",\"type\":\"address\"}],\"name\":\"addVoter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_vAccount\",\"type\":\"address\"}],\"name\":\"deleteVoter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_authOrg\",\"type\":\"string\"},{\"name\":\"_vAccount\",\"type\":\"address\"},{\"name\":\"_pendingOp\",\"type\":\"uint256\"}],\"name\":\"processVote\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_authOrg\",\"type\":\"string\"},{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_account\",\"type\":\"address\"},{\"name\":\"_pendingOp\",\"type\":\"uint256\"}],\"name\":\"addVotingItem\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_permUpgradable\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_vAccount\",\"type\":\"address\"}],\"name\":\"VoterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_vAccount\",\"type\":\"address\"}],\"name\":\"VoterDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"VotingItemAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"VoteProcessed\",\"type\":\"event\"}]" 32 33 // VoterManagerBin is the compiled bytecode used for deploying new contracts. 34 const VoterManagerBin = `6080604052600060035534801561001557600080fd5b506040516020806129498339810180604052602081101561003557600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506128b3806100966000396000f3fe608060405234801561001057600080fd5b5060043610610074576000357c010000000000000000000000000000000000000000000000000000000090048063014e6acc146100795780635607395b1461021157806359cbd6fe146102aa578063b021386414610343578063e98ac22d146103fe575b600080fd5b6100f06004803603602081101561008f57600080fd5b81019080803590602001906401000000008111156100ac57600080fd5b8201836020820111156100be57600080fd5b803590602001918460018302840111640100000000831117156100e057600080fd5b909192939192939050505061054b565b6040518080602001806020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838103835287818151815260200191508051906020019080838360005b8381101561016c578082015181840152602081019050610151565b50505050905090810190601f1680156101995780820380516001836020036101000a031916815260200191505b50838103825286818151815260200191508051906020019080838360005b838110156101d25780820151818401526020810190506101b7565b50505050905090810190601f1680156101ff5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b6102a86004803603604081101561022757600080fd5b810190808035906020019064010000000081111561024457600080fd5b82018360208201111561025657600080fd5b8035906020019184600183028401116401000000008311171561027857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108fa565b005b610341600480360360408110156102c057600080fd5b81019080803590602001906401000000008111156102dd57600080fd5b8201836020820111156102ef57600080fd5b8035906020019184600183028401116401000000008311171561031157600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611336565b005b6103e46004803603606081101561035957600080fd5b810190808035906020019064010000000081111561037657600080fd5b82018360208201111561038857600080fd5b803590602001918460018302840111640100000000831117156103aa57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611728565b604051808215151515815260200191505060405180910390f35b610549600480360360a081101561041457600080fd5b810190808035906020019064010000000081111561043157600080fd5b82018360208201111561044357600080fd5b8035906020019184600183028401116401000000008311171561046557600080fd5b90919293919293908035906020019064010000000081111561048657600080fd5b82018360208201111561049857600080fd5b803590602001918460018302840111640100000000831117156104ba57600080fd5b9091929391929390803590602001906401000000008111156104db57600080fd5b8201836020820111156104ed57600080fd5b8035906020019184600183028401116401000000008311171561050f57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611e0a565b005b6060806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e32cf906040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156105d457600080fd5b505afa1580156105e8573d6000803e3d6000fd5b505050506040513d60208110156105fe57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b600061070087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612353565b905060018181548110151561071157fe5b90600052602060002090600b020160040160000160018281548110151561073457fe5b90600052602060002090600b020160040160010160018381548110151561075757fe5b90600052602060002090600b020160040160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660018481548110151561079b57fe5b90600052602060002090600b020160040160030154838054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108455780601f1061081a57610100808354040283529160200191610845565b820191906000526020600020905b81548152906001019060200180831161082857829003601f168201915b50505050509350828054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108e15780601f106108b6576101008083540402835291602001916108e1565b820191906000526020600020905b8154815290600101906020018083116108c457829003601f168201915b5050505050925094509450945094505092959194509250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e32cf906040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561097d57600080fd5b505afa158015610991573d6000803e3d6000fd5b505050506040513d60208110156109a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b600060026000858560405160200180806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509350505050604051602081830303815290604052805190602001208152602001908152602001600020541415610e815760036000815480929190600101919050555060035460026000858560405160200180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405160208183030381529060405280519060200120815260200190815260200160002081905550600060018054809190600101610b5c919061258c565b90508383600183815481101515610b6f57fe5b90600052602060002090600b02016000019190610b8d9291906125be565b5060018082815481101515610b9e57fe5b90600052602060002090600b02016001018190555060018082815481101515610bc357fe5b90600052602060002090600b0201600201819055506000600182815481101515610be957fe5b90600052602060002090600b0201600301819055506020604051908101604052806000815250600182815481101515610c1e57fe5b90600052602060002090600b02016004016000019080519060200190610c4592919061263e565b506020604051908101604052806000815250600182815481101515610c6657fe5b90600052602060002090600b02016004016001019080519060200190610c8d92919061263e565b506000600182815481101515610c9f57fe5b90600052602060002090600b020160040160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600182815481101515610d0257fe5b90600052602060002090600b020160040160030181905550600181815481101515610d2957fe5b90600052602060002090600b020160010154600182815481101515610d4a57fe5b90600052602060002090600b020160090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600181815481101515610dab57fe5b90600052602060002090600b020160080160408051908101604052808473ffffffffffffffffffffffffffffffffffffffff1681526020016001151581525090806001815401808255809150509060018203906000526020600020016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff0219169083151502179055505050505061129a565b6000610ed084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612353565b90506000600182815481101515610ee357fe5b90600052602060002090600b020160090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156110fe57600181815481101515610f4757fe5b90600052602060002090600b020160010160008154809291906001019190505550600181815481101515610f7757fe5b90600052602060002090600b020160010154600182815481101515610f9857fe5b90600052602060002090600b020160090160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600181815481101515610ff957fe5b90600052602060002090600b020160080160408051908101604052808473ffffffffffffffffffffffffffffffffffffffff1681526020016001151581525090806001815401808255809150509060018203906000526020600020016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff0219169083151502179055505050506001818154811015156110d857fe5b90600052602060002090600b020160020160008154809291906001019190505550611298565b600061114e85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050846123fe565b90506001151560018381548110151561116357fe5b90600052602060002090600b02016008018281548110151561118157fe5b9060005260206000200160000160149054906101000a900460ff16151514151515611214576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f616c7265616479206120766f746572000000000000000000000000000000000081525060200191505060405180910390fd5b6001808381548110151561122457fe5b90600052602060002090600b02016008018281548110151561124257fe5b9060005260206000200160000160146101000a81548160ff02191690831515021790555060018281548110151561127557fe5b90600052602060002090600b020160020160008154809291906001019190505550505b505b7f424f3ad05c61ea35cad66f22b70b1fad7250d8229921238078c401db36d3457483838360405180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281038252858582818152602001925080828437600081840152601f19601f82011690508083019250505094505050505060405180910390a1505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e32cf906040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156113b957600080fd5b505afa1580156113cd573d6000803e3d6000fd5b505050506040513d60208110156113e357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081600115156114ea8383612475565b1515141515611561576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f6d757374206265206120766f746572000000000000000000000000000000000081525060200191505060405180910390fd5b60006115b086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612353565b9050600061160287878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050866123fe565b905060018281548110151561161357fe5b90600052602060002090600b02016002016000815480929190600190039190505550600060018381548110151561164657fe5b90600052602060002090600b02016008018281548110151561166457fe5b9060005260206000200160000160146101000a81548160ff0219169083151502179055507f654cd85d9b2abaf3affef0a047625d088e6e4d0448935c9b5016b5f5aa0ca3b687878760405180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281038252858582818152602001925080828437600081840152601f19601f82011690508083019250505094505050505060405180910390a150505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e32cf906040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156117ad57600080fd5b505afa1580156117c1573d6000803e3d6000fd5b505050506040513d60208110156117d757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561188a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505083600115156118de8383612475565b1515141515611955576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f6d757374206265206120766f746572000000000000000000000000000000000081525060200191505060405180910390fd5b600115156119a788888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505086612554565b1515141515611a1e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6e6f7468696e6720746f20617070726f7665000000000000000000000000000081525060200191505060405180910390fd5b6000611a6d88888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612353565b905060011515600182815481101515611a8257fe5b90600052602060002090600b0201600a01600083815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514151515611b67576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f63616e6e6f7420646f75626c6520766f7465000000000000000000000000000081525060200191505060405180910390fd5b600181815481101515611b7657fe5b90600052602060002090600b02016003016000815480929190600101919050555060018082815481101515611ba757fe5b90600052602060002090600b0201600a01600083815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f87999b54e45aa02834a1265e356d7bcdceb72b8cbb4396ebaeba32a103b43508888860405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a16002600182815481101515611c9157fe5b90600052602060002090600b020160020154811515611cac57fe5b04600182815481101515611cbc57fe5b90600052602060002090600b0201600301541115611dfa576020604051908101604052806000815250600182815481101515611cf457fe5b90600052602060002090600b02016004016000019080519060200190611d1b92919061263e565b506020604051908101604052806000815250600182815481101515611d3c57fe5b90600052602060002090600b02016004016001019080519060200190611d6392919061263e565b506000600182815481101515611d7557fe5b90600052602060002090600b020160040160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600182815481101515611dd857fe5b90600052602060002090600b0201600401600301819055506001935050611e00565b60009350505b5050949350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e32cf906040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611e8d57600080fd5b505afa158015611ea1573d6000803e3d6000fd5b505050506040513d6020811015611eb757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b611fb988888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506000612554565b1515612010576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806128546034913960400191505060405180910390fd5b600061205f89898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612353565b9050868660018381548110151561207257fe5b90600052602060002090600b020160040160000191906120939291906125be565b5084846001838154811015156120a557fe5b90600052602060002090600b020160040160010191906120c69291906125be565b50826001828154811015156120d757fe5b90600052602060002090600b020160040160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160018281548110151561213957fe5b90600052602060002090600b02016004016003018190555060008090505b60018281548110151561216657fe5b90600052602060002090600b0201600801805490508110156122be5760018281548110151561219157fe5b90600052602060002090600b0201600801818154811015156121af57fe5b9060005260206000200160000160149054906101000a900460ff16156122b15760006001838154811015156121e057fe5b90600052602060002090600b0201600a016000848152602001908152602001600020600060018581548110151561221357fe5b90600052602060002090600b02016008018481548110151561223157fe5b9060005260206000200160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8080600101915050612157565b5060006001828154811015156122d057fe5b90600052602060002090600b0201600301819055507f5bfaebb5931145594f63236d2a59314c4dc6035b65d0ca4cee9c7298e2f06ca3898960405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a1505050505050505050565b6000600160026000846040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561239f578082015181840152602081019050612384565b50505050905090810190601f1680156123cc5780820380516001836020036101000a031916815260200191505b509250505060405160208183030381529060405280519060200120815260200190815260200160002054039050919050565b60008061240a84612353565b90506001808281548110151561241c57fe5b90600052602060002090600b020160090160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540391505092915050565b60008061248184612353565b9050600060018281548110151561249457fe5b90600052602060002090600b020160090160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156124f357600091505061254e565b60006124ff85856123fe565b905060018281548110151561251057fe5b90600052602060002090600b02016008018181548110151561252e57fe5b9060005260206000200160000160149054906101000a900460ff16925050505b92915050565b600081600161256285612353565b81548110151561256e57fe5b90600052602060002090600b02016004016003015414905092915050565b8154818355818111156125b957600b0281600b0283600052602060002091820191016125b891906126be565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106125ff57803560ff191683800117855561262d565b8280016001018555821561262d579182015b8281111561262c578235825591602001919060010190612611565b5b50905061263a919061276b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061267f57805160ff19168380011785556126ad565b828001600101855582156126ad579182015b828111156126ac578251825591602001919060010190612691565b5b5090506126ba919061276b565b5090565b61276891905b8082111561276457600080820160006126dd9190612790565b600182016000905560028201600090556003820160009055600482016000808201600061270a9190612790565b60018201600061271a9190612790565b6002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160009055505060088201600061275b91906127d8565b50600b016126c4565b5090565b90565b61278d91905b80821115612789576000816000905550600101612771565b5090565b90565b50805460018160011615610100020316600290046000825580601f106127b657506127d5565b601f0160209004906000526020600020908101906127d4919061276b565b5b50565b50805460008255906000526020600020908101906127f691906127f9565b50565b61285091905b8082111561284c57600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a81549060ff0219169055506001016127ff565b5090565b9056fe6974656d732070656e64696e6720666f7220617070726f76616c2e206e6577206974656d2063616e6e6f74206265206164646564a165627a7a723058209bcb200dffe1c7dbbf4661d7181f768f85d4dda30f18c49d34e48846e15a15430029` 35 36 // DeployVoterManager deploys a new Ethereum contract, binding an instance of VoterManager to it. 37 func DeployVoterManager(auth *bind.TransactOpts, backend bind.ContractBackend, _permUpgradable common.Address) (common.Address, *types.Transaction, *VoterManager, error) { 38 parsed, err := abi.JSON(strings.NewReader(VoterManagerABI)) 39 if err != nil { 40 return common.Address{}, nil, nil, err 41 } 42 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(VoterManagerBin), backend, _permUpgradable) 43 if err != nil { 44 return common.Address{}, nil, nil, err 45 } 46 return address, tx, &VoterManager{VoterManagerCaller: VoterManagerCaller{contract: contract}, VoterManagerTransactor: VoterManagerTransactor{contract: contract}, VoterManagerFilterer: VoterManagerFilterer{contract: contract}}, nil 47 } 48 49 // VoterManager is an auto generated Go binding around an Ethereum contract. 50 type VoterManager struct { 51 VoterManagerCaller // Read-only binding to the contract 52 VoterManagerTransactor // Write-only binding to the contract 53 VoterManagerFilterer // Log filterer for contract events 54 } 55 56 // VoterManagerCaller is an auto generated read-only Go binding around an Ethereum contract. 57 type VoterManagerCaller struct { 58 contract *bind.BoundContract // Generic contract wrapper for the low level calls 59 } 60 61 // VoterManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. 62 type VoterManagerTransactor struct { 63 contract *bind.BoundContract // Generic contract wrapper for the low level calls 64 } 65 66 // VoterManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 67 type VoterManagerFilterer struct { 68 contract *bind.BoundContract // Generic contract wrapper for the low level calls 69 } 70 71 // VoterManagerSession is an auto generated Go binding around an Ethereum contract, 72 // with pre-set call and transact options. 73 type VoterManagerSession struct { 74 Contract *VoterManager // Generic contract binding to set the session for 75 CallOpts bind.CallOpts // Call options to use throughout this session 76 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 77 } 78 79 // VoterManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, 80 // with pre-set call options. 81 type VoterManagerCallerSession struct { 82 Contract *VoterManagerCaller // Generic contract caller binding to set the session for 83 CallOpts bind.CallOpts // Call options to use throughout this session 84 } 85 86 // VoterManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 87 // with pre-set transact options. 88 type VoterManagerTransactorSession struct { 89 Contract *VoterManagerTransactor // Generic contract transactor binding to set the session for 90 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 91 } 92 93 // VoterManagerRaw is an auto generated low-level Go binding around an Ethereum contract. 94 type VoterManagerRaw struct { 95 Contract *VoterManager // Generic contract binding to access the raw methods on 96 } 97 98 // VoterManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 99 type VoterManagerCallerRaw struct { 100 Contract *VoterManagerCaller // Generic read-only contract binding to access the raw methods on 101 } 102 103 // VoterManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 104 type VoterManagerTransactorRaw struct { 105 Contract *VoterManagerTransactor // Generic write-only contract binding to access the raw methods on 106 } 107 108 // NewVoterManager creates a new instance of VoterManager, bound to a specific deployed contract. 109 func NewVoterManager(address common.Address, backend bind.ContractBackend) (*VoterManager, error) { 110 contract, err := bindVoterManager(address, backend, backend, backend) 111 if err != nil { 112 return nil, err 113 } 114 return &VoterManager{VoterManagerCaller: VoterManagerCaller{contract: contract}, VoterManagerTransactor: VoterManagerTransactor{contract: contract}, VoterManagerFilterer: VoterManagerFilterer{contract: contract}}, nil 115 } 116 117 // NewVoterManagerCaller creates a new read-only instance of VoterManager, bound to a specific deployed contract. 118 func NewVoterManagerCaller(address common.Address, caller bind.ContractCaller) (*VoterManagerCaller, error) { 119 contract, err := bindVoterManager(address, caller, nil, nil) 120 if err != nil { 121 return nil, err 122 } 123 return &VoterManagerCaller{contract: contract}, nil 124 } 125 126 // NewVoterManagerTransactor creates a new write-only instance of VoterManager, bound to a specific deployed contract. 127 func NewVoterManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*VoterManagerTransactor, error) { 128 contract, err := bindVoterManager(address, nil, transactor, nil) 129 if err != nil { 130 return nil, err 131 } 132 return &VoterManagerTransactor{contract: contract}, nil 133 } 134 135 // NewVoterManagerFilterer creates a new log filterer instance of VoterManager, bound to a specific deployed contract. 136 func NewVoterManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*VoterManagerFilterer, error) { 137 contract, err := bindVoterManager(address, nil, nil, filterer) 138 if err != nil { 139 return nil, err 140 } 141 return &VoterManagerFilterer{contract: contract}, nil 142 } 143 144 // bindVoterManager binds a generic wrapper to an already deployed contract. 145 func bindVoterManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 146 parsed, err := abi.JSON(strings.NewReader(VoterManagerABI)) 147 if err != nil { 148 return nil, err 149 } 150 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 151 } 152 153 // Call invokes the (constant) contract method with params as input values and 154 // sets the output to result. The result type might be a single field for simple 155 // returns, a slice of interfaces for anonymous returns and a struct for named 156 // returns. 157 func (_VoterManager *VoterManagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 158 return _VoterManager.Contract.VoterManagerCaller.contract.Call(opts, result, method, params...) 159 } 160 161 // Transfer initiates a plain transaction to move funds to the contract, calling 162 // its default method if one is available. 163 func (_VoterManager *VoterManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 164 return _VoterManager.Contract.VoterManagerTransactor.contract.Transfer(opts) 165 } 166 167 // Transact invokes the (paid) contract method with params as input values. 168 func (_VoterManager *VoterManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 169 return _VoterManager.Contract.VoterManagerTransactor.contract.Transact(opts, method, params...) 170 } 171 172 // Call invokes the (constant) contract method with params as input values and 173 // sets the output to result. The result type might be a single field for simple 174 // returns, a slice of interfaces for anonymous returns and a struct for named 175 // returns. 176 func (_VoterManager *VoterManagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 177 return _VoterManager.Contract.contract.Call(opts, result, method, params...) 178 } 179 180 // Transfer initiates a plain transaction to move funds to the contract, calling 181 // its default method if one is available. 182 func (_VoterManager *VoterManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 183 return _VoterManager.Contract.contract.Transfer(opts) 184 } 185 186 // Transact invokes the (paid) contract method with params as input values. 187 func (_VoterManager *VoterManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 188 return _VoterManager.Contract.contract.Transact(opts, method, params...) 189 } 190 191 // GetPendingOpDetails is a free data retrieval call binding the contract method 0x014e6acc. 192 // 193 // Solidity: function getPendingOpDetails(_orgId string) constant returns(string, string, address, uint256) 194 func (_VoterManager *VoterManagerCaller) GetPendingOpDetails(opts *bind.CallOpts, _orgId string) (string, string, common.Address, *big.Int, error) { 195 var ( 196 ret0 = new(string) 197 ret1 = new(string) 198 ret2 = new(common.Address) 199 ret3 = new(*big.Int) 200 ) 201 out := &[]interface{}{ 202 ret0, 203 ret1, 204 ret2, 205 ret3, 206 } 207 err := _VoterManager.contract.Call(opts, out, "getPendingOpDetails", _orgId) 208 return *ret0, *ret1, *ret2, *ret3, err 209 } 210 211 // GetPendingOpDetails is a free data retrieval call binding the contract method 0x014e6acc. 212 // 213 // Solidity: function getPendingOpDetails(_orgId string) constant returns(string, string, address, uint256) 214 func (_VoterManager *VoterManagerSession) GetPendingOpDetails(_orgId string) (string, string, common.Address, *big.Int, error) { 215 return _VoterManager.Contract.GetPendingOpDetails(&_VoterManager.CallOpts, _orgId) 216 } 217 218 // GetPendingOpDetails is a free data retrieval call binding the contract method 0x014e6acc. 219 // 220 // Solidity: function getPendingOpDetails(_orgId string) constant returns(string, string, address, uint256) 221 func (_VoterManager *VoterManagerCallerSession) GetPendingOpDetails(_orgId string) (string, string, common.Address, *big.Int, error) { 222 return _VoterManager.Contract.GetPendingOpDetails(&_VoterManager.CallOpts, _orgId) 223 } 224 225 // AddVoter is a paid mutator transaction binding the contract method 0x5607395b. 226 // 227 // Solidity: function addVoter(_orgId string, _vAccount address) returns() 228 func (_VoterManager *VoterManagerTransactor) AddVoter(opts *bind.TransactOpts, _orgId string, _vAccount common.Address) (*types.Transaction, error) { 229 return _VoterManager.contract.Transact(opts, "addVoter", _orgId, _vAccount) 230 } 231 232 // AddVoter is a paid mutator transaction binding the contract method 0x5607395b. 233 // 234 // Solidity: function addVoter(_orgId string, _vAccount address) returns() 235 func (_VoterManager *VoterManagerSession) AddVoter(_orgId string, _vAccount common.Address) (*types.Transaction, error) { 236 return _VoterManager.Contract.AddVoter(&_VoterManager.TransactOpts, _orgId, _vAccount) 237 } 238 239 // AddVoter is a paid mutator transaction binding the contract method 0x5607395b. 240 // 241 // Solidity: function addVoter(_orgId string, _vAccount address) returns() 242 func (_VoterManager *VoterManagerTransactorSession) AddVoter(_orgId string, _vAccount common.Address) (*types.Transaction, error) { 243 return _VoterManager.Contract.AddVoter(&_VoterManager.TransactOpts, _orgId, _vAccount) 244 } 245 246 // AddVotingItem is a paid mutator transaction binding the contract method 0xe98ac22d. 247 // 248 // Solidity: function addVotingItem(_authOrg string, _orgId string, _enodeId string, _account address, _pendingOp uint256) returns() 249 func (_VoterManager *VoterManagerTransactor) AddVotingItem(opts *bind.TransactOpts, _authOrg string, _orgId string, _enodeId string, _account common.Address, _pendingOp *big.Int) (*types.Transaction, error) { 250 return _VoterManager.contract.Transact(opts, "addVotingItem", _authOrg, _orgId, _enodeId, _account, _pendingOp) 251 } 252 253 // AddVotingItem is a paid mutator transaction binding the contract method 0xe98ac22d. 254 // 255 // Solidity: function addVotingItem(_authOrg string, _orgId string, _enodeId string, _account address, _pendingOp uint256) returns() 256 func (_VoterManager *VoterManagerSession) AddVotingItem(_authOrg string, _orgId string, _enodeId string, _account common.Address, _pendingOp *big.Int) (*types.Transaction, error) { 257 return _VoterManager.Contract.AddVotingItem(&_VoterManager.TransactOpts, _authOrg, _orgId, _enodeId, _account, _pendingOp) 258 } 259 260 // AddVotingItem is a paid mutator transaction binding the contract method 0xe98ac22d. 261 // 262 // Solidity: function addVotingItem(_authOrg string, _orgId string, _enodeId string, _account address, _pendingOp uint256) returns() 263 func (_VoterManager *VoterManagerTransactorSession) AddVotingItem(_authOrg string, _orgId string, _enodeId string, _account common.Address, _pendingOp *big.Int) (*types.Transaction, error) { 264 return _VoterManager.Contract.AddVotingItem(&_VoterManager.TransactOpts, _authOrg, _orgId, _enodeId, _account, _pendingOp) 265 } 266 267 // DeleteVoter is a paid mutator transaction binding the contract method 0x59cbd6fe. 268 // 269 // Solidity: function deleteVoter(_orgId string, _vAccount address) returns() 270 func (_VoterManager *VoterManagerTransactor) DeleteVoter(opts *bind.TransactOpts, _orgId string, _vAccount common.Address) (*types.Transaction, error) { 271 return _VoterManager.contract.Transact(opts, "deleteVoter", _orgId, _vAccount) 272 } 273 274 // DeleteVoter is a paid mutator transaction binding the contract method 0x59cbd6fe. 275 // 276 // Solidity: function deleteVoter(_orgId string, _vAccount address) returns() 277 func (_VoterManager *VoterManagerSession) DeleteVoter(_orgId string, _vAccount common.Address) (*types.Transaction, error) { 278 return _VoterManager.Contract.DeleteVoter(&_VoterManager.TransactOpts, _orgId, _vAccount) 279 } 280 281 // DeleteVoter is a paid mutator transaction binding the contract method 0x59cbd6fe. 282 // 283 // Solidity: function deleteVoter(_orgId string, _vAccount address) returns() 284 func (_VoterManager *VoterManagerTransactorSession) DeleteVoter(_orgId string, _vAccount common.Address) (*types.Transaction, error) { 285 return _VoterManager.Contract.DeleteVoter(&_VoterManager.TransactOpts, _orgId, _vAccount) 286 } 287 288 // ProcessVote is a paid mutator transaction binding the contract method 0xb0213864. 289 // 290 // Solidity: function processVote(_authOrg string, _vAccount address, _pendingOp uint256) returns(bool) 291 func (_VoterManager *VoterManagerTransactor) ProcessVote(opts *bind.TransactOpts, _authOrg string, _vAccount common.Address, _pendingOp *big.Int) (*types.Transaction, error) { 292 return _VoterManager.contract.Transact(opts, "processVote", _authOrg, _vAccount, _pendingOp) 293 } 294 295 // ProcessVote is a paid mutator transaction binding the contract method 0xb0213864. 296 // 297 // Solidity: function processVote(_authOrg string, _vAccount address, _pendingOp uint256) returns(bool) 298 func (_VoterManager *VoterManagerSession) ProcessVote(_authOrg string, _vAccount common.Address, _pendingOp *big.Int) (*types.Transaction, error) { 299 return _VoterManager.Contract.ProcessVote(&_VoterManager.TransactOpts, _authOrg, _vAccount, _pendingOp) 300 } 301 302 // ProcessVote is a paid mutator transaction binding the contract method 0xb0213864. 303 // 304 // Solidity: function processVote(_authOrg string, _vAccount address, _pendingOp uint256) returns(bool) 305 func (_VoterManager *VoterManagerTransactorSession) ProcessVote(_authOrg string, _vAccount common.Address, _pendingOp *big.Int) (*types.Transaction, error) { 306 return _VoterManager.Contract.ProcessVote(&_VoterManager.TransactOpts, _authOrg, _vAccount, _pendingOp) 307 } 308 309 // VoterManagerVoteProcessedIterator is returned from FilterVoteProcessed and is used to iterate over the raw logs and unpacked data for VoteProcessed events raised by the VoterManager contract. 310 type VoterManagerVoteProcessedIterator struct { 311 Event *VoterManagerVoteProcessed // Event containing the contract specifics and raw log 312 313 contract *bind.BoundContract // Generic contract to use for unpacking event data 314 event string // Event name to use for unpacking event data 315 316 logs chan types.Log // Log channel receiving the found contract events 317 sub ethereum.Subscription // Subscription for errors, completion and termination 318 done bool // Whether the subscription completed delivering logs 319 fail error // Occurred error to stop iteration 320 } 321 322 // Next advances the iterator to the subsequent event, returning whether there 323 // are any more events found. In case of a retrieval or parsing error, false is 324 // returned and Error() can be queried for the exact failure. 325 func (it *VoterManagerVoteProcessedIterator) Next() bool { 326 // If the iterator failed, stop iterating 327 if it.fail != nil { 328 return false 329 } 330 // If the iterator completed, deliver directly whatever's available 331 if it.done { 332 select { 333 case log := <-it.logs: 334 it.Event = new(VoterManagerVoteProcessed) 335 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 336 it.fail = err 337 return false 338 } 339 it.Event.Raw = log 340 return true 341 342 default: 343 return false 344 } 345 } 346 // Iterator still in progress, wait for either a data or an error event 347 select { 348 case log := <-it.logs: 349 it.Event = new(VoterManagerVoteProcessed) 350 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 351 it.fail = err 352 return false 353 } 354 it.Event.Raw = log 355 return true 356 357 case err := <-it.sub.Err(): 358 it.done = true 359 it.fail = err 360 return it.Next() 361 } 362 } 363 364 // Error returns any retrieval or parsing error occurred during filtering. 365 func (it *VoterManagerVoteProcessedIterator) Error() error { 366 return it.fail 367 } 368 369 // Close terminates the iteration process, releasing any pending underlying 370 // resources. 371 func (it *VoterManagerVoteProcessedIterator) Close() error { 372 it.sub.Unsubscribe() 373 return nil 374 } 375 376 // VoterManagerVoteProcessed represents a VoteProcessed event raised by the VoterManager contract. 377 type VoterManagerVoteProcessed struct { 378 OrgId string 379 Raw types.Log // Blockchain specific contextual infos 380 } 381 382 // FilterVoteProcessed is a free log retrieval operation binding the contract event 0x87999b54e45aa02834a1265e356d7bcdceb72b8cbb4396ebaeba32a103b43508. 383 // 384 // Solidity: e VoteProcessed(_orgId string) 385 func (_VoterManager *VoterManagerFilterer) FilterVoteProcessed(opts *bind.FilterOpts) (*VoterManagerVoteProcessedIterator, error) { 386 387 logs, sub, err := _VoterManager.contract.FilterLogs(opts, "VoteProcessed") 388 if err != nil { 389 return nil, err 390 } 391 return &VoterManagerVoteProcessedIterator{contract: _VoterManager.contract, event: "VoteProcessed", logs: logs, sub: sub}, nil 392 } 393 394 // WatchVoteProcessed is a free log subscription operation binding the contract event 0x87999b54e45aa02834a1265e356d7bcdceb72b8cbb4396ebaeba32a103b43508. 395 // 396 // Solidity: e VoteProcessed(_orgId string) 397 func (_VoterManager *VoterManagerFilterer) WatchVoteProcessed(opts *bind.WatchOpts, sink chan<- *VoterManagerVoteProcessed) (event.Subscription, error) { 398 399 logs, sub, err := _VoterManager.contract.WatchLogs(opts, "VoteProcessed") 400 if err != nil { 401 return nil, err 402 } 403 return event.NewSubscription(func(quit <-chan struct{}) error { 404 defer sub.Unsubscribe() 405 for { 406 select { 407 case log := <-logs: 408 // New log arrived, parse the event and forward to the user 409 event := new(VoterManagerVoteProcessed) 410 if err := _VoterManager.contract.UnpackLog(event, "VoteProcessed", log); err != nil { 411 return err 412 } 413 event.Raw = log 414 415 select { 416 case sink <- event: 417 case err := <-sub.Err(): 418 return err 419 case <-quit: 420 return nil 421 } 422 case err := <-sub.Err(): 423 return err 424 case <-quit: 425 return nil 426 } 427 } 428 }), nil 429 } 430 431 // VoterManagerVoterAddedIterator is returned from FilterVoterAdded and is used to iterate over the raw logs and unpacked data for VoterAdded events raised by the VoterManager contract. 432 type VoterManagerVoterAddedIterator struct { 433 Event *VoterManagerVoterAdded // Event containing the contract specifics and raw log 434 435 contract *bind.BoundContract // Generic contract to use for unpacking event data 436 event string // Event name to use for unpacking event data 437 438 logs chan types.Log // Log channel receiving the found contract events 439 sub ethereum.Subscription // Subscription for errors, completion and termination 440 done bool // Whether the subscription completed delivering logs 441 fail error // Occurred error to stop iteration 442 } 443 444 // Next advances the iterator to the subsequent event, returning whether there 445 // are any more events found. In case of a retrieval or parsing error, false is 446 // returned and Error() can be queried for the exact failure. 447 func (it *VoterManagerVoterAddedIterator) Next() bool { 448 // If the iterator failed, stop iterating 449 if it.fail != nil { 450 return false 451 } 452 // If the iterator completed, deliver directly whatever's available 453 if it.done { 454 select { 455 case log := <-it.logs: 456 it.Event = new(VoterManagerVoterAdded) 457 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 458 it.fail = err 459 return false 460 } 461 it.Event.Raw = log 462 return true 463 464 default: 465 return false 466 } 467 } 468 // Iterator still in progress, wait for either a data or an error event 469 select { 470 case log := <-it.logs: 471 it.Event = new(VoterManagerVoterAdded) 472 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 473 it.fail = err 474 return false 475 } 476 it.Event.Raw = log 477 return true 478 479 case err := <-it.sub.Err(): 480 it.done = true 481 it.fail = err 482 return it.Next() 483 } 484 } 485 486 // Error returns any retrieval or parsing error occurred during filtering. 487 func (it *VoterManagerVoterAddedIterator) Error() error { 488 return it.fail 489 } 490 491 // Close terminates the iteration process, releasing any pending underlying 492 // resources. 493 func (it *VoterManagerVoterAddedIterator) Close() error { 494 it.sub.Unsubscribe() 495 return nil 496 } 497 498 // VoterManagerVoterAdded represents a VoterAdded event raised by the VoterManager contract. 499 type VoterManagerVoterAdded struct { 500 OrgId string 501 VAccount common.Address 502 Raw types.Log // Blockchain specific contextual infos 503 } 504 505 // FilterVoterAdded is a free log retrieval operation binding the contract event 0x424f3ad05c61ea35cad66f22b70b1fad7250d8229921238078c401db36d34574. 506 // 507 // Solidity: e VoterAdded(_orgId string, _vAccount address) 508 func (_VoterManager *VoterManagerFilterer) FilterVoterAdded(opts *bind.FilterOpts) (*VoterManagerVoterAddedIterator, error) { 509 510 logs, sub, err := _VoterManager.contract.FilterLogs(opts, "VoterAdded") 511 if err != nil { 512 return nil, err 513 } 514 return &VoterManagerVoterAddedIterator{contract: _VoterManager.contract, event: "VoterAdded", logs: logs, sub: sub}, nil 515 } 516 517 // WatchVoterAdded is a free log subscription operation binding the contract event 0x424f3ad05c61ea35cad66f22b70b1fad7250d8229921238078c401db36d34574. 518 // 519 // Solidity: e VoterAdded(_orgId string, _vAccount address) 520 func (_VoterManager *VoterManagerFilterer) WatchVoterAdded(opts *bind.WatchOpts, sink chan<- *VoterManagerVoterAdded) (event.Subscription, error) { 521 522 logs, sub, err := _VoterManager.contract.WatchLogs(opts, "VoterAdded") 523 if err != nil { 524 return nil, err 525 } 526 return event.NewSubscription(func(quit <-chan struct{}) error { 527 defer sub.Unsubscribe() 528 for { 529 select { 530 case log := <-logs: 531 // New log arrived, parse the event and forward to the user 532 event := new(VoterManagerVoterAdded) 533 if err := _VoterManager.contract.UnpackLog(event, "VoterAdded", log); err != nil { 534 return err 535 } 536 event.Raw = log 537 538 select { 539 case sink <- event: 540 case err := <-sub.Err(): 541 return err 542 case <-quit: 543 return nil 544 } 545 case err := <-sub.Err(): 546 return err 547 case <-quit: 548 return nil 549 } 550 } 551 }), nil 552 } 553 554 // VoterManagerVoterDeletedIterator is returned from FilterVoterDeleted and is used to iterate over the raw logs and unpacked data for VoterDeleted events raised by the VoterManager contract. 555 type VoterManagerVoterDeletedIterator struct { 556 Event *VoterManagerVoterDeleted // Event containing the contract specifics and raw log 557 558 contract *bind.BoundContract // Generic contract to use for unpacking event data 559 event string // Event name to use for unpacking event data 560 561 logs chan types.Log // Log channel receiving the found contract events 562 sub ethereum.Subscription // Subscription for errors, completion and termination 563 done bool // Whether the subscription completed delivering logs 564 fail error // Occurred error to stop iteration 565 } 566 567 // Next advances the iterator to the subsequent event, returning whether there 568 // are any more events found. In case of a retrieval or parsing error, false is 569 // returned and Error() can be queried for the exact failure. 570 func (it *VoterManagerVoterDeletedIterator) Next() bool { 571 // If the iterator failed, stop iterating 572 if it.fail != nil { 573 return false 574 } 575 // If the iterator completed, deliver directly whatever's available 576 if it.done { 577 select { 578 case log := <-it.logs: 579 it.Event = new(VoterManagerVoterDeleted) 580 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 581 it.fail = err 582 return false 583 } 584 it.Event.Raw = log 585 return true 586 587 default: 588 return false 589 } 590 } 591 // Iterator still in progress, wait for either a data or an error event 592 select { 593 case log := <-it.logs: 594 it.Event = new(VoterManagerVoterDeleted) 595 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 596 it.fail = err 597 return false 598 } 599 it.Event.Raw = log 600 return true 601 602 case err := <-it.sub.Err(): 603 it.done = true 604 it.fail = err 605 return it.Next() 606 } 607 } 608 609 // Error returns any retrieval or parsing error occurred during filtering. 610 func (it *VoterManagerVoterDeletedIterator) Error() error { 611 return it.fail 612 } 613 614 // Close terminates the iteration process, releasing any pending underlying 615 // resources. 616 func (it *VoterManagerVoterDeletedIterator) Close() error { 617 it.sub.Unsubscribe() 618 return nil 619 } 620 621 // VoterManagerVoterDeleted represents a VoterDeleted event raised by the VoterManager contract. 622 type VoterManagerVoterDeleted struct { 623 OrgId string 624 VAccount common.Address 625 Raw types.Log // Blockchain specific contextual infos 626 } 627 628 // FilterVoterDeleted is a free log retrieval operation binding the contract event 0x654cd85d9b2abaf3affef0a047625d088e6e4d0448935c9b5016b5f5aa0ca3b6. 629 // 630 // Solidity: e VoterDeleted(_orgId string, _vAccount address) 631 func (_VoterManager *VoterManagerFilterer) FilterVoterDeleted(opts *bind.FilterOpts) (*VoterManagerVoterDeletedIterator, error) { 632 633 logs, sub, err := _VoterManager.contract.FilterLogs(opts, "VoterDeleted") 634 if err != nil { 635 return nil, err 636 } 637 return &VoterManagerVoterDeletedIterator{contract: _VoterManager.contract, event: "VoterDeleted", logs: logs, sub: sub}, nil 638 } 639 640 // WatchVoterDeleted is a free log subscription operation binding the contract event 0x654cd85d9b2abaf3affef0a047625d088e6e4d0448935c9b5016b5f5aa0ca3b6. 641 // 642 // Solidity: e VoterDeleted(_orgId string, _vAccount address) 643 func (_VoterManager *VoterManagerFilterer) WatchVoterDeleted(opts *bind.WatchOpts, sink chan<- *VoterManagerVoterDeleted) (event.Subscription, error) { 644 645 logs, sub, err := _VoterManager.contract.WatchLogs(opts, "VoterDeleted") 646 if err != nil { 647 return nil, err 648 } 649 return event.NewSubscription(func(quit <-chan struct{}) error { 650 defer sub.Unsubscribe() 651 for { 652 select { 653 case log := <-logs: 654 // New log arrived, parse the event and forward to the user 655 event := new(VoterManagerVoterDeleted) 656 if err := _VoterManager.contract.UnpackLog(event, "VoterDeleted", log); err != nil { 657 return err 658 } 659 event.Raw = log 660 661 select { 662 case sink <- event: 663 case err := <-sub.Err(): 664 return err 665 case <-quit: 666 return nil 667 } 668 case err := <-sub.Err(): 669 return err 670 case <-quit: 671 return nil 672 } 673 } 674 }), nil 675 } 676 677 // VoterManagerVotingItemAddedIterator is returned from FilterVotingItemAdded and is used to iterate over the raw logs and unpacked data for VotingItemAdded events raised by the VoterManager contract. 678 type VoterManagerVotingItemAddedIterator struct { 679 Event *VoterManagerVotingItemAdded // Event containing the contract specifics and raw log 680 681 contract *bind.BoundContract // Generic contract to use for unpacking event data 682 event string // Event name to use for unpacking event data 683 684 logs chan types.Log // Log channel receiving the found contract events 685 sub ethereum.Subscription // Subscription for errors, completion and termination 686 done bool // Whether the subscription completed delivering logs 687 fail error // Occurred error to stop iteration 688 } 689 690 // Next advances the iterator to the subsequent event, returning whether there 691 // are any more events found. In case of a retrieval or parsing error, false is 692 // returned and Error() can be queried for the exact failure. 693 func (it *VoterManagerVotingItemAddedIterator) Next() bool { 694 // If the iterator failed, stop iterating 695 if it.fail != nil { 696 return false 697 } 698 // If the iterator completed, deliver directly whatever's available 699 if it.done { 700 select { 701 case log := <-it.logs: 702 it.Event = new(VoterManagerVotingItemAdded) 703 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 704 it.fail = err 705 return false 706 } 707 it.Event.Raw = log 708 return true 709 710 default: 711 return false 712 } 713 } 714 // Iterator still in progress, wait for either a data or an error event 715 select { 716 case log := <-it.logs: 717 it.Event = new(VoterManagerVotingItemAdded) 718 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 719 it.fail = err 720 return false 721 } 722 it.Event.Raw = log 723 return true 724 725 case err := <-it.sub.Err(): 726 it.done = true 727 it.fail = err 728 return it.Next() 729 } 730 } 731 732 // Error returns any retrieval or parsing error occurred during filtering. 733 func (it *VoterManagerVotingItemAddedIterator) Error() error { 734 return it.fail 735 } 736 737 // Close terminates the iteration process, releasing any pending underlying 738 // resources. 739 func (it *VoterManagerVotingItemAddedIterator) Close() error { 740 it.sub.Unsubscribe() 741 return nil 742 } 743 744 // VoterManagerVotingItemAdded represents a VotingItemAdded event raised by the VoterManager contract. 745 type VoterManagerVotingItemAdded struct { 746 OrgId string 747 Raw types.Log // Blockchain specific contextual infos 748 } 749 750 // FilterVotingItemAdded is a free log retrieval operation binding the contract event 0x5bfaebb5931145594f63236d2a59314c4dc6035b65d0ca4cee9c7298e2f06ca3. 751 // 752 // Solidity: e VotingItemAdded(_orgId string) 753 func (_VoterManager *VoterManagerFilterer) FilterVotingItemAdded(opts *bind.FilterOpts) (*VoterManagerVotingItemAddedIterator, error) { 754 755 logs, sub, err := _VoterManager.contract.FilterLogs(opts, "VotingItemAdded") 756 if err != nil { 757 return nil, err 758 } 759 return &VoterManagerVotingItemAddedIterator{contract: _VoterManager.contract, event: "VotingItemAdded", logs: logs, sub: sub}, nil 760 } 761 762 // WatchVotingItemAdded is a free log subscription operation binding the contract event 0x5bfaebb5931145594f63236d2a59314c4dc6035b65d0ca4cee9c7298e2f06ca3. 763 // 764 // Solidity: e VotingItemAdded(_orgId string) 765 func (_VoterManager *VoterManagerFilterer) WatchVotingItemAdded(opts *bind.WatchOpts, sink chan<- *VoterManagerVotingItemAdded) (event.Subscription, error) { 766 767 logs, sub, err := _VoterManager.contract.WatchLogs(opts, "VotingItemAdded") 768 if err != nil { 769 return nil, err 770 } 771 return event.NewSubscription(func(quit <-chan struct{}) error { 772 defer sub.Unsubscribe() 773 for { 774 select { 775 case log := <-logs: 776 // New log arrived, parse the event and forward to the user 777 event := new(VoterManagerVotingItemAdded) 778 if err := _VoterManager.contract.UnpackLog(event, "VotingItemAdded", log); err != nil { 779 return err 780 } 781 event.Raw = log 782 783 select { 784 case sink <- event: 785 case err := <-sub.Err(): 786 return err 787 case <-quit: 788 return nil 789 } 790 case err := <-sub.Err(): 791 return err 792 case <-quit: 793 return nil 794 } 795 } 796 }), nil 797 }