UNPKG

@etherisc/gif-contracts

Version:

This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.

1,382 lines (1,381 loc) 70.2 kB
{ "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": "uint256", "name": "index", "type": "uint256" } ], "name": "getRoleMember", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "name": "getRoleMemberCount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "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", "1": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControlEnumerable.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", "27": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol", "3": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/IAccessControlEnumerable.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControlEnumerable.sol", "exportedSymbols": { "AccessControl": [ 18281 ], "AccessControlEnumerable": [ 21875 ], "Context": [ 24074 ], "ERC165": [ 26079 ], "EnumerableSet": [ 19390 ], "IAccessControl": [ 26055 ], "IAccessControlEnumerable": [ 27191 ], "IERC165": [ 27203 ], "Strings": [ 23075 ] }, "id": 21876, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 21752, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "118:23:1" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/IAccessControlEnumerable.sol", "file": "./IAccessControlEnumerable.sol", "id": 21753, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21876, "sourceUnit": 27192, "src": "143:40:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControl.sol", "file": "./AccessControl.sol", "id": 21754, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21876, "sourceUnit": 18282, "src": "184:29:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol", "file": "../utils/structs/EnumerableSet.sol", "id": 21755, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21876, "sourceUnit": 19391, "src": "214:44:1", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 21757, "name": "IAccessControlEnumerable", "nodeType": "IdentifierPath", "referencedDeclaration": 27191, "src": "400:24:1" }, "id": 21758, "nodeType": "InheritanceSpecifier", "src": "400:24:1" }, { "baseName": { "id": 21759, "name": "AccessControl", "nodeType": "IdentifierPath", "referencedDeclaration": 18281, "src": "426:13:1" }, "id": 21760, "nodeType": "InheritanceSpecifier", "src": "426:13:1" } ], "contractDependencies": [ 18281, 24074, 26055, 26079, 27191, 27203 ], "contractKind": "contract", "documentation": { "id": 21756, "nodeType": "StructuredDocumentation", "src": "260:94:1", "text": " @dev Extension of {AccessControl} that allows enumerating the members of each role." }, "fullyImplemented": true, "id": 21875, "linearizedBaseContracts": [ 21875, 18281, 26079, 27203, 27191, 26055, 24074 ], "name": "AccessControlEnumerable", "nameLocation": "373:23:1", "nodeType": "ContractDefinition", "nodes": [ { "id": 21764, "libraryName": { "id": 21761, "name": "EnumerableSet", "nodeType": "IdentifierPath", "referencedDeclaration": 19390, "src": "452:13:1" }, "nodeType": "UsingForDirective", "src": "446:49:1", "typeName": { "id": 21763, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 21762, "name": "EnumerableSet.AddressSet", "nodeType": "IdentifierPath", "referencedDeclaration": 19103, "src": "470:24:1" }, "referencedDeclaration": 19103, "src": "470:24:1", "typeDescriptions": { "typeIdentifier": "t_struct$_AddressSet_$19103_storage_ptr", "typeString": "struct EnumerableSet.AddressSet" } } }, { "constant": false, "id": 21769, "mutability": "mutable", "name": "_roleMembers", "nameLocation": "554:12:1", "nodeType": "VariableDeclaration", "scope": 21875, "src": "501:65:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$19103_storage_$", "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet)" }, "typeName": { "id": 21768, "keyType": { "id": 21765, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "509:7:1", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "501:44:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$19103_storage_$", "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet)" }, "valueType": { "id": 21767, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 21766, "name": "EnumerableSet.AddressSet", "nodeType": "IdentifierPath", "referencedDeclaration": 19103, "src": "520:24:1" }, "referencedDeclaration": 19103, "src": "520:24:1", "typeDescriptions": { "typeIdentifier": "t_struct$_AddressSet_$19103_storage_ptr", "typeString": "struct EnumerableSet.AddressSet" } } }, "visibility": "private" }, { "baseFunctions": [ 18022 ], "body": { "id": 21790, "nodeType": "Block", "src": "725:121:1", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 21788, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "id": 21783, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 21778, "name": "interfaceId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21772, "src": "742:11:1", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "arguments": [ { "id": 21780, "name": "IAccessControlEnumerable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27191, "src": "762:24:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IAccessControlEnumerable_$27191_$", "typeString": "type(contract IAccessControlEnumerable)" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_contract$_IAccessControlEnumerable_$27191_$", "typeString": "type(contract IAccessControlEnumerable)" } ], "id": 21779, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "757:4:1", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 21781, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "757:30:1", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_contract$_IAccessControlEnumerable_$27191", "typeString": "type(contract IAccessControlEnumerable)" } }, "id": 21782, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "interfaceId", "nodeType": "MemberAccess", "src": "757:42:1", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "src": "742:57:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "arguments": [ { "id": 21786, "name": "interfaceId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21772, "src": "827:11:1", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } ], "expression": { "id": 21784, "name": "super", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -25, "src": "803:5:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_super$_AccessControlEnumerable_$21875_$", "typeString": "type(contract super AccessControlEnumerable)" } }, "id": 21785, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "supportsInterface", "nodeType": "MemberAccess", "referencedDeclaration": 18022, "src": "803:23:1", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes4_$returns$_t_bool_$", "typeString": "function (bytes4) view returns (bool)" } }, "id": 21787, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "803:36:1", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "742:97:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 21777, "id": 21789, "nodeType": "Return", "src": "735:104:1" } ] }, "documentation": { "id": 21770, "nodeType": "StructuredDocumentation", "src": "573:56:1", "text": " @dev See {IERC165-supportsInterface}." }, "functionSelector": "01ffc9a7", "id": 21791, "implemented": true, "kind": "function", "modifiers": [], "name": "supportsInterface", "nameLocation": "643:17:1", "nodeType": "FunctionDefinition", "overrides": { "id": 21774, "nodeType": "OverrideSpecifier", "overrides": [], "src": "701:8:1" }, "parameters": { "id": 21773, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21772, "mutability": "mutable", "name": "interfaceId", "nameLocation": "668:11:1", "nodeType": "VariableDeclaration", "scope": 21791, "src": "661:18:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 21771, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "661:6:1", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "660:20:1" }, "returnParameters": { "id": 21777, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21776, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 21791, "src": "719:4:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 21775, "name": "bool", "nodeType": "ElementaryTypeName", "src": "719:4:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "718:6:1" }, "scope": 21875, "src": "634:212:1", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "baseFunctions": [ 27182 ], "body": { "id": 21809, "nodeType": "Block", "src": "1530:52:1", "statements": [ { "expression": { "arguments": [ { "id": 21806, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21796, "src": "1569:5:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "baseExpression": { "id": 21802, "name": "_roleMembers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21769, "src": "1547:12:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$19103_storage_$", "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet storage ref)" } }, "id": 21804, "indexExpression": { "id": 21803, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21794, "src": "1560:4:1", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1547:18:1", "typeDescriptions": { "typeIdentifier": "t_struct$_AddressSet_$19103_storage", "typeString": "struct EnumerableSet.AddressSet storage ref" } }, "id": 21805, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "at", "nodeType": "MemberAccess", "referencedDeclaration": 19226, "src": "1547:21:1", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$19103_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$19103_storage_ptr_$", "typeString": "function (struct EnumerableSet.AddressSet storage pointer,uint256) view returns (address)" } }, "id": 21807, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1547:28:1", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 21801, "id": 21808, "nodeType": "Return", "src": "1540:35:1" } ] }, "documentation": { "id": 21792, "nodeType": "StructuredDocumentation", "src": "852:574:1", "text": " @dev Returns one of the accounts that have `role`. `index` must be a\n value between 0 and {getRoleMemberCount}, non-inclusive.\n Role bearers are not sorted in any particular way, and their ordering may\n change at any point.\n WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n you perform all queries on the same block. See the following\n https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n for more information." }, "functionSelector": "9010d07c", "id": 21810, "implemented": true, "kind": "function", "modifiers": [], "name": "getRoleMember", "nameLocation": "1440:13:1", "nodeType": "FunctionDefinition", "overrides": { "id": 21798, "nodeType": "OverrideSpecifier", "overrides": [], "src": "1503:8:1" }, "parameters": { "id": 21797, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21794, "mutability": "mutable", "name": "role", "nameLocation": "1462:4:1", "nodeType": "VariableDeclaration", "scope": 21810, "src": "1454:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 21793, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1454:7:1", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 21796, "mutability": "mutable", "name": "index", "nameLocation": "1476:5:1", "nodeType": "VariableDeclaration", "scope": 21810, "src": "1468:13:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21795, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1468:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1453:29:1" }, "returnParameters": { "id": 21801, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21800, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 21810, "src": "1521:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 21799, "name": "address", "nodeType": "ElementaryTypeName", "src": "1521:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1520:9:1" }, "scope": 21875, "src": "1431:151:1", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "baseFunctions": [ 27190 ], "body": { "id": 21825, "nodeType": "Block", "src": "1839:51:1", "statements": [ { "expression": { "arguments": [], "expression": { "argumentTypes": [], "expression": { "baseExpression": { "id": 21819, "name": "_roleMembers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21769, "src": "1856:12:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$19103_storage_$", "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet storage ref)" } }, "id": 21821, "indexExpression": { "id": 21820, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21813, "src": "1869:4:1", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1856:18:1", "typeDescriptions": { "typeIdentifier": "t_struct$_AddressSet_$19103_storage", "typeString": "struct EnumerableSet.AddressSet storage ref" } }, "id": 21822, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": 19199, "src": "1856:25:1", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$19103_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$19103_storage_ptr_$", "typeString": "function (struct EnumerableSet.AddressSet storage pointer) view returns (uint256)" } }, "id": 21823, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1856:27:1", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 21818, "id": 21824, "nodeType": "Return", "src": "1849:34:1" } ] }, "documentation": { "id": 21811, "nodeType": "StructuredDocumentation", "src": "1588:157:1", "text": " @dev Returns the number of accounts that have `role`. Can be used\n together with {getRoleMember} to enumerate all bearers of a role." }, "functionSelector": "ca15c873", "id": 21826, "implemented": true, "kind": "function", "modifiers": [], "name": "getRoleMemberCount", "nameLocation": "1759:18:1", "nodeType": "FunctionDefinition", "overrides": { "id": 21815, "nodeType": "OverrideSpecifier", "overrides": [], "src": "1812:8:1" }, "parameters": { "id": 21814, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21813, "mutability": "mutable", "name": "role", "nameLocation": "1786:4:1", "nodeType": "VariableDeclaration", "scope": 21826, "src": "1778:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 21812, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1778:7:1", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "1777:14:1" }, "returnParameters": { "id": 21818, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21817, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 21826, "src": "1830:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21816, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1830:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1829:9:1" }, "scope": 21875, "src": "1750:140:1", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "baseFunctions": [ 18249 ], "body": { "id": 21849, "nodeType": "Block", "src": "2055:89:1", "statements": [ { "expression": { "arguments": [ { "id": 21838, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21829, "src": "2082:4:1", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 21839, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21831, "src": "2088:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 21835, "name": "super", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -25, "src": "2065:5:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_super$_AccessControlEnumerable_$21875_$", "typeString": "type(contract super AccessControlEnumerable)" } }, "id": 21837, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_grantRole", "nodeType": "MemberAccess", "referencedDeclaration": 18249, "src": "2065:16:1", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", "typeString": "function (bytes32,address)" } }, "id": 21840, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2065:31:1", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 21841, "nodeType": "ExpressionStatement", "src": "2065:31:1" }, { "expression": { "arguments": [ { "id": 21846, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21831, "src": "2129:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "baseExpression": { "id": 21842, "name": "_roleMembers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21769, "src": "2106:12:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$19103_storage_$", "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet storage ref)" } }, "id": 21844, "indexExpression": { "id": 21843, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21829, "src": "2119:4:1", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2106:18:1", "typeDescriptions": { "typeIdentifier": "t_struct$_AddressSet_$19103_storage", "typeString": "struct EnumerableSet.AddressSet storage ref" } }, "id": 21845, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 19130, "src": "2106:22:1", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$19103_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$19103_storage_ptr_$", "typeString": "function (struct EnumerableSet.AddressSet storage pointer,address) returns (bool)" } }, "id": 21847, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2106:31:1", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 21848, "nodeType": "ExpressionStatement", "src": "2106:31:1" } ] }, "documentation": { "id": 21827, "nodeType": "StructuredDocumentation", "src": "1896:77:1", "text": " @dev Overload {_grantRole} to track enumerable memberships" }, "id": 21850, "implemented": true, "kind": "function", "modifiers": [], "name": "_grantRole", "nameLocation": "1987:10:1", "nodeType": "FunctionDefinition", "overrides": { "id": 21833, "nodeType": "OverrideSpecifier", "overrides": [], "src": "2046:8:1"