// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.

package bind

import (
	"math/big"
	"strings"

	ethereum "github.com/ethereum/go-ethereum"
	"github.com/ethereum/go-ethereum/accounts/abi"
	"github.com/ethereum/go-ethereum/accounts/abi/bind"
	"github.com/ethereum/go-ethereum/common"
	"github.com/ethereum/go-ethereum/core/types"
	"github.com/ethereum/go-ethereum/event"
)

// Reference imports to suppress errors if they are not otherwise used.
var (
	_ = big.NewInt
	_ = strings.NewReader
	_ = ethereum.NotFound
	_ = bind.Bind
	_ = common.Big1
	_ = types.BloomLookup
	_ = event.NewSubscription
)

// NodeManagerABI is the input ABI used to generate the binding from.
const NodeManagerABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_ip\",\"type\":\"string\"},{\"name\":\"_port\",\"type\":\"uint16\"},{\"name\":\"_raftport\",\"type\":\"uint16\"},{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_action\",\"type\":\"uint256\"}],\"name\":\"updateNodeStatus\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"enodeId\",\"type\":\"string\"}],\"name\":\"getNodeDetails\",\"outputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_ip\",\"type\":\"string\"},{\"name\":\"_port\",\"type\":\"uint16\"},{\"name\":\"_raftport\",\"type\":\"uint16\"},{\"name\":\"_nodeStatus\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_ip\",\"type\":\"string\"},{\"name\":\"_port\",\"type\":\"uint16\"},{\"name\":\"_raftport\",\"type\":\"uint16\"},{\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"addAdminNode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_ip\",\"type\":\"string\"},{\"name\":\"_port\",\"type\":\"uint16\"}],\"name\":\"connectionAllowed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_ip\",\"type\":\"string\"},{\"name\":\"_port\",\"type\":\"uint16\"},{\"name\":\"_raftport\",\"type\":\"uint16\"},{\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"addOrgNode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_ip\",\"type\":\"string\"},{\"name\":\"_port\",\"type\":\"uint16\"},{\"name\":\"_raftport\",\"type\":\"uint16\"},{\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"addNode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_nodeIndex\",\"type\":\"uint256\"}],\"name\":\"getNodeDetailsFromIndex\",\"outputs\":[{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_ip\",\"type\":\"string\"},{\"name\":\"_port\",\"type\":\"uint16\"},{\"name\":\"_raftport\",\"type\":\"uint16\"},{\"name\":\"_nodeStatus\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNumberOfNodes\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_enodeId\",\"type\":\"string\"},{\"name\":\"_ip\",\"type\":\"string\"},{\"name\":\"_port\",\"type\":\"uint16\"},{\"name\":\"_raftport\",\"type\":\"uint16\"},{\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"approveNode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_permUpgradable\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ip\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_port\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_raftport\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"NodeProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ip\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_port\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_raftport\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"NodeApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ip\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_port\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_raftport\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"NodeDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ip\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_port\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_raftport\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"NodeActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ip\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_port\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_raftport\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"NodeBlacklisted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ip\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_port\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_raftport\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"NodeRecoveryInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_enodeId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_ip\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_port\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_raftport\",\"type\":\"uint16\"},{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"NodeRecoveryCompleted\",\"type\":\"event\"}]"

var NodeManagerParsedABI, _ = abi.JSON(strings.NewReader(NodeManagerABI))

