UNPKG

@dnextco/tokenboost-solidity-erc223token

Version:

Solidity contracts for TokenBoost (ERC223Token)

1,276 lines 66.3 kB
{ "contractName": "Roles", "abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058209dbe9707b402a640bb8b4713a40b6a3351b0af9b928cfc77f3fdb1655faa4b2e0029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058209dbe9707b402a640bb8b4713a40b6a3351b0af9b928cfc77f3fdb1655faa4b2e0029", "sourceMap": "186:799:38:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", "deployedSourceMap": "186:799:38:-;;;;;;;;", "source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title Roles\n * @author Francisco Giordano (@frangio)\n * @dev Library for managing addresses assigned to a Role.\n * See RBAC.sol for example usage.\n */\nlibrary Roles {\n struct Role {\n mapping (address => bool) bearer;\n }\n\n /**\n * @dev give an address access to this role\n */\n function add(Role storage _role, address _addr)\n internal\n {\n _role.bearer[_addr] = true;\n }\n\n /**\n * @dev remove an address' access to this role\n */\n function remove(Role storage _role, address _addr)\n internal\n {\n _role.bearer[_addr] = false;\n }\n\n /**\n * @dev check if an address has this role\n * // reverts\n */\n function check(Role storage _role, address _addr)\n internal\n view\n {\n require(has(_role, _addr));\n }\n\n /**\n * @dev check if an address has this role\n * @return bool\n */\n function has(Role storage _role, address _addr)\n internal\n view\n returns (bool)\n {\n return _role.bearer[_addr];\n }\n}\n", "sourcePath": "zeppelin-solidity/contracts/access/rbac/Roles.sol", "ast": { "absolutePath": "zeppelin-solidity/contracts/access/rbac/Roles.sol", "exportedSymbols": { "Roles": [ 6601 ] }, "id": 6602, "nodeType": "SourceUnit", "nodes": [ { "id": 6533, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:38" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title Roles\n@author Francisco Giordano (@frangio)\n@dev Library for managing addresses assigned to a Role.\nSee RBAC.sol for example usage.", "fullyImplemented": true, "id": 6601, "linearizedBaseContracts": [ 6601 ], "name": "Roles", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "Roles.Role", "id": 6538, "members": [ { "constant": false, "id": 6537, "name": "bearer", "nodeType": "VariableDeclaration", "scope": 6538, "src": "222:32:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" }, "typeName": { "id": 6536, "keyType": { "id": 6534, "name": "address", "nodeType": "ElementaryTypeName", "src": "231:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "222:25:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" }, "valueType": { "id": 6535, "name": "bool", "nodeType": "ElementaryTypeName", "src": "242:4:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } }, "value": null, "visibility": "internal" } ], "name": "Role", "nodeType": "StructDefinition", "scope": 6601, "src": "204:55:38", "visibility": "public" }, { "body": { "id": 6553, "nodeType": "Block", "src": "384:37:38", "statements": [ { "expression": { "argumentTypes": null, "id": 6551, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 6545, "name": "_role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6540, "src": "390:5:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role storage pointer" } }, "id": 6548, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "bearer", "nodeType": "MemberAccess", "referencedDeclaration": 6537, "src": "390:12:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 6549, "indexExpression": { "argumentTypes": null, "id": 6547, "name": "_addr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6542, "src": "403:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "390:19:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 6550, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "412:4:38", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "390:26:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 6552, "nodeType": "ExpressionStatement", "src": "390:26:38" } ] }, "documentation": "@dev give an address access to this role", "id": 6554, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "add", "nodeType": "FunctionDefinition", "parameters": { "id": 6543, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6540, "name": "_role", "nodeType": "VariableDeclaration", "scope": 6554, "src": "334:18:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" }, "typeName": { "contractScope": null, "id": 6539, "name": "Role", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6538, "src": "334:4:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6542, "name": "_addr", "nodeType": "VariableDeclaration", "scope": 6554, "src": "354:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6541, "name": "address", "nodeType": "ElementaryTypeName", "src": "354:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "333:35:38" }, "payable": false, "returnParameters": { "id": 6544, "nodeType": "ParameterList", "parameters": [], "src": "384:0:38" }, "scope": 6601, "src": "321:100:38", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 6569, "nodeType": "Block", "src": "552:38:38", "statements": [ { "expression": { "argumentTypes": null, "id": 6567, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 6561, "name": "_role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6556, "src": "558:5:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role storage pointer" } }, "id": 6564, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "bearer", "nodeType": "MemberAccess", "referencedDeclaration": 6537, "src": "558:12:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 6565, "indexExpression": { "argumentTypes": null, "id": 6563, "name": "_addr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6558, "src": "571:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "558:19:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 6566, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "580:5:38", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "558:27:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 6568, "nodeType": "ExpressionStatement", "src": "558:27:38" } ] }, "documentation": "@dev remove an address' access to this role", "id": 6570, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "remove", "nodeType": "FunctionDefinition", "parameters": { "id": 6559, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6556, "name": "_role", "nodeType": "VariableDeclaration", "scope": 6570, "src": "502:18:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" }, "typeName": { "contractScope": null, "id": 6555, "name": "Role", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6538, "src": "502:4:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6558, "name": "_addr", "nodeType": "VariableDeclaration", "scope": 6570, "src": "522:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6557, "name": "address", "nodeType": "ElementaryTypeName", "src": "522:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "501:35:38" }, "payable": false, "returnParameters": { "id": 6560, "nodeType": "ParameterList", "parameters": [], "src": "552:0:38" }, "scope": 6601, "src": "486:104:38", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 6584, "nodeType": "Block", "src": "740:37:38", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 6579, "name": "_role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6572, "src": "758:5:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role storage pointer" } }, { "argumentTypes": null, "id": 6580, "name": "_addr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6574, "src": "765:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role storage pointer" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 6578, "name": "has", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6600, "src": "754:3:38", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$6538_storage_ptr_$_t_address_$returns$_t_bool_$", "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" } }, "id": 6581, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "754:17:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 6577, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 7665, 7666 ], "referencedDeclaration": 7665, "src": "746:7:38", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 6582, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "746:26:38", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 6583, "nodeType": "ExpressionStatement", "src": "746:26:38" } ] }, "documentation": "@dev check if an address has this role\n// reverts", "id": 6585, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "check", "nodeType": "FunctionDefinition", "parameters": { "id": 6575, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6572, "name": "_role", "nodeType": "VariableDeclaration", "scope": 6585, "src": "681:18:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" }, "typeName": { "contractScope": null, "id": 6571, "name": "Role", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6538, "src": "681:4:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6574, "name": "_addr", "nodeType": "VariableDeclaration", "scope": 6585, "src": "701:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6573, "name": "address", "nodeType": "ElementaryTypeName", "src": "701:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "680:35:38" }, "payable": false, "returnParameters": { "id": 6576, "nodeType": "ParameterList", "parameters": [], "src": "740:0:38" }, "scope": 6601, "src": "666:111:38", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": { "id": 6599, "nodeType": "Block", "src": "946:37:38", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 6594, "name": "_role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6587, "src": "959:5:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role storage pointer" } }, "id": 6595, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "bearer", "nodeType": "MemberAccess", "referencedDeclaration": 6537, "src": "959:12:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 6597, "indexExpression": { "argumentTypes": null, "id": 6596, "name": "_addr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6589, "src": "972:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "959:19:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 6593, "id": 6598, "nodeType": "Return", "src": "952:26:38" } ] }, "documentation": "@dev check if an address has this role\n@return bool", "id": 6600, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "has", "nodeType": "FunctionDefinition", "parameters": { "id": 6590, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6587, "name": "_role", "nodeType": "VariableDeclaration", "scope": 6600, "src": "868:18:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" }, "typeName": { "contractScope": null, "id": 6586, "name": "Role", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6538, "src": "868:4:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6589, "name": "_addr", "nodeType": "VariableDeclaration", "scope": 6600, "src": "888:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6588, "name": "address", "nodeType": "ElementaryTypeName", "src": "888:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "867:35:38" }, "payable": false, "returnParameters": { "id": 6593, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6592, "name": "", "nodeType": "VariableDeclaration", "scope": 6600, "src": "938:4:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 6591, "name": "bool", "nodeType": "ElementaryTypeName", "src": "938:4:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "937:6:38" }, "scope": 6601, "src": "855:128:38", "stateMutability": "view", "superFunction": null, "visibility": "internal" } ], "scope": 6602, "src": "186:799:38" } ], "src": "0:986:38" }, "legacyAST": { "absolutePath": "zeppelin-solidity/contracts/access/rbac/Roles.sol", "exportedSymbols": { "Roles": [ 6601 ] }, "id": 6602, "nodeType": "SourceUnit", "nodes": [ { "id": 6533, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:38" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title Roles\n@author Francisco Giordano (@frangio)\n@dev Library for managing addresses assigned to a Role.\nSee RBAC.sol for example usage.", "fullyImplemented": true, "id": 6601, "linearizedBaseContracts": [ 6601 ], "name": "Roles", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "Roles.Role", "id": 6538, "members": [ { "constant": false, "id": 6537, "name": "bearer", "nodeType": "VariableDeclaration", "scope": 6538, "src": "222:32:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" }, "typeName": { "id": 6536, "keyType": { "id": 6534, "name": "address", "nodeType": "ElementaryTypeName", "src": "231:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "222:25:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" }, "valueType": { "id": 6535, "name": "bool", "nodeType": "ElementaryTypeName", "src": "242:4:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } }, "value": null, "visibility": "internal" } ], "name": "Role", "nodeType": "StructDefinition", "scope": 6601, "src": "204:55:38", "visibility": "public" }, { "body": { "id": 6553, "nodeType": "Block", "src": "384:37:38", "statements": [ { "expression": { "argumentTypes": null, "id": 6551, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 6545, "name": "_role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6540, "src": "390:5:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role storage pointer" } }, "id": 6548, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "bearer", "nodeType": "MemberAccess", "referencedDeclaration": 6537, "src": "390:12:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 6549, "indexExpression": { "argumentTypes": null, "id": 6547, "name": "_addr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6542, "src": "403:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "390:19:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 6550, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "412:4:38", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "390:26:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 6552, "nodeType": "ExpressionStatement", "src": "390:26:38" } ] }, "documentation": "@dev give an address access to this role", "id": 6554, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "add", "nodeType": "FunctionDefinition", "parameters": { "id": 6543, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6540, "name": "_role", "nodeType": "VariableDeclaration", "scope": 6554, "src": "334:18:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" }, "typeName": { "contractScope": null, "id": 6539, "name": "Role", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6538, "src": "334:4:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6542, "name": "_addr", "nodeType": "VariableDeclaration", "scope": 6554, "src": "354:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6541, "name": "address", "nodeType": "ElementaryTypeName", "src": "354:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "333:35:38" }, "payable": false, "returnParameters": { "id": 6544, "nodeType": "ParameterList", "parameters": [], "src": "384:0:38" }, "scope": 6601, "src": "321:100:38", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 6569, "nodeType": "Block", "src": "552:38:38", "statements": [ { "expression": { "argumentTypes": null, "id": 6567, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 6561, "name": "_role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6556, "src": "558:5:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role storage pointer" } }, "id": 6564, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "bearer", "nodeType": "MemberAccess", "referencedDeclaration": 6537, "src": "558:12:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 6565, "indexExpression": { "argumentTypes": null, "id": 6563, "name": "_addr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6558, "src": "571:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "558:19:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", "id": 6566, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "580:5:38", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "558:27:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 6568, "nodeType": "ExpressionStatement", "src": "558:27:38" } ] }, "documentation": "@dev remove an address' access to this role", "id": 6570, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "remove", "nodeType": "FunctionDefinition", "parameters": { "id": 6559, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6556, "name": "_role", "nodeType": "VariableDeclaration", "scope": 6570, "src": "502:18:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" }, "typeName": { "contractScope": null, "id": 6555, "name": "Role", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6538, "src": "502:4:38", "typeDescriptions": { "typeIdentifier": "t_struct$_Role_$6538_storage_ptr", "typeString": "struct Roles.Role" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6558, "name": "_addr", "nodeType": "VariableDeclaration", "scope": 6570, "src": "522