tokenboost-solidity-erc20token
Version:
Solidity contracts for TokenBoost (ERC20Token)
1,276 lines • 66.3 kB
JSON
{
"contractName": "Roles",
"abi": [],
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058209dbe9707b402a640bb8b4713a40b6a3351b0af9b928cfc77f3fdb1655faa4b2e0029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058209dbe9707b402a640bb8b4713a40b6a3351b0af9b928cfc77f3fdb1655faa4b2e0029",
"sourceMap": "186:799:16:-;;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:16:-;;;;;;;;",
"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": [
3821
]
},
"id": 3822,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3753,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:16"
},
{
"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": 3821,
"linearizedBaseContracts": [
3821
],
"name": "Roles",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "Roles.Role",
"id": 3758,
"members": [
{
"constant": false,
"id": 3757,
"name": "bearer",
"nodeType": "VariableDeclaration",
"scope": 3758,
"src": "222:32:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 3756,
"keyType": {
"id": 3754,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "231:7:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "222:25:16",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 3755,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "242:4:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "internal"
}
],
"name": "Role",
"nodeType": "StructDefinition",
"scope": 3821,
"src": "204:55:16",
"visibility": "public"
},
{
"body": {
"id": 3773,
"nodeType": "Block",
"src": "384:37:16",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3771,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3765,
"name": "_role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3760,
"src": "390:5:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role storage pointer"
}
},
"id": 3768,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bearer",
"nodeType": "MemberAccess",
"referencedDeclaration": 3757,
"src": "390:12:16",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3769,
"indexExpression": {
"argumentTypes": null,
"id": 3767,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3762,
"src": "403:5:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "390:19:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3770,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "412:4:16",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "390:26:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3772,
"nodeType": "ExpressionStatement",
"src": "390:26:16"
}
]
},
"documentation": "@dev give an address access to this role",
"id": 3774,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3763,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3760,
"name": "_role",
"nodeType": "VariableDeclaration",
"scope": 3774,
"src": "334:18:16",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
},
"typeName": {
"contractScope": null,
"id": 3759,
"name": "Role",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3758,
"src": "334:4:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3762,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 3774,
"src": "354:13:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3761,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "354:7:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "333:35:16"
},
"payable": false,
"returnParameters": {
"id": 3764,
"nodeType": "ParameterList",
"parameters": [],
"src": "384:0:16"
},
"scope": 3821,
"src": "321:100:16",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3789,
"nodeType": "Block",
"src": "552:38:16",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3787,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3781,
"name": "_role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3776,
"src": "558:5:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role storage pointer"
}
},
"id": 3784,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bearer",
"nodeType": "MemberAccess",
"referencedDeclaration": 3757,
"src": "558:12:16",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3785,
"indexExpression": {
"argumentTypes": null,
"id": 3783,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3778,
"src": "571:5:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "558:19:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 3786,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "580:5:16",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "558:27:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3788,
"nodeType": "ExpressionStatement",
"src": "558:27:16"
}
]
},
"documentation": "@dev remove an address' access to this role",
"id": 3790,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3779,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3776,
"name": "_role",
"nodeType": "VariableDeclaration",
"scope": 3790,
"src": "502:18:16",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
},
"typeName": {
"contractScope": null,
"id": 3775,
"name": "Role",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3758,
"src": "502:4:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3778,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 3790,
"src": "522:13:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3777,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "522:7:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "501:35:16"
},
"payable": false,
"returnParameters": {
"id": 3780,
"nodeType": "ParameterList",
"parameters": [],
"src": "552:0:16"
},
"scope": 3821,
"src": "486:104:16",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3804,
"nodeType": "Block",
"src": "740:37:16",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3799,
"name": "_role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3792,
"src": "758:5:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role storage pointer"
}
},
{
"argumentTypes": null,
"id": 3800,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3794,
"src": "765:5:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role storage pointer"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 3798,
"name": "has",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3820,
"src": "754:3:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_Role_$3758_storage_ptr_$_t_address_$returns$_t_bool_$",
"typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)"
}
},
"id": 3801,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "754:17:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 3797,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4919,
4920
],
"referencedDeclaration": 4919,
"src": "746:7:16",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 3802,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "746:26:16",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3803,
"nodeType": "ExpressionStatement",
"src": "746:26:16"
}
]
},
"documentation": "@dev check if an address has this role\n// reverts",
"id": 3805,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "check",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3795,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3792,
"name": "_role",
"nodeType": "VariableDeclaration",
"scope": 3805,
"src": "681:18:16",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
},
"typeName": {
"contractScope": null,
"id": 3791,
"name": "Role",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3758,
"src": "681:4:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3794,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 3805,
"src": "701:13:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3793,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "701:7:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "680:35:16"
},
"payable": false,
"returnParameters": {
"id": 3796,
"nodeType": "ParameterList",
"parameters": [],
"src": "740:0:16"
},
"scope": 3821,
"src": "666:111:16",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3819,
"nodeType": "Block",
"src": "946:37:16",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3814,
"name": "_role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3807,
"src": "959:5:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role storage pointer"
}
},
"id": 3815,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bearer",
"nodeType": "MemberAccess",
"referencedDeclaration": 3757,
"src": "959:12:16",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3817,
"indexExpression": {
"argumentTypes": null,
"id": 3816,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3809,
"src": "972:5:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "959:19:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 3813,
"id": 3818,
"nodeType": "Return",
"src": "952:26:16"
}
]
},
"documentation": "@dev check if an address has this role\n@return bool",
"id": 3820,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "has",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3810,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3807,
"name": "_role",
"nodeType": "VariableDeclaration",
"scope": 3820,
"src": "868:18:16",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
},
"typeName": {
"contractScope": null,
"id": 3806,
"name": "Role",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3758,
"src": "868:4:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3809,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 3820,
"src": "888:13:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3808,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "888:7:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "867:35:16"
},
"payable": false,
"returnParameters": {
"id": 3813,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3812,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3820,
"src": "938:4:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3811,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "938:4:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "937:6:16"
},
"scope": 3821,
"src": "855:128:16",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 3822,
"src": "186:799:16"
}
],
"src": "0:986:16"
},
"legacyAST": {
"absolutePath": "zeppelin-solidity/contracts/access/rbac/Roles.sol",
"exportedSymbols": {
"Roles": [
3821
]
},
"id": 3822,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3753,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:16"
},
{
"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": 3821,
"linearizedBaseContracts": [
3821
],
"name": "Roles",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "Roles.Role",
"id": 3758,
"members": [
{
"constant": false,
"id": 3757,
"name": "bearer",
"nodeType": "VariableDeclaration",
"scope": 3758,
"src": "222:32:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 3756,
"keyType": {
"id": 3754,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "231:7:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "222:25:16",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 3755,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "242:4:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "internal"
}
],
"name": "Role",
"nodeType": "StructDefinition",
"scope": 3821,
"src": "204:55:16",
"visibility": "public"
},
{
"body": {
"id": 3773,
"nodeType": "Block",
"src": "384:37:16",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3771,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3765,
"name": "_role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3760,
"src": "390:5:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role storage pointer"
}
},
"id": 3768,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bearer",
"nodeType": "MemberAccess",
"referencedDeclaration": 3757,
"src": "390:12:16",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3769,
"indexExpression": {
"argumentTypes": null,
"id": 3767,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3762,
"src": "403:5:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "390:19:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3770,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "412:4:16",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "390:26:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3772,
"nodeType": "ExpressionStatement",
"src": "390:26:16"
}
]
},
"documentation": "@dev give an address access to this role",
"id": 3774,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3763,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3760,
"name": "_role",
"nodeType": "VariableDeclaration",
"scope": 3774,
"src": "334:18:16",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
},
"typeName": {
"contractScope": null,
"id": 3759,
"name": "Role",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3758,
"src": "334:4:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3762,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 3774,
"src": "354:13:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3761,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "354:7:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "333:35:16"
},
"payable": false,
"returnParameters": {
"id": 3764,
"nodeType": "ParameterList",
"parameters": [],
"src": "384:0:16"
},
"scope": 3821,
"src": "321:100:16",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3789,
"nodeType": "Block",
"src": "552:38:16",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3787,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3781,
"name": "_role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3776,
"src": "558:5:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role storage pointer"
}
},
"id": 3784,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bearer",
"nodeType": "MemberAccess",
"referencedDeclaration": 3757,
"src": "558:12:16",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 3785,
"indexExpression": {
"argumentTypes": null,
"id": 3783,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3778,
"src": "571:5:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "558:19:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 3786,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "580:5:16",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "558:27:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3788,
"nodeType": "ExpressionStatement",
"src": "558:27:16"
}
]
},
"documentation": "@dev remove an address' access to this role",
"id": 3790,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "remove",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3779,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3776,
"name": "_role",
"nodeType": "VariableDeclaration",
"scope": 3790,
"src": "502:18:16",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
},
"typeName": {
"contractScope": null,
"id": 3775,
"name": "Role",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3758,
"src": "502:4:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Role_$3758_storage_ptr",
"typeString": "struct Roles.Role"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3778,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 3790,
"src": "522