// NodeManagerBin is the compiled bytecode used for deploying new contracts.
var NodeManagerBin = "0x608060405234801561001057600080fd5b5060405160208061338f8339810180604052602081101561003057600080fd5b5051600080546001600160a01b039092166001600160a01b031990921691909117905561332d806100626000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80634c573311116100665780634c5733111461042b578063549583df1461073057806397c07a9b146108f2578063b81c806a1461090f578063f82e08ac1461092957610093565b806337d50b27146100985780633f0e0e471461025e5780634530abe11461042b57806345a59e5b146105ed575b600080fd5b61025c600480360360c08110156100ae57600080fd5b810190602081018135600160201b8111156100c857600080fd5b8201836020820111156100da57600080fd5b803590602001918460018302840111600160201b831117156100fb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561014d57600080fd5b82018360208201111561015f57600080fd5b803590602001918460018302840111600160201b8311171561018057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929561ffff8535811696602087013590911695919450925060608101915060400135600160201b8111156101e657600080fd5b8201836020820111156101f857600080fd5b803590602001918460018302840111600160201b8311171561021957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610aeb915050565b005b6102cc6004803603602081101561027457600080fd5b810190602081018135600160201b81111561028e57600080fd5b8201836020820111156102a057600080fd5b803590602001918460018302840111600160201b831117156102c157600080fd5b50909250905061160a565b6040805161ffff80861660608301528416608082015260a0810183905260c080825288519082015287519091829160208084019284019160e08501918c019080838360005b83811015610329578181015183820152602001610311565b50505050905090810190601f1680156103565780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838360005b83811015610389578181015183820152602001610371565b50505050905090810190601f1680156103b65780820380516001836020036101000a031916815260200191505b5084810382528851815288516020918201918a019080838360005b838110156103e95781810151838201526020016103d1565b50505050905090810190601f1680156104165780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390f35b61025c600480360360a081101561044157600080fd5b810190602081018135600160201b81111561045b57600080fd5b82018360208201111561046d57600080fd5b803590602001918460018302840111600160201b8311171561048e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156104e057600080fd5b8201836020820111156104f257600080fd5b803590602001918460018302840111600160201b8311171561051357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929561ffff8535811696602087013590911695919450925060608101915060400135600160201b81111561057957600080fd5b82018360208201111561058b57600080fd5b803590602001918460018302840111600160201b831117156105ac57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506119d1945050505050565b61071c6004803603606081101561060357600080fd5b810190602081018135600160201b81111561061d57600080fd5b82018360208201111561062f57600080fd5b803590602001918460018302840111600160201b8311171561065057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156106a257600080fd5b8201836020820111156106b457600080fd5b803590602001918460018302840111600160201b831117156106d557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903561ffff169150611ec79050565b604080519115158252519081900360200190f35b61025c600480360360a081101561074657600080fd5b810190602081018135600160201b81111561076057600080fd5b82018360208201111561077257600080fd5b803590602001918460018302840111600160201b8311171561079357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156107e557600080fd5b8201836020820111156107f757600080fd5b803590602001918460018302840111600160201b8311171561081857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929561ffff8535811696602087013590911695919450925060608101915060400135600160201b81111561087e57600080fd5b82018360208201111561089057600080fd5b803590602001918460018302840111600160201b831117156108b157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506121e8945050505050565b6102cc6004803603602081101561090857600080fd5b50356125d5565b610917612879565b60408051918252519081900360200190f35b61025c600480360360a081101561093f57600080fd5b810190602081018135600160201b81111561095957600080fd5b82018360208201111561096b57600080fd5b803590602001918460018302840111600160201b8311171561098c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156109de57600080fd5b8201836020820111156109f057600080fd5b803590602001918460018302840111600160201b83111715610a1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929561ffff8535811696602087013590911695919450925060608101915060400135600160201b811115610a7757600080fd5b820183602082011115610a8957600080fd5b803590602001918460018302840111600160201b83111715610aaa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612880945050505050565b6000809054906101000a90046001600160a01b03166001600160a01b0316630e32cf906040518163ffffffff1660e01b815260040160206040518083038186803b158015610b3857600080fd5b505afa158015610b4c573d6000803e3d6000fd5b505050506040513d6020811015610b6257600080fd5b50516001600160a01b03163314610bb75760408051600160e51b62461bcd02815260206004820152600e6024820152600160911b6d34b73b30b634b21031b0b63632b902604482015290519081900360640190fd5b8560036000826040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015610bfd578181015183820152602001610be5565b50505050905090810190601f168015610c2a5780820380516001836020036101000a031916815260200191505b5060408051601f19818403018152918152815160209283012086529085019590955250505001600020541515610caa5760408051600160e51b62461bcd02815260206004820152601e60248201527f70617373656420656e6f646520696420646f6573206e6f742065786973740000604482015290519081900360640190fd5b610cb48784612eed565b1515610cf457604051600160e51b62461bcd02815260040180806020018281038252602a815260200180613265602a913960400191505060405180910390fd5b8160011480610d035750816002145b80610d0e5750816003145b80610d195750816004145b80610d245750816005145b1515610d6457604051600160e51b62461bcd0281526004018080602001828103825260268152602001806132af6026913960400191505060405180910390fd5b6000610d6f88613047565b9050866040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015610db2578181015183820152602001610d9a565b50505050905090810190601f168015610ddf5780820380516001836020036101000a031916815260200191505b509250505060405160208183030381529060405280519060200120600182815481101515610e0957fe5b90600052602060002090600502016001016040516020018080602001828103825283818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610ea65780601f10610e7b57610100808354040283529160200191610ea6565b820191906000526020600020905b815481529060010190602001808311610e8957829003601f168201915b50509250505060405160208183030381529060405280519060200120141580610ef957508561ffff16600182815481101515610ede57fe5b600091825260209091206002600590920201015461ffff1614155b80610f3457508461ffff16600182815481101515610f1357fe5b600091825260209091206005909102016002015462010000900461ffff1614155b15610f3f5750611601565b826001141561114857610f51886130f0565b600214610f965760408051600160e51b62461bcd02815260206004820152601d602482015260008051602061328f833981519152604482015290519081900360640190fd5b6003600182815481101515610fa757fe5b9060005260206000209060050201600401819055507ff631019be71bc682c59150635d714061185232e98e60de8bdd87bbee239cc5c888888888886040518080602001806020018661ffff1661ffff1681526020018561ffff1661ffff16815260200180602001848103845289818151815260200191508051906020019080838360005b8381101561104357818101518382015260200161102b565b50505050905090810190601f1680156110705780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b838110156110a357818101518382015260200161108b565b50505050905090810190601f1680156110d05780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b838110156111035781810151838201526020016110eb565b50505050905090810190601f1680156111305780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a16115ff565b826002141561124b5761115a886130f0565b60031461119f5760408051600160e51b62461bcd02815260206004820152601d602482015260008051602061328f833981519152604482015290519081900360640190fd5b60026001828154811015156111b057fe5b9060005260206000209060050201600401819055507ffb98f62dea866f0c373574c8523f611d0db1d8f19cc1b95d07a221d36a6a45de88888888886040518080602001806020018661ffff1661ffff1681526020018561ffff1661ffff16815260200180602001848103845289818151815260200191508051906020019080838360008381101561104357818101518382015260200161102b565b826003141561130057600460018281548110151561126557fe5b9060005260206000209060050201600401819055507f25300d4d785e654bc9b7979700cfa0fdc9ace890a46841fecfce661fd2c41a3388888888886040518080602001806020018661ffff1661ffff1681526020018561ffff1661ffff16815260200180602001848103845289818151815260200191508051906020019080838360008381101561104357818101518382015260200161102b565b826004141561140357611312886130f0565b6004146113575760408051600160e51b62461bcd02815260206004820152601d602482015260008051602061328f833981519152604482015290519081900360640190fd5b600560018281548110151561136857fe5b9060005260206000209060050201600401819055507f72779f66ea90e28bae76fbfe03eaef5ae01699976c7493f93186ab9560ccfaa488888888886040518080602001806020018661ffff1661ffff1681526020018561ffff1661ffff16815260200180602001848103845289818151815260200191508051906020019080838360008381101561104357818101518382015260200161102b565b61140c886130f0565b6005146114515760408051600160e51b62461bcd02815260206004820152601d602482015260008051602061328f833981519152604482015290519081900360640190fd5b600260018281548110151561146257fe5b9060005260206000209060050201600401819055507f60aac8c36efdaabf125dc9ec2124bde8b3ceafe5c8b4fc8063fc4ac9017eb0be88888888886040518080602001806020018661ffff1661ffff1681526020018561ffff1661ffff16815260200180602001848103845289818151815260200191508051906020019080838360005b838110156114fe5781810151838201526020016114e6565b50505050905090810190601f16801561152b5780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b8381101561155e578181015183820152602001611546565b50505050905090810190601f16801561158b5780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b838110156115be5781810151838201526020016115a6565b50505050905090810190601f1680156115eb5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a15b505b50505050505050565b6060806060600080600060026000866040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015611659578181015183820152602001611641565b50505050905090810190601f1680156116865780820380516001836020036101000a031916815260200191505b509250505060405160208183030381529060405280519060200120815260200190815260200160002054600014156116f157505060408051602080820183526000808352835180830185528181528451928301909452808252919650919450909250905080806119c7565b600061173289898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061304792505050565b905060018181548110151561174357fe5b906000526020600020906005020160030160018281548110151561176357fe5b906000526020600020906005020160000160018381548110151561178357fe5b90600052602060002090600502016001016001848154811015156117a357fe5b60009182526020909120600260059092020101546001805461ffff90921691869081106117cc57fe5b906000526020600020906005020160020160029054906101000a900461ffff166001868154811015156117fb57fe5b600091825260209182902060046005909202010154865460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815291928891908301828280156118965780601f1061186b57610100808354040283529160200191611896565b820191906000526020600020905b81548152906001019060200180831161187957829003601f168201915b5050885460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152959b508a9450925084019050828280156119245780601f106118f957610100808354040283529160200191611924565b820191906000526020600020905b81548152906001019060200180831161190757829003601f168201915b5050875460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152959a50899450925084019050828280156119b25780601f10611987576101008083540402835291602001916119b2565b820191906000526020600020905b81548152906001019060200180831161199557829003601f168201915b50505050509350965096509650965096509650505b9295509295509295565b6000809054906101000a90046001600160a01b03166001600160a01b0316630e32cf906040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1e57600080fd5b505afa158015611a32573d6000803e3d6000fd5b505050506040513d6020811015611a4857600080fd5b50516001600160a01b03163314611a9d5760408051600160e51b62461bcd02815260206004820152600e6024820152600160911b6d34b73b30b634b21031b0b63632b902604482015290519081900360640190fd5b8460036000826040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015611ae3578181015183820152602001611acb565b50505050905090810190601f168015611b105780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181528151602092830120865290850195909552505050016000205415611b8f5760408051600160e51b62461bcd02815260206004820152601660248201527f70617373656420656e6f64652069642065786973747300000000000000000000604482015290519081900360640190fd5b60048054600101908190556040805160208082018181528a519383019390935289516003936000938c9391928392606090920191850190808383895b83811015611be3578181015183820152602001611bcb565b50505050905090810190601f168015611c105780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301208652858201969096529385016000908120969096555050825160c0810184528a81528083018a905261ffff808a169482019490945292871660608401525060808201859052600260a083015260018054808201808355919094528251805191946005027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60192611cbe928492909101906131cc565b506020828101518051611cd792600185019201906131cc565b506040820151600282018054606085015161ffff908116620100000263ffff0000199190941661ffff19909216919091171691909117905560808201518051611d2a9160038401916020909101906131cc565b5060a082015181600401555050507f9394c836a3325586270659f6aa3b9f835abca9afe7fec5abfc69760bb12bce0d86868686866040518080602001806020018661ffff1661ffff1681526020018561ffff1661ffff16815260200180602001848103845289818151815260200191508051906020019080838360005b83811015611dbf578181015183820152602001611da7565b50505050905090810190601f168015611dec5780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b83811015611e1f578181015183820152602001611e07565b50505050905090810190601f168015611e4c5780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b83811015611e7f578181015183820152602001611e67565b50505050905090810190601f168015611eac5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a1505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316630e32cf906040518163ffffffff1660e01b815260040160206040518083038186803b158015611f1657600080fd5b505afa158015611f2a573d6000803e3d6000fd5b505050506040513d6020811015611f4057600080fd5b50516001600160a01b03163314611f955760408051600160e51b62461bcd02815260206004820152600e6024820152600160911b6d34b73b30b634b21031b0b63632b902604482015290519081900360640190fd5b60036000856040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015611fda578181015183820152602001611fc2565b50505050905090810190601f1680156120075780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012081526020019081526020016000205460001415612041575060006121e1565b600061204c85613047565b905060018181548110151561205d57fe5b90600052602060002090600502016004015460021480156121cc5750836040516020018080602001828103825283818151815260200191508051906020019080838360005b838110156120ba5781810151838201526020016120a2565b50505050905090810190601f1680156120e75780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040528051906020012060018281548110151561211157fe5b906000526020600020906005020160010160405160200180806020018281038252838181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156121ae5780601f10612183576101008083540402835291602001916121ae565b820191906000526020600020905b81548152906001019060200180831161219157829003601f168201915b50509250505060405160208183030381529060405280519060200120145b156121db5760019150506121e1565b60009150505b9392505050565b6000809054906101000a90046001600160a01b03166001600160a01b0316630e32cf906040518163ffffffff1660e01b815260040160206040518083038186803b15801561223557600080fd5b505afa158015612249573d6000803e3d6000fd5b505050506040513d602081101561225f57600080fd5b50516001600160a01b031633146122b45760408051600160e51b62461bcd02815260206004820152600e6024820152600160911b6d34b73b30b634b21031b0b63632b902604482015290519081900360640190fd5b8460036000826040516020018080602001828103825283818151815260200191508051906020019080838360005b838110156122fa5781810151838201526020016122e2565b50505050905090810190601f1680156123275780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301208652908501959095525050500160002054156123a65760408051600160e51b62461bcd02815260206004820152601660248201527f70617373656420656e6f64652069642065786973747300000000000000000000604482015290519081900360640190fd5b60048054600101908190556040805160208082018181528a519383019390935289516003936000938c9391928392606090920191850190808383895b838110156123fa5781810151838201526020016123e2565b50505050905090810190601f1680156124275780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301208652858201969096529385016000908120969096555050825160c0810184528a81528083018a905261ffff808a169482019490945292871660608401525060808201859052600160a083018190528054808201808355919094528251805191946005027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601926124d5928492909101906131cc565b5060208281015180516124ee92600185019201906131cc565b506040820151600282018054606085015161ffff908116620100000263ffff0000199190941661ffff199092169190911716919091179055608082015180516125419160038401916020909101906131cc565b5060a082015181600401555050507ff9bad9f8a2dccc52fad61273a7fd673335b420319506c19b87df9ce7a19732da86868686866040518080602001806020018661ffff1661ffff1681526020018561ffff1661ffff168152602001806020018481038452898181518152602001915080519060200190808383600083811015611dbf578181015183820152602001611da7565b606080606060008060006001878154811015156125ee57fe5b906000526020600020906005020160030160018881548110151561260e57fe5b906000526020600020906005020160000160018981548110151561262e57fe5b906000526020600020906005020160010160018a81548110151561264e57fe5b60009182526020909120600260059092020101546001805461ffff909216918c90811061267757fe5b906000526020600020906005020160020160029054906101000a900461ffff1660018c8154811015156126a657fe5b600091825260209182902060046005909202010154865460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815291928891908301828280156127415780601f1061271657610100808354040283529160200191612741565b820191906000526020600020905b81548152906001019060200180831161272457829003601f168201915b5050885460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152959b508a9450925084019050828280156127cf5780601f106127a4576101008083540402835291602001916127cf565b820191906000526020600020905b8154815290600101906020018083116127b257829003601f168201915b5050875460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152959a508994509250840190508282801561285d5780601f106128325761010080835404028352916020019161285d565b820191906000526020600020905b81548152906001019060200180831161284057829003601f168201915b5050505050935095509550955095509550955091939550919395565b6004545b90565b6000809054906101000a90046001600160a01b03166001600160a01b0316630e32cf906040518163ffffffff1660e01b815260040160206040518083038186803b1580156128cd57600080fd5b505afa1580156128e1573d6000803e3d6000fd5b505050506040513d60208110156128f757600080fd5b50516001600160a01b0316331461294c5760408051600160e51b62461bcd02815260206004820152600e6024820152600160911b6d34b73b30b634b21031b0b63632b902604482015290519081900360640190fd5b8460036000826040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561299257818101518382015260200161297a565b50505050905090810190601f1680156129bf5780820380516001836020036101000a031916815260200191505b5060408051601f19818403018152918152815160209283012086529085019590955250505001600020541515612a3f5760408051600160e51b62461bcd02815260206004820152601e60248201527f70617373656420656e6f646520696420646f6573206e6f742065786973740000604482015290519081900360640190fd5b612a498683612eed565b1515612a8957604051600160e51b62461bcd02815260040180806020018281038252602d8152602001806132d5602d913960400191505060405180910390fd5b612a92866130f0565b600114612ae95760408051600160e51b62461bcd02815260206004820152601c60248201527f6e6f7468696e672070656e64696e6720666f7220617070726f76616c00000000604482015290519081900360640190fd5b6000612af487613047565b9050856040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015612b37578181015183820152602001612b1f565b50505050905090810190601f168015612b645780820380516001836020036101000a031916815260200191505b509250505060405160208183030381529060405280519060200120600182815481101515612b8e57fe5b90600052602060002090600502016001016040516020018080602001828103825283818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015612c2b5780601f10612c0057610100808354040283529160200191612c2b565b820191906000526020600020905b815481529060010190602001808311612c0e57829003601f168201915b50509250505060405160208183030381529060405280519060200120141580612c7e57508461ffff16600182815481101515612c6357fe5b600091825260209091206002600590920201015461ffff1614155b80612cb957508361ffff16600182815481101515612c9857fe5b600091825260209091206005909102016002015462010000900461ffff1614155b15612cc45750612ee5565b6002600182815481101515612cd557fe5b9060005260206000209060050201600401819055507f9394c836a3325586270659f6aa3b9f835abca9afe7fec5abfc69760bb12bce0d600182815481101515612d1a57fe5b9060005260206000209060050201600001878787600186815481101515612d3d57fe5b90600052602060002090600502016003016040518080602001806020018661ffff1661ffff1681526020018561ffff1661ffff16815260200180602001848103845289818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015612dfb5780601f10612dd057610100808354040283529160200191612dfb565b820191906000526020600020905b815481529060010190602001808311612dde57829003601f168201915b505084810383528851815288516020918201918a019080838360005b83811015612e2f578181015183820152602001612e17565b50505050905090810190601f168015612e5c5780820380516001836020036101000a031916815260200191505b50848103825285546002600019610100600184161502019091160480825260209091019086908015612ecf5780601f10612ea457610100808354040283529160200191612ecf565b820191906000526020600020905b815481529060010190602001808311612eb257829003601f168201915b50509850505050505050505060405180910390a1505b505050505050565b6000816040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015612f30578181015183820152602001612f18565b50505050905090810190601f168015612f5d5780820380516001836020036101000a031916815260200191505b5092505050604051602081830303815290604052805190602001206001612f8385613047565b81548110612f8d57fe5b60009182526020918290206040805180850194855260036005909402909201929092018054600260001961010060018416150201909116049282018390529291829160600190849080156130225780601f10612ff757610100808354040283529160200191613022565b820191906000526020600020905b81548152906001019060200180831161300557829003601f168201915b5050925050506040516020818303038152906040528051906020012014905092915050565b6000600160036000846040516020018080602001828103825283818151815260200191508051906020019080838360005b83811015613090578181015183820152602001613078565b50505050905090810190601f1680156130bd5780820380516001836020036101000a031916815260200191505b5092505050604051602081830303815290604052805190602001208152602001908152602001600020540390505b919050565b600060036000836040516020018080602001828103825283818151815260200191508051906020019080838360005b8381101561313757818101518382015260200161311f565b50505050905090810190601f1680156131645780820380516001836020036101000a031916815260200191505b5092505050604051602081830303815290604052805190602001208152602001908152602001600020546000141561319e575060006130eb565b60016131a983613047565b815481106131b357fe5b9060005260206000209060050201600401549050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061320d57805160ff191683800117855561323a565b8280016001018555821561323a579182015b8281111561323a57825182559160200191906001019061321f565b5061324692915061324a565b5090565b61287d91905b80821115613246576000815560010161325056fe656e6f646520696420646f6573206e6f742062656c6f6e6720746f2074686520706173736564206f72676f7065726174696f6e2063616e6e6f7420626520706572666f726d6564000000696e76616c6964206f7065726174696f6e2e2077726f6e6720616374696f6e20706173736564656e6f646520696420646f6573206e6f742062656c6f6e6720746f2074686520706173736564206f7267206964a165627a7a7230582033fd8af5439a9af79764088da6847651cc33d3b41698fff5d54b3e47419c5c6a0029"

// DeployNodeManager deploys a new Ethereum contract, binding an instance of NodeManager to it.
func DeployNodeManager(auth *bind.TransactOpts, backend bind.ContractBackend, _permUpgradable common.Address) (common.Address, *types.Transaction, *NodeManager, error) {
	parsed, err := abi.JSON(strings.NewReader(NodeManagerABI))
	if err != nil {
		return common.Address{}, nil, nil, err
	}

	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(NodeManagerBin), backend, _permUpgradable)
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	return address, tx, &NodeManager{NodeManagerCaller: NodeManagerCaller{contract: contract}, NodeManagerTransactor: NodeManagerTransactor{contract: contract}, NodeManagerFilterer: NodeManagerFilterer{contract: contract}}, nil
}

// NodeManager is an auto generated Go binding around an Ethereum contract.
type NodeManager struct {
	NodeManagerCaller     // Read-only binding to the contract
	NodeManagerTransactor // Write-only binding to the contract
	NodeManagerFilterer   // Log filterer for contract events
}

// NodeManagerCaller is an auto generated read-only Go binding around an Ethereum contract.
type NodeManagerCaller struct {
	contract *bind.BoundContract // Generic contract wrapper for the low level calls
}

// NodeManagerTransactor is an auto generated write-only Go binding around an Ethereum contract.
type NodeManagerTransactor struct {
	contract *bind.BoundContract // Generic contract wrapper for the low level calls
}

// NodeManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type NodeManagerFilterer struct {
	contract *bind.BoundContract // Generic contract wrapper for the low level calls
}

// NodeManagerSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type NodeManagerSession struct {
	Contract     *NodeManager      // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

// NodeManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type NodeManagerCallerSession struct {
	Contract *NodeManagerCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts      // Call options to use throughout this session
}

// NodeManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type NodeManagerTransactorSession struct {
	Contract     *NodeManagerTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts      // Transaction auth options to use throughout this session
}

// NodeManagerRaw is an auto generated low-level Go binding around an Ethereum contract.
type NodeManagerRaw struct {
	Contract *NodeManager // Generic contract binding to access the raw methods on
}

// NodeManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type NodeManagerCallerRaw struct {
	Contract *NodeManagerCaller // Generic read-only contract binding to access the raw methods on
}

// NodeManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type NodeManagerTransactorRaw struct {
	Contract *NodeManagerTransactor // Generic write-only contract binding to access the raw methods on
}

// NewNodeManager creates a new instance of NodeManager, bound to a specific deployed contract.
func NewNodeManager(address common.Address, backend bind.ContractBackend) (*NodeManager, error) {
	contract, err := bindNodeManager(address, backend, backend, backend)
	if err != nil {
		return nil, err
	}
	return &NodeManager{NodeManagerCaller: NodeManagerCaller{contract: contract}, NodeManagerTransactor: NodeManagerTransactor{contract: contract}, NodeManagerFilterer: NodeManagerFilterer{contract: contract}}, nil
}

// NewNodeManagerCaller creates a new read-only instance of NodeManager, bound to a specific deployed contract.
func NewNodeManagerCaller(address common.Address, caller bind.ContractCaller) (*NodeManagerCaller, error) {
	contract, err := bindNodeManager(address, caller, nil, nil)
	if err != nil {
		return nil, err
	}
	return &NodeManagerCaller{contract: contract}, nil
}

// NewNodeManagerTransactor creates a new write-only instance of NodeManager, bound to a specific deployed contract.
func NewNodeManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*NodeManagerTransactor, error) {
	contract, err := bindNodeManager(address, nil, transactor, nil)
	if err != nil {
		return nil, err
	}
	return &NodeManagerTransactor{contract: contract}, nil
}

// NewNodeManagerFilterer creates a new log filterer instance of NodeManager, bound to a specific deployed contract.
func NewNodeManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*NodeManagerFilterer, error) {
	contract, err := bindNodeManager(address, nil, nil, filterer)
	if err != nil {
		return nil, err
	}
	return &NodeManagerFilterer{contract: contract}, nil
}

// bindNodeManager binds a generic wrapper to an already deployed contract.
func bindNodeManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
	parsed, err := abi.JSON(strings.NewReader(NodeManagerABI))
	if err != nil {
		return nil, err
	}
	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}

// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_NodeManager *NodeManagerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
	return _NodeManager.Contract.NodeManagerCaller.contract.Call(opts, result, method, params...)
}

// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_NodeManager *NodeManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _NodeManager.Contract.NodeManagerTransactor.contract.Transfer(opts)
}

// Transact invokes the (paid) contract method with params as input values.
func (_NodeManager *NodeManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _NodeManager.Contract.NodeManagerTransactor.contract.Transact(opts, method, params...)
}

// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_NodeManager *NodeManagerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
	return _NodeManager.Contract.contract.Call(opts, result, method, params...)
}

// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_NodeManager *NodeManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _NodeManager.Contract.contract.Transfer(opts)
}

// Transact invokes the (paid) contract method with params as input values.
func (_NodeManager *NodeManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _NodeManager.Contract.contract.Transact(opts, method, params...)
}

// ConnectionAllowed is a free data retrieval call binding the contract method 0x45a59e5b.
//
// Solidity: function connectionAllowed(string _enodeId, string _ip, uint16 _port) view returns(bool)
func (_NodeManager *NodeManagerCaller) ConnectionAllowed(opts *bind.CallOpts, _enodeId string, _ip string, _port uint16) (bool, error) {
	var out []interface{}
	err := _NodeManager.contract.Call(opts, &out, "connectionAllowed", _enodeId, _ip, _port)

	if err != nil {
		return *new(bool), err
	}

	out0 := *abi.ConvertType(out[0], new(bool)).(*bool)

	return out0, err

}

// ConnectionAllowed is a free data retrieval call binding the contract method 0x45a59e5b.
//
// Solidity: function connectionAllowed(string _enodeId, string _ip, uint16 _port) view returns(bool)
func (_NodeManager *NodeManagerSession) ConnectionAllowed(_enodeId string, _ip string, _port uint16) (bool, error) {
	return _NodeManager.Contract.ConnectionAllowed(&_NodeManager.CallOpts, _enodeId, _ip, _port)
}

