UNPKG

@gooddollar/goodcontracts

Version:
1,216 lines 126 kB
{ "contractName": "IdentityAdminRole", "abi": [ { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" } ], "name": "IdentityAdminAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" } ], "name": "IdentityAdminRemoved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "constant": true, "inputs": [], "name": "isOwner", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "isIdentityAdmin", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "addIdentityAdmin", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "removeIdentityAdmin", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "renounceIdentityAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"IdentityAdminAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"IdentityAdminRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addIdentityAdmin\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isIdentityAdmin\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"removeIdentityAdmin\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceIdentityAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"addIdentityAdmin(address)\":{\"details\":\"Adds a identity admin account. Is only callable by owner.\",\"params\":{\"account\":\"Address to be added\"},\"return\":\"true if successful\"},\"isIdentityAdmin(address)\":{\"details\":\"Checks if account is identity admin\",\"params\":{\"account\":\"Account to check\"},\"return\":\"Boolean indicating if account is identity admin\"},\"isOwner()\":{\"return\":\"true if `msg.sender` is the owner of the contract.\"},\"owner()\":{\"return\":\"the address of the owner.\"},\"removeIdentityAdmin(address)\":{\"details\":\"Removes a identity admin account. Is only callable by owner.\",\"params\":{\"account\":\"Address to be removed\"},\"return\":\"true if successful\"},\"renounceIdentityAdmin()\":{\"details\":\"Allows an admin to renounce their role\"},\"renounceOwnership()\":{\"details\":\"Allows the current owner to relinquish control of the contract.\"},\"transferOwnership(address)\":{\"details\":\"Allows the current owner to transfer control of the contract to a newOwner.\",\"params\":{\"newOwner\":\"The address to transfer ownership to.\"}}},\"title\":\"Contract managing the identity admin role\"},\"userdoc\":{\"methods\":{\"renounceOwnership()\":{\"notice\":\"Renouncing to ownership will leave the contract without an owner. It will not be possible to call the functions with the `onlyOwner` modifier anymore.\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/identity/IdentityAdminRole.sol\":\"IdentityAdminRole\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/identity/IdentityAdminRole.sol\":{\"keccak256\":\"0x8e82c45eefe0da77d017144dfad12602c68124297035937901cdd08ce48c57ff\",\"urls\":[\"bzz-raw://e20e606342b3b35f41a081294cf3f716fe7e27e81d3090daa37c5208f4ef4bc3\",\"dweb:/ipfs/QmVEhHpiwVsksnPyHkfNa5LpTBLxoP9kj5NRZUBv456ewK\"]},\"openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzz-raw://4ca6617349a9b36fd82e9442a8e445ce9021a174e4399d1457ddc894ee3f5df3\",\"dweb:/ipfs/QmcmyB4cNazZ1sw963Afaijt67M9bDgwmGXCgQajGTD4tm\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x980de387a1a020a498f53d00f89fecebb12c949a17e8f160093c0303ede2b786\",\"urls\":[\"bzz-raw://f07a2c393caa85f62f0aaa461e3edd50aa59371d4209778ba0558d7f8b4b856c\",\"dweb:/ipfs/QmeN3ZiYGSjCnQFeYaJNgoXjF9eDue1g3e9pqManRkeBtV\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "pragma solidity >0.5.4;\r\n\r\nimport \"openzeppelin-solidity/contracts/access/Roles.sol\";\r\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\r\n\r\n/**\r\n * @title Contract managing the identity admin role\r\n */\r\ncontract IdentityAdminRole is Ownable {\r\n using Roles for Roles.Role;\r\n\r\n event IdentityAdminAdded(address indexed account);\r\n event IdentityAdminRemoved(address indexed account);\r\n\r\n Roles.Role private IdentityAdmins;\r\n\r\n /* @dev constructor. Adds caller as an admin\r\n */\r\n constructor() internal {\r\n _addIdentityAdmin(msg.sender);\r\n }\r\n\r\n /* @dev Modifier to check if caller is an admin\r\n */\r\n modifier onlyIdentityAdmin() {\r\n require(isIdentityAdmin(msg.sender), \"not IdentityAdmin\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Checks if account is identity admin\r\n * @param account Account to check\r\n * @return Boolean indicating if account is identity admin\r\n */\r\n function isIdentityAdmin(address account) public view returns (bool) {\r\n return IdentityAdmins.has(account);\r\n }\r\n\r\n /**\r\n * @dev Adds a identity admin account. Is only callable by owner.\r\n * @param account Address to be added\r\n * @return true if successful\r\n */\r\n function addIdentityAdmin(address account) public onlyOwner returns (bool) {\r\n _addIdentityAdmin(account);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Removes a identity admin account. Is only callable by owner.\r\n * @param account Address to be removed\r\n * @return true if successful\r\n */\r\n function removeIdentityAdmin(address account) public onlyOwner returns (bool) {\r\n _removeIdentityAdmin(account);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Allows an admin to renounce their role\r\n */\r\n function renounceIdentityAdmin() public {\r\n _removeIdentityAdmin(msg.sender);\r\n }\r\n\r\n /**\r\n * @dev Internal implementation of addIdentityAdmin\r\n */\r\n function _addIdentityAdmin(address account) internal {\r\n IdentityAdmins.add(account);\r\n emit IdentityAdminAdded(account);\r\n }\r\n\r\n /**\r\n * @dev Internal implementation of removeIdentityAdmin\r\n */\r\n function _removeIdentityAdmin(address account) internal {\r\n IdentityAdmins.remove(account);\r\n emit IdentityAdminRemoved(account);\r\n }\r\n}\r\n", "sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/identity/IdentityAdminRole.sol", "ast": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/identity/IdentityAdminRole.sol", "exportedSymbols": { "IdentityAdminRole": [ 2507 ] }, "id": 2508, "nodeType": "SourceUnit", "nodes": [ { "id": 2382, "literals": [ "solidity", ">", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:10" }, { "absolutePath": "openzeppelin-solidity/contracts/access/Roles.sol", "file": "openzeppelin-solidity/contracts/access/Roles.sol", "id": 2383, "nodeType": "ImportDirective", "scope": 2508, "sourceUnit": 20742, "src": "27:58:10", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "id": 2384, "nodeType": "ImportDirective", "scope": 2508, "sourceUnit": 21418, "src": "87:63:10", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2385, "name": "Ownable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 21417, "src": "247:7:10", "typeDescriptions": { "typeIdentifier": "t_contract$_Ownable_$21417", "typeString": "contract Ownable" } }, "id": 2386, "nodeType": "InheritanceSpecifier", "src": "247:7:10" } ], "contractDependencies": [ 21417 ], "contractKind": "contract", "documentation": "@title Contract managing the identity admin role", "fullyImplemented": true, "id": 2507, "linearizedBaseContracts": [ 2507, 21417 ], "name": "IdentityAdminRole", "nodeType": "ContractDefinition", "nodes": [ { "id": 2389, "libraryName": { "contractScope": null, "id": 2387, "name": "Roles", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 20741, "src": "268:5:10", "typeDescriptions": { "typeIdentifier": "t_contract$_Roles_$20741", "typeString": "library Roles" } }, "nodeType": "UsingForDirective", "src": "262:27:10", "typeName": { "contractScope": null, "id": 2388, "name": "Roles.Role", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 20654, "src": "278:10:10", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$20654_storage_ptr", "typeString": "struct Roles.Role" } } }, { "anonymous": false, "documentation": null, "id": 2393, "name": "IdentityAdminAdded", "nodeType": "EventDefinition", "parameters": { "id": 2392, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2391, "indexed": true, "name": "account", "nodeType": "VariableDeclaration", "scope": 2393, "src": "322:23:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2390, "name": "address", "nodeType": "ElementaryTypeName", "src": "322:7:10", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "321:25:10" }, "src": "297:50:10" }, { "anonymous": false, "documentation": null, "id": 2397, "name": "IdentityAdminRemoved", "nodeType": "EventDefinition", "parameters": { "id": 2396, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2395, "indexed": true, "name": "account", "nodeType": "VariableDeclaration", "scope": 2397, "src": "380:23:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2394, "name": "address", "nodeType": "ElementaryTypeName", "src": "380:7:10", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "379:25:10" }, "src": "353:52:10" }, { "constant": false, "id": 2399, "name": "IdentityAdmins", "nodeType": "VariableDeclaration", "scope": 2507, "src": "413:33:10", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$20654_storage", "typeString": "struct Roles.Role" }, "typeName": { "contractScope": null, "id": 2398, "name": "Roles.Role", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 20654, "src": "413:10:10", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$20654_storage_ptr", "typeString": "struct Roles.Role" } }, "value": null, "visibility": "private" }, { "body": { "id": 2407, "nodeType": "Block", "src": "537:48:10", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2403, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22171, "src": "566:3:10", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2404, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "566:10:10", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 2402, "name": "_addIdentityAdmin", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2490, "src": "548:17:10", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 2405, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "548:29:10", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2406, "nodeType": "ExpressionStatement", "src": "548:29:10" } ] }, "documentation": null, "id": 2408, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 2400, "nodeType": "ParameterList", "parameters": [], "src": "525:2:10" }, "returnParameters": { "id": 2401, "nodeType": "ParameterList", "parameters": [], "src": "537:0:10" }, "scope": 2507, "src": "514:71:10", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 2419, "nodeType": "Block", "src": "684:88:10", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2412, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22171, "src": "719:3:10", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2413, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "719:10:10", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 2411, "name": "isIdentityAdmin", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2433, "src": "703:15:10", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", "typeString": "function (address) view returns (bool)" } }, "id": 2414, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "703:27:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "6e6f74204964656e7469747941646d696e", "id": 2415, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "732:19:10", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_70ecc8614ad05c5de74bd38197a8e4225214d22f113f180762dc587547b4d306", "typeString": "literal_string \"not IdentityAdmin\"" }, "value": "not IdentityAdmin" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_70ecc8614ad05c5de74bd38197a8e4225214d22f113f180762dc587547b4d306", "typeString": "literal_string \"not IdentityAdmin\"" } ], "id": 2410, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 22174, 22175 ], "referencedDeclaration": 22175, "src": "695:7:10", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2416, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "695:57:10", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2417, "nodeType": "ExpressionStatement", "src": "695:57:10" }, { "id": 2418, "nodeType": "PlaceholderStatement", "src": "763:1:10" } ] }, "documentation": null, "id": 2420, "name": "onlyIdentityAdmin", "nodeType": "ModifierDefinition", "parameters": { "id": 2409, "nodeType": "ParameterList", "parameters": [], "src": "681:2:10" }, "src": "655:117:10", "visibility": "internal" }, { "body": { "id": 2432, "nodeType": "Block", "src": "1020:53:10", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2429, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2422, "src": "1057:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "id": 2427, "name": "IdentityAdmins", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2399, "src": "1038:14:10", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$20654_storage", "typeString": "struct Roles.Role storage ref" } }, "id": 2428, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "has", "nodeType": "MemberAccess", "referencedDeclaration": 20740, "src": "1038:18:10", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$20654_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$20654_storage_ptr_$", "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" } }, "id": 2430, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1038:27:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 2426, "id": 2431, "nodeType": "Return", "src": "1031:34:10" } ] }, "documentation": "@dev Checks if account is identity admin\n@param account Account to check\n@return Boolean indicating if account is identity admin", "id": 2433, "implemented": true, "kind": "function", "modifiers": [], "name": "isIdentityAdmin", "nodeType": "FunctionDefinition", "parameters": { "id": 2423, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2422, "name": "account", "nodeType": "VariableDeclaration", "scope": 2433, "src": "976:15:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2421, "name": "address", "nodeType": "ElementaryTypeName", "src": "976:7:10", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "975:17:10" }, "returnParameters": { "id": 2426, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2425, "name": "", "nodeType": "VariableDeclaration", "scope": 2433, "src": "1014:4:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 2424, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1014:4:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1013:6:10" }, "scope": 2507, "src": "951:122:10", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 2448, "nodeType": "Block", "src": "1323:67:10", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2443, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2435, "src": "1352:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2442, "name": "_addIdentityAdmin", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2490, "src": "1334:17:10", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 2444, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1334:26:10", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2445, "nodeType": "ExpressionStatement", "src": "1334:26:10" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 2446, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1378:4:10", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 2441, "id": 2447, "nodeType": "Return", "src": "1371:11:10" } ] }, "documentation": "@dev Adds a identity admin account. Is only callable by owner.\n@param account Address to be added\n@return true if successful", "id": 2449, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2438, "modifierName": { "argumentTypes": null, "id": 2437, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21351, "src": "1298:9:10", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1298:9:10" } ], "name": "addIdentityAdmin", "nodeType": "FunctionDefinition", "parameters": { "id": 2436, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2435, "name": "account", "nodeType": "VariableDeclaration", "scope": 2449, "src": "1274:15:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2434, "name": "address", "nodeType": "ElementaryTypeName", "src": "1274:7:10", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1273:17:10" }, "returnParameters": { "id": 2441, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2440, "name": "", "nodeType": "VariableDeclaration", "scope": 2449, "src": "1317:4:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 2439, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1317:4:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1316:6:10" }, "scope": 2507, "src": "1248:142:10", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2464, "nodeType": "Block", "src": "1648:70:10", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2459, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2451, "src": "1680:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2458, "name": "_removeIdentityAdmin", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2506, "src": "1659:20:10", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 2460, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1659:29:10", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2461, "nodeType": "ExpressionStatement", "src": "1659:29:10" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 2462, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1706:4:10", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 2457, "id": 2463, "nodeType": "Return", "src": "1699:11:10" } ] }, "documentation": "@dev Removes a identity admin account. Is only callable by owner.\n@param account Address to be removed\n@return true if successful", "id": 2465, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2454, "modifierName": { "argumentTypes": null, "id": 2453, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21351, "src": "1623:9:10", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1623:9:10" } ], "name": "removeIdentityAdmin", "nodeType": "FunctionDefinition", "parameters": { "id": 2452, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2451, "name": "account", "nodeType": "VariableDeclaration", "scope": 2465, "src": "1599:15:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2450, "name": "address", "nodeType": "ElementaryTypeName", "src": "1599:7:10", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1598:17:10" }, "returnParameters": { "id": 2457, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2456, "name": "", "nodeType": "VariableDeclaration", "scope": 2465, "src": "1642:4:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 2455, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1642:4:10", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1641:6:10" }, "scope": 2507, "src": "1570:148:10", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2473, "nodeType": "Block", "src": "1836:51:10", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2469, "name":