{ "contractName": "IERC1155Receiver", "abi": [ { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "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": "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" } ], "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\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":\"IERC1155Receiver\"},\"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/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 (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n * @dev Handles the receipt of a single ERC1155 token type. This function is\n * called at the end of a `safeTransferFrom` after the balance has been updated.\n *\n * NOTE: To accept the transfer, this must return\n * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n * (i.e. 0xf23a6e61, or its own function selector).\n *\n * @param operator The address which initiated the transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param id The ID of the token being transferred\n * @param value The amount of tokens being transferred\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\n * is called at the end of a `safeBatchTransferFrom` after the balances have\n * been updated.\n *\n * NOTE: To accept the transfer(s), this must return\n * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n * (i.e. 0xbc197c81, or its own function selector).\n *\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n", "sourcePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol", "ast": { "absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol", "exportedSymbols": { "IERC1155Receiver": [ 2690 ], "IERC165": [ 6023 ] }, "id": 2691, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 2651, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "118:23:8" }, { "absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol", "file": "../../utils/introspection/IERC165.sol", "id": 2652, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 2691, "sourceUnit": 6024, "src": "143:47:8", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 2654, "name": "IERC165", "nodeType": "IdentifierPath", "referencedDeclaration": 6023, "src": "262:7:8" }, "id": 2655, "nodeType": "InheritanceSpecifier", "src": "262:7:8" } ], "canonicalName": "IERC1155Receiver", "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 2653, "nodeType": "StructuredDocumentation", "src": "192:39:8", "text": " @dev _Available since v3.1._" }, "fullyImplemented": false, "id": 2690, "linearizedBaseContracts": [ 2690, 6023 ], "name": "IERC1155Receiver", "nameLocation": "242:16:8", "nodeType": "ContractDefinition", "nodes": [ { "documentation": { "id": 2656, "nodeType": "StructuredDocumentation", "src": "276:826:8", "text": " @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n NOTE: To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed" }, "functionSelector": "f23a6e61", "id": 2671, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155Received", "nameLocation": "1116:17:8", "nodeType": "FunctionDefinition", "parameters": { "id": 2667, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2658, "mutability": "mutable", "name": "operator", "nameLocation": "1151:8:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1143:16:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2657, "name": "address", "nodeType": "ElementaryTypeName", "src": "1143:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2660, "mutability": "mutable", "name": "from", "nameLocation": "1177:4:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1169:12:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2659, "name": "address", "nodeType": "ElementaryTypeName", "src": "1169:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2662, "mutability": "mutable", "name": "id", "nameLocation": "1199:2:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1191:10:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2661, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1191:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 2664, "mutability": "mutable", "name": "value", "nameLocation": "1219:5:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1211:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2663, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1211:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 2666, "mutability": "mutable", "name": "data", "nameLocation": "1249:4:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1234:19:8", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 2665, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1234:5:8", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "1133:126:8" }, "returnParameters": { "id": 2670, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2669, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1278:6:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 2668, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1278:6:8", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "1277:8:8" }, "scope": 2690, "src": "1107:179:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "documentation": { "id": 2672, "nodeType": "StructuredDocumentation", "src": "1292:994:8", "text": " @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated.\n NOTE: To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed" }, "functionSelector": "bc197c81", "id": 2689, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155BatchReceived", "nameLocation": "2300:22:8", "nodeType": "FunctionDefinition", "parameters": { "id": 2685, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2674, "mutability": "mutable", "name": "operator", "nameLocation": "2340:8:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2332:16:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2673, "name": "address", "nodeType": "ElementaryTypeName", "src": "2332:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2676, "mutability": "mutable", "name": "from", "nameLocation": "2366:4:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2358:12:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2675, "name": "address", "nodeType": "ElementaryTypeName", "src": "2358:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2679, "mutability": "mutable", "name": "ids", "nameLocation": "2399:3:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2380:22:8", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 2677, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2380:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2678, "nodeType": "ArrayTypeName", "src": "2380:9:8", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" }, { "constant": false, "id": 2682, "mutability": "mutable", "name": "values", "nameLocation": "2431:6:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2412:25:8", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 2680, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2412:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2681, "nodeType": "ArrayTypeName", "src": "2412:9:8", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" }, { "constant": false, "id": 2684, "mutability": "mutable", "name": "data", "nameLocation": "2462:4:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2447:19:8", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 2683, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2447:5:8", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "2322:150:8" }, "returnParameters": { "id": 2688, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2687, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2491:6:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 2686, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "2491:6:8", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "2490:8:8" }, "scope": 2690, "src": "2291:208:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 2691, "src": "232:2269:8", "usedErrors": [] } ], "src": "118:2384:8" }, "legacyAST": { "absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol", "exportedSymbols": { "IERC1155Receiver": [ 2690 ], "IERC165": [ 6023 ] }, "id": 2691, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 2651, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "118:23:8" }, { "absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol", "file": "../../utils/introspection/IERC165.sol", "id": 2652, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 2691, "sourceUnit": 6024, "src": "143:47:8", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 2654, "name": "IERC165", "nodeType": "IdentifierPath", "referencedDeclaration": 6023, "src": "262:7:8" }, "id": 2655, "nodeType": "InheritanceSpecifier", "src": "262:7:8" } ], "canonicalName": "IERC1155Receiver", "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 2653, "nodeType": "StructuredDocumentation", "src": "192:39:8", "text": " @dev _Available since v3.1._" }, "fullyImplemented": false, "id": 2690, "linearizedBaseContracts": [ 2690, 6023 ], "name": "IERC1155Receiver", "nameLocation": "242:16:8", "nodeType": "ContractDefinition", "nodes": [ { "documentation": { "id": 2656, "nodeType": "StructuredDocumentation", "src": "276:826:8", "text": " @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n NOTE: To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed" }, "functionSelector": "f23a6e61", "id": 2671, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155Received", "nameLocation": "1116:17:8", "nodeType": "FunctionDefinition", "parameters": { "id": 2667, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2658, "mutability": "mutable", "name": "operator", "nameLocation": "1151:8:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1143:16:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2657, "name": "address", "nodeType": "ElementaryTypeName", "src": "1143:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2660, "mutability": "mutable", "name": "from", "nameLocation": "1177:4:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1169:12:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2659, "name": "address", "nodeType": "ElementaryTypeName", "src": "1169:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2662, "mutability": "mutable", "name": "id", "nameLocation": "1199:2:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1191:10:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2661, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1191:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 2664, "mutability": "mutable", "name": "value", "nameLocation": "1219:5:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1211:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2663, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1211:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 2666, "mutability": "mutable", "name": "data", "nameLocation": "1249:4:8", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1234:19:8", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 2665, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1234:5:8", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "1133:126:8" }, "returnParameters": { "id": 2670, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2669, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2671, "src": "1278:6:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 2668, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1278:6:8", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "1277:8:8" }, "scope": 2690, "src": "1107:179:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "documentation": { "id": 2672, "nodeType": "StructuredDocumentation", "src": "1292:994:8", "text": " @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated.\n NOTE: To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed" }, "functionSelector": "bc197c81", "id": 2689, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155BatchReceived", "nameLocation": "2300:22:8", "nodeType": "FunctionDefinition", "parameters": { "id": 2685, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2674, "mutability": "mutable", "name": "operator", "nameLocation": "2340:8:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2332:16:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2673, "name": "address", "nodeType": "ElementaryTypeName", "src": "2332:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2676, "mutability": "mutable", "name": "from", "nameLocation": "2366:4:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2358:12:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2675, "name": "address", "nodeType": "ElementaryTypeName", "src": "2358:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 2679, "mutability": "mutable", "name": "ids", "nameLocation": "2399:3:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2380:22:8", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 2677, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2380:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2678, "nodeType": "ArrayTypeName", "src": "2380:9:8", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" }, { "constant": false, "id": 2682, "mutability": "mutable", "name": "values", "nameLocation": "2431:6:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2412:25:8", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 2680, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2412:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2681, "nodeType": "ArrayTypeName", "src": "2412:9:8", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" }, { "constant": false, "id": 2684, "mutability": "mutable", "name": "data", "nameLocation": "2462:4:8", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2447:19:8", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 2683, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2447:5:8", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "2322:150:8" }, "returnParameters": { "id": 2688, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2687, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2689, "src": "2491:6:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 2686, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "2491:6:8", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "2490:8:8" }, "scope": 2690, "src": "2291:208:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 2691, "src": "232:2269:8", "usedErrors": [] } ], "src": "118:2384:8" }, "compiler": { "name": "solc", "version": "0.8.10+commit.fc410830.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.4.4", "updatedAt": "2022-08-17T06:09:48.112Z", "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": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }