github.com/hyperion-hyn/go-ethereum@v2.4.0+incompatible/permission/bind/roles.go (about) 1 // Code generated - DO NOT EDIT. 2 // This file is a generated binding and any manual changes will be lost. 3 4 package permission 5 6 import ( 7 "math/big" 8 "strings" 9 10 ethereum "github.com/ethereum/go-ethereum" 11 "github.com/ethereum/go-ethereum/accounts/abi" 12 "github.com/ethereum/go-ethereum/accounts/abi/bind" 13 "github.com/ethereum/go-ethereum/common" 14 "github.com/ethereum/go-ethereum/core/types" 15 "github.com/ethereum/go-ethereum/event" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var ( 20 _ = big.NewInt 21 _ = strings.NewReader 22 _ = ethereum.NotFound 23 _ = abi.U256 24 _ = bind.Bind 25 _ = common.Big1 26 _ = types.BloomLookup 27 _ = event.NewSubscription 28 ) 29 30 // RoleManagerABI is the input ABI used to generate the binding from. 31 const RoleManagerABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"_roleId\",\"type\":\"string\"},{\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"getRoleDetails\",\"outputs\":[{\"name\":\"roleId\",\"type\":\"string\"},{\"name\":\"orgId\",\"type\":\"string\"},{\"name\":\"accessType\",\"type\":\"uint256\"},{\"name\":\"voter\",\"type\":\"bool\"},{\"name\":\"admin\",\"type\":\"bool\"},{\"name\":\"active\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_roleId\",\"type\":\"string\"},{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_baseAccess\",\"type\":\"uint256\"},{\"name\":\"_isVoter\",\"type\":\"bool\"},{\"name\":\"_isAdmin\",\"type\":\"bool\"}],\"name\":\"addRole\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNumberOfRoles\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_rIndex\",\"type\":\"uint256\"}],\"name\":\"getRoleDetailsFromIndex\",\"outputs\":[{\"name\":\"roleId\",\"type\":\"string\"},{\"name\":\"orgId\",\"type\":\"string\"},{\"name\":\"accessType\",\"type\":\"uint256\"},{\"name\":\"voter\",\"type\":\"bool\"},{\"name\":\"admin\",\"type\":\"bool\"},{\"name\":\"active\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_roleId\",\"type\":\"string\"},{\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"removeRole\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_roleId\",\"type\":\"string\"},{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_ultParent\",\"type\":\"string\"}],\"name\":\"roleExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_roleId\",\"type\":\"string\"},{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_ultParent\",\"type\":\"string\"}],\"name\":\"isAdminRole\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_roleId\",\"type\":\"string\"},{\"name\":\"_orgId\",\"type\":\"string\"},{\"name\":\"_ultParent\",\"type\":\"string\"}],\"name\":\"isVoterRole\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_permUpgradable\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_roleId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_baseAccess\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_isVoter\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_isAdmin\",\"type\":\"bool\"}],\"name\":\"RoleCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_roleId\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"_orgId\",\"type\":\"string\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"}]" 32 33 // RoleManagerBin is the compiled bytecode used for deploying new contracts. 34 const RoleManagerBin = `608060405234801561001057600080fd5b506040516020806129598339810180604052602081101561003057600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506128c8806100916000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c010000000000000000000000000000000000000000000000000000000090048063a634301211610078578063a634301214610552578063abf5739f14610620578063be322e5414610821578063deb16ba71461095c576100a5565b80631870aba3146100aa5780637b7135791461028557806387f55d31146103f9578063a451d4a814610417575b600080fd5b610176600480360360408110156100c057600080fd5b81019080803590602001906401000000008111156100dd57600080fd5b8201836020820111156100ef57600080fd5b8035906020019184600183028401116401000000008311171561011157600080fd5b90919293919293908035906020019064010000000081111561013257600080fd5b82018360208201111561014457600080fd5b8035906020019184600183028401116401000000008311171561016657600080fd5b9091929391929390505050610a97565b604051808060200180602001878152602001861515151581526020018515151515815260200184151515158152602001838103835289818151815260200191508051906020019080838360005b838110156101de5780820151818401526020810190506101c3565b50505050905090810190601f16801561020b5780820380516001836020036101000a031916815260200191505b50838103825288818151815260200191508051906020019080838360005b83811015610244578082015181840152602081019050610229565b50505050905090810190601f1680156102715780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b6103f7600480360360a081101561029b57600080fd5b81019080803590602001906401000000008111156102b857600080fd5b8201836020820111156102ca57600080fd5b803590602001918460018302840111640100000000831117156102ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561034f57600080fd5b82018360208201111561036157600080fd5b8035906020019184600183028401116401000000008311171561038357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803515159060200190929190803515159060200190929190505050610e9b565b005b6104016114db565b6040518082815260200191505060405180910390f35b6104436004803603602081101561042d57600080fd5b81019080803590602001909291905050506114e8565b604051808060200180602001878152602001861515151581526020018515151515815260200184151515158152602001838103835289818151815260200191508051906020019080838360005b838110156104ab578082015181840152602081019050610490565b50505050905090810190601f1680156104d85780820380516001836020036101000a031916815260200191505b50838103825288818151815260200191508051906020019080838360005b838110156105115780820151818401526020810190506104f6565b50505050905090810190601f16801561053e5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b61061e6004803603604081101561056857600080fd5b810190808035906020019064010000000081111561058557600080fd5b82018360208201111561059757600080fd5b803590602001918460018302840111640100000000831117156105b957600080fd5b9091929391929390803590602001906401000000008111156105da57600080fd5b8201836020820111156105ec57600080fd5b8035906020019184600183028401116401000000008311171561060e57600080fd5b9091929391929390505050611729565b005b6108076004803603606081101561063657600080fd5b810190808035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184600183028401116401000000008311171561068757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156106ea57600080fd5b8201836020820111156106fc57600080fd5b8035906020019184600183028401116401000000008311171561071e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561078157600080fd5b82018360208201111561079357600080fd5b803590602001918460018302840111640100000000831117156107b557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611b08565b604051808215151515815260200191505060405180910390f35b6109426004803603606081101561083757600080fd5b810190808035906020019064010000000081111561085457600080fd5b82018360208201111561086657600080fd5b8035906020019184600183028401116401000000008311171561088857600080fd5b9091929391929390803590602001906401000000008111156108a957600080fd5b8201836020820111156108bb57600080fd5b803590602001918460018302840111640100000000831117156108dd57600080fd5b9091929391929390803590602001906401000000008111156108fe57600080fd5b82018360208201111561091057600080fd5b8035906020019184600183028401116401000000008311171561093257600080fd5b9091929391929390505050611dc6565b604051808215151515815260200191505060405180910390f35b610a7d6004803603606081101561097257600080fd5b810190808035906020019064010000000081111561098f57600080fd5b8201836020820111156109a157600080fd5b803590602001918460018302840111640100000000831117156109c357600080fd5b9091929391929390803590602001906401000000008111156109e457600080fd5b8201836020820111156109f657600080fd5b80359060200191846001830284011164010000000083111715610a1857600080fd5b909192939192939080359060200190640100000000811115610a3957600080fd5b820183602082011115610a4b57600080fd5b80359060200191846001830284011164010000000083111715610a6d57600080fd5b9091929391929390505050612252565b604051808215151515815260200191505060405180910390f35b606080600080600080610b438a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505089898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506020604051908101604052806000815250611b08565b1515610bc757898960008060008085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509450909192939450602060405190810160405280600081525093929190839350955095509550955095509550610e8e565b6000610c5b8b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506126de565b9050600181815481101515610c6c57fe5b9060005260206000209060040201600001600182815481101515610c8c57fe5b9060005260206000209060040201600101600183815481101515610cac57fe5b906000526020600020906004020160020154600184815481101515610ccd57fe5b906000526020600020906004020160030160009054906101000a900460ff16600185815481101515610cfb57fe5b906000526020600020906004020160030160019054906101000a900460ff16600186815481101515610d2957fe5b906000526020600020906004020160030160029054906101000a900460ff16858054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ddd5780601f10610db257610100808354040283529160200191610ddd565b820191906000526020600020905b815481529060010190602001808311610dc057829003601f168201915b50505050509550848054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e795780601f10610e4e57610100808354040283529160200191610e79565b820191906000526020600020905b815481529060010190602001808311610e5c57829003601f168201915b50505050509450965096509650965096509650505b9499939850945094509450565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e32cf906040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015610f1e57600080fd5b505afa158015610f32573d6000803e3d6000fd5b505050506040513d6020811015610f4857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ffb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b6000600260008787604051602001808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561104a57808201518184015260208101905061102f565b50505050905090810190601f1680156110775780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156110b0578082015181840152602081019050611095565b50505050905090810190601f1680156110dd5780820380516001836020036101000a031916815260200191505b509450505050506040516020818303038152906040528051906020012081526020019081526020016000205414151561117e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f726f6c652065786973747320666f7220746865206f726700000000000000000081525060200191505060405180910390fd5b600360008154809291906001019190505550600354600260008787604051602001808060200180602001838103835285818151815260200191508051906020019080838360005b838110156111e05780820151818401526020810190506111c5565b50505050905090810190601f16801561120d5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101561124657808201518184015260208101905061122b565b50505050905090810190601f1680156112735780820380516001836020036101000a031916815260200191505b5094505050505060405160208183030381529060405280519060200120815260200190815260200160002081905550600160c06040519081016040528087815260200186815260200185815260200184151581526020018315158152602001600115158152509080600181540180825580915050906001820390600052602060002090600402016000909192909190915060008201518160000190805190602001906113209291906127f7565b50602082015181600101908051906020019061133d9291906127f7565b506040820151816002015560608201518160030160006101000a81548160ff02191690831515021790555060808201518160030160016101000a81548160ff02191690831515021790555060a08201518160030160026101000a81548160ff0219169083151502179055505050507fefa5bc1bedbee25b04b00855c15a0c180ecb4a2440d4d08296e49561655e2b1c85858585856040518080602001806020018681526020018515151515815260200184151515158152602001838103835288818151815260200191508051906020019080838360005b8381101561142f578082015181840152602081019050611414565b50505050905090810190601f16801561145c5780820380516001836020036101000a031916815260200191505b50838103825287818151815260200191508051906020019080838360005b8381101561149557808201518184015260208101905061147a565b50505050905090810190601f1680156114c25780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15050505050565b6000600180549050905090565b60608060008060008060018781548110151561150057fe5b906000526020600020906004020160000160018881548110151561152057fe5b906000526020600020906004020160010160018981548110151561154057fe5b90600052602060002090600402016002015460018a81548110151561156157fe5b906000526020600020906004020160030160009054906101000a900460ff1660018b81548110151561158f57fe5b906000526020600020906004020160030160019054906101000a900460ff1660018c8154811015156115bd57fe5b906000526020600020906004020160030160029054906101000a900460ff16858054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116715780601f1061164657610100808354040283529160200191611671565b820191906000526020600020905b81548152906001019060200180831161165457829003601f168201915b50505050509550848054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561170d5780601f106116e25761010080835404028352916020019161170d565b820191906000526020600020905b8154815290600101906020018083116116f057829003601f168201915b5050505050945095509550955095509550955091939550919395565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e32cf906040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156117ac57600080fd5b505afa1580156117c0573d6000803e3d6000fd5b505050506040513d60208110156117d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611889576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b600060026000868686866040516020018080602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050604051602081830303815290604052805190602001208152602001908152602001600020541415151561199b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f726f6c6520646f6573206e6f742065786973740000000000000000000000000081525060200191505060405180910390fd5b6000611a2f85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506126de565b90506000600182815481101515611a4257fe5b906000526020600020906004020160030160026101000a81548160ff0219169083151502179055507f1196059dd83524bf989fd94bb65808c09dbea2ab791fb6bfa87a0e0aa64b2ea6858585856040518080602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f820116905080830192505050965050505050505060405180910390a15050505050565b6000806000600260008787604051602001808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611b5a578082015181840152602081019050611b3f565b50505050905090810190601f168015611b875780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015611bc0578082015181840152602081019050611ba5565b50505050905090810190601f168015611bed5780820380516001836020036101000a031916815260200191505b5094505050505060405160208183030381529060405280519060200120815260200190815260200160002054141515611c6257611c2a85856126de565b9050600181815481101515611c3b57fe5b906000526020600020906004020160030160029054906101000a900460ff16915050611dbf565b6000600260008786604051602001808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611cb1578082015181840152602081019050611c96565b50505050905090810190601f168015611cde5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015611d17578082015181840152602081019050611cfc565b50505050905090810190601f168015611d445780820380516001836020036101000a031916815260200191505b5094505050505060405160208183030381529060405280519060200120815260200190815260200160002054141515611db957611d8185846126de565b9050600181815481101515611d9257fe5b906000526020600020906004020160030160029054906101000a900460ff16915050611dbf565b60009150505b9392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e32cf906040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611e4b57600080fd5b505afa158015611e5f573d6000803e3d6000fd5b505050506040513d6020811015611e7557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b611fff87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611b08565b151561200e5760009050612248565b600080600260008a8a8a8a6040516020018080602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505096505050505050506040516020818303038152906040528051906020012081526020019081526020016000205414151561214b5761214488888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506126de565b90506121e0565b6121dd88888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506126de565b90505b6001818154811015156121ef57fe5b906000526020600020906004020160030160029054906101000a900460ff168015612244575060018181548110151561222457fe5b906000526020600020906004020160030160019054906101000a900460ff165b9150505b9695505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e32cf906040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156122d757600080fd5b505afa1580156122eb573d6000803e3d6000fd5b505050506040513d602081101561230157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156123b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b61248b87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611b08565b151561249a57600090506126d4565b600080600260008a8a8a8a6040516020018080602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050604051602081830303815290604052805190602001208152602001908152602001600020541415156125d7576125d088888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506126de565b905061266c565b61266988888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506126de565b90505b60018181548110151561267b57fe5b906000526020600020906004020160030160029054906101000a900460ff1680156126d057506001818154811015156126b057fe5b906000526020600020906004020160030160009054906101000a900460ff165b9150505b9695505050505050565b60006001600260008585604051602001808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561272f578082015181840152602081019050612714565b50505050905090810190601f16801561275c5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101561279557808201518184015260208101905061277a565b50505050905090810190601f1680156127c25780820380516001836020036101000a031916815260200191505b509450505050506040516020818303038152906040528051906020012081526020019081526020016000205403905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061283857805160ff1916838001178555612866565b82800160010185558215612866579182015b8281111561286557825182559160200191906001019061284a565b5b5090506128739190612877565b5090565b61289991905b8082111561289557600081600090555060010161287d565b5090565b9056fea165627a7a7230582006ce3e54be3a54da4e284827f5291f19d7bc4a8fa63cfe3ce43f1e50c45ba2f00029` 35 36 // DeployRoleManager deploys a new Ethereum contract, binding an instance of RoleManager to it. 37 func DeployRoleManager(auth *bind.TransactOpts, backend bind.ContractBackend, _permUpgradable common.Address) (common.Address, *types.Transaction, *RoleManager, error) { 38 parsed, err := abi.JSON(strings.NewReader(RoleManagerABI)) 39 if err != nil { 40 return common.Address{}, nil, nil, err 41 } 42 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(RoleManagerBin), backend, _permUpgradable) 43 if err != nil { 44 return common.Address{}, nil, nil, err 45 } 46 return address, tx, &RoleManager{RoleManagerCaller: RoleManagerCaller{contract: contract}, RoleManagerTransactor: RoleManagerTransactor{contract: contract}, RoleManagerFilterer: RoleManagerFilterer{contract: contract}}, nil 47 } 48 49 // RoleManager is an auto generated Go binding around an Ethereum contract. 50 type RoleManager struct { 51 RoleManagerCaller // Read-only binding to the contract 52 RoleManagerTransactor // Write-only binding to the contract 53 RoleManagerFilterer // Log filterer for contract events 54 } 55 56 // RoleManagerCaller is an auto generated read-only Go binding around an Ethereum contract. 57 type RoleManagerCaller struct { 58 contract *bind.BoundContract // Generic contract wrapper for the low level calls 59 } 60 61 // RoleManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. 62 type RoleManagerTransactor struct { 63 contract *bind.BoundContract // Generic contract wrapper for the low level calls 64 } 65 66 // RoleManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 67 type RoleManagerFilterer struct { 68 contract *bind.BoundContract // Generic contract wrapper for the low level calls 69 } 70 71 // RoleManagerSession is an auto generated Go binding around an Ethereum contract, 72 // with pre-set call and transact options. 73 type RoleManagerSession struct { 74 Contract *RoleManager // Generic contract binding to set the session for 75 CallOpts bind.CallOpts // Call options to use throughout this session 76 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 77 } 78 79 // RoleManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, 80 // with pre-set call options. 81 type RoleManagerCallerSession struct { 82 Contract *RoleManagerCaller // Generic contract caller binding to set the session for 83 CallOpts bind.CallOpts // Call options to use throughout this session 84 } 85 86 // RoleManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 87 // with pre-set transact options. 88 type RoleManagerTransactorSession struct { 89 Contract *RoleManagerTransactor // Generic contract transactor binding to set the session for 90 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 91 } 92 93 // RoleManagerRaw is an auto generated low-level Go binding around an Ethereum contract. 94 type RoleManagerRaw struct { 95 Contract *RoleManager // Generic contract binding to access the raw methods on 96 } 97 98 // RoleManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 99 type RoleManagerCallerRaw struct { 100 Contract *RoleManagerCaller // Generic read-only contract binding to access the raw methods on 101 } 102 103 // RoleManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 104 type RoleManagerTransactorRaw struct { 105 Contract *RoleManagerTransactor // Generic write-only contract binding to access the raw methods on 106 } 107 108 // NewRoleManager creates a new instance of RoleManager, bound to a specific deployed contract. 109 func NewRoleManager(address common.Address, backend bind.ContractBackend) (*RoleManager, error) { 110 contract, err := bindRoleManager(address, backend, backend, backend) 111 if err != nil { 112 return nil, err 113 } 114 return &RoleManager{RoleManagerCaller: RoleManagerCaller{contract: contract}, RoleManagerTransactor: RoleManagerTransactor{contract: contract}, RoleManagerFilterer: RoleManagerFilterer{contract: contract}}, nil 115 } 116 117 // NewRoleManagerCaller creates a new read-only instance of RoleManager, bound to a specific deployed contract. 118 func NewRoleManagerCaller(address common.Address, caller bind.ContractCaller) (*RoleManagerCaller, error) { 119 contract, err := bindRoleManager(address, caller, nil, nil) 120 if err != nil { 121 return nil, err 122 } 123 return &RoleManagerCaller{contract: contract}, nil 124 } 125 126 // NewRoleManagerTransactor creates a new write-only instance of RoleManager, bound to a specific deployed contract. 127 func NewRoleManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*RoleManagerTransactor, error) { 128 contract, err := bindRoleManager(address, nil, transactor, nil) 129 if err != nil { 130 return nil, err 131 } 132 return &RoleManagerTransactor{contract: contract}, nil 133 } 134 135 // NewRoleManagerFilterer creates a new log filterer instance of RoleManager, bound to a specific deployed contract. 136 func NewRoleManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*RoleManagerFilterer, error) { 137 contract, err := bindRoleManager(address, nil, nil, filterer) 138 if err != nil { 139 return nil, err 140 } 141 return &RoleManagerFilterer{contract: contract}, nil 142 } 143 144 // bindRoleManager binds a generic wrapper to an already deployed contract. 145 func bindRoleManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 146 parsed, err := abi.JSON(strings.NewReader(RoleManagerABI)) 147 if err != nil { 148 return nil, err 149 } 150 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 151 } 152 153 // Call invokes the (constant) contract method with params as input values and 154 // sets the output to result. The result type might be a single field for simple 155 // returns, a slice of interfaces for anonymous returns and a struct for named 156 // returns. 157 func (_RoleManager *RoleManagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 158 return _RoleManager.Contract.RoleManagerCaller.contract.Call(opts, result, method, params...) 159 } 160 161 // Transfer initiates a plain transaction to move funds to the contract, calling 162 // its default method if one is available. 163 func (_RoleManager *RoleManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 164 return _RoleManager.Contract.RoleManagerTransactor.contract.Transfer(opts) 165 } 166 167 // Transact invokes the (paid) contract method with params as input values. 168 func (_RoleManager *RoleManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 169 return _RoleManager.Contract.RoleManagerTransactor.contract.Transact(opts, method, params...) 170 } 171 172 // Call invokes the (constant) contract method with params as input values and 173 // sets the output to result. The result type might be a single field for simple 174 // returns, a slice of interfaces for anonymous returns and a struct for named 175 // returns. 176 func (_RoleManager *RoleManagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 177 return _RoleManager.Contract.contract.Call(opts, result, method, params...) 178 } 179 180 // Transfer initiates a plain transaction to move funds to the contract, calling 181 // its default method if one is available. 182 func (_RoleManager *RoleManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 183 return _RoleManager.Contract.contract.Transfer(opts) 184 } 185 186 // Transact invokes the (paid) contract method with params as input values. 187 func (_RoleManager *RoleManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 188 return _RoleManager.Contract.contract.Transact(opts, method, params...) 189 } 190 191 // GetNumberOfRoles is a free data retrieval call binding the contract method 0x87f55d31. 192 // 193 // Solidity: function getNumberOfRoles() constant returns(uint256) 194 func (_RoleManager *RoleManagerCaller) GetNumberOfRoles(opts *bind.CallOpts) (*big.Int, error) { 195 var ( 196 ret0 = new(*big.Int) 197 ) 198 out := ret0 199 err := _RoleManager.contract.Call(opts, out, "getNumberOfRoles") 200 return *ret0, err 201 } 202 203 // GetNumberOfRoles is a free data retrieval call binding the contract method 0x87f55d31. 204 // 205 // Solidity: function getNumberOfRoles() constant returns(uint256) 206 func (_RoleManager *RoleManagerSession) GetNumberOfRoles() (*big.Int, error) { 207 return _RoleManager.Contract.GetNumberOfRoles(&_RoleManager.CallOpts) 208 } 209 210 // GetNumberOfRoles is a free data retrieval call binding the contract method 0x87f55d31. 211 // 212 // Solidity: function getNumberOfRoles() constant returns(uint256) 213 func (_RoleManager *RoleManagerCallerSession) GetNumberOfRoles() (*big.Int, error) { 214 return _RoleManager.Contract.GetNumberOfRoles(&_RoleManager.CallOpts) 215 } 216 217 // GetRoleDetails is a free data retrieval call binding the contract method 0x1870aba3. 218 // 219 // Solidity: function getRoleDetails(_roleId string, _orgId string) constant returns(roleId string, orgId string, accessType uint256, voter bool, admin bool, active bool) 220 func (_RoleManager *RoleManagerCaller) GetRoleDetails(opts *bind.CallOpts, _roleId string, _orgId string) (struct { 221 RoleId string 222 OrgId string 223 AccessType *big.Int 224 Voter bool 225 Admin bool 226 Active bool 227 }, error) { 228 ret := new(struct { 229 RoleId string 230 OrgId string 231 AccessType *big.Int 232 Voter bool 233 Admin bool 234 Active bool 235 }) 236 out := ret 237 err := _RoleManager.contract.Call(opts, out, "getRoleDetails", _roleId, _orgId) 238 return *ret, err 239 } 240 241 // GetRoleDetails is a free data retrieval call binding the contract method 0x1870aba3. 242 // 243 // Solidity: function getRoleDetails(_roleId string, _orgId string) constant returns(roleId string, orgId string, accessType uint256, voter bool, admin bool, active bool) 244 func (_RoleManager *RoleManagerSession) GetRoleDetails(_roleId string, _orgId string) (struct { 245 RoleId string 246 OrgId string 247 AccessType *big.Int 248 Voter bool 249 Admin bool 250 Active bool 251 }, error) { 252 return _RoleManager.Contract.GetRoleDetails(&_RoleManager.CallOpts, _roleId, _orgId) 253 } 254 255 // GetRoleDetails is a free data retrieval call binding the contract method 0x1870aba3. 256 // 257 // Solidity: function getRoleDetails(_roleId string, _orgId string) constant returns(roleId string, orgId string, accessType uint256, voter bool, admin bool, active bool) 258 func (_RoleManager *RoleManagerCallerSession) GetRoleDetails(_roleId string, _orgId string) (struct { 259 RoleId string 260 OrgId string 261 AccessType *big.Int 262 Voter bool 263 Admin bool 264 Active bool 265 }, error) { 266 return _RoleManager.Contract.GetRoleDetails(&_RoleManager.CallOpts, _roleId, _orgId) 267 } 268 269 // GetRoleDetailsFromIndex is a free data retrieval call binding the contract method 0xa451d4a8. 270 // 271 // Solidity: function getRoleDetailsFromIndex(_rIndex uint256) constant returns(roleId string, orgId string, accessType uint256, voter bool, admin bool, active bool) 272 func (_RoleManager *RoleManagerCaller) GetRoleDetailsFromIndex(opts *bind.CallOpts, _rIndex *big.Int) (struct { 273 RoleId string 274 OrgId string 275 AccessType *big.Int 276 Voter bool 277 Admin bool 278 Active bool 279 }, error) { 280 ret := new(struct { 281 RoleId string 282 OrgId string 283 AccessType *big.Int 284 Voter bool 285 Admin bool 286 Active bool 287 }) 288 out := ret 289 err := _RoleManager.contract.Call(opts, out, "getRoleDetailsFromIndex", _rIndex) 290 return *ret, err 291 } 292 293 // GetRoleDetailsFromIndex is a free data retrieval call binding the contract method 0xa451d4a8. 294 // 295 // Solidity: function getRoleDetailsFromIndex(_rIndex uint256) constant returns(roleId string, orgId string, accessType uint256, voter bool, admin bool, active bool) 296 func (_RoleManager *RoleManagerSession) GetRoleDetailsFromIndex(_rIndex *big.Int) (struct { 297 RoleId string 298 OrgId string 299 AccessType *big.Int 300 Voter bool 301 Admin bool 302 Active bool 303 }, error) { 304 return _RoleManager.Contract.GetRoleDetailsFromIndex(&_RoleManager.CallOpts, _rIndex) 305 } 306 307 // GetRoleDetailsFromIndex is a free data retrieval call binding the contract method 0xa451d4a8. 308 // 309 // Solidity: function getRoleDetailsFromIndex(_rIndex uint256) constant returns(roleId string, orgId string, accessType uint256, voter bool, admin bool, active bool) 310 func (_RoleManager *RoleManagerCallerSession) GetRoleDetailsFromIndex(_rIndex *big.Int) (struct { 311 RoleId string 312 OrgId string 313 AccessType *big.Int 314 Voter bool 315 Admin bool 316 Active bool 317 }, error) { 318 return _RoleManager.Contract.GetRoleDetailsFromIndex(&_RoleManager.CallOpts, _rIndex) 319 } 320 321 // IsAdminRole is a free data retrieval call binding the contract method 0xbe322e54. 322 // 323 // Solidity: function isAdminRole(_roleId string, _orgId string, _ultParent string) constant returns(bool) 324 func (_RoleManager *RoleManagerCaller) IsAdminRole(opts *bind.CallOpts, _roleId string, _orgId string, _ultParent string) (bool, error) { 325 var ( 326 ret0 = new(bool) 327 ) 328 out := ret0 329 err := _RoleManager.contract.Call(opts, out, "isAdminRole", _roleId, _orgId, _ultParent) 330 return *ret0, err 331 } 332 333 // IsAdminRole is a free data retrieval call binding the contract method 0xbe322e54. 334 // 335 // Solidity: function isAdminRole(_roleId string, _orgId string, _ultParent string) constant returns(bool) 336 func (_RoleManager *RoleManagerSession) IsAdminRole(_roleId string, _orgId string, _ultParent string) (bool, error) { 337 return _RoleManager.Contract.IsAdminRole(&_RoleManager.CallOpts, _roleId, _orgId, _ultParent) 338 } 339 340 // IsAdminRole is a free data retrieval call binding the contract method 0xbe322e54. 341 // 342 // Solidity: function isAdminRole(_roleId string, _orgId string, _ultParent string) constant returns(bool) 343 func (_RoleManager *RoleManagerCallerSession) IsAdminRole(_roleId string, _orgId string, _ultParent string) (bool, error) { 344 return _RoleManager.Contract.IsAdminRole(&_RoleManager.CallOpts, _roleId, _orgId, _ultParent) 345 } 346 347 // IsVoterRole is a free data retrieval call binding the contract method 0xdeb16ba7. 348 // 349 // Solidity: function isVoterRole(_roleId string, _orgId string, _ultParent string) constant returns(bool) 350 func (_RoleManager *RoleManagerCaller) IsVoterRole(opts *bind.CallOpts, _roleId string, _orgId string, _ultParent string) (bool, error) { 351 var ( 352 ret0 = new(bool) 353 ) 354 out := ret0 355 err := _RoleManager.contract.Call(opts, out, "isVoterRole", _roleId, _orgId, _ultParent) 356 return *ret0, err 357 } 358 359 // IsVoterRole is a free data retrieval call binding the contract method 0xdeb16ba7. 360 // 361 // Solidity: function isVoterRole(_roleId string, _orgId string, _ultParent string) constant returns(bool) 362 func (_RoleManager *RoleManagerSession) IsVoterRole(_roleId string, _orgId string, _ultParent string) (bool, error) { 363 return _RoleManager.Contract.IsVoterRole(&_RoleManager.CallOpts, _roleId, _orgId, _ultParent) 364 } 365 366 // IsVoterRole is a free data retrieval call binding the contract method 0xdeb16ba7. 367 // 368 // Solidity: function isVoterRole(_roleId string, _orgId string, _ultParent string) constant returns(bool) 369 func (_RoleManager *RoleManagerCallerSession) IsVoterRole(_roleId string, _orgId string, _ultParent string) (bool, error) { 370 return _RoleManager.Contract.IsVoterRole(&_RoleManager.CallOpts, _roleId, _orgId, _ultParent) 371 } 372 373 // RoleExists is a free data retrieval call binding the contract method 0xabf5739f. 374 // 375 // Solidity: function roleExists(_roleId string, _orgId string, _ultParent string) constant returns(bool) 376 func (_RoleManager *RoleManagerCaller) RoleExists(opts *bind.CallOpts, _roleId string, _orgId string, _ultParent string) (bool, error) { 377 var ( 378 ret0 = new(bool) 379 ) 380 out := ret0 381 err := _RoleManager.contract.Call(opts, out, "roleExists", _roleId, _orgId, _ultParent) 382 return *ret0, err 383 } 384 385 // RoleExists is a free data retrieval call binding the contract method 0xabf5739f. 386 // 387 // Solidity: function roleExists(_roleId string, _orgId string, _ultParent string) constant returns(bool) 388 func (_RoleManager *RoleManagerSession) RoleExists(_roleId string, _orgId string, _ultParent string) (bool, error) { 389 return _RoleManager.Contract.RoleExists(&_RoleManager.CallOpts, _roleId, _orgId, _ultParent) 390 } 391 392 // RoleExists is a free data retrieval call binding the contract method 0xabf5739f. 393 // 394 // Solidity: function roleExists(_roleId string, _orgId string, _ultParent string) constant returns(bool) 395 func (_RoleManager *RoleManagerCallerSession) RoleExists(_roleId string, _orgId string, _ultParent string) (bool, error) { 396 return _RoleManager.Contract.RoleExists(&_RoleManager.CallOpts, _roleId, _orgId, _ultParent) 397 } 398 399 // AddRole is a paid mutator transaction binding the contract method 0x7b713579. 400 // 401 // Solidity: function addRole(_roleId string, _orgId string, _baseAccess uint256, _isVoter bool, _isAdmin bool) returns() 402 func (_RoleManager *RoleManagerTransactor) AddRole(opts *bind.TransactOpts, _roleId string, _orgId string, _baseAccess *big.Int, _isVoter bool, _isAdmin bool) (*types.Transaction, error) { 403 return _RoleManager.contract.Transact(opts, "addRole", _roleId, _orgId, _baseAccess, _isVoter, _isAdmin) 404 } 405 406 // AddRole is a paid mutator transaction binding the contract method 0x7b713579. 407 // 408 // Solidity: function addRole(_roleId string, _orgId string, _baseAccess uint256, _isVoter bool, _isAdmin bool) returns() 409 func (_RoleManager *RoleManagerSession) AddRole(_roleId string, _orgId string, _baseAccess *big.Int, _isVoter bool, _isAdmin bool) (*types.Transaction, error) { 410 return _RoleManager.Contract.AddRole(&_RoleManager.TransactOpts, _roleId, _orgId, _baseAccess, _isVoter, _isAdmin) 411 } 412 413 // AddRole is a paid mutator transaction binding the contract method 0x7b713579. 414 // 415 // Solidity: function addRole(_roleId string, _orgId string, _baseAccess uint256, _isVoter bool, _isAdmin bool) returns() 416 func (_RoleManager *RoleManagerTransactorSession) AddRole(_roleId string, _orgId string, _baseAccess *big.Int, _isVoter bool, _isAdmin bool) (*types.Transaction, error) { 417 return _RoleManager.Contract.AddRole(&_RoleManager.TransactOpts, _roleId, _orgId, _baseAccess, _isVoter, _isAdmin) 418 } 419 420 // RemoveRole is a paid mutator transaction binding the contract method 0xa6343012. 421 // 422 // Solidity: function removeRole(_roleId string, _orgId string) returns() 423 func (_RoleManager *RoleManagerTransactor) RemoveRole(opts *bind.TransactOpts, _roleId string, _orgId string) (*types.Transaction, error) { 424 return _RoleManager.contract.Transact(opts, "removeRole", _roleId, _orgId) 425 } 426 427 // RemoveRole is a paid mutator transaction binding the contract method 0xa6343012. 428 // 429 // Solidity: function removeRole(_roleId string, _orgId string) returns() 430 func (_RoleManager *RoleManagerSession) RemoveRole(_roleId string, _orgId string) (*types.Transaction, error) { 431 return _RoleManager.Contract.RemoveRole(&_RoleManager.TransactOpts, _roleId, _orgId) 432 } 433 434 // RemoveRole is a paid mutator transaction binding the contract method 0xa6343012. 435 // 436 // Solidity: function removeRole(_roleId string, _orgId string) returns() 437 func (_RoleManager *RoleManagerTransactorSession) RemoveRole(_roleId string, _orgId string) (*types.Transaction, error) { 438 return _RoleManager.Contract.RemoveRole(&_RoleManager.TransactOpts, _roleId, _orgId) 439 } 440 441 // RoleManagerRoleCreatedIterator is returned from FilterRoleCreated and is used to iterate over the raw logs and unpacked data for RoleCreated events raised by the RoleManager contract. 442 type RoleManagerRoleCreatedIterator struct { 443 Event *RoleManagerRoleCreated // Event containing the contract specifics and raw log 444 445 contract *bind.BoundContract // Generic contract to use for unpacking event data 446 event string // Event name to use for unpacking event data 447 448 logs chan types.Log // Log channel receiving the found contract events 449 sub ethereum.Subscription // Subscription for errors, completion and termination 450 done bool // Whether the subscription completed delivering logs 451 fail error // Occurred error to stop iteration 452 } 453 454 // Next advances the iterator to the subsequent event, returning whether there 455 // are any more events found. In case of a retrieval or parsing error, false is 456 // returned and Error() can be queried for the exact failure. 457 func (it *RoleManagerRoleCreatedIterator) Next() bool { 458 // If the iterator failed, stop iterating 459 if it.fail != nil { 460 return false 461 } 462 // If the iterator completed, deliver directly whatever's available 463 if it.done { 464 select { 465 case log := <-it.logs: 466 it.Event = new(RoleManagerRoleCreated) 467 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 468 it.fail = err 469 return false 470 } 471 it.Event.Raw = log 472 return true 473 474 default: 475 return false 476 } 477 } 478 // Iterator still in progress, wait for either a data or an error event 479 select { 480 case log := <-it.logs: 481 it.Event = new(RoleManagerRoleCreated) 482 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 483 it.fail = err 484 return false 485 } 486 it.Event.Raw = log 487 return true 488 489 case err := <-it.sub.Err(): 490 it.done = true 491 it.fail = err 492 return it.Next() 493 } 494 } 495 496 // Error returns any retrieval or parsing error occurred during filtering. 497 func (it *RoleManagerRoleCreatedIterator) Error() error { 498 return it.fail 499 } 500 501 // Close terminates the iteration process, releasing any pending underlying 502 // resources. 503 func (it *RoleManagerRoleCreatedIterator) Close() error { 504 it.sub.Unsubscribe() 505 return nil 506 } 507 508 // RoleManagerRoleCreated represents a RoleCreated event raised by the RoleManager contract. 509 type RoleManagerRoleCreated struct { 510 RoleId string 511 OrgId string 512 BaseAccess *big.Int 513 IsVoter bool 514 IsAdmin bool 515 Raw types.Log // Blockchain specific contextual infos 516 } 517 518 // FilterRoleCreated is a free log retrieval operation binding the contract event 0xefa5bc1bedbee25b04b00855c15a0c180ecb4a2440d4d08296e49561655e2b1c. 519 // 520 // Solidity: e RoleCreated(_roleId string, _orgId string, _baseAccess uint256, _isVoter bool, _isAdmin bool) 521 func (_RoleManager *RoleManagerFilterer) FilterRoleCreated(opts *bind.FilterOpts) (*RoleManagerRoleCreatedIterator, error) { 522 523 logs, sub, err := _RoleManager.contract.FilterLogs(opts, "RoleCreated") 524 if err != nil { 525 return nil, err 526 } 527 return &RoleManagerRoleCreatedIterator{contract: _RoleManager.contract, event: "RoleCreated", logs: logs, sub: sub}, nil 528 } 529 530 // WatchRoleCreated is a free log subscription operation binding the contract event 0xefa5bc1bedbee25b04b00855c15a0c180ecb4a2440d4d08296e49561655e2b1c. 531 // 532 // Solidity: e RoleCreated(_roleId string, _orgId string, _baseAccess uint256, _isVoter bool, _isAdmin bool) 533 func (_RoleManager *RoleManagerFilterer) WatchRoleCreated(opts *bind.WatchOpts, sink chan<- *RoleManagerRoleCreated) (event.Subscription, error) { 534 535 logs, sub, err := _RoleManager.contract.WatchLogs(opts, "RoleCreated") 536 if err != nil { 537 return nil, err 538 } 539 return event.NewSubscription(func(quit <-chan struct{}) error { 540 defer sub.Unsubscribe() 541 for { 542 select { 543 case log := <-logs: 544 // New log arrived, parse the event and forward to the user 545 event := new(RoleManagerRoleCreated) 546 if err := _RoleManager.contract.UnpackLog(event, "RoleCreated", log); err != nil { 547 return err 548 } 549 event.Raw = log 550 551 select { 552 case sink <- event: 553 case err := <-sub.Err(): 554 return err 555 case <-quit: 556 return nil 557 } 558 case err := <-sub.Err(): 559 return err 560 case <-quit: 561 return nil 562 } 563 } 564 }), nil 565 } 566 567 // RoleManagerRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the RoleManager contract. 568 type RoleManagerRoleRevokedIterator struct { 569 Event *RoleManagerRoleRevoked // Event containing the contract specifics and raw log 570 571 contract *bind.BoundContract // Generic contract to use for unpacking event data 572 event string // Event name to use for unpacking event data 573 574 logs chan types.Log // Log channel receiving the found contract events 575 sub ethereum.Subscription // Subscription for errors, completion and termination 576 done bool // Whether the subscription completed delivering logs 577 fail error // Occurred error to stop iteration 578 } 579 580 // Next advances the iterator to the subsequent event, returning whether there 581 // are any more events found. In case of a retrieval or parsing error, false is 582 // returned and Error() can be queried for the exact failure. 583 func (it *RoleManagerRoleRevokedIterator) Next() bool { 584 // If the iterator failed, stop iterating 585 if it.fail != nil { 586 return false 587 } 588 // If the iterator completed, deliver directly whatever's available 589 if it.done { 590 select { 591 case log := <-it.logs: 592 it.Event = new(RoleManagerRoleRevoked) 593 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 594 it.fail = err 595 return false 596 } 597 it.Event.Raw = log 598 return true 599 600 default: 601 return false 602 } 603 } 604 // Iterator still in progress, wait for either a data or an error event 605 select { 606 case log := <-it.logs: 607 it.Event = new(RoleManagerRoleRevoked) 608 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 609 it.fail = err 610 return false 611 } 612 it.Event.Raw = log 613 return true 614 615 case err := <-it.sub.Err(): 616 it.done = true 617 it.fail = err 618 return it.Next() 619 } 620 } 621 622 // Error returns any retrieval or parsing error occurred during filtering. 623 func (it *RoleManagerRoleRevokedIterator) Error() error { 624 return it.fail 625 } 626 627 // Close terminates the iteration process, releasing any pending underlying 628 // resources. 629 func (it *RoleManagerRoleRevokedIterator) Close() error { 630 it.sub.Unsubscribe() 631 return nil 632 } 633 634 // RoleManagerRoleRevoked represents a RoleRevoked event raised by the RoleManager contract. 635 type RoleManagerRoleRevoked struct { 636 RoleId string 637 OrgId string 638 Raw types.Log // Blockchain specific contextual infos 639 } 640 641 // FilterRoleRevoked is a free log retrieval operation binding the contract event 0x1196059dd83524bf989fd94bb65808c09dbea2ab791fb6bfa87a0e0aa64b2ea6. 642 // 643 // Solidity: e RoleRevoked(_roleId string, _orgId string) 644 func (_RoleManager *RoleManagerFilterer) FilterRoleRevoked(opts *bind.FilterOpts) (*RoleManagerRoleRevokedIterator, error) { 645 646 logs, sub, err := _RoleManager.contract.FilterLogs(opts, "RoleRevoked") 647 if err != nil { 648 return nil, err 649 } 650 return &RoleManagerRoleRevokedIterator{contract: _RoleManager.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil 651 } 652 653 // WatchRoleRevoked is a free log subscription operation binding the contract event 0x1196059dd83524bf989fd94bb65808c09dbea2ab791fb6bfa87a0e0aa64b2ea6. 654 // 655 // Solidity: e RoleRevoked(_roleId string, _orgId string) 656 func (_RoleManager *RoleManagerFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *RoleManagerRoleRevoked) (event.Subscription, error) { 657 658 logs, sub, err := _RoleManager.contract.WatchLogs(opts, "RoleRevoked") 659 if err != nil { 660 return nil, err 661 } 662 return event.NewSubscription(func(quit <-chan struct{}) error { 663 defer sub.Unsubscribe() 664 for { 665 select { 666 case log := <-logs: 667 // New log arrived, parse the event and forward to the user 668 event := new(RoleManagerRoleRevoked) 669 if err := _RoleManager.contract.UnpackLog(event, "RoleRevoked", log); err != nil { 670 return err 671 } 672 event.Raw = log 673 674 select { 675 case sink <- event: 676 case err := <-sub.Err(): 677 return err 678 case <-quit: 679 return nil 680 } 681 case err := <-sub.Err(): 682 return err 683 case <-quit: 684 return nil 685 } 686 } 687 }), nil 688 }