// ConnectionAllowed is a free data retrieval call binding the contract method 0x45a59e5b.
//
// Solidity: function connectionAllowed(string _enodeId, string _ip, uint16 _port) view returns(bool)
func (_NodeManager *NodeManagerCallerSession) ConnectionAllowed(_enodeId string, _ip string, _port uint16) (bool, error) {
	return _NodeManager.Contract.ConnectionAllowed(&_NodeManager.CallOpts, _enodeId, _ip, _port)
}

// GetNodeDetails is a free data retrieval call binding the contract method 0x3f0e0e47.
//
// Solidity: function getNodeDetails(string enodeId) view returns(string _orgId, string _enodeId, string _ip, uint16 _port, uint16 _raftport, uint256 _nodeStatus)
func (_NodeManager *NodeManagerCaller) GetNodeDetails(opts *bind.CallOpts, enodeId string) (struct {
	OrgId      string
	EnodeId    string
	Ip         string
	Port       uint16
	Raftport   uint16
	NodeStatus *big.Int
}, error) {
	var out []interface{}
	err := _NodeManager.contract.Call(opts, &out, "getNodeDetails", enodeId)

	outstruct := new(struct {
		OrgId      string
		EnodeId    string
		Ip         string
		Port       uint16
		Raftport   uint16
		NodeStatus *big.Int
	})

	outstruct.OrgId = out[0].(string)
	outstruct.EnodeId = out[1].(string)
	outstruct.Ip = out[2].(string)
	outstruct.Port = out[3].(uint16)
	outstruct.Raftport = out[4].(uint16)
	outstruct.NodeStatus = out[5].(*big.Int)

	return *outstruct, err

}

// GetNodeDetails is a free data retrieval call binding the contract method 0x3f0e0e47.
//
// Solidity: function getNodeDetails(string enodeId) view returns(string _orgId, string _enodeId, string _ip, uint16 _port, uint16 _raftport, uint256 _nodeStatus)
func (_NodeManager *NodeManagerSession) GetNodeDetails(enodeId string) (struct {
	OrgId      string
	EnodeId    string
	Ip         string
	Port       uint16
	Raftport   uint16
	NodeStatus *big.Int
}, error) {
	return _NodeManager.Contract.GetNodeDetails(&_NodeManager.CallOpts, enodeId)
}

// GetNodeDetails is a free data retrieval call binding the contract method 0x3f0e0e47.
//
// Solidity: function getNodeDetails(string enodeId) view returns(string _orgId, string _enodeId, string _ip, uint16 _port, uint16 _raftport, uint256 _nodeStatus)
func (_NodeManager *NodeManagerCallerSession) GetNodeDetails(enodeId string) (struct {
	OrgId      string
	EnodeId    string
	Ip         string
	Port       uint16
	Raftport   uint16
	NodeStatus *big.Int
}, error) {
	return _NodeManager.Contract.GetNodeDetails(&_NodeManager.CallOpts, enodeId)
}

// GetNodeDetailsFromIndex is a free data retrieval call binding the contract method 0x97c07a9b.
//
// Solidity: function getNodeDetailsFromIndex(uint256 _nodeIndex) view returns(string _orgId, string _enodeId, string _ip, uint16 _port, uint16 _raftport, uint256 _nodeStatus)
func (_NodeManager *NodeManagerCaller) GetNodeDetailsFromIndex(opts *bind.CallOpts, _nodeIndex *big.Int) (struct {
	OrgId      string
	EnodeId    string
	Ip         string
	Port       uint16
	Raftport   uint16
	NodeStatus *big.Int
}, error) {
	var out []interface{}
	err := _NodeManager.contract.Call(opts, &out, "getNodeDetailsFromIndex", _nodeIndex)

	outstruct := new(struct {
		OrgId      string
		EnodeId    string
		Ip         string
		Port       uint16
		Raftport   uint16
		NodeStatus *big.Int
	})

	outstruct.OrgId = out[0].(string)
	outstruct.EnodeId = out[1].(string)
	outstruct.Ip = out[2].(string)
	outstruct.Port = out[3].(uint16)
	outstruct.Raftport = out[4].(uint16)
	outstruct.NodeStatus = out[5].(*big.Int)

	return *outstruct, err

}

// GetNodeDetailsFromIndex is a free data retrieval call binding the contract method 0x97c07a9b.
//
// Solidity: function getNodeDetailsFromIndex(uint256 _nodeIndex) view returns(string _orgId, string _enodeId, string _ip, uint16 _port, uint16 _raftport, uint256 _nodeStatus)
func (_NodeManager *NodeManagerSession) GetNodeDetailsFromIndex(_nodeIndex *big.Int) (struct {
	OrgId      string
	EnodeId    string
	Ip         string
	Port       uint16
	Raftport   uint16
	NodeStatus *big.Int
}, error) {
	return _NodeManager.Contract.GetNodeDetailsFromIndex(&_NodeManager.CallOpts, _nodeIndex)
}

// GetNodeDetailsFromIndex is a free data retrieval call binding the contract method 0x97c07a9b.
//
// Solidity: function getNodeDetailsFromIndex(uint256 _nodeIndex) view returns(string _orgId, string _enodeId, string _ip, uint16 _port, uint16 _raftport, uint256 _nodeStatus)
func (_NodeManager *NodeManagerCallerSession) GetNodeDetailsFromIndex(_nodeIndex *big.Int) (struct {
	OrgId      string
	EnodeId    string
	Ip         string
	Port       uint16
	Raftport   uint16
	NodeStatus *big.Int
}, error) {
	return _NodeManager.Contract.GetNodeDetailsFromIndex(&_NodeManager.CallOpts, _nodeIndex)
}

// GetNumberOfNodes is a free data retrieval call binding the contract method 0xb81c806a.
//
// Solidity: function getNumberOfNodes() view returns(uint256)
func (_NodeManager *NodeManagerCaller) GetNumberOfNodes(opts *bind.CallOpts) (*big.Int, error) {
	var out []interface{}
	err := _NodeManager.contract.Call(opts, &out, "getNumberOfNodes")

	if err != nil {
		return *new(*big.Int), err
	}

	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)

	return out0, err

}

// GetNumberOfNodes is a free data retrieval call binding the contract method 0xb81c806a.
//
// Solidity: function getNumberOfNodes() view returns(uint256)
func (_NodeManager *NodeManagerSession) GetNumberOfNodes() (*big.Int, error) {
	return _NodeManager.Contract.GetNumberOfNodes(&_NodeManager.CallOpts)
}

// GetNumberOfNodes is a free data retrieval call binding the contract method 0xb81c806a.
//
// Solidity: function getNumberOfNodes() view returns(uint256)
func (_NodeManager *NodeManagerCallerSession) GetNumberOfNodes() (*big.Int, error) {
	return _NodeManager.Contract.GetNumberOfNodes(&_NodeManager.CallOpts)
}

// AddAdminNode is a paid mutator transaction binding the contract method 0x4530abe1.
//
// Solidity: function addAdminNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerTransactor) AddAdminNode(opts *bind.TransactOpts, _enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.contract.Transact(opts, "addAdminNode", _enodeId, _ip, _port, _raftport, _orgId)
}

// AddAdminNode is a paid mutator transaction binding the contract method 0x4530abe1.
//
// Solidity: function addAdminNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerSession) AddAdminNode(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.Contract.AddAdminNode(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId)
}

// AddAdminNode is a paid mutator transaction binding the contract method 0x4530abe1.
//
// Solidity: function addAdminNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerTransactorSession) AddAdminNode(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.Contract.AddAdminNode(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId)
}

// AddNode is a paid mutator transaction binding the contract method 0x549583df.
//
// Solidity: function addNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerTransactor) AddNode(opts *bind.TransactOpts, _enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.contract.Transact(opts, "addNode", _enodeId, _ip, _port, _raftport, _orgId)
}

