@etherisc/gif-contracts
Version:
This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.
1,378 lines (1,377 loc) • 185 kB
JSON
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
{
"inputs": [],
"name": "DEFAULT_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleAdmin",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "grantRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "hasRole",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "renounceRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "revokeRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"allSourcePaths": {
"0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControl.sol",
"2": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/IAccessControl.sol",
"22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"24": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"25": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControl.sol",
"exportedSymbols": {
"AccessControl": [
18281
],
"Context": [
24074
],
"ERC165": [
26079
],
"IAccessControl": [
26055
],
"IERC165": [
27203
],
"Strings": [
23075
]
},
"id": 18282,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 17963,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "108:23:0"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/IAccessControl.sol",
"file": "./IAccessControl.sol",
"id": 17964,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18282,
"sourceUnit": 26056,
"src": "133:30:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"file": "../utils/Context.sol",
"id": 17965,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18282,
"sourceUnit": 24075,
"src": "164:30:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"file": "../utils/Strings.sol",
"id": 17966,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18282,
"sourceUnit": 23076,
"src": "195:30:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"file": "../utils/introspection/ERC165.sol",
"id": 17967,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 18282,
"sourceUnit": 26080,
"src": "226:43:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 17969,
"name": "Context",
"nodeType": "IdentifierPath",
"referencedDeclaration": 24074,
"src": "1841:7:0"
},
"id": 17970,
"nodeType": "InheritanceSpecifier",
"src": "1841:7:0"
},
{
"baseName": {
"id": 17971,
"name": "IAccessControl",
"nodeType": "IdentifierPath",
"referencedDeclaration": 26055,
"src": "1850:14:0"
},
"id": 17972,
"nodeType": "InheritanceSpecifier",
"src": "1850:14:0"
},
{
"baseName": {
"id": 17973,
"name": "ERC165",
"nodeType": "IdentifierPath",
"referencedDeclaration": 26079,
"src": "1866:6:0"
},
"id": 17974,
"nodeType": "InheritanceSpecifier",
"src": "1866:6:0"
}
],
"contractDependencies": [
24074,
26055,
26079,
27203
],
"contractKind": "contract",
"documentation": {
"id": 17968,
"nodeType": "StructuredDocumentation",
"src": "271:1534:0",
"text": " @dev Contract module that allows children to implement role-based access\n control mechanisms. This is a lightweight version that doesn't allow enumerating role\n members except through off-chain means by accessing the contract event logs. Some\n applications may benefit from on-chain enumerability, for those cases see\n {AccessControlEnumerable}.\n Roles are referred to by their `bytes32` identifier. These should be exposed\n in the external API and be unique. The best way to achieve this is by\n using `public constant` hash digests:\n ```\n bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n ```\n Roles can be used to represent a set of permissions. To restrict access to a\n function call, use {hasRole}:\n ```\n function foo() public {\n require(hasRole(MY_ROLE, msg.sender));\n ...\n }\n ```\n Roles can be granted and revoked dynamically via the {grantRole} and\n {revokeRole} functions. Each role has an associated admin role, and only\n accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n that only accounts with this role will be able to grant or revoke other\n roles. More complex role relationships can be created by using\n {_setRoleAdmin}.\n WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n grant and revoke this role. Extra precautions should be taken to secure\n accounts that have been granted it."
},
"fullyImplemented": true,
"id": 18281,
"linearizedBaseContracts": [
18281,
26079,
27203,
26055,
24074
],
"name": "AccessControl",
"nameLocation": "1824:13:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "AccessControl.RoleData",
"id": 17981,
"members": [
{
"constant": false,
"id": 17978,
"mutability": "mutable",
"name": "members",
"nameLocation": "1930:7:0",
"nodeType": "VariableDeclaration",
"scope": 17981,
"src": "1905:32:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 17977,
"keyType": {
"id": 17975,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1913:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "1905:24:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 17976,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1924:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 17980,
"mutability": "mutable",
"name": "adminRole",
"nameLocation": "1955:9:0",
"nodeType": "VariableDeclaration",
"scope": 17981,
"src": "1947:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17979,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1947:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"name": "RoleData",
"nameLocation": "1886:8:0",
"nodeType": "StructDefinition",
"scope": 18281,
"src": "1879:92:0",
"visibility": "public"
},
{
"constant": false,
"id": 17986,
"mutability": "mutable",
"name": "_roles",
"nameLocation": "2014:6:0",
"nodeType": "VariableDeclaration",
"scope": 18281,
"src": "1977:43:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$17981_storage_$",
"typeString": "mapping(bytes32 => struct AccessControl.RoleData)"
},
"typeName": {
"id": 17985,
"keyType": {
"id": 17982,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1985:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "1977:28:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$17981_storage_$",
"typeString": "mapping(bytes32 => struct AccessControl.RoleData)"
},
"valueType": {
"id": 17984,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 17983,
"name": "RoleData",
"nodeType": "IdentifierPath",
"referencedDeclaration": 17981,
"src": "1996:8:0"
},
"referencedDeclaration": 17981,
"src": "1996:8:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_RoleData_$17981_storage_ptr",
"typeString": "struct AccessControl.RoleData"
}
}
},
"visibility": "private"
},
{
"constant": true,
"functionSelector": "a217fddf",
"id": 17989,
"mutability": "constant",
"name": "DEFAULT_ADMIN_ROLE",
"nameLocation": "2051:18:0",
"nodeType": "VariableDeclaration",
"scope": 18281,
"src": "2027:49:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17987,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2027:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"hexValue": "30783030",
"id": 17988,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2072:4:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0x00"
},
"visibility": "public"
},
{
"body": {
"id": 17999,
"nodeType": "Block",
"src": "2495:44:0",
"statements": [
{
"expression": {
"arguments": [
{
"id": 17995,
"name": "role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17992,
"src": "2516:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 17994,
"name": "_checkRole",
"nodeType": "Identifier",
"overloadedDeclarations": [
18054,
18097
],
"referencedDeclaration": 18054,
"src": "2505:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$",
"typeString": "function (bytes32) view"
}
},
"id": 17996,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2505:16:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 17997,
"nodeType": "ExpressionStatement",
"src": "2505:16:0"
},
{
"id": 17998,
"nodeType": "PlaceholderStatement",
"src": "2531:1:0"
}
]
},
"documentation": {
"id": 17990,
"nodeType": "StructuredDocumentation",
"src": "2083:375:0",
"text": " @dev Modifier that checks that an account has a specific role. Reverts\n with a standardized message including the required role.\n The format of the revert reason is given by the following regular expression:\n /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n _Available since v4.1._"
},
"id": 18000,
"name": "onlyRole",
"nameLocation": "2472:8:0",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 17993,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 17992,
"mutability": "mutable",
"name": "role",
"nameLocation": "2489:4:0",
"nodeType": "VariableDeclaration",
"scope": 18000,
"src": "2481:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17991,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2481:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "2480:14:0"
},
"src": "2463:76:0",
"virtual": false,
"visibility": "internal"
},
{
"baseFunctions": [
26078
],
"body": {
"id": 18021,
"nodeType": "Block",
"src": "2697:111:0",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 18019,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 18014,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 18009,
"name": "interfaceId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18003,
"src": "2714:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 18011,
"name": "IAccessControl",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 26055,
"src": "2734:14:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IAccessControl_$26055_$",
"typeString": "type(contract IAccessControl)"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_contract$_IAccessControl_$26055_$",
"typeString": "type(contract IAccessControl)"
}
],
"id": 18010,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -27,
"src": "2729:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 18012,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2729:20:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_contract$_IAccessControl_$26055",
"typeString": "type(contract IAccessControl)"
}
},
"id": 18013,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "interfaceId",
"nodeType": "MemberAccess",
"src": "2729:32:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "2714:47:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"arguments": [
{
"id": 18017,
"name": "interfaceId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18003,
"src": "2789:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"expression": {
"id": 18015,
"name": "super",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -25,
"src": "2765:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_super$_AccessControl_$18281_$",
"typeString": "type(contract super AccessControl)"
}
},
"id": 18016,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "supportsInterface",
"nodeType": "MemberAccess",
"referencedDeclaration": 26078,
"src": "2765:23:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes4_$returns$_t_bool_$",
"typeString": "function (bytes4) view returns (bool)"
}
},
"id": 18018,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2765:36:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "2714:87:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 18008,
"id": 18020,
"nodeType": "Return",
"src": "2707:94:0"
}
]
},
"documentation": {
"id": 18001,
"nodeType": "StructuredDocumentation",
"src": "2545:56:0",
"text": " @dev See {IERC165-supportsInterface}."
},
"functionSelector": "01ffc9a7",
"id": 18022,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "supportsInterface",
"nameLocation": "2615:17:0",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 18005,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "2673:8:0"
},
"parameters": {
"id": 18004,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18003,
"mutability": "mutable",
"name": "interfaceId",
"nameLocation": "2640:11:0",
"nodeType": "VariableDeclaration",
"scope": 18022,
"src": "2633:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 18002,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "2633:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "2632:20:0"
},
"returnParameters": {
"id": 18008,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18007,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 18022,
"src": "2691:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 18006,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2691:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "2690:6:0"
},
"scope": 18281,
"src": "2606:202:0",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
26022
],
"body": {
"id": 18040,
"nodeType": "Block",
"src": "2987:53:0",
"statements": [
{
"expression": {
"baseExpression": {
"expression": {
"baseExpression": {
"id": 18033,
"name": "_roles",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17986,
"src": "3004:6:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$17981_storage_$",
"typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
}
},
"id": 18035,
"indexExpression": {
"id": 18034,
"name": "role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18025,
"src": "3011:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3004:12:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_RoleData_$17981_storage",
"typeString": "struct AccessControl.RoleData storage ref"
}
},
"id": 18036,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "members",
"nodeType": "MemberAccess",
"referencedDeclaration": 17978,
"src": "3004:20:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 18038,
"indexExpression": {
"id": 18037,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18027,
"src": "3025:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3004:29:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 18032,
"id": 18039,
"nodeType": "Return",
"src": "2997:36:0"
}
]
},
"documentation": {
"id": 18023,
"nodeType": "StructuredDocumentation",
"src": "2814:76:0",
"text": " @dev Returns `true` if `account` has been granted `role`."
},
"functionSelector": "91d14854",
"id": 18041,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "hasRole",
"nameLocation": "2904:7:0",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 18029,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "2963:8:0"
},
"parameters": {
"id": 18028,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18025,
"mutability": "mutable",
"name": "role",
"nameLocation": "2920:4:0",
"nodeType": "VariableDeclaration",
"scope": 18041,
"src": "2912:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 18024,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2912:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 18027,
"mutability": "mutable",
"name": "account",
"nameLocation": "2934:7:0",
"nodeType": "VariableDeclaration",
"scope": 18041,
"src": "2926:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18026,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2926:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "2911:31:0"
},
"returnParameters": {
"id": 18032,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18031,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 18041,
"src": "2981:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 18030,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2981:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "2980:6:0"
},
"scope": 18281,
"src": "2895:145:0",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"body": {
"id": 18053,
"nodeType": "Block",
"src": "3390:47:0",
"statements": [
{
"expression": {
"arguments": [
{
"id": 18048,
"name": "role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18044,
"src": "3411:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 18049,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24064,
"src": "3417:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 18050,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3417:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 18047,
"name": "_checkRole",
"nodeType": "Identifier",
"overloadedDeclarations": [
18054,
18097
],
"referencedDeclaration": 18097,
"src": "3400:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$__$",
"typeString": "function (bytes32,address) view"
}
},
"id": 18051,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3400:30:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 18052,
"nodeType": "ExpressionStatement",
"src": "3400:30:0"
}
]
},
"documentation": {
"id": 18042,
"nodeType": "StructuredDocumentation",
"src": "3046:283:0",
"text": " @dev Revert with a standard message if `_msgSender()` is missing `role`.\n Overriding this function changes the behavior of the {onlyRole} modifier.\n Format of the revert message is described in {_checkRole}.\n _Available since v4.6._"
},
"id": 18054,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_checkRole",
"nameLocation": "3343:10:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 18045,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18044,
"mutability": "mutable",
"name": "role",
"nameLocation": "3362:4:0",
"nodeType": "VariableDeclaration",
"scope": 18054,
"src": "3354:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 18043,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3354:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "3353:14:0"
},
"returnParameters": {
"id": 18046,
"nodeType": "ParameterList",
"parameters": [],
"src": "3390:0:0"
},
"scope": 18281,
"src": "3334:103:0",
"stateMutability": "view",
"virtual": true,
"visibility": "internal"
},
{
"body": {
"id": 18096,
"nodeType": "Block",
"src": "3791:419:0",
"statements": [
{
"condition": {
"id": 18066,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "3805:23:0",
"subExpression": {
"arguments": [
{
"id": 18063,
"name": "role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18057,
"src": "3814:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 18064,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18059,
"src": "3820:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],