@ethsub/sol
Version:
ethsub contracts
1,038 lines (1,037 loc) • 270 kB
JSON
{
"contractName": "ERC165Checker",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library used to query support of an interface declared via {IERC165}. Note that these functions return the actual result of the query: they do not `revert` if an interface is not supported. It is up to the caller to decide what to do in these cases.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/introspection/ERC165Checker.sol\":\"ERC165Checker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/introspection/ERC165Checker.sol\":{\"keccak256\":\"0x1bdefceaba99e08a6c30400bc686e6380c1e914887bf5780db14f965c09aa9d3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fa31e8df5c7a5f3434977d3a881ee322c4e81f8486aec4bb859bebd20f23d805\",\"dweb:/ipfs/QmShFfnjPytP2ooLtDj7f2XULXgbsRj4xjrFc9qm9kRe79\"]}},\"version\":1}",
"bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220881c298687e7ae98011f7a3c8464e2e5eec15841d56a2b874a6c1e1b210f926b64736f6c634300060c0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220881c298687e7ae98011f7a3c8464e2e5eec15841d56a2b874a6c1e1b210f926b64736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "344:5246:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "344:5246:3:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165Checker {\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n /*\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\n */\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\n\n /**\n * @dev Returns true if `account` supports the {IERC165} interface,\n */\n function supportsERC165(address account) internal view returns (bool) {\n // Any contract that implements ERC165 must explicitly indicate support of\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n return _supportsERC165Interface(account, _INTERFACE_ID_ERC165) &&\n !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);\n }\n\n /**\n * @dev Returns true if `account` supports the interface defined by\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n // query support of both ERC165 as per the spec and support of _interfaceId\n return supportsERC165(account) &&\n _supportsERC165Interface(account, interfaceId);\n }\n\n /**\n * @dev Returns a boolean array where each value corresponds to the\n * interfaces passed in and whether they're supported or not. This allows\n * you to batch check interfaces for a contract where your expectation\n * is that some interfaces may not be supported.\n *\n * See {IERC165-supportsInterface}.\n *\n * _Available since v3.4._\n */\n function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool[] memory) {\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n // query support of ERC165 itself\n if (supportsERC165(account)) {\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);\n }\n }\n\n return interfaceIdsSupported;\n }\n\n /**\n * @dev Returns true if `account` supports all the interfaces defined in\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n *\n * Batch-querying can lead to gas savings by skipping repeated checks for\n * {IERC165} support.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n // query support of ERC165 itself\n if (!supportsERC165(account)) {\n return false;\n }\n\n // query support of each interface in _interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n if (!_supportsERC165Interface(account, interfaceIds[i])) {\n return false;\n }\n }\n\n // all interfaces supported\n return true;\n }\n\n /**\n * @notice Query if a contract implements an interface, does not check ERC165 support\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return true if the contract at account indicates support of the interface with\n * identifier interfaceId, false otherwise\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\n * the behavior of this method is undefined. This precondition can be checked\n * with {supportsERC165}.\n * Interface identification is specified in ERC-165.\n */\n function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {\n // success determines whether the staticcall succeeded and result determines\n // whether the contract at account indicates support of _interfaceId\n (bool success, bool result) = _callERC165SupportsInterface(account, interfaceId);\n\n return (success && result);\n }\n\n /**\n * @notice Calls the function with selector 0x01ffc9a7 (ERC165) and suppresses throw\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return success true if the STATICCALL succeeded, false otherwise\n * @return result true if the STATICCALL succeeded and the contract at account\n * indicates support of the interface with identifier interfaceId, false otherwise\n */\n function _callERC165SupportsInterface(address account, bytes4 interfaceId)\n private\n view\n returns (bool, bool)\n {\n bytes memory encodedParams = abi.encodeWithSelector(_INTERFACE_ID_ERC165, interfaceId);\n (bool success, bytes memory result) = account.staticcall{ gas: 30000 }(encodedParams);\n if (result.length < 32) return (false, false);\n return (success, abi.decode(result, (bool)));\n }\n}\n",
"sourcePath": "@openzeppelin/contracts/introspection/ERC165Checker.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/introspection/ERC165Checker.sol",
"exportedSymbols": {
"ERC165Checker": [
570
]
},
"id": 571,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 344,
"literals": [
"solidity",
">=",
"0.6",
".2",
"<",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "33:31:3"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 345,
"nodeType": "StructuredDocumentation",
"src": "66:277:3",
"text": " @dev Library used to query support of an interface declared via {IERC165}.\n Note that these functions return the actual result of the query: they do not\n `revert` if an interface is not supported. It is up to the caller to decide\n what to do in these cases."
},
"fullyImplemented": true,
"id": 570,
"linearizedBaseContracts": [
570
],
"name": "ERC165Checker",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 348,
"mutability": "constant",
"name": "_INTERFACE_ID_INVALID",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 570,
"src": "446:58:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 346,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "446:6:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"hexValue": "30786666666666666666",
"id": 347,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "494:10:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_4294967295_by_1",
"typeString": "int_const 4294967295"
},
"value": "0xffffffff"
},
"visibility": "private"
},
{
"constant": true,
"id": 351,
"mutability": "constant",
"name": "_INTERFACE_ID_ERC165",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 570,
"src": "594:57:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 349,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "594:6:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"hexValue": "30783031666663396137",
"id": 350,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "641:10:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_33540519_by_1",
"typeString": "int_const 33540519"
},
"value": "0x01ffc9a7"
},
"visibility": "private"
},
{
"body": {
"id": 370,
"nodeType": "Block",
"src": "816:324:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 368,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 360,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 354,
"src": "1030:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 361,
"name": "_INTERFACE_ID_ERC165",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 351,
"src": "1039:20:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 359,
"name": "_supportsERC165Interface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 518,
"src": "1005:24:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes4_$returns$_t_bool_$",
"typeString": "function (address,bytes4) view returns (bool)"
}
},
"id": 362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1005:55:3",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"id": 367,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1076:57:3",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 364,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 354,
"src": "1102:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 365,
"name": "_INTERFACE_ID_INVALID",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 348,
"src": "1111:21:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 363,
"name": "_supportsERC165Interface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 518,
"src": "1077:24:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes4_$returns$_t_bool_$",
"typeString": "function (address,bytes4) view returns (bool)"
}
},
"id": 366,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1077:56:3",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1005:128:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 358,
"id": 369,
"nodeType": "Return",
"src": "998:135:3"
}
]
},
"documentation": {
"id": 352,
"nodeType": "StructuredDocumentation",
"src": "658:83:3",
"text": " @dev Returns true if `account` supports the {IERC165} interface,"
},
"id": 371,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "supportsERC165",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 355,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 354,
"mutability": "mutable",
"name": "account",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 371,
"src": "770:15:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 353,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "770:7:3",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "769:17:3"
},
"returnParameters": {
"id": 358,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 357,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 371,
"src": "810:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 356,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "810:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "809:6:3"
},
"scope": 570,
"src": "746:394:3",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 390,
"nodeType": "Block",
"src": "1451:193:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 388,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 382,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 374,
"src": "1567:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 381,
"name": "supportsERC165",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 371,
"src": "1552:14:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view returns (bool)"
}
},
"id": 383,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1552:23:3",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 385,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 374,
"src": "1616:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 386,
"name": "interfaceId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 376,
"src": "1625:11:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 384,
"name": "_supportsERC165Interface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 518,
"src": "1591:24:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes4_$returns$_t_bool_$",
"typeString": "function (address,bytes4) view returns (bool)"
}
},
"id": 387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1591:46:3",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1552:85:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 380,
"id": 389,
"nodeType": "Return",
"src": "1545:92:3"
}
]
},
"documentation": {
"id": 372,
"nodeType": "StructuredDocumentation",
"src": "1146:207:3",
"text": " @dev Returns true if `account` supports the interface defined by\n `interfaceId`. Support for {IERC165} itself is queried automatically.\n See {IERC165-supportsInterface}."
},
"id": 391,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "supportsInterface",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 377,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 374,
"mutability": "mutable",
"name": "account",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 391,
"src": "1385:15:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 373,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1385:7:3",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 376,
"mutability": "mutable",
"name": "interfaceId",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 391,
"src": "1402:18:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 375,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "1402:6:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1384:37:3"
},
"returnParameters": {
"id": 380,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 379,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 391,
"src": "1445:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 378,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1445:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1444:6:3"
},
"scope": 570,
"src": "1358:286:3",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 446,
"nodeType": "Block",
"src": "2146:552:3",
"statements": [
{
"assignments": [
407
],
"declarations": [
{
"constant": false,
"id": 407,
"mutability": "mutable",
"name": "interfaceIdsSupported",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 446,
"src": "2255:35:3",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr",
"typeString": "bool[]"
},
"typeName": {
"baseType": {
"id": 405,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2255:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 406,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2255:6:3",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr",
"typeString": "bool[]"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 414,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 411,
"name": "interfaceIds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 397,
"src": "2304:12:3",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"id": 412,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2304:19:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 410,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "2293:10:3",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bool_$dyn_memory_ptr_$",
"typeString": "function (uint256) pure returns (bool[] memory)"
},
"typeName": {
"baseType": {
"id": 408,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2297:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 409,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2297:6:3",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bool_$dyn_storage_ptr",
"typeString": "bool[]"
}
}
},
"id": 413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2293:31:3",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr",
"typeString": "bool[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2255:69:3"
},
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 416,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 394,
"src": "2396:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 415,
"name": "supportsERC165",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 371,
"src": "2381:14:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view returns (bool)"
}
},
"id": 417,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2381:23:3",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 443,
"nodeType": "IfStatement",
"src": "2377:276:3",
"trueBody": {
"id": 442,
"nodeType": "Block",
"src": "2406:247:3",
"statements": [
{
"body": {
"id": 440,
"nodeType": "Block",
"src": "2533:110:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 438,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 429,
"name": "interfaceIdsSupported",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 407,
"src": "2551:21:3",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bool_$dyn_memory_ptr",
"typeString": "bool[] memory"
}
},
"id": 431,
"indexExpression": {
"argumentTypes": null,
"id": 430,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 419,
"src": "2573:1:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2551:24:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 433,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 394,
"src": "2603:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 434,
"name": "interfaceIds",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 397,
"src": "2612:12:3",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes4_$dyn_memory_ptr",
"typeString": "bytes4[] memory"
}
},
"id": 436,
"indexExpression": {
"argumentTypes": null,
"id": 435,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 419,
"src": "2625:1:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2612:15:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 432,
"name": "_supportsERC165Interface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 518,
"src": "2578:24:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes4_$returns$_t_bool_$",
"typeString": "function (address,bytes4) view returns (bool)"
}
},
"id": 437,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2578:50:3",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},