984 lines
40 KiB
JSON
984 lines
40 KiB
JSON
{
|
|
"contractName": "ERC1155Receiver",
|
|
"abi": [
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "operator",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256[]",
|
|
"name": "ids",
|
|
"type": "uint256[]"
|
|
},
|
|
{
|
|
"internalType": "uint256[]",
|
|
"name": "values",
|
|
"type": "uint256[]"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "data",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "onERC1155BatchReceived",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "operator",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "id",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "value",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "data",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "onERC1155Received",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "interfaceId",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"name": "supportsInterface",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"_Available since v3.1._\",\"kind\":\"dev\",\"methods\":{\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\":{\"details\":\"Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` (i.e. 0xbc197c81, or its own function selector).\",\"params\":{\"data\":\"Additional data with no specified format\",\"from\":\"The address which previously owned the token\",\"ids\":\"An array containing ids of each token being transferred (order and length must match values array)\",\"operator\":\"The address which initiated the batch transfer (i.e. msg.sender)\",\"values\":\"An array containing amounts of each token being transferred (order and length must match ids array)\"},\"returns\":{\"_0\":\"`bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\"}},\"onERC1155Received(address,address,uint256,uint256,bytes)\":{\"details\":\"Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` (i.e. 0xf23a6e61, or its own function selector).\",\"params\":{\"data\":\"Additional data with no specified format\",\"from\":\"The address which previously owned the token\",\"id\":\"The ID of the token being transferred\",\"operator\":\"The address which initiated the transfer (i.e. msg.sender)\",\"value\":\"The amount of tokens being transferred\"},\"returns\":{\"_0\":\"`bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":\"ERC1155Receiver\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0e28648f994abf1d6bc345644a361cc0b7efa544f8bc0c8ec26011fed85a91ec\",\"dweb:/ipfs/QmVVE7AiRjKaQYYji7TkjmTeVzGpNmms5eoxqTCfvvpj6D\"]},\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0808de0ae4918c664643c885ca7fa6503e8ef2bd75609dfc85152c0128a3422d\",\"dweb:/ipfs/QmNrhFC1XgBKuuxfahFeiwi1MCdu3FLNpHj2uStgmf4iJj\"]},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]}},\"version\":1}",
|
|
"bytecode": "0x",
|
|
"deployedBytecode": "0x",
|
|
"immutableReferences": {},
|
|
"generatedSources": [],
|
|
"deployedGeneratedSources": [],
|
|
"sourceMap": "",
|
|
"deployedSourceMap": "",
|
|
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Receiver.sol\";\nimport \"../../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n",
|
|
"sourcePath": "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol",
|
|
"ast": {
|
|
"absolutePath": "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol",
|
|
"exportedSymbols": {
|
|
"ERC1155Receiver": [
|
|
2830
|
|
],
|
|
"ERC165": [
|
|
6136
|
|
],
|
|
"IERC1155Receiver": [
|
|
2730
|
|
],
|
|
"IERC165": [
|
|
6148
|
|
]
|
|
},
|
|
"id": 2831,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 2798,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "108:23:12"
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol",
|
|
"file": "../IERC1155Receiver.sol",
|
|
"id": 2799,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2831,
|
|
"sourceUnit": 2731,
|
|
"src": "133:33:12",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/utils/introspection/ERC165.sol",
|
|
"file": "../../../utils/introspection/ERC165.sol",
|
|
"id": 2800,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2831,
|
|
"sourceUnit": 6137,
|
|
"src": "167:49:12",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 2802,
|
|
"name": "ERC165",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 6136,
|
|
"src": "295:6:12"
|
|
},
|
|
"id": 2803,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "295:6:12"
|
|
},
|
|
{
|
|
"baseName": {
|
|
"id": 2804,
|
|
"name": "IERC1155Receiver",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2730,
|
|
"src": "303:16:12"
|
|
},
|
|
"id": 2805,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "303:16:12"
|
|
}
|
|
],
|
|
"canonicalName": "ERC1155Receiver",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 2801,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "218:39:12",
|
|
"text": " @dev _Available since v3.1._"
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 2830,
|
|
"linearizedBaseContracts": [
|
|
2830,
|
|
2730,
|
|
6136,
|
|
6148
|
|
],
|
|
"name": "ERC1155Receiver",
|
|
"nameLocation": "276:15:12",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"baseFunctions": [
|
|
6135,
|
|
6147
|
|
],
|
|
"body": {
|
|
"id": 2828,
|
|
"nodeType": "Block",
|
|
"src": "495:113:12",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 2826,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"id": 2821,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2816,
|
|
"name": "interfaceId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2808,
|
|
"src": "512:11:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2818,
|
|
"name": "IERC1155Receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2730,
|
|
"src": "532:16:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IERC1155Receiver_$2730_$",
|
|
"typeString": "type(contract IERC1155Receiver)"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_contract$_IERC1155Receiver_$2730_$",
|
|
"typeString": "type(contract IERC1155Receiver)"
|
|
}
|
|
],
|
|
"id": 2817,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "527:4:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 2819,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "527:22:12",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_contract$_IERC1155Receiver_$2730",
|
|
"typeString": "type(contract IERC1155Receiver)"
|
|
}
|
|
},
|
|
"id": 2820,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "interfaceId",
|
|
"nodeType": "MemberAccess",
|
|
"src": "527:34:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"src": "512:49:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2824,
|
|
"name": "interfaceId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2808,
|
|
"src": "589:11:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2822,
|
|
"name": "super",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967271,
|
|
"src": "565:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_super$_ERC1155Receiver_$2830_$",
|
|
"typeString": "type(contract super ERC1155Receiver)"
|
|
}
|
|
},
|
|
"id": 2823,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "supportsInterface",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 6135,
|
|
"src": "565:23:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_bytes4_$returns$_t_bool_$",
|
|
"typeString": "function (bytes4) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 2825,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "565:36:12",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "512:89:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2815,
|
|
"id": 2827,
|
|
"nodeType": "Return",
|
|
"src": "505:96:12"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 2806,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "326:56:12",
|
|
"text": " @dev See {IERC165-supportsInterface}."
|
|
},
|
|
"functionSelector": "01ffc9a7",
|
|
"id": 2829,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "supportsInterface",
|
|
"nameLocation": "396:17:12",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 2812,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [
|
|
{
|
|
"id": 2810,
|
|
"name": "ERC165",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 6136,
|
|
"src": "463:6:12"
|
|
},
|
|
{
|
|
"id": 2811,
|
|
"name": "IERC165",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 6148,
|
|
"src": "471:7:12"
|
|
}
|
|
],
|
|
"src": "454:25:12"
|
|
},
|
|
"parameters": {
|
|
"id": 2809,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2808,
|
|
"mutability": "mutable",
|
|
"name": "interfaceId",
|
|
"nameLocation": "421:11:12",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2829,
|
|
"src": "414:18:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 2807,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "414:6:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "413:20:12"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2815,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2814,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2829,
|
|
"src": "489:4:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 2813,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "489:4:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "488:6:12"
|
|
},
|
|
"scope": 2830,
|
|
"src": "387:221:12",
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 2831,
|
|
"src": "258:352:12",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "108:503:12"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol",
|
|
"exportedSymbols": {
|
|
"ERC1155Receiver": [
|
|
2830
|
|
],
|
|
"ERC165": [
|
|
6136
|
|
],
|
|
"IERC1155Receiver": [
|
|
2730
|
|
],
|
|
"IERC165": [
|
|
6148
|
|
]
|
|
},
|
|
"id": 2831,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 2798,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "108:23:12"
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol",
|
|
"file": "../IERC1155Receiver.sol",
|
|
"id": 2799,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2831,
|
|
"sourceUnit": 2731,
|
|
"src": "133:33:12",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@openzeppelin/contracts/utils/introspection/ERC165.sol",
|
|
"file": "../../../utils/introspection/ERC165.sol",
|
|
"id": 2800,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 2831,
|
|
"sourceUnit": 6137,
|
|
"src": "167:49:12",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 2802,
|
|
"name": "ERC165",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 6136,
|
|
"src": "295:6:12"
|
|
},
|
|
"id": 2803,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "295:6:12"
|
|
},
|
|
{
|
|
"baseName": {
|
|
"id": 2804,
|
|
"name": "IERC1155Receiver",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 2730,
|
|
"src": "303:16:12"
|
|
},
|
|
"id": 2805,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "303:16:12"
|
|
}
|
|
],
|
|
"canonicalName": "ERC1155Receiver",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 2801,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "218:39:12",
|
|
"text": " @dev _Available since v3.1._"
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 2830,
|
|
"linearizedBaseContracts": [
|
|
2830,
|
|
2730,
|
|
6136,
|
|
6148
|
|
],
|
|
"name": "ERC1155Receiver",
|
|
"nameLocation": "276:15:12",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"baseFunctions": [
|
|
6135,
|
|
6147
|
|
],
|
|
"body": {
|
|
"id": 2828,
|
|
"nodeType": "Block",
|
|
"src": "495:113:12",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 2826,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"id": 2821,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 2816,
|
|
"name": "interfaceId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2808,
|
|
"src": "512:11:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2818,
|
|
"name": "IERC1155Receiver",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2730,
|
|
"src": "532:16:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IERC1155Receiver_$2730_$",
|
|
"typeString": "type(contract IERC1155Receiver)"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_type$_t_contract$_IERC1155Receiver_$2730_$",
|
|
"typeString": "type(contract IERC1155Receiver)"
|
|
}
|
|
],
|
|
"id": 2817,
|
|
"name": "type",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967269,
|
|
"src": "527:4:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 2819,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "527:22:12",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_meta_type_t_contract$_IERC1155Receiver_$2730",
|
|
"typeString": "type(contract IERC1155Receiver)"
|
|
}
|
|
},
|
|
"id": 2820,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "interfaceId",
|
|
"nodeType": "MemberAccess",
|
|
"src": "527:34:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"src": "512:49:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 2824,
|
|
"name": "interfaceId",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2808,
|
|
"src": "589:11:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 2822,
|
|
"name": "super",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967271,
|
|
"src": "565:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_super$_ERC1155Receiver_$2830_$",
|
|
"typeString": "type(contract super ERC1155Receiver)"
|
|
}
|
|
},
|
|
"id": 2823,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "supportsInterface",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 6135,
|
|
"src": "565:23:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_bytes4_$returns$_t_bool_$",
|
|
"typeString": "function (bytes4) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 2825,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "565:36:12",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "512:89:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 2815,
|
|
"id": 2827,
|
|
"nodeType": "Return",
|
|
"src": "505:96:12"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 2806,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "326:56:12",
|
|
"text": " @dev See {IERC165-supportsInterface}."
|
|
},
|
|
"functionSelector": "01ffc9a7",
|
|
"id": 2829,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "supportsInterface",
|
|
"nameLocation": "396:17:12",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 2812,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [
|
|
{
|
|
"id": 2810,
|
|
"name": "ERC165",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 6136,
|
|
"src": "463:6:12"
|
|
},
|
|
{
|
|
"id": 2811,
|
|
"name": "IERC165",
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 6148,
|
|
"src": "471:7:12"
|
|
}
|
|
],
|
|
"src": "454:25:12"
|
|
},
|
|
"parameters": {
|
|
"id": 2809,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2808,
|
|
"mutability": "mutable",
|
|
"name": "interfaceId",
|
|
"nameLocation": "421:11:12",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2829,
|
|
"src": "414:18:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 2807,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "414:6:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "413:20:12"
|
|
},
|
|
"returnParameters": {
|
|
"id": 2815,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 2814,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 2829,
|
|
"src": "489:4:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 2813,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "489:4:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "488:6:12"
|
|
},
|
|
"scope": 2830,
|
|
"src": "387:221:12",
|
|
"stateMutability": "view",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 2831,
|
|
"src": "258:352:12",
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"src": "108:503:12"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.8.10+commit.fc410830.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.4.4",
|
|
"updatedAt": "2022-12-22T09:02:46.736Z",
|
|
"devdoc": {
|
|
"details": "_Available since v3.1._",
|
|
"kind": "dev",
|
|
"methods": {
|
|
"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": {
|
|
"details": "Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81, or its own function selector).",
|
|
"params": {
|
|
"data": "Additional data with no specified format",
|
|
"from": "The address which previously owned the token",
|
|
"ids": "An array containing ids of each token being transferred (order and length must match values array)",
|
|
"operator": "The address which initiated the batch transfer (i.e. msg.sender)",
|
|
"values": "An array containing amounts of each token being transferred (order and length must match ids array)"
|
|
},
|
|
"returns": {
|
|
"_0": "`bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed"
|
|
}
|
|
},
|
|
"onERC1155Received(address,address,uint256,uint256,bytes)": {
|
|
"details": "Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61, or its own function selector).",
|
|
"params": {
|
|
"data": "Additional data with no specified format",
|
|
"from": "The address which previously owned the token",
|
|
"id": "The ID of the token being transferred",
|
|
"operator": "The address which initiated the transfer (i.e. msg.sender)",
|
|
"value": "The amount of tokens being transferred"
|
|
},
|
|
"returns": {
|
|
"_0": "`bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed"
|
|
}
|
|
},
|
|
"supportsInterface(bytes4)": {
|
|
"details": "See {IERC165-supportsInterface}."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
} |