@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
1,490 lines (1,489 loc) • 835 kB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "string",
"name": "name_",
"type": "string"
},
{
"internalType": "string",
"name": "symbol_",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "approved",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getApproved",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"name": "isApprovedForAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "ownerOf",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "setApprovalForAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "tokenURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol",
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"12": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"14": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"6": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/ERC721.sol",
"7": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"8": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721Receiver.sol",
"9": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/ERC721.sol",
"exportedSymbols": {
"Address": [
24852
],
"Context": [
15648
],
"ERC165": [
24921
],
"ERC721": [
24557
],
"IERC165": [
22864
],
"IERC721": [
13932
],
"IERC721Metadata": [
24897
],
"IERC721Receiver": [
24870
],
"Strings": [
16154
]
},
"id": 24558,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 23692,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "107:23:6"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"file": "./IERC721.sol",
"id": 23693,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 24558,
"sourceUnit": 13933,
"src": "132:23:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721Receiver.sol",
"file": "./IERC721Receiver.sol",
"id": 23694,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 24558,
"sourceUnit": 24871,
"src": "156:31:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol",
"file": "./extensions/IERC721Metadata.sol",
"id": 23695,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 24558,
"sourceUnit": 24898,
"src": "188:42:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol",
"file": "../../utils/Address.sol",
"id": 23696,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 24558,
"sourceUnit": 24853,
"src": "231:33:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"file": "../../utils/Context.sol",
"id": 23697,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 24558,
"sourceUnit": 15649,
"src": "265:33:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"file": "../../utils/Strings.sol",
"id": 23698,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 24558,
"sourceUnit": 16155,
"src": "299:33:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"file": "../../utils/introspection/ERC165.sol",
"id": 23699,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 24558,
"sourceUnit": 24922,
"src": "333:46:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 23701,
"name": "Context",
"nodeType": "IdentifierPath",
"referencedDeclaration": 15648,
"src": "647:7:6"
},
"id": 23702,
"nodeType": "InheritanceSpecifier",
"src": "647:7:6"
},
{
"baseName": {
"id": 23703,
"name": "ERC165",
"nodeType": "IdentifierPath",
"referencedDeclaration": 24921,
"src": "656:6:6"
},
"id": 23704,
"nodeType": "InheritanceSpecifier",
"src": "656:6:6"
},
{
"baseName": {
"id": 23705,
"name": "IERC721",
"nodeType": "IdentifierPath",
"referencedDeclaration": 13932,
"src": "664:7:6"
},
"id": 23706,
"nodeType": "InheritanceSpecifier",
"src": "664:7:6"
},
{
"baseName": {
"id": 23707,
"name": "IERC721Metadata",
"nodeType": "IdentifierPath",
"referencedDeclaration": 24897,
"src": "673:15:6"
},
"id": 23708,
"nodeType": "InheritanceSpecifier",
"src": "673:15:6"
}
],
"contractDependencies": [
13932,
15648,
22864,
24897,
24921
],
"contractKind": "contract",
"documentation": {
"id": 23700,
"nodeType": "StructuredDocumentation",
"src": "381:246:6",
"text": " @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n the Metadata extension, but not including the Enumerable extension, which is available separately as\n {ERC721Enumerable}."
},
"fullyImplemented": true,
"id": 24557,
"linearizedBaseContracts": [
24557,
24897,
13932,
24921,
22864,
15648
],
"name": "ERC721",
"nameLocation": "637:6:6",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 23711,
"libraryName": {
"id": 23709,
"name": "Address",
"nodeType": "IdentifierPath",
"referencedDeclaration": 24852,
"src": "701:7:6"
},
"nodeType": "UsingForDirective",
"src": "695:26:6",
"typeName": {
"id": 23710,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "713:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
{
"id": 23714,
"libraryName": {
"id": 23712,
"name": "Strings",
"nodeType": "IdentifierPath",
"referencedDeclaration": 16154,
"src": "732:7:6"
},
"nodeType": "UsingForDirective",
"src": "726:26:6",
"typeName": {
"id": 23713,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "744:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"id": 23716,
"mutability": "mutable",
"name": "_name",
"nameLocation": "791:5:6",
"nodeType": "VariableDeclaration",
"scope": 24557,
"src": "776:20:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 23715,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "776:6:6",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 23718,
"mutability": "mutable",
"name": "_symbol",
"nameLocation": "838:7:6",
"nodeType": "VariableDeclaration",
"scope": 24557,
"src": "823:22:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 23717,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "823:6:6",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 23722,
"mutability": "mutable",
"name": "_owners",
"nameLocation": "934:7:6",
"nodeType": "VariableDeclaration",
"scope": 24557,
"src": "898:43:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"typeName": {
"id": 23721,
"keyType": {
"id": 23719,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "906:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "898:27:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"valueType": {
"id": 23720,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "917:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 23726,
"mutability": "mutable",
"name": "_balances",
"nameLocation": "1028:9:6",
"nodeType": "VariableDeclaration",
"scope": 24557,
"src": "992:45:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 23725,
"keyType": {
"id": 23723,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1000:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "992:27:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 23724,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1011:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 23730,
"mutability": "mutable",
"name": "_tokenApprovals",
"nameLocation": "1129:15:6",
"nodeType": "VariableDeclaration",
"scope": 24557,
"src": "1093:51:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"typeName": {
"id": 23729,
"keyType": {
"id": 23727,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1101:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "1093:27:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"valueType": {
"id": 23728,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1112:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 23736,
"mutability": "mutable",
"name": "_operatorApprovals",
"nameLocation": "1252:18:6",
"nodeType": "VariableDeclaration",
"scope": 24557,
"src": "1199:71:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(address => mapping(address => bool))"
},
"typeName": {
"id": 23735,
"keyType": {
"id": 23731,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1207:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "1199:44:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(address => mapping(address => bool))"
},
"valueType": {
"id": 23734,
"keyType": {
"id": 23732,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1226:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "1218:24:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 23733,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1237:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
}
},
"visibility": "private"
},
{
"body": {
"id": 23752,
"nodeType": "Block",
"src": "1446:57:6",
"statements": [
{
"expression": {
"id": 23746,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 23744,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23716,
"src": "1456:5:6",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 23745,
"name": "name_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23739,
"src": "1464:5:6",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "1456:13:6",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 23747,
"nodeType": "ExpressionStatement",
"src": "1456:13:6"
},
{
"expression": {
"id": 23750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 23748,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23718,
"src": "1479:7:6",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 23749,
"name": "symbol_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23741,
"src": "1489:7:6",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "1479:17:6",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 23751,
"nodeType": "ExpressionStatement",
"src": "1479:17:6"
}
]
},
"documentation": {
"id": 23737,
"nodeType": "StructuredDocumentation",
"src": "1277:108:6",
"text": " @dev Initializes the contract by setting a `name` and a `symbol` to the token collection."
},
"id": 23753,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 23742,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 23739,
"mutability": "mutable",
"name": "name_",
"nameLocation": "1416:5:6",
"nodeType": "VariableDeclaration",
"scope": 23753,
"src": "1402:19:6",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 23738,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1402:6:6",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 23741,
"mutability": "mutable",
"name": "symbol_",
"nameLocation": "1437:7:6",
"nodeType": "VariableDeclaration",
"scope": 23753,
"src": "1423:21:6",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 23740,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1423:6:6",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "1401:44:6"
},
"returnParameters": {
"id": 23743,
"nodeType": "ParameterList",
"parameters": [],
"src": "1446:0:6"
},
"scope": 24557,
"src": "1390:113:6",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
22863,
24920
],
"body": {
"id": 23783,
"nodeType": "Block",
"src": "1678:192:6",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 23781,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 23776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 23769,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 23764,
"name": "interfaceId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23756,
"src": "1707:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 23766,
"name": "IERC721",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13932,
"src": "1727:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC721_$13932_$",
"typeString": "type(contract IERC721)"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_contract$_IERC721_$13932_$",
"typeString": "type(contract IERC721)"
}
],
"id": 23765,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -27,
"src": "1722:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 23767,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1722:13:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_contract$_IERC721_$13932",
"typeString": "type(contract IERC721)"
}
},
"id": 23768,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "interfaceId",
"nodeType": "MemberAccess",
"src": "1722:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "1707:40:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 23775,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 23770,
"name": "interfaceId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23756,
"src": "1763:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 23772,
"name": "IERC721Metadata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24897,
"src": "1783:15:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$24897_$",
"typeString": "type(contract IERC721Metadata)"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$24897_$",
"typeString": "type(contract IERC721Metadata)"
}
],
"id": 23771,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -27,
"src": "1778:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 23773,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1778:21:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_contract$_IERC721Metadata_$24897",
"typeString": "type(contract IERC721Metadata)"
}
},
"id": 23774,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "interfaceId",
"nodeType": "MemberAccess",
"src": "1778:33:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "1763:48:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1707:104:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"arguments": [
{
"id": 23779,
"name": "interfaceId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23756,
"src": "1851:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"expression": {
"id": 23777,
"name": "super",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -25,
"src": "1827:5:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_super$_ERC721_$24557_$",
"typeString": "type(contract super ERC721)"
}
},
"id": 23778,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "supportsInterface",
"nodeType": "MemberAccess",
"referencedDeclaration": 24920,
"src": "1827:23:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes4_$returns$_t_bool_$",
"typeString": "function (bytes4) view returns (bool)"
}
},
"id": 23780,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1827:36:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1707:156:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 23763,
"id": 23782,
"nodeType": "Return",
"src": "1688:175:6"
}
]
},
"documentation": {
"id": 23754,
"nodeType": "StructuredDocumentation",
"src": "1509:56:6",
"text": " @dev See {IERC165-supportsInterface}."
},
"functionSelector": "01ffc9a7",
"id": 23784,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "supportsInterface",
"nameLocation": "1579:17:6",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 23760,
"nodeType": "OverrideSpecifier",
"overrides": [
{
"id": 23758,
"name": "ERC165",
"nodeType": "IdentifierPath",
"referencedDeclaration": 24921,
"src": "1646:6:6"
},
{
"id": 23759,
"name": "IERC165",
"nodeType": "IdentifierPath",
"referencedDeclaration": 22864,
"src": "1654:7:6"
}
],
"src": "1637:25:6"
},
"parameters": {
"id": 23757,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 23756,
"mutability": "mutable",
"name": "interfaceId",
"nameLocation": "1604:11:6",
"nodeType": "VariableDeclaration",
"scope": 23784,
"src": "1597:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 23755,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "1597:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "1596:20:6"
},
"returnParameters": {
"id": 23763,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 23762,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 23784,
"src": "1672:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 23761,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1672:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "1671:6:6"
},
"scope": 24557,
"src": "1570:300:6",
"stateMutability": "view",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
13857
],
"body": {
"id": 23807,
"nodeType": "Block",
"src": "2010:123:6",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 23799,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 23794,
"name": "owner",