// AddNode is a paid mutator transaction binding the contract method 0x549583df.
//
// Solidity: function addNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerSession) AddNode(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.Contract.AddNode(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId)
}

// AddNode is a paid mutator transaction binding the contract method 0x549583df.
//
// Solidity: function addNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerTransactorSession) AddNode(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.Contract.AddNode(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId)
}

// AddOrgNode is a paid mutator transaction binding the contract method 0x4c573311.
//
// Solidity: function addOrgNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerTransactor) AddOrgNode(opts *bind.TransactOpts, _enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.contract.Transact(opts, "addOrgNode", _enodeId, _ip, _port, _raftport, _orgId)
}

// AddOrgNode is a paid mutator transaction binding the contract method 0x4c573311.
//
// Solidity: function addOrgNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerSession) AddOrgNode(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.Contract.AddOrgNode(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId)
}

// AddOrgNode is a paid mutator transaction binding the contract method 0x4c573311.
//
// Solidity: function addOrgNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerTransactorSession) AddOrgNode(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.Contract.AddOrgNode(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId)
}

// ApproveNode is a paid mutator transaction binding the contract method 0xf82e08ac.
//
// Solidity: function approveNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerTransactor) ApproveNode(opts *bind.TransactOpts, _enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.contract.Transact(opts, "approveNode", _enodeId, _ip, _port, _raftport, _orgId)
}

// ApproveNode is a paid mutator transaction binding the contract method 0xf82e08ac.
//
// Solidity: function approveNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerSession) ApproveNode(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.Contract.ApproveNode(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId)
}

// ApproveNode is a paid mutator transaction binding the contract method 0xf82e08ac.
//
// Solidity: function approveNode(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId) returns()
func (_NodeManager *NodeManagerTransactorSession) ApproveNode(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string) (*types.Transaction, error) {
	return _NodeManager.Contract.ApproveNode(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId)
}

// UpdateNodeStatus is a paid mutator transaction binding the contract method 0x37d50b27.
//
// Solidity: function updateNodeStatus(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId, uint256 _action) returns()
func (_NodeManager *NodeManagerTransactor) UpdateNodeStatus(opts *bind.TransactOpts, _enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string, _action *big.Int) (*types.Transaction, error) {
	return _NodeManager.contract.Transact(opts, "updateNodeStatus", _enodeId, _ip, _port, _raftport, _orgId, _action)
}

// UpdateNodeStatus is a paid mutator transaction binding the contract method 0x37d50b27.
//
// Solidity: function updateNodeStatus(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId, uint256 _action) returns()
func (_NodeManager *NodeManagerSession) UpdateNodeStatus(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string, _action *big.Int) (*types.Transaction, error) {
	return _NodeManager.Contract.UpdateNodeStatus(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId, _action)
}

// UpdateNodeStatus is a paid mutator transaction binding the contract method 0x37d50b27.
//
// Solidity: function updateNodeStatus(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId, uint256 _action) returns()
func (_NodeManager *NodeManagerTransactorSession) UpdateNodeStatus(_enodeId string, _ip string, _port uint16, _raftport uint16, _orgId string, _action *big.Int) (*types.Transaction, error) {
	return _NodeManager.Contract.UpdateNodeStatus(&_NodeManager.TransactOpts, _enodeId, _ip, _port, _raftport, _orgId, _action)
}

// NodeManagerNodeActivatedIterator is returned from FilterNodeActivated and is used to iterate over the raw logs and unpacked data for NodeActivated events raised by the NodeManager contract.
type NodeManagerNodeActivatedIterator struct {
	Event *NodeManagerNodeActivated // 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 *NodeManagerNodeActivatedIterator) 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(NodeManagerNodeActivated)
			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(NodeManagerNodeActivated)
		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 *NodeManagerNodeActivatedIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *NodeManagerNodeActivatedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// NodeManagerNodeActivated represents a NodeActivated event raised by the NodeManager contract.
type NodeManagerNodeActivated struct {
	EnodeId  string
	Ip       string
	Port     uint16
	Raftport uint16
	OrgId    string
	Raw      types.Log // Blockchain specific contextual infos
}

// FilterNodeActivated is a free log retrieval operation binding the contract event 0xfb98f62dea866f0c373574c8523f611d0db1d8f19cc1b95d07a221d36a6a45de.
//
// Solidity: event NodeActivated(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) FilterNodeActivated(opts *bind.FilterOpts) (*NodeManagerNodeActivatedIterator, error) {

	logs, sub, err := _NodeManager.contract.FilterLogs(opts, "NodeActivated")
	if err != nil {
		return nil, err
	}
	return &NodeManagerNodeActivatedIterator{contract: _NodeManager.contract, event: "NodeActivated", logs: logs, sub: sub}, nil
}

var NodeActivatedTopicHash = "0xfb98f62dea866f0c373574c8523f611d0db1d8f19cc1b95d07a221d36a6a45de"

// WatchNodeActivated is a free log subscription operation binding the contract event 0xfb98f62dea866f0c373574c8523f611d0db1d8f19cc1b95d07a221d36a6a45de.
//
// Solidity: event NodeActivated(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) WatchNodeActivated(opts *bind.WatchOpts, sink chan<- *NodeManagerNodeActivated) (event.Subscription, error) {

	logs, sub, err := _NodeManager.contract.WatchLogs(opts, "NodeActivated")
	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(NodeManagerNodeActivated)
				if err := _NodeManager.contract.UnpackLog(event, "NodeActivated", 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
}

// ParseNodeActivated is a log parse operation binding the contract event 0xfb98f62dea866f0c373574c8523f611d0db1d8f19cc1b95d07a221d36a6a45de.
//
// Solidity: event NodeActivated(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) ParseNodeActivated(log types.Log) (*NodeManagerNodeActivated, error) {
	event := new(NodeManagerNodeActivated)
	if err := _NodeManager.contract.UnpackLog(event, "NodeActivated", log); err != nil {
		return nil, err
	}
	return event, nil
}

// NodeManagerNodeApprovedIterator is returned from FilterNodeApproved and is used to iterate over the raw logs and unpacked data for NodeApproved events raised by the NodeManager contract.
type NodeManagerNodeApprovedIterator struct {
	Event *NodeManagerNodeApproved // 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 *NodeManagerNodeApprovedIterator) 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(NodeManagerNodeApproved)
			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(NodeManagerNodeApproved)
		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 *NodeManagerNodeApprovedIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *NodeManagerNodeApprovedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// NodeManagerNodeApproved represents a NodeApproved event raised by the NodeManager contract.
type NodeManagerNodeApproved struct {
	EnodeId  string
	Ip       string
	Port     uint16
	Raftport uint16
	OrgId    string
	Raw      types.Log // Blockchain specific contextual infos
}

// FilterNodeApproved is a free log retrieval operation binding the contract event 0x9394c836a3325586270659f6aa3b9f835abca9afe7fec5abfc69760bb12bce0d.
//
// Solidity: event NodeApproved(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) FilterNodeApproved(opts *bind.FilterOpts) (*NodeManagerNodeApprovedIterator, error) {

	logs, sub, err := _NodeManager.contract.FilterLogs(opts, "NodeApproved")
	if err != nil {
		return nil, err
	}
	return &NodeManagerNodeApprovedIterator{contract: _NodeManager.contract, event: "NodeApproved", logs: logs, sub: sub}, nil
}

var NodeApprovedTopicHash = "0x9394c836a3325586270659f6aa3b9f835abca9afe7fec5abfc69760bb12bce0d"

