{ "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" } ], "bytecode": { "object": "0x", "sourceMap": "", "linkReferences": {} }, "deployedBytecode": { "object": "0x", "sourceMap": "", "linkReferences": {} }, "methodIdentifiers": { "DEFAULT_ADMIN_ROLE()": "a217fddf", "getRoleAdmin(bytes32)": "248a9ca3", "grantRole(bytes32,address)": "2f2ff15d", "hasRole(bytes32,address)": "91d14854", "renounceRole(bytes32,address)": "36568abe", "revokeRole(bytes32,address)": "d547741f", "supportsInterface(bytes4)": "01ffc9a7" }, "rawMetadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"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\"}],\"devdoc\":{\"details\":\"Contract module that allows children to implement role-based access control mechanisms. This is a lightweight version that doesn't allow enumerating role members except through off-chain means by accessing the contract event logs. Some applications may benefit from on-chain enumerability, for those cases see {AccessControlEnumerable}. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ``` bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ``` function foo() public { require(hasRole(MY_ROLE, msg.sender)); ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it.\",\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":\"AccessControl\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/=node_modules/@ensdomains/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=lib/forge-std/src/\",\":hardhat-deploy/=node_modules/hardhat-deploy/\",\":hardhat/=node_modules/hardhat/\"],\"viaIR\":true},\"sources\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x67e3daf189111d6d5b0464ed09cf9f0605a22c4b965a7fcecd707101faff008a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cbbb1a75e4064d564bf69e74970eef35064e51fcc09cbf3589aee7faa60d6afe\",\"dweb:/ipfs/QmYfAtQwFSGmxomnyAV3tpBDbfDwiFXV61osWW2zzQVg5Q\"]},\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8c969013129ba9e651a20735ef659fef6d8a1139ea3607bd4b26ddea2d645634\",\"dweb:/ipfs/QmVhVa6LGuzAcB8qgDtVHRkucn4ihj5UZr8xBLcJkP6ucb\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://33bbf48cc069be677705037ba7520c22b1b622c23b33e1a71495f2d36549d40b\",\"dweb:/ipfs/Qmct36zWXv3j7LZB83uwbg7TXwnZSN1fqHNDZ93GG98bGz\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.17+commit.8df45f5f" }, "language": "Solidity", "output": { "abi": [ { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32", "indexed": true }, { "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32", "indexed": true }, { "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32", "indexed": true } ], "type": "event", "name": "RoleAdminChanged", "anonymous": false }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32", "indexed": true }, { "internalType": "address", "name": "account", "type": "address", "indexed": true }, { "internalType": "address", "name": "sender", "type": "address", "indexed": true } ], "type": "event", "name": "RoleGranted", "anonymous": false }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32", "indexed": true }, { "internalType": "address", "name": "account", "type": "address", "indexed": true }, { "internalType": "address", "name": "sender", "type": "address", "indexed": true } ], "type": "event", "name": "RoleRevoked", "anonymous": false }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "DEFAULT_ADMIN_ROLE", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ] }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "stateMutability": "view", "type": "function", "name": "getRoleAdmin", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ] }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" } ], "stateMutability": "nonpayable", "type": "function", "name": "grantRole" }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" } ], "stateMutability": "view", "type": "function", "name": "hasRole", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" } ], "stateMutability": "nonpayable", "type": "function", "name": "renounceRole" }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" } ], "stateMutability": "nonpayable", "type": "function", "name": "revokeRole" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "stateMutability": "view", "type": "function", "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] } ], "devdoc": { "kind": "dev", "methods": { "getRoleAdmin(bytes32)": { "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." }, "grantRole(bytes32,address)": { "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." }, "hasRole(bytes32,address)": { "details": "Returns `true` if `account` has been granted `role`." }, "renounceRole(bytes32,address)": { "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." }, "revokeRole(bytes32,address)": { "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." }, "supportsInterface(bytes4)": { "details": "See {IERC165-supportsInterface}." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }, "settings": { "remappings": [ ":@ensdomains/=node_modules/@ensdomains/", ":@openzeppelin/=node_modules/@openzeppelin/", ":ds-test/=lib/forge-std/lib/ds-test/src/", ":eth-gas-reporter/=node_modules/eth-gas-reporter/", ":forge-std/=lib/forge-std/src/", ":hardhat-deploy/=node_modules/hardhat-deploy/", ":hardhat/=node_modules/hardhat/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "node_modules/@openzeppelin/contracts/access/AccessControl.sol": "AccessControl" }, "libraries": {}, "viaIR": true }, "sources": { "node_modules/@openzeppelin/contracts/access/AccessControl.sol": { "keccak256": "0x67e3daf189111d6d5b0464ed09cf9f0605a22c4b965a7fcecd707101faff008a", "urls": [ "bzz-raw://cbbb1a75e4064d564bf69e74970eef35064e51fcc09cbf3589aee7faa60d6afe", "dweb:/ipfs/QmYfAtQwFSGmxomnyAV3tpBDbfDwiFXV61osWW2zzQVg5Q" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/access/IAccessControl.sol": { "keccak256": "0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57", "urls": [ "bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a", "dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/Context.sol": { "keccak256": "0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7", "urls": [ "bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92", "dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/Strings.sol": { "keccak256": "0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a", "urls": [ "bzz-raw://8c969013129ba9e651a20735ef659fef6d8a1139ea3607bd4b26ddea2d645634", "dweb:/ipfs/QmVhVa6LGuzAcB8qgDtVHRkucn4ihj5UZr8xBLcJkP6ucb" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol": { "keccak256": "0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b", "urls": [ "bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d", "dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol": { "keccak256": "0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1", "urls": [ "bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f", "dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/math/Math.sol": { "keccak256": "0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6", "urls": [ "bzz-raw://33bbf48cc069be677705037ba7520c22b1b622c23b33e1a71495f2d36549d40b", "dweb:/ipfs/Qmct36zWXv3j7LZB83uwbg7TXwnZSN1fqHNDZ93GG98bGz" ], "license": "MIT" } }, "version": 1 }, "ast": { "absolutePath": "node_modules/@openzeppelin/contracts/access/AccessControl.sol", "id": 25702, "exportedSymbols": { "AccessControl": [ 25701 ], "Context": [ 27279 ], "ERC165": [ 27552 ], "IAccessControl": [ 25774 ], "IERC165": [ 27564 ], "Math": [ 28429 ], "Strings": [ 27528 ] }, "nodeType": "SourceUnit", "src": "108:7994:16", "nodes": [ { "id": 25387, "nodeType": "PragmaDirective", "src": "108:23:16", "nodes": [], "literals": [ "solidity", "^", "0.8", ".0" ] }, { "id": 25388, "nodeType": "ImportDirective", "src": "133:30:16", "nodes": [], "absolutePath": "node_modules/@openzeppelin/contracts/access/IAccessControl.sol", "file": "./IAccessControl.sol", "nameLocation": "-1:-1:-1", "scope": 25702, "sourceUnit": 25775, "symbolAliases": [], "unitAlias": "" }, { "id": 25389, "nodeType": "ImportDirective", "src": "164:30:16", "nodes": [], "absolutePath": "node_modules/@openzeppelin/contracts/utils/Context.sol", "file": "../utils/Context.sol", "nameLocation": "-1:-1:-1", "scope": 25702, "sourceUnit": 27280, "symbolAliases": [], "unitAlias": "" }, { "id": 25390, "nodeType": "ImportDirective", "src": "195:30:16", "nodes": [], "absolutePath": "node_modules/@openzeppelin/contracts/utils/Strings.sol", "file": "../utils/Strings.sol", "nameLocation": "-1:-1:-1", "scope": 25702, "sourceUnit": 27529, "symbolAliases": [], "unitAlias": "" }, { "id": 25391, "nodeType": "ImportDirective", "src": "226:43:16", "nodes": [], "absolutePath": "node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol", "file": "../utils/introspection/ERC165.sol", "nameLocation": "-1:-1:-1", "scope": 25702, "sourceUnit": 27553, "symbolAliases": [], "unitAlias": "" }, { "id": 25701, "nodeType": "ContractDefinition", "src": "1806:6295:16", "nodes": [ { "id": 25405, "nodeType": "StructDefinition", "src": "1879:92:16", "nodes": [], "canonicalName": "AccessControl.RoleData", "members": [ { "constant": false, "id": 25402, "mutability": "mutable", "name": "members", "nameLocation": "1930:7:16", "nodeType": "VariableDeclaration", "scope": 25405, "src": "1905:32:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" }, "typeName": { "id": 25401, "keyType": { "id": 25399, "name": "address", "nodeType": "ElementaryTypeName", "src": "1913:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1905:24:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" }, "valueType": { "id": 25400, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1924:4:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } }, "visibility": "internal" }, { "constant": false, "id": 25404, "mutability": "mutable", "name": "adminRole", "nameLocation": "1955:9:16", "nodeType": "VariableDeclaration", "scope": 25405, "src": "1947:17:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25403, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1947:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "name": "RoleData", "nameLocation": "1886:8:16", "scope": 25701, "visibility": "public" }, { "id": 25410, "nodeType": "VariableDeclaration", "src": "1977:43:16", "nodes": [], "constant": false, "mutability": "mutable", "name": "_roles", "nameLocation": "2014:6:16", "scope": 25701, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$25405_storage_$", "typeString": "mapping(bytes32 => struct AccessControl.RoleData)" }, "typeName": { "id": 25409, "keyType": { "id": 25406, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1985:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "1977:28:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$25405_storage_$", "typeString": "mapping(bytes32 => struct AccessControl.RoleData)" }, "valueType": { "id": 25408, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 25407, "name": "RoleData", "nameLocations": [ "1996:8:16" ], "nodeType": "IdentifierPath", "referencedDeclaration": 25405, "src": "1996:8:16" }, "referencedDeclaration": 25405, "src": "1996:8:16", "typeDescriptions": { "typeIdentifier": "t_struct$_RoleData_$25405_storage_ptr", "typeString": "struct AccessControl.RoleData" } } }, "visibility": "private" }, { "id": 25413, "nodeType": "VariableDeclaration", "src": "2027:49:16", "nodes": [], "constant": true, "functionSelector": "a217fddf", "mutability": "constant", "name": "DEFAULT_ADMIN_ROLE", "nameLocation": "2051:18:16", "scope": 25701, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25411, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "2027:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": { "hexValue": "30783030", "id": 25412, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2072:4:16", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0x00" }, "visibility": "public" }, { "id": 25424, "nodeType": "ModifierDefinition", "src": "2463:76:16", "nodes": [], "body": { "id": 25423, "nodeType": "Block", "src": "2495:44:16", "nodes": [], "statements": [ { "expression": { "arguments": [ { "id": 25419, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25416, "src": "2516:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 25418, "name": "_checkRole", "nodeType": "Identifier", "overloadedDeclarations": [ 25478, 25517 ], "referencedDeclaration": 25478, "src": "2505:10:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$", "typeString": "function (bytes32) view" } }, "id": 25420, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2505:16:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25421, "nodeType": "ExpressionStatement", "src": "2505:16:16" }, { "id": 25422, "nodeType": "PlaceholderStatement", "src": "2531:1:16" } ] }, "documentation": { "id": 25414, "nodeType": "StructuredDocumentation", "src": "2083:375:16", "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._" }, "name": "onlyRole", "nameLocation": "2472:8:16", "parameters": { "id": 25417, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25416, "mutability": "mutable", "name": "role", "nameLocation": "2489:4:16", "nodeType": "VariableDeclaration", "scope": 25424, "src": "2481:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25415, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "2481:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "2480:14:16" }, "virtual": false, "visibility": "internal" }, { "id": 25446, "nodeType": "FunctionDefinition", "src": "2606:202:16", "nodes": [], "body": { "id": 25445, "nodeType": "Block", "src": "2697:111:16", "nodes": [], "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 25443, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "id": 25438, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 25433, "name": "interfaceId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25427, "src": "2714:11:16", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "arguments": [ { "id": 25435, "name": "IAccessControl", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25774, "src": "2734:14:16", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IAccessControl_$25774_$", "typeString": "type(contract IAccessControl)" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_contract$_IAccessControl_$25774_$", "typeString": "type(contract IAccessControl)" } ], "id": 25434, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "2729:4:16", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 25436, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2729:20:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_contract$_IAccessControl_$25774", "typeString": "type(contract IAccessControl)" } }, "id": 25437, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2750:11:16", "memberName": "interfaceId", "nodeType": "MemberAccess", "src": "2729:32:16", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "src": "2714:47:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "arguments": [ { "id": 25441, "name": "interfaceId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25427, "src": "2789:11:16", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } ], "expression": { "id": 25439, "name": "super", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -25, "src": "2765:5:16", "typeDescriptions": { "typeIdentifier": "t_type$_t_super$_AccessControl_$25701_$", "typeString": "type(contract super AccessControl)" } }, "id": 25440, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2771:17:16", "memberName": "supportsInterface", "nodeType": "MemberAccess", "referencedDeclaration": 27551, "src": "2765:23:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes4_$returns$_t_bool_$", "typeString": "function (bytes4) view returns (bool)" } }, "id": 25442, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2765:36:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "2714:87:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 25432, "id": 25444, "nodeType": "Return", "src": "2707:94:16" } ] }, "baseFunctions": [ 27551 ], "documentation": { "id": 25425, "nodeType": "StructuredDocumentation", "src": "2545:56:16", "text": " @dev See {IERC165-supportsInterface}." }, "functionSelector": "01ffc9a7", "implemented": true, "kind": "function", "modifiers": [], "name": "supportsInterface", "nameLocation": "2615:17:16", "overrides": { "id": 25429, "nodeType": "OverrideSpecifier", "overrides": [], "src": "2673:8:16" }, "parameters": { "id": 25428, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25427, "mutability": "mutable", "name": "interfaceId", "nameLocation": "2640:11:16", "nodeType": "VariableDeclaration", "scope": 25446, "src": "2633:18:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 25426, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "2633:6:16", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "2632:20:16" }, "returnParameters": { "id": 25432, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25431, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 25446, "src": "2691:4:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 25430, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2691:4:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "2690:6:16" }, "scope": 25701, "stateMutability": "view", "virtual": true, "visibility": "public" }, { "id": 25465, "nodeType": "FunctionDefinition", "src": "2895:145:16", "nodes": [], "body": { "id": 25464, "nodeType": "Block", "src": "2987:53:16", "nodes": [], "statements": [ { "expression": { "baseExpression": { "expression": { "baseExpression": { "id": 25457, "name": "_roles", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25410, "src": "3004:6:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$25405_storage_$", "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)" } }, "id": 25459, "indexExpression": { "id": 25458, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25449, "src": "3011:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3004:12:16", "typeDescriptions": { "typeIdentifier": "t_struct$_RoleData_$25405_storage", "typeString": "struct AccessControl.RoleData storage ref" } }, "id": 25460, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3017:7:16", "memberName": "members", "nodeType": "MemberAccess", "referencedDeclaration": 25402, "src": "3004:20:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 25462, "indexExpression": { "id": 25461, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25451, "src": "3025:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3004:29:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 25456, "id": 25463, "nodeType": "Return", "src": "2997:36:16" } ] }, "baseFunctions": [ 25741 ], "documentation": { "id": 25447, "nodeType": "StructuredDocumentation", "src": "2814:76:16", "text": " @dev Returns `true` if `account` has been granted `role`." }, "functionSelector": "91d14854", "implemented": true, "kind": "function", "modifiers": [], "name": "hasRole", "nameLocation": "2904:7:16", "overrides": { "id": 25453, "nodeType": "OverrideSpecifier", "overrides": [], "src": "2963:8:16" }, "parameters": { "id": 25452, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25449, "mutability": "mutable", "name": "role", "nameLocation": "2920:4:16", "nodeType": "VariableDeclaration", "scope": 25465, "src": "2912:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25448, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "2912:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25451, "mutability": "mutable", "name": "account", "nameLocation": "2934:7:16", "nodeType": "VariableDeclaration", "scope": 25465, "src": "2926:15:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25450, "name": "address", "nodeType": "ElementaryTypeName", "src": "2926:7:16", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "2911:31:16" }, "returnParameters": { "id": 25456, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25455, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 25465, "src": "2981:4:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 25454, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2981:4:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "2980:6:16" }, "scope": 25701, "stateMutability": "view", "virtual": true, "visibility": "public" }, { "id": 25478, "nodeType": "FunctionDefinition", "src": "3334:103:16", "nodes": [], "body": { "id": 25477, "nodeType": "Block", "src": "3390:47:16", "nodes": [], "statements": [ { "expression": { "arguments": [ { "id": 25472, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25468, "src": "3411:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "arguments": [], "expression": { "argumentTypes": [], "id": 25473, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27269, "src": "3417:10:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 25474, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3417:12:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25471, "name": "_checkRole", "nodeType": "Identifier", "overloadedDeclarations": [ 25478, 25517 ], "referencedDeclaration": 25517, "src": "3400:10:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$__$", "typeString": "function (bytes32,address) view" } }, "id": 25475, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3400:30:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25476, "nodeType": "ExpressionStatement", "src": "3400:30:16" } ] }, "documentation": { "id": 25466, "nodeType": "StructuredDocumentation", "src": "3046:283:16", "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._" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_checkRole", "nameLocation": "3343:10:16", "parameters": { "id": 25469, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25468, "mutability": "mutable", "name": "role", "nameLocation": "3362:4:16", "nodeType": "VariableDeclaration", "scope": 25478, "src": "3354:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25467, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "3354:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "3353:14:16" }, "returnParameters": { "id": 25470, "nodeType": "ParameterList", "parameters": [], "src": "3390:0:16" }, "scope": 25701, "stateMutability": "view", "virtual": true, "visibility": "internal" }, { "id": 25517, "nodeType": "FunctionDefinition", "src": "3718:479:16", "nodes": [], "body": { "id": 25516, "nodeType": "Block", "src": "3791:406:16", "nodes": [], "statements": [ { "condition": { "id": 25490, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "3805:23:16", "subExpression": { "arguments": [ { "id": 25487, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25481, "src": "3814:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25488, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25483, "src": "3820:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25486, "name": "hasRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25465, "src": "3806:7:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", "typeString": "function (bytes32,address) view returns (bool)" } }, "id": 25489, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3806:22:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 25515, "nodeType": "IfStatement", "src": "3801:390:16", "trueBody": { "id": 25514, "nodeType": "Block", "src": "3830:361:16", "statements": [ { "expression": { "arguments": [ { "arguments": [ { "arguments": [ { "hexValue": "416363657373436f6e74726f6c3a206163636f756e7420", "id": 25496, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3938:25:16", "typeDescriptions": { "typeIdentifier": "t_stringliteral_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874", "typeString": "literal_string \"AccessControl: account \"" }, "value": "AccessControl: account " }, { "arguments": [ { "id": 25499, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25483, "src": "4009:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 25497, "name": "Strings", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27528, "src": "3989:7:16", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Strings_$27528_$", "typeString": "type(library Strings)" } }, "id": 25498, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3997:11:16", "memberName": "toHexString", "nodeType": "MemberAccess", "referencedDeclaration": 27527, "src": "3989:19:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_string_memory_ptr_$", "typeString": "function (address) pure returns (string memory)" } }, "id": 25500, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3989:28:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "hexValue": "206973206d697373696e6720726f6c6520", "id": 25501, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4043:19:16", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69", "typeString": "literal_string \" is missing role \"" }, "value": " is missing role " }, { "arguments": [ { "arguments": [ { "id": 25506, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25481, "src": "4116:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 25505, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4108:7:16", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 25504, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4108:7:16", "typeDescriptions": {} } }, "id": 25507, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4108:13:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "hexValue": "3332", "id": 25508, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4123:2:16", "typeDescriptions": { "typeIdentifier": "t_rational_32_by_1", "typeString": "int_const 32" }, "value": "32" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_rational_32_by_1", "typeString": "int_const 32" } ], "expression": { "id": 25502, "name": "Strings", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27528, "src": "4088:7:16", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Strings_$27528_$", "typeString": "type(library Strings)" } }, "id": 25503, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4096:11:16", "memberName": "toHexString", "nodeType": "MemberAccess", "referencedDeclaration": 27507, "src": "4088:19:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256,uint256) pure returns (string memory)" } }, "id": 25509, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4088:38:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874", "typeString": "literal_string \"AccessControl: account \"" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_stringliteral_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69", "typeString": "literal_string \" is missing role \"" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "expression": { "id": 25494, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "3896:3:16", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 25495, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3900:12:16", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "3896:16:16", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, "id": 25510, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3896:252:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "id": 25493, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3868:6:16", "typeDescriptions": { "typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)" }, "typeName": { "id": 25492, "name": "string", "nodeType": "ElementaryTypeName", "src": "3868:6:16", "typeDescriptions": {} } }, "id": 25511, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3868:298:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 25491, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "3844:6:16", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 25512, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3844:336:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25513, "nodeType": "ExpressionStatement", "src": "3844:336:16" } ] } } ] }, "documentation": { "id": 25479, "nodeType": "StructuredDocumentation", "src": "3443:270:16", "text": " @dev Revert with a standard message if `account` is missing `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})$/" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_checkRole", "nameLocation": "3727:10:16", "parameters": { "id": 25484, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25481, "mutability": "mutable", "name": "role", "nameLocation": "3746:4:16", "nodeType": "VariableDeclaration", "scope": 25517, "src": "3738:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25480, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "3738:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25483, "mutability": "mutable", "name": "account", "nameLocation": "3760:7:16", "nodeType": "VariableDeclaration", "scope": 25517, "src": "3752:15:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25482, "name": "address", "nodeType": "ElementaryTypeName", "src": "3752:7:16", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "3737:31:16" }, "returnParameters": { "id": 25485, "nodeType": "ParameterList", "parameters": [], "src": "3791:0:16" }, "scope": 25701, "stateMutability": "view", "virtual": true, "visibility": "internal" }, { "id": 25532, "nodeType": "FunctionDefinition", "src": "4378:129:16", "nodes": [], "body": { "id": 25531, "nodeType": "Block", "src": "4461:46:16", "nodes": [], "statements": [ { "expression": { "expression": { "baseExpression": { "id": 25526, "name": "_roles", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25410, "src": "4478:6:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$25405_storage_$", "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)" } }, "id": 25528, "indexExpression": { "id": 25527, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25520, "src": "4485:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "4478:12:16", "typeDescriptions": { "typeIdentifier": "t_struct$_RoleData_$25405_storage", "typeString": "struct AccessControl.RoleData storage ref" } }, "id": 25529, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4491:9:16", "memberName": "adminRole", "nodeType": "MemberAccess", "referencedDeclaration": 25404, "src": "4478:22:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "functionReturnParameters": 25525, "id": 25530, "nodeType": "Return", "src": "4471:29:16" } ] }, "baseFunctions": [ 25749 ], "documentation": { "id": 25518, "nodeType": "StructuredDocumentation", "src": "4203:170:16", "text": " @dev Returns the admin role that controls `role`. See {grantRole} and\n {revokeRole}.\n To change a role's admin, use {_setRoleAdmin}." }, "functionSelector": "248a9ca3", "implemented": true, "kind": "function", "modifiers": [], "name": "getRoleAdmin", "nameLocation": "4387:12:16", "overrides": { "id": 25522, "nodeType": "OverrideSpecifier", "overrides": [], "src": "4434:8:16" }, "parameters": { "id": 25521, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25520, "mutability": "mutable", "name": "role", "nameLocation": "4408:4:16", "nodeType": "VariableDeclaration", "scope": 25532, "src": "4400:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25519, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "4400:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "4399:14:16" }, "returnParameters": { "id": 25525, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25524, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 25532, "src": "4452:7:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25523, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "4452:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "4451:9:16" }, "scope": 25701, "stateMutability": "view", "virtual": true, "visibility": "public" }, { "id": 25552, "nodeType": "FunctionDefinition", "src": "4803:145:16", "nodes": [], "body": { "id": 25551, "nodeType": "Block", "src": "4906:42:16", "nodes": [], "statements": [ { "expression": { "arguments": [ { "id": 25547, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25535, "src": "4927:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25548, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25537, "src": "4933:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25546, "name": "_grantRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25669, "src": "4916:10:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", "typeString": "function (bytes32,address)" } }, "id": 25549, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4916:25:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25550, "nodeType": "ExpressionStatement", "src": "4916:25:16" } ] }, "baseFunctions": [ 25757 ], "documentation": { "id": 25533, "nodeType": "StructuredDocumentation", "src": "4513:285:16", "text": " @dev Grants `role` to `account`.\n If `account` had not been already granted `role`, emits a {RoleGranted}\n event.\n Requirements:\n - the caller must have ``role``'s admin role.\n May emit a {RoleGranted} event." }, "functionSelector": "2f2ff15d", "implemented": true, "kind": "function", "modifiers": [ { "arguments": [ { "arguments": [ { "id": 25542, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25535, "src": "4899:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 25541, "name": "getRoleAdmin", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25532, "src": "4886:12:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$", "typeString": "function (bytes32) view returns (bytes32)" } }, "id": 25543, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4886:18:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "id": 25544, "kind": "modifierInvocation", "modifierName": { "id": 25540, "name": "onlyRole", "nameLocations": [ "4877:8:16" ], "nodeType": "IdentifierPath", "referencedDeclaration": 25424, "src": "4877:8:16" }, "nodeType": "ModifierInvocation", "src": "4877:28:16" } ], "name": "grantRole", "nameLocation": "4812:9:16", "overrides": { "id": 25539, "nodeType": "OverrideSpecifier", "overrides": [], "src": "4868:8:16" }, "parameters": { "id": 25538, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25535, "mutability": "mutable", "name": "role", "nameLocation": "4830:4:16", "nodeType": "VariableDeclaration", "scope": 25552, "src": "4822:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25534, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "4822:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25537, "mutability": "mutable", "name": "account", "nameLocation": "4844:7:16", "nodeType": "VariableDeclaration", "scope": 25552, "src": "4836:15:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25536, "name": "address", "nodeType": "ElementaryTypeName", "src": "4836:7:16", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "4821:31:16" }, "returnParameters": { "id": 25545, "nodeType": "ParameterList", "parameters": [], "src": "4906:0:16" }, "scope": 25701, "stateMutability": "nonpayable", "virtual": true, "visibility": "public" }, { "id": 25572, "nodeType": "FunctionDefinition", "src": "5228:147:16", "nodes": [], "body": { "id": 25571, "nodeType": "Block", "src": "5332:43:16", "nodes": [], "statements": [ { "expression": { "arguments": [ { "id": 25567, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25555, "src": "5354:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25568, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25557, "src": "5360:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25566, "name": "_revokeRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25700, "src": "5342:11:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", "typeString": "function (bytes32,address)" } }, "id": 25569, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5342:26:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25570, "nodeType": "ExpressionStatement", "src": "5342:26:16" } ] }, "baseFunctions": [ 25765 ], "documentation": { "id": 25553, "nodeType": "StructuredDocumentation", "src": "4954:269:16", "text": " @dev Revokes `role` from `account`.\n If `account` had been granted `role`, emits a {RoleRevoked} event.\n Requirements:\n - the caller must have ``role``'s admin role.\n May emit a {RoleRevoked} event." }, "functionSelector": "d547741f", "implemented": true, "kind": "function", "modifiers": [ { "arguments": [ { "arguments": [ { "id": 25562, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25555, "src": "5325:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 25561, "name": "getRoleAdmin", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25532, "src": "5312:12:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$", "typeString": "function (bytes32) view returns (bytes32)" } }, "id": 25563, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5312:18:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "id": 25564, "kind": "modifierInvocation", "modifierName": { "id": 25560, "name": "onlyRole", "nameLocations": [ "5303:8:16" ], "nodeType": "IdentifierPath", "referencedDeclaration": 25424, "src": "5303:8:16" }, "nodeType": "ModifierInvocation", "src": "5303:28:16" } ], "name": "revokeRole", "nameLocation": "5237:10:16", "overrides": { "id": 25559, "nodeType": "OverrideSpecifier", "overrides": [], "src": "5294:8:16" }, "parameters": { "id": 25558, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25555, "mutability": "mutable", "name": "role", "nameLocation": "5256:4:16", "nodeType": "VariableDeclaration", "scope": 25572, "src": "5248:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25554, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "5248:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25557, "mutability": "mutable", "name": "account", "nameLocation": "5270:7:16", "nodeType": "VariableDeclaration", "scope": 25572, "src": "5262:15:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25556, "name": "address", "nodeType": "ElementaryTypeName", "src": "5262:7:16", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "5247:31:16" }, "returnParameters": { "id": 25565, "nodeType": "ParameterList", "parameters": [], "src": "5332:0:16" }, "scope": 25701, "stateMutability": "nonpayable", "virtual": true, "visibility": "public" }, { "id": 25595, "nodeType": "FunctionDefinition", "src": "5912:214:16", "nodes": [], "body": { "id": 25594, "nodeType": "Block", "src": "5989:137:16", "nodes": [], "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 25585, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 25582, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25577, "src": "6007:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 25583, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27269, "src": "6018:10:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 25584, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6018:12:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "6007:23:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66", "id": 25586, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6032:49:16", "typeDescriptions": { "typeIdentifier": "t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b", "typeString": "literal_string \"AccessControl: can only renounce roles for self\"" }, "value": "AccessControl: can only renounce roles for self" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b", "typeString": "literal_string \"AccessControl: can only renounce roles for self\"" } ], "id": 25581, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5999:7:16", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 25587, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5999:83:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25588, "nodeType": "ExpressionStatement", "src": "5999:83:16" }, { "expression": { "arguments": [ { "id": 25590, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25575, "src": "6105:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25591, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25577, "src": "6111:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25589, "name": "_revokeRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25700, "src": "6093:11:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", "typeString": "function (bytes32,address)" } }, "id": 25592, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6093:26:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25593, "nodeType": "ExpressionStatement", "src": "6093:26:16" } ] }, "baseFunctions": [ 25773 ], "documentation": { "id": 25573, "nodeType": "StructuredDocumentation", "src": "5381:526:16", "text": " @dev Revokes `role` from the calling account.\n Roles are often managed via {grantRole} and {revokeRole}: this function's\n purpose is to provide a mechanism for accounts to lose their privileges\n if they are compromised (such as when a trusted device is misplaced).\n If the calling account had been revoked `role`, emits a {RoleRevoked}\n event.\n Requirements:\n - the caller must be `account`.\n May emit a {RoleRevoked} event." }, "functionSelector": "36568abe", "implemented": true, "kind": "function", "modifiers": [], "name": "renounceRole", "nameLocation": "5921:12:16", "overrides": { "id": 25579, "nodeType": "OverrideSpecifier", "overrides": [], "src": "5980:8:16" }, "parameters": { "id": 25578, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25575, "mutability": "mutable", "name": "role", "nameLocation": "5942:4:16", "nodeType": "VariableDeclaration", "scope": 25595, "src": "5934:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25574, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "5934:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25577, "mutability": "mutable", "name": "account", "nameLocation": "5956:7:16", "nodeType": "VariableDeclaration", "scope": 25595, "src": "5948:15:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25576, "name": "address", "nodeType": "ElementaryTypeName", "src": "5948:7:16", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "5933:31:16" }, "returnParameters": { "id": 25580, "nodeType": "ParameterList", "parameters": [], "src": "5989:0:16" }, "scope": 25701, "stateMutability": "nonpayable", "virtual": true, "visibility": "public" }, { "id": 25609, "nodeType": "FunctionDefinition", "src": "6811:110:16", "nodes": [], "body": { "id": 25608, "nodeType": "Block", "src": "6879:42:16", "nodes": [], "statements": [ { "expression": { "arguments": [ { "id": 25604, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25598, "src": "6900:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25605, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25600, "src": "6906:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25603, "name": "_grantRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25669, "src": "6889:10:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", "typeString": "function (bytes32,address)" } }, "id": 25606, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6889:25:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25607, "nodeType": "ExpressionStatement", "src": "6889:25:16" } ] }, "documentation": { "id": 25596, "nodeType": "StructuredDocumentation", "src": "6132:674:16", "text": " @dev Grants `role` to `account`.\n If `account` had not been already granted `role`, emits a {RoleGranted}\n event. Note that unlike {grantRole}, this function doesn't perform any\n checks on the calling account.\n May emit a {RoleGranted} event.\n [WARNING]\n ====\n This function should only be called from the constructor when setting\n up the initial roles for the system.\n Using this function in any other way is effectively circumventing the admin\n system imposed by {AccessControl}.\n ====\n NOTE: This function is deprecated in favor of {_grantRole}." }, "implemented": true, "kind": "function", "modifiers": [], "name": "_setupRole", "nameLocation": "6820:10:16", "parameters": { "id": 25601, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25598, "mutability": "mutable", "name": "role", "nameLocation": "6839:4:16", "nodeType": "VariableDeclaration", "scope": 25609, "src": "6831:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25597, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "6831:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25600, "mutability": "mutable", "name": "account", "nameLocation": "6853:7:16", "nodeType": "VariableDeclaration", "scope": 25609, "src": "6845:15:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25599, "name": "address", "nodeType": "ElementaryTypeName", "src": "6845:7:16", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "6830:31:16" }, "returnParameters": { "id": 25602, "nodeType": "ParameterList", "parameters": [], "src": "6879:0:16" }, "scope": 25701, "stateMutability": "nonpayable", "virtual": true, "visibility": "internal" }, { "id": 25637, "nodeType": "FunctionDefinition", "src": "7046:247:16", "nodes": [], "body": { "id": 25636, "nodeType": "Block", "src": "7119:174:16", "nodes": [], "statements": [ { "assignments": [ 25618 ], "declarations": [ { "constant": false, "id": 25618, "mutability": "mutable", "name": "previousAdminRole", "nameLocation": "7137:17:16", "nodeType": "VariableDeclaration", "scope": 25636, "src": "7129:25:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25617, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "7129:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "id": 25622, "initialValue": { "arguments": [ { "id": 25620, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25612, "src": "7170:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 25619, "name": "getRoleAdmin", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25532, "src": "7157:12:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$", "typeString": "function (bytes32) view returns (bytes32)" } }, "id": 25621, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7157:18:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", "src": "7129:46:16" }, { "expression": { "id": 25628, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { "baseExpression": { "id": 25623, "name": "_roles", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25410, "src": "7185:6:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$25405_storage_$", "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)" } }, "id": 25625, "indexExpression": { "id": 25624, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25612, "src": "7192:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "7185:12:16", "typeDescriptions": { "typeIdentifier": "t_struct$_RoleData_$25405_storage", "typeString": "struct AccessControl.RoleData storage ref" } }, "id": 25626, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberLocation": "7198:9:16", "memberName": "adminRole", "nodeType": "MemberAccess", "referencedDeclaration": 25404, "src": "7185:22:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 25627, "name": "adminRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25614, "src": "7210:9:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "src": "7185:34:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "id": 25629, "nodeType": "ExpressionStatement", "src": "7185:34:16" }, { "eventCall": { "arguments": [ { "id": 25631, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25612, "src": "7251:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25632, "name": "previousAdminRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25618, "src": "7257:17:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25633, "name": "adminRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25614, "src": "7276:9:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 25630, "name": "RoleAdminChanged", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25713, "src": "7234:16:16", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$returns$__$", "typeString": "function (bytes32,bytes32,bytes32)" } }, "id": 25634, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7234:52:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25635, "nodeType": "EmitStatement", "src": "7229:57:16" } ] }, "documentation": { "id": 25610, "nodeType": "StructuredDocumentation", "src": "6927:114:16", "text": " @dev Sets `adminRole` as ``role``'s admin role.\n Emits a {RoleAdminChanged} event." }, "implemented": true, "kind": "function", "modifiers": [], "name": "_setRoleAdmin", "nameLocation": "7055:13:16", "parameters": { "id": 25615, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25612, "mutability": "mutable", "name": "role", "nameLocation": "7077:4:16", "nodeType": "VariableDeclaration", "scope": 25637, "src": "7069:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25611, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "7069:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25614, "mutability": "mutable", "name": "adminRole", "nameLocation": "7091:9:16", "nodeType": "VariableDeclaration", "scope": 25637, "src": "7083:17:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25613, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "7083:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "7068:33:16" }, "returnParameters": { "id": 25616, "nodeType": "ParameterList", "parameters": [], "src": "7119:0:16" }, "scope": 25701, "stateMutability": "nonpayable", "virtual": true, "visibility": "internal" }, { "id": 25669, "nodeType": "FunctionDefinition", "src": "7461:233:16", "nodes": [], "body": { "id": 25668, "nodeType": "Block", "src": "7529:165:16", "nodes": [], "statements": [ { "condition": { "id": 25649, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "7543:23:16", "subExpression": { "arguments": [ { "id": 25646, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25640, "src": "7552:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25647, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25642, "src": "7558:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25645, "name": "hasRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25465, "src": "7544:7:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", "typeString": "function (bytes32,address) view returns (bool)" } }, "id": 25648, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7544:22:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 25667, "nodeType": "IfStatement", "src": "7539:149:16", "trueBody": { "id": 25666, "nodeType": "Block", "src": "7568:120:16", "statements": [ { "expression": { "id": 25657, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "baseExpression": { "expression": { "baseExpression": { "id": 25650, "name": "_roles", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25410, "src": "7582:6:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$25405_storage_$", "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)" } }, "id": 25652, "indexExpression": { "id": 25651, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25640, "src": "7589:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "7582:12:16", "typeDescriptions": { "typeIdentifier": "t_struct$_RoleData_$25405_storage", "typeString": "struct AccessControl.RoleData storage ref" } }, "id": 25653, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7595:7:16", "memberName": "members", "nodeType": "MemberAccess", "referencedDeclaration": 25402, "src": "7582:20:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 25655, "indexExpression": { "id": 25654, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25642, "src": "7603:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "7582:29:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "74727565", "id": 25656, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7614:4:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "7582:36:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 25658, "nodeType": "ExpressionStatement", "src": "7582:36:16" }, { "eventCall": { "arguments": [ { "id": 25660, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25640, "src": "7649:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25661, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25642, "src": "7655:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "arguments": [], "expression": { "argumentTypes": [], "id": 25662, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27269, "src": "7664:10:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 25663, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7664:12:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25659, "name": "RoleGranted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25722, "src": "7637:11:16", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_address_$returns$__$", "typeString": "function (bytes32,address,address)" } }, "id": 25664, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7637:40:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25665, "nodeType": "EmitStatement", "src": "7632:45:16" } ] } } ] }, "documentation": { "id": 25638, "nodeType": "StructuredDocumentation", "src": "7299:157:16", "text": " @dev Grants `role` to `account`.\n Internal function without access restriction.\n May emit a {RoleGranted} event." }, "implemented": true, "kind": "function", "modifiers": [], "name": "_grantRole", "nameLocation": "7470:10:16", "parameters": { "id": 25643, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25640, "mutability": "mutable", "name": "role", "nameLocation": "7489:4:16", "nodeType": "VariableDeclaration", "scope": 25669, "src": "7481:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25639, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "7481:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25642, "mutability": "mutable", "name": "account", "nameLocation": "7503:7:16", "nodeType": "VariableDeclaration", "scope": 25669, "src": "7495:15:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25641, "name": "address", "nodeType": "ElementaryTypeName", "src": "7495:7:16", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "7480:31:16" }, "returnParameters": { "id": 25644, "nodeType": "ParameterList", "parameters": [], "src": "7529:0:16" }, "scope": 25701, "stateMutability": "nonpayable", "virtual": true, "visibility": "internal" }, { "id": 25700, "nodeType": "FunctionDefinition", "src": "7865:234:16", "nodes": [], "body": { "id": 25699, "nodeType": "Block", "src": "7934:165:16", "nodes": [], "statements": [ { "condition": { "arguments": [ { "id": 25678, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25672, "src": "7956:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25679, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25674, "src": "7962:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25677, "name": "hasRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25465, "src": "7948:7:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", "typeString": "function (bytes32,address) view returns (bool)" } }, "id": 25680, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7948:22:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 25698, "nodeType": "IfStatement", "src": "7944:149:16", "trueBody": { "id": 25697, "nodeType": "Block", "src": "7972:121:16", "statements": [ { "expression": { "id": 25688, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "baseExpression": { "expression": { "baseExpression": { "id": 25681, "name": "_roles", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25410, "src": "7986:6:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$25405_storage_$", "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)" } }, "id": 25683, "indexExpression": { "id": 25682, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25672, "src": "7993:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "7986:12:16", "typeDescriptions": { "typeIdentifier": "t_struct$_RoleData_$25405_storage", "typeString": "struct AccessControl.RoleData storage ref" } }, "id": 25684, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "7999:7:16", "memberName": "members", "nodeType": "MemberAccess", "referencedDeclaration": 25402, "src": "7986:20:16", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "id": 25686, "indexExpression": { "id": 25685, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25674, "src": "8007:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "7986:29:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "66616c7365", "id": 25687, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "8018:5:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "7986:37:16", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 25689, "nodeType": "ExpressionStatement", "src": "7986:37:16" }, { "eventCall": { "arguments": [ { "id": 25691, "name": "role", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25672, "src": "8054:4:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 25692, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25674, "src": "8060:7:16", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "arguments": [], "expression": { "argumentTypes": [], "id": 25693, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27269, "src": "8069:10:16", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 25694, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8069:12:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 25690, "name": "RoleRevoked", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25731, "src": "8042:11:16", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_address_$returns$__$", "typeString": "function (bytes32,address,address)" } }, "id": 25695, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8042:40:16", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 25696, "nodeType": "EmitStatement", "src": "8037:45:16" } ] } } ] }, "documentation": { "id": 25670, "nodeType": "StructuredDocumentation", "src": "7700:160:16", "text": " @dev Revokes `role` from `account`.\n Internal function without access restriction.\n May emit a {RoleRevoked} event." }, "implemented": true, "kind": "function", "modifiers": [], "name": "_revokeRole", "nameLocation": "7874:11:16", "parameters": { "id": 25675, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25672, "mutability": "mutable", "name": "role", "nameLocation": "7894:4:16", "nodeType": "VariableDeclaration", "scope": 25700, "src": "7886:12:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 25671, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "7886:7:16", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 25674, "mutability": "mutable", "name": "account", "nameLocation": "7908:7:16", "nodeType": "VariableDeclaration", "scope": 25700, "src": "7900:15:16", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25673, "name": "address", "nodeType": "ElementaryTypeName", "src": "7900:7:16", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "7885:31:16" }, "returnParameters": { "id": 25676, "nodeType": "ParameterList", "parameters": [], "src": "7934:0:16" }, "scope": 25701, "stateMutability": "nonpayable", "virtual": true, "visibility": "internal" } ], "abstract": true, "baseContracts": [ { "baseName": { "id": 25393, "name": "Context", "nameLocations": [ "1841:7:16" ], "nodeType": "IdentifierPath", "referencedDeclaration": 27279, "src": "1841:7:16" }, "id": 25394, "nodeType": "InheritanceSpecifier", "src": "1841:7:16" }, { "baseName": { "id": 25395, "name": "IAccessControl", "nameLocations": [ "1850:14:16" ], "nodeType": "IdentifierPath", "referencedDeclaration": 25774, "src": "1850:14:16" }, "id": 25396, "nodeType": "InheritanceSpecifier", "src": "1850:14:16" }, { "baseName": { "id": 25397, "name": "ERC165", "nameLocations": [ "1866:6:16" ], "nodeType": "IdentifierPath", "referencedDeclaration": 27552, "src": "1866:6:16" }, "id": 25398, "nodeType": "InheritanceSpecifier", "src": "1866:6:16" } ], "canonicalName": "AccessControl", "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 25392, "nodeType": "StructuredDocumentation", "src": "271:1534:16", "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, "linearizedBaseContracts": [ 25701, 27552, 27564, 25774, 27279 ], "name": "AccessControl", "nameLocation": "1824:13:16", "scope": 25702, "usedErrors": [] } ], "license": "MIT" }, "id": 16 }