diff --git a/controls/cluster/Clusterkeys.sol b/controls/cluster/Clusterkeys.sol index 032f1589d..a9cfaaade 100644 --- a/controls/cluster/Clusterkeys.sol +++ b/controls/cluster/Clusterkeys.sol @@ -33,7 +33,6 @@ contract Clusterkeys { event KeyNotFound(string _privateKey); event OrgNotFound(string _orgId); event KeyExists(string _orgId, string _privateKey); - event Dummy(uint _orgId, bool _keyExists, uint loopCnt ); event VoterAdded(string _orgId, address _address); event VoterExists(string _orgId, address _address); event VoterNotFound(string _orgId, address _address); @@ -44,6 +43,7 @@ contract Clusterkeys { event NothingToApprove(string _orgId); event PrintAll(string _orgId, string _privateKey); + event PrintVoter(string _orgId, address _voterAccount); event PrintKey(string _orgId, Operation _pendingOp, string _pendingKey); modifier canVote(string _orgId){ @@ -54,9 +54,9 @@ contract Clusterkeys { flag = true; break; } - require(flag, "Account can not vote"); - _; } + require(flag, "Account cannot vote"); + _; } function getOrgIndex(string _orgId) internal view returns (uint) @@ -294,13 +294,20 @@ contract Clusterkeys { } } - function printAll () public { + function printAllOrg () public { for (uint i = 0; i < orgList.length; i++){ - emit PrintKey(orgList[i].orgId, orgList[i].pendingOp, orgList[i].pendingKey); for (uint j = 0; j < orgList[i].privateKey.length ; j++){ emit PrintAll(orgList[i].orgId, orgList[i].privateKey[j]); } } } + function printAllVoter () public { + for (uint i = 0; i < voterList.length; i++){ + for (uint j = 0; j < voterList[i].orgVoterAccount.length ; j++){ + emit PrintVoter(voterList[i].orgId, voterList[i].orgVoterAccount[j]); + } + } + } + } diff --git a/controls/cluster/abi/Clusterkeys.abi b/controls/cluster/abi/Clusterkeys.abi index d1de19177..fc11d8f9b 100644 --- a/controls/cluster/abi/Clusterkeys.abi +++ b/controls/cluster/abi/Clusterkeys.abi @@ -1 +1 @@ -[{"constant":false,"inputs":[{"name":"_orgId","type":"string"},{"name":"_privateKey","type":"string"}],"name":"deleteOrgKey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"printAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_orgId","type":"string"},{"name":"_privateKey","type":"string"}],"name":"addOrgKey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_privateKey","type":"string"}],"name":"OrgKeyAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_privateKey","type":"string"}],"name":"OrgKeyDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_voterAccount","type":"string"}],"name":"orgVoterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_privateKey","type":"string"}],"name":"KeyNotFound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"}],"name":"OrgNotFound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_privateKey","type":"string"}],"name":"PrintAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_privateKey","type":"string"}],"name":"KeyExists","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"uint256"},{"indexed":false,"name":"_keyExists","type":"bool"},{"indexed":false,"name":"loopCnt","type":"uint256"}],"name":"Dummy","type":"event"}] \ No newline at end of file +[{"constant":false,"inputs":[],"name":"printAllOrg","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_orgId","type":"string"}],"name":"approvePendingOp","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_orgId","type":"string"},{"name":"_privateKey","type":"string"}],"name":"deleteOrgKey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_orgId","type":"string"},{"name":"_address","type":"address"}],"name":"addVoter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_orgId","type":"string"},{"name":"_address","type":"address"}],"name":"deleteVoter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"printAllVoter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_orgId","type":"string"},{"name":"_privateKey","type":"string"}],"name":"addOrgKey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_privateKey","type":"string"}],"name":"OrgKeyAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_privateKey","type":"string"}],"name":"OrgKeyDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_voterAccount","type":"string"}],"name":"orgVoterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_privateKey","type":"string"}],"name":"KeyNotFound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"}],"name":"OrgNotFound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_privateKey","type":"string"}],"name":"KeyExists","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_address","type":"address"}],"name":"VoterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_address","type":"address"}],"name":"VoterExists","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_address","type":"address"}],"name":"VoterNotFound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_address","type":"address"}],"name":"VoterAccountDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"}],"name":"NoVotingAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"}],"name":"PendingApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_pendingOp","type":"uint8"},{"indexed":false,"name":"_privateKey","type":"string"}],"name":"ItemForApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"}],"name":"NothingToApprove","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_privateKey","type":"string"}],"name":"PrintAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_voterAccount","type":"address"}],"name":"PrintVoter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_orgId","type":"string"},{"indexed":false,"name":"_pendingOp","type":"uint8"},{"indexed":false,"name":"_pendingKey","type":"string"}],"name":"PrintKey","type":"event"}] \ No newline at end of file diff --git a/controls/cluster/clusterkey_binding.go b/controls/cluster/clusterkey_binding.go index b6b7ae40a..6e4207a00 100644 --- a/controls/cluster/clusterkey_binding.go +++ b/controls/cluster/clusterkey_binding.go @@ -4,7 +4,6 @@ package cluster import ( - "math/big" "strings" ethereum "github.com/ethereum/go-ethereum" @@ -16,7 +15,7 @@ import ( ) // ClusterABI is the input ABI used to generate the binding from. -const ClusterABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"deleteOrgKey\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"printAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"addOrgKey\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"OrgKeyAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"OrgKeyDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_voterAccount\",\"type\":\"string\"}],\"name\":\"orgVoterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"KeyNotFound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"OrgNotFound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"PrintAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"KeyExists\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_keyExists\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"loopCnt\",\"type\":\"uint256\"}],\"name\":\"Dummy\",\"type\":\"event\"}]" +const ClusterABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"printAllOrg\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"approvePendingOp\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"deleteOrgKey\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"addVoter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"deleteVoter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"printAllVoter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"addOrgKey\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"OrgKeyAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"OrgKeyDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_voterAccount\",\"type\":\"string\"}],\"name\":\"orgVoterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"KeyNotFound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"OrgNotFound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"KeyExists\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"VoterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"VoterExists\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"VoterNotFound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"VoterAccountDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"NoVotingAccount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"PendingApproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_pendingOp\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"ItemForApproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"NothingToApprove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_privateKey\",\"type\":\"string\"}],\"name\":\"PrintAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_voterAccount\",\"type\":\"address\"}],\"name\":\"PrintVoter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_pendingOp\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"_pendingKey\",\"type\":\"string\"}],\"name\":\"PrintKey\",\"type\":\"event\"}]" // Cluster is an auto generated Go binding around an Ethereum contract. type Cluster struct { @@ -181,6 +180,48 @@ func (_Cluster *ClusterTransactorSession) AddOrgKey(_orgId string, _privateKey s return _Cluster.Contract.AddOrgKey(&_Cluster.TransactOpts, _orgId, _privateKey) } +// AddVoter is a paid mutator transaction binding the contract method 0x5607395b. +// +// Solidity: function addVoter(_orgId string, _address address) returns() +func (_Cluster *ClusterTransactor) AddVoter(opts *bind.TransactOpts, _orgId string, _address common.Address) (*types.Transaction, error) { + return _Cluster.contract.Transact(opts, "addVoter", _orgId, _address) +} + +// AddVoter is a paid mutator transaction binding the contract method 0x5607395b. +// +// Solidity: function addVoter(_orgId string, _address address) returns() +func (_Cluster *ClusterSession) AddVoter(_orgId string, _address common.Address) (*types.Transaction, error) { + return _Cluster.Contract.AddVoter(&_Cluster.TransactOpts, _orgId, _address) +} + +// AddVoter is a paid mutator transaction binding the contract method 0x5607395b. +// +// Solidity: function addVoter(_orgId string, _address address) returns() +func (_Cluster *ClusterTransactorSession) AddVoter(_orgId string, _address common.Address) (*types.Transaction, error) { + return _Cluster.Contract.AddVoter(&_Cluster.TransactOpts, _orgId, _address) +} + +// ApprovePendingOp is a paid mutator transaction binding the contract method 0x35dc4772. +// +// Solidity: function approvePendingOp(_orgId string) returns() +func (_Cluster *ClusterTransactor) ApprovePendingOp(opts *bind.TransactOpts, _orgId string) (*types.Transaction, error) { + return _Cluster.contract.Transact(opts, "approvePendingOp", _orgId) +} + +// ApprovePendingOp is a paid mutator transaction binding the contract method 0x35dc4772. +// +// Solidity: function approvePendingOp(_orgId string) returns() +func (_Cluster *ClusterSession) ApprovePendingOp(_orgId string) (*types.Transaction, error) { + return _Cluster.Contract.ApprovePendingOp(&_Cluster.TransactOpts, _orgId) +} + +// ApprovePendingOp is a paid mutator transaction binding the contract method 0x35dc4772. +// +// Solidity: function approvePendingOp(_orgId string) returns() +func (_Cluster *ClusterTransactorSession) ApprovePendingOp(_orgId string) (*types.Transaction, error) { + return _Cluster.Contract.ApprovePendingOp(&_Cluster.TransactOpts, _orgId) +} + // DeleteOrgKey is a paid mutator transaction binding the contract method 0x49379c50. // // Solidity: function deleteOrgKey(_orgId string, _privateKey string) returns() @@ -202,30 +243,72 @@ func (_Cluster *ClusterTransactorSession) DeleteOrgKey(_orgId string, _privateKe return _Cluster.Contract.DeleteOrgKey(&_Cluster.TransactOpts, _orgId, _privateKey) } -// PrintAll is a paid mutator transaction binding the contract method 0xb9f41ba3. +// DeleteVoter is a paid mutator transaction binding the contract method 0x59cbd6fe. // -// Solidity: function printAll() returns() -func (_Cluster *ClusterTransactor) PrintAll(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Cluster.contract.Transact(opts, "printAll") +// Solidity: function deleteVoter(_orgId string, _address address) returns() +func (_Cluster *ClusterTransactor) DeleteVoter(opts *bind.TransactOpts, _orgId string, _address common.Address) (*types.Transaction, error) { + return _Cluster.contract.Transact(opts, "deleteVoter", _orgId, _address) } -// PrintAll is a paid mutator transaction binding the contract method 0xb9f41ba3. +// DeleteVoter is a paid mutator transaction binding the contract method 0x59cbd6fe. // -// Solidity: function printAll() returns() -func (_Cluster *ClusterSession) PrintAll() (*types.Transaction, error) { - return _Cluster.Contract.PrintAll(&_Cluster.TransactOpts) +// Solidity: function deleteVoter(_orgId string, _address address) returns() +func (_Cluster *ClusterSession) DeleteVoter(_orgId string, _address common.Address) (*types.Transaction, error) { + return _Cluster.Contract.DeleteVoter(&_Cluster.TransactOpts, _orgId, _address) } -// PrintAll is a paid mutator transaction binding the contract method 0xb9f41ba3. +// DeleteVoter is a paid mutator transaction binding the contract method 0x59cbd6fe. // -// Solidity: function printAll() returns() -func (_Cluster *ClusterTransactorSession) PrintAll() (*types.Transaction, error) { - return _Cluster.Contract.PrintAll(&_Cluster.TransactOpts) +// Solidity: function deleteVoter(_orgId string, _address address) returns() +func (_Cluster *ClusterTransactorSession) DeleteVoter(_orgId string, _address common.Address) (*types.Transaction, error) { + return _Cluster.Contract.DeleteVoter(&_Cluster.TransactOpts, _orgId, _address) } -// ClusterDummyIterator is returned from FilterDummy and is used to iterate over the raw logs and unpacked data for Dummy events raised by the Cluster contract. -type ClusterDummyIterator struct { - Event *ClusterDummy // Event containing the contract specifics and raw log +// PrintAllOrg is a paid mutator transaction binding the contract method 0x2bbc5084. +// +// Solidity: function printAllOrg() returns() +func (_Cluster *ClusterTransactor) PrintAllOrg(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cluster.contract.Transact(opts, "printAllOrg") +} + +// PrintAllOrg is a paid mutator transaction binding the contract method 0x2bbc5084. +// +// Solidity: function printAllOrg() returns() +func (_Cluster *ClusterSession) PrintAllOrg() (*types.Transaction, error) { + return _Cluster.Contract.PrintAllOrg(&_Cluster.TransactOpts) +} + +// PrintAllOrg is a paid mutator transaction binding the contract method 0x2bbc5084. +// +// Solidity: function printAllOrg() returns() +func (_Cluster *ClusterTransactorSession) PrintAllOrg() (*types.Transaction, error) { + return _Cluster.Contract.PrintAllOrg(&_Cluster.TransactOpts) +} + +// PrintAllVoter is a paid mutator transaction binding the contract method 0x73f9cee0. +// +// Solidity: function printAllVoter() returns() +func (_Cluster *ClusterTransactor) PrintAllVoter(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Cluster.contract.Transact(opts, "printAllVoter") +} + +// PrintAllVoter is a paid mutator transaction binding the contract method 0x73f9cee0. +// +// Solidity: function printAllVoter() returns() +func (_Cluster *ClusterSession) PrintAllVoter() (*types.Transaction, error) { + return _Cluster.Contract.PrintAllVoter(&_Cluster.TransactOpts) +} + +// PrintAllVoter is a paid mutator transaction binding the contract method 0x73f9cee0. +// +// Solidity: function printAllVoter() returns() +func (_Cluster *ClusterTransactorSession) PrintAllVoter() (*types.Transaction, error) { + return _Cluster.Contract.PrintAllVoter(&_Cluster.TransactOpts) +} + +// ClusterItemForApprovalIterator is returned from FilterItemForApproval and is used to iterate over the raw logs and unpacked data for ItemForApproval events raised by the Cluster contract. +type ClusterItemForApprovalIterator struct { + Event *ClusterItemForApproval // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -239,7 +322,7 @@ type ClusterDummyIterator struct { // 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. -func (it *ClusterDummyIterator) Next() bool { +func (it *ClusterItemForApprovalIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -248,7 +331,7 @@ func (it *ClusterDummyIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ClusterDummy) + it.Event = new(ClusterItemForApproval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -263,7 +346,7 @@ func (it *ClusterDummyIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ClusterDummy) + it.Event = new(ClusterItemForApproval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -279,43 +362,43 @@ func (it *ClusterDummyIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ClusterDummyIterator) Error() error { +func (it *ClusterItemForApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ClusterDummyIterator) Close() error { +func (it *ClusterItemForApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } -// ClusterDummy represents a Dummy event raised by the Cluster contract. -type ClusterDummy struct { - OrgId *big.Int - KeyExists bool - LoopCnt *big.Int - Raw types.Log // Blockchain specific contextual infos +// ClusterItemForApproval represents a ItemForApproval event raised by the Cluster contract. +type ClusterItemForApproval struct { + OrgId string + PendingOp uint8 + PrivateKey string + Raw types.Log // Blockchain specific contextual infos } -// FilterDummy is a free log retrieval operation binding the contract event 0xd58c0f112df16fab0019f11d0dd6b109778672dd444bdd4ef464ff369d83eacd. +// FilterItemForApproval is a free log retrieval operation binding the contract event 0x4475befcee492797e02530076fd7e138aa058eb3bcd028a9df5c0f2815ba9f4a. // -// Solidity: e Dummy(_orgId uint256, _keyExists bool, loopCnt uint256) -func (_Cluster *ClusterFilterer) FilterDummy(opts *bind.FilterOpts) (*ClusterDummyIterator, error) { +// Solidity: e ItemForApproval(_orgId string, _pendingOp uint8, _privateKey string) +func (_Cluster *ClusterFilterer) FilterItemForApproval(opts *bind.FilterOpts) (*ClusterItemForApprovalIterator, error) { - logs, sub, err := _Cluster.contract.FilterLogs(opts, "Dummy") + logs, sub, err := _Cluster.contract.FilterLogs(opts, "ItemForApproval") if err != nil { return nil, err } - return &ClusterDummyIterator{contract: _Cluster.contract, event: "Dummy", logs: logs, sub: sub}, nil + return &ClusterItemForApprovalIterator{contract: _Cluster.contract, event: "ItemForApproval", logs: logs, sub: sub}, nil } -// WatchDummy is a free log subscription operation binding the contract event 0xd58c0f112df16fab0019f11d0dd6b109778672dd444bdd4ef464ff369d83eacd. +// WatchItemForApproval is a free log subscription operation binding the contract event 0x4475befcee492797e02530076fd7e138aa058eb3bcd028a9df5c0f2815ba9f4a. // -// Solidity: e Dummy(_orgId uint256, _keyExists bool, loopCnt uint256) -func (_Cluster *ClusterFilterer) WatchDummy(opts *bind.WatchOpts, sink chan<- *ClusterDummy) (event.Subscription, error) { +// Solidity: e ItemForApproval(_orgId string, _pendingOp uint8, _privateKey string) +func (_Cluster *ClusterFilterer) WatchItemForApproval(opts *bind.WatchOpts, sink chan<- *ClusterItemForApproval) (event.Subscription, error) { - logs, sub, err := _Cluster.contract.WatchLogs(opts, "Dummy") + logs, sub, err := _Cluster.contract.WatchLogs(opts, "ItemForApproval") if err != nil { return nil, err } @@ -325,8 +408,8 @@ func (_Cluster *ClusterFilterer) WatchDummy(opts *bind.WatchOpts, sink chan<- *C select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ClusterDummy) - if err := _Cluster.contract.UnpackLog(event, "Dummy", log); err != nil { + event := new(ClusterItemForApproval) + if err := _Cluster.contract.UnpackLog(event, "ItemForApproval", log); err != nil { return err } event.Raw = log @@ -592,6 +675,250 @@ func (_Cluster *ClusterFilterer) WatchKeyNotFound(opts *bind.WatchOpts, sink cha }), nil } +// ClusterNoVotingAccountIterator is returned from FilterNoVotingAccount and is used to iterate over the raw logs and unpacked data for NoVotingAccount events raised by the Cluster contract. +type ClusterNoVotingAccountIterator struct { + Event *ClusterNoVotingAccount // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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. +func (it *ClusterNoVotingAccountIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ClusterNoVotingAccount) + 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 + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ClusterNoVotingAccount) + 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() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ClusterNoVotingAccountIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClusterNoVotingAccountIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClusterNoVotingAccount represents a NoVotingAccount event raised by the Cluster contract. +type ClusterNoVotingAccount struct { + OrgId string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNoVotingAccount is a free log retrieval operation binding the contract event 0xaca1d1ef8876e1135c8c76871025becb2eefcbdb13c62fcd55c51dc174abf7af. +// +// Solidity: e NoVotingAccount(_orgId string) +func (_Cluster *ClusterFilterer) FilterNoVotingAccount(opts *bind.FilterOpts) (*ClusterNoVotingAccountIterator, error) { + + logs, sub, err := _Cluster.contract.FilterLogs(opts, "NoVotingAccount") + if err != nil { + return nil, err + } + return &ClusterNoVotingAccountIterator{contract: _Cluster.contract, event: "NoVotingAccount", logs: logs, sub: sub}, nil +} + +// WatchNoVotingAccount is a free log subscription operation binding the contract event 0xaca1d1ef8876e1135c8c76871025becb2eefcbdb13c62fcd55c51dc174abf7af. +// +// Solidity: e NoVotingAccount(_orgId string) +func (_Cluster *ClusterFilterer) WatchNoVotingAccount(opts *bind.WatchOpts, sink chan<- *ClusterNoVotingAccount) (event.Subscription, error) { + + logs, sub, err := _Cluster.contract.WatchLogs(opts, "NoVotingAccount") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClusterNoVotingAccount) + if err := _Cluster.contract.UnpackLog(event, "NoVotingAccount", 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 +} + +// ClusterNothingToApproveIterator is returned from FilterNothingToApprove and is used to iterate over the raw logs and unpacked data for NothingToApprove events raised by the Cluster contract. +type ClusterNothingToApproveIterator struct { + Event *ClusterNothingToApprove // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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. +func (it *ClusterNothingToApproveIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ClusterNothingToApprove) + 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 + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ClusterNothingToApprove) + 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() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ClusterNothingToApproveIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClusterNothingToApproveIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClusterNothingToApprove represents a NothingToApprove event raised by the Cluster contract. +type ClusterNothingToApprove struct { + OrgId string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNothingToApprove is a free log retrieval operation binding the contract event 0xe820171ad1d64f6ca44bb0943acbac4c6085812bf91e8b791646295639806228. +// +// Solidity: e NothingToApprove(_orgId string) +func (_Cluster *ClusterFilterer) FilterNothingToApprove(opts *bind.FilterOpts) (*ClusterNothingToApproveIterator, error) { + + logs, sub, err := _Cluster.contract.FilterLogs(opts, "NothingToApprove") + if err != nil { + return nil, err + } + return &ClusterNothingToApproveIterator{contract: _Cluster.contract, event: "NothingToApprove", logs: logs, sub: sub}, nil +} + +// WatchNothingToApprove is a free log subscription operation binding the contract event 0xe820171ad1d64f6ca44bb0943acbac4c6085812bf91e8b791646295639806228. +// +// Solidity: e NothingToApprove(_orgId string) +func (_Cluster *ClusterFilterer) WatchNothingToApprove(opts *bind.WatchOpts, sink chan<- *ClusterNothingToApprove) (event.Subscription, error) { + + logs, sub, err := _Cluster.contract.WatchLogs(opts, "NothingToApprove") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClusterNothingToApprove) + if err := _Cluster.contract.UnpackLog(event, "NothingToApprove", 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 +} + // ClusterOrgKeyAddedIterator is returned from FilterOrgKeyAdded and is used to iterate over the raw logs and unpacked data for OrgKeyAdded events raised by the Cluster contract. type ClusterOrgKeyAddedIterator struct { Event *ClusterOrgKeyAdded // Event containing the contract specifics and raw log @@ -960,6 +1287,128 @@ func (_Cluster *ClusterFilterer) WatchOrgNotFound(opts *bind.WatchOpts, sink cha }), nil } +// ClusterPendingApprovalIterator is returned from FilterPendingApproval and is used to iterate over the raw logs and unpacked data for PendingApproval events raised by the Cluster contract. +type ClusterPendingApprovalIterator struct { + Event *ClusterPendingApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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. +func (it *ClusterPendingApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ClusterPendingApproval) + 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 + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ClusterPendingApproval) + 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() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ClusterPendingApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClusterPendingApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClusterPendingApproval represents a PendingApproval event raised by the Cluster contract. +type ClusterPendingApproval struct { + OrgId string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPendingApproval is a free log retrieval operation binding the contract event 0x2de31d28953221328a1c7e30a93fa15e0d8573128a8f6fa92cf66408a0403c99. +// +// Solidity: e PendingApproval(_orgId string) +func (_Cluster *ClusterFilterer) FilterPendingApproval(opts *bind.FilterOpts) (*ClusterPendingApprovalIterator, error) { + + logs, sub, err := _Cluster.contract.FilterLogs(opts, "PendingApproval") + if err != nil { + return nil, err + } + return &ClusterPendingApprovalIterator{contract: _Cluster.contract, event: "PendingApproval", logs: logs, sub: sub}, nil +} + +// WatchPendingApproval is a free log subscription operation binding the contract event 0x2de31d28953221328a1c7e30a93fa15e0d8573128a8f6fa92cf66408a0403c99. +// +// Solidity: e PendingApproval(_orgId string) +func (_Cluster *ClusterFilterer) WatchPendingApproval(opts *bind.WatchOpts, sink chan<- *ClusterPendingApproval) (event.Subscription, error) { + + logs, sub, err := _Cluster.contract.WatchLogs(opts, "PendingApproval") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClusterPendingApproval) + if err := _Cluster.contract.UnpackLog(event, "PendingApproval", 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 +} + // ClusterPrintAllIterator is returned from FilterPrintAll and is used to iterate over the raw logs and unpacked data for PrintAll events raised by the Cluster contract. type ClusterPrintAllIterator struct { Event *ClusterPrintAll // Event containing the contract specifics and raw log @@ -1083,6 +1532,745 @@ func (_Cluster *ClusterFilterer) WatchPrintAll(opts *bind.WatchOpts, sink chan<- }), nil } +// ClusterPrintKeyIterator is returned from FilterPrintKey and is used to iterate over the raw logs and unpacked data for PrintKey events raised by the Cluster contract. +type ClusterPrintKeyIterator struct { + Event *ClusterPrintKey // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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. +func (it *ClusterPrintKeyIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ClusterPrintKey) + 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 + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ClusterPrintKey) + 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() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ClusterPrintKeyIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClusterPrintKeyIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClusterPrintKey represents a PrintKey event raised by the Cluster contract. +type ClusterPrintKey struct { + OrgId string + PendingOp uint8 + PendingKey string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPrintKey is a free log retrieval operation binding the contract event 0x5ac991854acd1b6419820adc1e7485528b0ad28b55d18e070e9bcd63786e7ff8. +// +// Solidity: e PrintKey(_orgId string, _pendingOp uint8, _pendingKey string) +func (_Cluster *ClusterFilterer) FilterPrintKey(opts *bind.FilterOpts) (*ClusterPrintKeyIterator, error) { + + logs, sub, err := _Cluster.contract.FilterLogs(opts, "PrintKey") + if err != nil { + return nil, err + } + return &ClusterPrintKeyIterator{contract: _Cluster.contract, event: "PrintKey", logs: logs, sub: sub}, nil +} + +// WatchPrintKey is a free log subscription operation binding the contract event 0x5ac991854acd1b6419820adc1e7485528b0ad28b55d18e070e9bcd63786e7ff8. +// +// Solidity: e PrintKey(_orgId string, _pendingOp uint8, _pendingKey string) +func (_Cluster *ClusterFilterer) WatchPrintKey(opts *bind.WatchOpts, sink chan<- *ClusterPrintKey) (event.Subscription, error) { + + logs, sub, err := _Cluster.contract.WatchLogs(opts, "PrintKey") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClusterPrintKey) + if err := _Cluster.contract.UnpackLog(event, "PrintKey", 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 +} + +// ClusterPrintVoterIterator is returned from FilterPrintVoter and is used to iterate over the raw logs and unpacked data for PrintVoter events raised by the Cluster contract. +type ClusterPrintVoterIterator struct { + Event *ClusterPrintVoter // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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. +func (it *ClusterPrintVoterIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ClusterPrintVoter) + 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 + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ClusterPrintVoter) + 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() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ClusterPrintVoterIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClusterPrintVoterIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClusterPrintVoter represents a PrintVoter event raised by the Cluster contract. +type ClusterPrintVoter struct { + OrgId string + VoterAccount common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPrintVoter is a free log retrieval operation binding the contract event 0x0c0001a7636c2b95d29de23e25bb65060f9ad324f9f38b309f6f5659a6cb3165. +// +// Solidity: e PrintVoter(_orgId string, _voterAccount address) +func (_Cluster *ClusterFilterer) FilterPrintVoter(opts *bind.FilterOpts) (*ClusterPrintVoterIterator, error) { + + logs, sub, err := _Cluster.contract.FilterLogs(opts, "PrintVoter") + if err != nil { + return nil, err + } + return &ClusterPrintVoterIterator{contract: _Cluster.contract, event: "PrintVoter", logs: logs, sub: sub}, nil +} + +// WatchPrintVoter is a free log subscription operation binding the contract event 0x0c0001a7636c2b95d29de23e25bb65060f9ad324f9f38b309f6f5659a6cb3165. +// +// Solidity: e PrintVoter(_orgId string, _voterAccount address) +func (_Cluster *ClusterFilterer) WatchPrintVoter(opts *bind.WatchOpts, sink chan<- *ClusterPrintVoter) (event.Subscription, error) { + + logs, sub, err := _Cluster.contract.WatchLogs(opts, "PrintVoter") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClusterPrintVoter) + if err := _Cluster.contract.UnpackLog(event, "PrintVoter", 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 +} + +// ClusterVoterAccountDeletedIterator is returned from FilterVoterAccountDeleted and is used to iterate over the raw logs and unpacked data for VoterAccountDeleted events raised by the Cluster contract. +type ClusterVoterAccountDeletedIterator struct { + Event *ClusterVoterAccountDeleted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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. +func (it *ClusterVoterAccountDeletedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ClusterVoterAccountDeleted) + 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 + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ClusterVoterAccountDeleted) + 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() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ClusterVoterAccountDeletedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClusterVoterAccountDeletedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClusterVoterAccountDeleted represents a VoterAccountDeleted event raised by the Cluster contract. +type ClusterVoterAccountDeleted struct { + OrgId string + Address common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVoterAccountDeleted is a free log retrieval operation binding the contract event 0x192eeefa7720f7067bcc0a3f5bbcc2941c417a8761ec8b795d2941f3b0d2be17. +// +// Solidity: e VoterAccountDeleted(_orgId string, _address address) +func (_Cluster *ClusterFilterer) FilterVoterAccountDeleted(opts *bind.FilterOpts) (*ClusterVoterAccountDeletedIterator, error) { + + logs, sub, err := _Cluster.contract.FilterLogs(opts, "VoterAccountDeleted") + if err != nil { + return nil, err + } + return &ClusterVoterAccountDeletedIterator{contract: _Cluster.contract, event: "VoterAccountDeleted", logs: logs, sub: sub}, nil +} + +// WatchVoterAccountDeleted is a free log subscription operation binding the contract event 0x192eeefa7720f7067bcc0a3f5bbcc2941c417a8761ec8b795d2941f3b0d2be17. +// +// Solidity: e VoterAccountDeleted(_orgId string, _address address) +func (_Cluster *ClusterFilterer) WatchVoterAccountDeleted(opts *bind.WatchOpts, sink chan<- *ClusterVoterAccountDeleted) (event.Subscription, error) { + + logs, sub, err := _Cluster.contract.WatchLogs(opts, "VoterAccountDeleted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClusterVoterAccountDeleted) + if err := _Cluster.contract.UnpackLog(event, "VoterAccountDeleted", 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 +} + +// ClusterVoterAddedIterator is returned from FilterVoterAdded and is used to iterate over the raw logs and unpacked data for VoterAdded events raised by the Cluster contract. +type ClusterVoterAddedIterator struct { + Event *ClusterVoterAdded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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. +func (it *ClusterVoterAddedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ClusterVoterAdded) + 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 + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ClusterVoterAdded) + 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() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ClusterVoterAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClusterVoterAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClusterVoterAdded represents a VoterAdded event raised by the Cluster contract. +type ClusterVoterAdded struct { + OrgId string + Address common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVoterAdded is a free log retrieval operation binding the contract event 0x424f3ad05c61ea35cad66f22b70b1fad7250d8229921238078c401db36d34574. +// +// Solidity: e VoterAdded(_orgId string, _address address) +func (_Cluster *ClusterFilterer) FilterVoterAdded(opts *bind.FilterOpts) (*ClusterVoterAddedIterator, error) { + + logs, sub, err := _Cluster.contract.FilterLogs(opts, "VoterAdded") + if err != nil { + return nil, err + } + return &ClusterVoterAddedIterator{contract: _Cluster.contract, event: "VoterAdded", logs: logs, sub: sub}, nil +} + +// WatchVoterAdded is a free log subscription operation binding the contract event 0x424f3ad05c61ea35cad66f22b70b1fad7250d8229921238078c401db36d34574. +// +// Solidity: e VoterAdded(_orgId string, _address address) +func (_Cluster *ClusterFilterer) WatchVoterAdded(opts *bind.WatchOpts, sink chan<- *ClusterVoterAdded) (event.Subscription, error) { + + logs, sub, err := _Cluster.contract.WatchLogs(opts, "VoterAdded") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClusterVoterAdded) + if err := _Cluster.contract.UnpackLog(event, "VoterAdded", 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 +} + +// ClusterVoterExistsIterator is returned from FilterVoterExists and is used to iterate over the raw logs and unpacked data for VoterExists events raised by the Cluster contract. +type ClusterVoterExistsIterator struct { + Event *ClusterVoterExists // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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. +func (it *ClusterVoterExistsIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ClusterVoterExists) + 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 + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ClusterVoterExists) + 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() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ClusterVoterExistsIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClusterVoterExistsIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClusterVoterExists represents a VoterExists event raised by the Cluster contract. +type ClusterVoterExists struct { + OrgId string + Address common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVoterExists is a free log retrieval operation binding the contract event 0x57c0436fcca42a02516ed36a118ab7196a853b19ae03db4cbe9d1f6ec5a8f30b. +// +// Solidity: e VoterExists(_orgId string, _address address) +func (_Cluster *ClusterFilterer) FilterVoterExists(opts *bind.FilterOpts) (*ClusterVoterExistsIterator, error) { + + logs, sub, err := _Cluster.contract.FilterLogs(opts, "VoterExists") + if err != nil { + return nil, err + } + return &ClusterVoterExistsIterator{contract: _Cluster.contract, event: "VoterExists", logs: logs, sub: sub}, nil +} + +// WatchVoterExists is a free log subscription operation binding the contract event 0x57c0436fcca42a02516ed36a118ab7196a853b19ae03db4cbe9d1f6ec5a8f30b. +// +// Solidity: e VoterExists(_orgId string, _address address) +func (_Cluster *ClusterFilterer) WatchVoterExists(opts *bind.WatchOpts, sink chan<- *ClusterVoterExists) (event.Subscription, error) { + + logs, sub, err := _Cluster.contract.WatchLogs(opts, "VoterExists") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClusterVoterExists) + if err := _Cluster.contract.UnpackLog(event, "VoterExists", 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 +} + +// ClusterVoterNotFoundIterator is returned from FilterVoterNotFound and is used to iterate over the raw logs and unpacked data for VoterNotFound events raised by the Cluster contract. +type ClusterVoterNotFoundIterator struct { + Event *ClusterVoterNotFound // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// 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. +func (it *ClusterVoterNotFoundIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ClusterVoterNotFound) + 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 + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ClusterVoterNotFound) + 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() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ClusterVoterNotFoundIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClusterVoterNotFoundIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClusterVoterNotFound represents a VoterNotFound event raised by the Cluster contract. +type ClusterVoterNotFound struct { + OrgId string + Address common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVoterNotFound is a free log retrieval operation binding the contract event 0xfc25f65937d1cb43a570fb3b3c5d0bf0b69b4cdd2da44c56b9893e2d14035960. +// +// Solidity: e VoterNotFound(_orgId string, _address address) +func (_Cluster *ClusterFilterer) FilterVoterNotFound(opts *bind.FilterOpts) (*ClusterVoterNotFoundIterator, error) { + + logs, sub, err := _Cluster.contract.FilterLogs(opts, "VoterNotFound") + if err != nil { + return nil, err + } + return &ClusterVoterNotFoundIterator{contract: _Cluster.contract, event: "VoterNotFound", logs: logs, sub: sub}, nil +} + +// WatchVoterNotFound is a free log subscription operation binding the contract event 0xfc25f65937d1cb43a570fb3b3c5d0bf0b69b4cdd2da44c56b9893e2d14035960. +// +// Solidity: e VoterNotFound(_orgId string, _address address) +func (_Cluster *ClusterFilterer) WatchVoterNotFound(opts *bind.WatchOpts, sink chan<- *ClusterVoterNotFound) (event.Subscription, error) { + + logs, sub, err := _Cluster.contract.WatchLogs(opts, "VoterNotFound") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClusterVoterNotFound) + if err := _Cluster.contract.UnpackLog(event, "VoterNotFound", 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 +} + // ClusterOrgVoterAddedIterator is returned from FilterOrgVoterAdded and is used to iterate over the raw logs and unpacked data for OrgVoterAdded events raised by the Cluster contract. type ClusterOrgVoterAddedIterator struct { Event *ClusterOrgVoterAdded // Event containing the contract specifics and raw log