// WatchNodeApproved is a free log subscription operation binding the contract event 0x9394c836a3325586270659f6aa3b9f835abca9afe7fec5abfc69760bb12bce0d.
//
// Solidity: event NodeApproved(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) WatchNodeApproved(opts *bind.WatchOpts, sink chan<- *NodeManagerNodeApproved) (event.Subscription, error) {

	logs, sub, err := _NodeManager.contract.WatchLogs(opts, "NodeApproved")
	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(NodeManagerNodeApproved)
				if err := _NodeManager.contract.UnpackLog(event, "NodeApproved", 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
}

// ParseNodeApproved is a log parse operation binding the contract event 0x9394c836a3325586270659f6aa3b9f835abca9afe7fec5abfc69760bb12bce0d.
//
// Solidity: event NodeApproved(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) ParseNodeApproved(log types.Log) (*NodeManagerNodeApproved, error) {
	event := new(NodeManagerNodeApproved)
	if err := _NodeManager.contract.UnpackLog(event, "NodeApproved", log); err != nil {
		return nil, err
	}
	return event, nil
}

// NodeManagerNodeBlacklistedIterator is returned from FilterNodeBlacklisted and is used to iterate over the raw logs and unpacked data for NodeBlacklisted events raised by the NodeManager contract.
type NodeManagerNodeBlacklistedIterator struct {
	Event *NodeManagerNodeBlacklisted // 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 *NodeManagerNodeBlacklistedIterator) 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(NodeManagerNodeBlacklisted)
			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(NodeManagerNodeBlacklisted)
		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 *NodeManagerNodeBlacklistedIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *NodeManagerNodeBlacklistedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// NodeManagerNodeBlacklisted represents a NodeBlacklisted event raised by the NodeManager contract.
type NodeManagerNodeBlacklisted struct {
	EnodeId  string
	Ip       string
	Port     uint16
	Raftport uint16
	OrgId    string
	Raw      types.Log // Blockchain specific contextual infos
}

// FilterNodeBlacklisted is a free log retrieval operation binding the contract event 0x25300d4d785e654bc9b7979700cfa0fdc9ace890a46841fecfce661fd2c41a33.
//
// Solidity: event NodeBlacklisted(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) FilterNodeBlacklisted(opts *bind.FilterOpts) (*NodeManagerNodeBlacklistedIterator, error) {

	logs, sub, err := _NodeManager.contract.FilterLogs(opts, "NodeBlacklisted")
	if err != nil {
		return nil, err
	}
	return &NodeManagerNodeBlacklistedIterator{contract: _NodeManager.contract, event: "NodeBlacklisted", logs: logs, sub: sub}, nil
}

var NodeBlacklistedTopicHash = "0x25300d4d785e654bc9b7979700cfa0fdc9ace890a46841fecfce661fd2c41a33"

// WatchNodeBlacklisted is a free log subscription operation binding the contract event 0x25300d4d785e654bc9b7979700cfa0fdc9ace890a46841fecfce661fd2c41a33.
//
// Solidity: event NodeBlacklisted(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) WatchNodeBlacklisted(opts *bind.WatchOpts, sink chan<- *NodeManagerNodeBlacklisted) (event.Subscription, error) {

	logs, sub, err := _NodeManager.contract.WatchLogs(opts, "NodeBlacklisted")
	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(NodeManagerNodeBlacklisted)
				if err := _NodeManager.contract.UnpackLog(event, "NodeBlacklisted", 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
}

// ParseNodeBlacklisted is a log parse operation binding the contract event 0x25300d4d785e654bc9b7979700cfa0fdc9ace890a46841fecfce661fd2c41a33.
//
// Solidity: event NodeBlacklisted(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) ParseNodeBlacklisted(log types.Log) (*NodeManagerNodeBlacklisted, error) {
	event := new(NodeManagerNodeBlacklisted)
	if err := _NodeManager.contract.UnpackLog(event, "NodeBlacklisted", log); err != nil {
		return nil, err
	}
	return event, nil
}

// NodeManagerNodeDeactivatedIterator is returned from FilterNodeDeactivated and is used to iterate over the raw logs and unpacked data for NodeDeactivated events raised by the NodeManager contract.
type NodeManagerNodeDeactivatedIterator struct {
	Event *NodeManagerNodeDeactivated // 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 *NodeManagerNodeDeactivatedIterator) 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(NodeManagerNodeDeactivated)
			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(NodeManagerNodeDeactivated)
		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 *NodeManagerNodeDeactivatedIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *NodeManagerNodeDeactivatedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// NodeManagerNodeDeactivated represents a NodeDeactivated event raised by the NodeManager contract.
type NodeManagerNodeDeactivated struct {
	EnodeId  string
	Ip       string
	Port     uint16
	Raftport uint16
	OrgId    string
	Raw      types.Log // Blockchain specific contextual infos
}

// FilterNodeDeactivated is a free log retrieval operation binding the contract event 0xf631019be71bc682c59150635d714061185232e98e60de8bdd87bbee239cc5c8.
//
// Solidity: event NodeDeactivated(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) FilterNodeDeactivated(opts *bind.FilterOpts) (*NodeManagerNodeDeactivatedIterator, error) {

	logs, sub, err := _NodeManager.contract.FilterLogs(opts, "NodeDeactivated")
	if err != nil {
		return nil, err
	}
	return &NodeManagerNodeDeactivatedIterator{contract: _NodeManager.contract, event: "NodeDeactivated", logs: logs, sub: sub}, nil
}

var NodeDeactivatedTopicHash = "0xf631019be71bc682c59150635d714061185232e98e60de8bdd87bbee239cc5c8"

// WatchNodeDeactivated is a free log subscription operation binding the contract event 0xf631019be71bc682c59150635d714061185232e98e60de8bdd87bbee239cc5c8.
//
// Solidity: event NodeDeactivated(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) WatchNodeDeactivated(opts *bind.WatchOpts, sink chan<- *NodeManagerNodeDeactivated) (event.Subscription, error) {

	logs, sub, err := _NodeManager.contract.WatchLogs(opts, "NodeDeactivated")
	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(NodeManagerNodeDeactivated)
				if err := _NodeManager.contract.UnpackLog(event, "NodeDeactivated", 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
}

// ParseNodeDeactivated is a log parse operation binding the contract event 0xf631019be71bc682c59150635d714061185232e98e60de8bdd87bbee239cc5c8.
//
// Solidity: event NodeDeactivated(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) ParseNodeDeactivated(log types.Log) (*NodeManagerNodeDeactivated, error) {
	event := new(NodeManagerNodeDeactivated)
	if err := _NodeManager.contract.UnpackLog(event, "NodeDeactivated", log); err != nil {
		return nil, err
	}
	return event, nil
}

// NodeManagerNodeProposedIterator is returned from FilterNodeProposed and is used to iterate over the raw logs and unpacked data for NodeProposed events raised by the NodeManager contract.
type NodeManagerNodeProposedIterator struct {
	Event *NodeManagerNodeProposed // 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 *NodeManagerNodeProposedIterator) 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(NodeManagerNodeProposed)
			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(NodeManagerNodeProposed)
		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 *NodeManagerNodeProposedIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *NodeManagerNodeProposedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// NodeManagerNodeProposed represents a NodeProposed event raised by the NodeManager contract.
type NodeManagerNodeProposed struct {
	EnodeId  string
	Ip       string
	Port     uint16
	Raftport uint16
	OrgId    string
	Raw      types.Log // Blockchain specific contextual infos
}

// FilterNodeProposed is a free log retrieval operation binding the contract event 0xf9bad9f8a2dccc52fad61273a7fd673335b420319506c19b87df9ce7a19732da.
//
// Solidity: event NodeProposed(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) FilterNodeProposed(opts *bind.FilterOpts) (*NodeManagerNodeProposedIterator, error) {

	logs, sub, err := _NodeManager.contract.FilterLogs(opts, "NodeProposed")
	if err != nil {
		return nil, err
	}
	return &NodeManagerNodeProposedIterator{contract: _NodeManager.contract, event: "NodeProposed", logs: logs, sub: sub}, nil
}

var NodeProposedTopicHash = "0xf9bad9f8a2dccc52fad61273a7fd673335b420319506c19b87df9ce7a19732da"

// WatchNodeProposed is a free log subscription operation binding the contract event 0xf9bad9f8a2dccc52fad61273a7fd673335b420319506c19b87df9ce7a19732da.
//
// Solidity: event NodeProposed(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) WatchNodeProposed(opts *bind.WatchOpts, sink chan<- *NodeManagerNodeProposed) (event.Subscription, error) {

	logs, sub, err := _NodeManager.contract.WatchLogs(opts, "NodeProposed")
	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(NodeManagerNodeProposed)
				if err := _NodeManager.contract.UnpackLog(event, "NodeProposed", 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
}

// ParseNodeProposed is a log parse operation binding the contract event 0xf9bad9f8a2dccc52fad61273a7fd673335b420319506c19b87df9ce7a19732da.
//
// Solidity: event NodeProposed(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) ParseNodeProposed(log types.Log) (*NodeManagerNodeProposed, error) {
	event := new(NodeManagerNodeProposed)
	if err := _NodeManager.contract.UnpackLog(event, "NodeProposed", log); err != nil {
		return nil, err
	}
	return event, nil
}

// NodeManagerNodeRecoveryCompletedIterator is returned from FilterNodeRecoveryCompleted and is used to iterate over the raw logs and unpacked data for NodeRecoveryCompleted events raised by the NodeManager contract.
type NodeManagerNodeRecoveryCompletedIterator struct {
	Event *NodeManagerNodeRecoveryCompleted // 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 *NodeManagerNodeRecoveryCompletedIterator) 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(NodeManagerNodeRecoveryCompleted)
			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(NodeManagerNodeRecoveryCompleted)
		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 *NodeManagerNodeRecoveryCompletedIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *NodeManagerNodeRecoveryCompletedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// NodeManagerNodeRecoveryCompleted represents a NodeRecoveryCompleted event raised by the NodeManager contract.
type NodeManagerNodeRecoveryCompleted struct {
	EnodeId  string
	Ip       string
	Port     uint16
	Raftport uint16
	OrgId    string
	Raw      types.Log // Blockchain specific contextual infos
}

// FilterNodeRecoveryCompleted is a free log retrieval operation binding the contract event 0x60aac8c36efdaabf125dc9ec2124bde8b3ceafe5c8b4fc8063fc4ac9017eb0be.
//
// Solidity: event NodeRecoveryCompleted(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) FilterNodeRecoveryCompleted(opts *bind.FilterOpts) (*NodeManagerNodeRecoveryCompletedIterator, error) {

	logs, sub, err := _NodeManager.contract.FilterLogs(opts, "NodeRecoveryCompleted")
	if err != nil {
		return nil, err
	}
	return &NodeManagerNodeRecoveryCompletedIterator{contract: _NodeManager.contract, event: "NodeRecoveryCompleted", logs: logs, sub: sub}, nil
}

var NodeRecoveryCompletedTopicHash = "0x60aac8c36efdaabf125dc9ec2124bde8b3ceafe5c8b4fc8063fc4ac9017eb0be"

// WatchNodeRecoveryCompleted is a free log subscription operation binding the contract event 0x60aac8c36efdaabf125dc9ec2124bde8b3ceafe5c8b4fc8063fc4ac9017eb0be.
//
// Solidity: event NodeRecoveryCompleted(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) WatchNodeRecoveryCompleted(opts *bind.WatchOpts, sink chan<- *NodeManagerNodeRecoveryCompleted) (event.Subscription, error) {

	logs, sub, err := _NodeManager.contract.WatchLogs(opts, "NodeRecoveryCompleted")
	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(NodeManagerNodeRecoveryCompleted)
				if err := _NodeManager.contract.UnpackLog(event, "NodeRecoveryCompleted", 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
}

// ParseNodeRecoveryCompleted is a log parse operation binding the contract event 0x60aac8c36efdaabf125dc9ec2124bde8b3ceafe5c8b4fc8063fc4ac9017eb0be.
//
// Solidity: event NodeRecoveryCompleted(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) ParseNodeRecoveryCompleted(log types.Log) (*NodeManagerNodeRecoveryCompleted, error) {
	event := new(NodeManagerNodeRecoveryCompleted)
	if err := _NodeManager.contract.UnpackLog(event, "NodeRecoveryCompleted", log); err != nil {
		return nil, err
	}
	return event, nil
}

// NodeManagerNodeRecoveryInitiatedIterator is returned from FilterNodeRecoveryInitiated and is used to iterate over the raw logs and unpacked data for NodeRecoveryInitiated events raised by the NodeManager contract.
type NodeManagerNodeRecoveryInitiatedIterator struct {
	Event *NodeManagerNodeRecoveryInitiated // 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 *NodeManagerNodeRecoveryInitiatedIterator) 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(NodeManagerNodeRecoveryInitiated)
			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(NodeManagerNodeRecoveryInitiated)
		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 *NodeManagerNodeRecoveryInitiatedIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *NodeManagerNodeRecoveryInitiatedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// NodeManagerNodeRecoveryInitiated represents a NodeRecoveryInitiated event raised by the NodeManager contract.
type NodeManagerNodeRecoveryInitiated struct {
	EnodeId  string
	Ip       string
	Port     uint16
	Raftport uint16
	OrgId    string
	Raw      types.Log // Blockchain specific contextual infos
}

// FilterNodeRecoveryInitiated is a free log retrieval operation binding the contract event 0x72779f66ea90e28bae76fbfe03eaef5ae01699976c7493f93186ab9560ccfaa4.
//
// Solidity: event NodeRecoveryInitiated(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) FilterNodeRecoveryInitiated(opts *bind.FilterOpts) (*NodeManagerNodeRecoveryInitiatedIterator, error) {

	logs, sub, err := _NodeManager.contract.FilterLogs(opts, "NodeRecoveryInitiated")
	if err != nil {
		return nil, err
	}
	return &NodeManagerNodeRecoveryInitiatedIterator{contract: _NodeManager.contract, event: "NodeRecoveryInitiated", logs: logs, sub: sub}, nil
}

var NodeRecoveryInitiatedTopicHash = "0x72779f66ea90e28bae76fbfe03eaef5ae01699976c7493f93186ab9560ccfaa4"

// WatchNodeRecoveryInitiated is a free log subscription operation binding the contract event 0x72779f66ea90e28bae76fbfe03eaef5ae01699976c7493f93186ab9560ccfaa4.
//
// Solidity: event NodeRecoveryInitiated(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) WatchNodeRecoveryInitiated(opts *bind.WatchOpts, sink chan<- *NodeManagerNodeRecoveryInitiated) (event.Subscription, error) {

	logs, sub, err := _NodeManager.contract.WatchLogs(opts, "NodeRecoveryInitiated")
	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(NodeManagerNodeRecoveryInitiated)
				if err := _NodeManager.contract.UnpackLog(event, "NodeRecoveryInitiated", 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
}

// ParseNodeRecoveryInitiated is a log parse operation binding the contract event 0x72779f66ea90e28bae76fbfe03eaef5ae01699976c7493f93186ab9560ccfaa4.
//
// Solidity: event NodeRecoveryInitiated(string _enodeId, string _ip, uint16 _port, uint16 _raftport, string _orgId)
func (_NodeManager *NodeManagerFilterer) ParseNodeRecoveryInitiated(log types.Log) (*NodeManagerNodeRecoveryInitiated, error) {
	event := new(NodeManagerNodeRecoveryInitiated)
	if err := _NodeManager.contract.UnpackLog(event, "NodeRecoveryInitiated", log); err != nil {
		return nil, err
	}
	return event, nil
}
