becrypto/build/contracts/IERC1155Receiver.json
2023-06-21 14:46:19 +08:00

1152 lines
50 KiB
JSON

{
"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": [
2880
],
"IERC165": [
6399
]
},
"id": 2881,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2841,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "118:23:11"
},
{
"absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol",
"file": "../../utils/introspection/IERC165.sol",
"id": 2842,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2881,
"sourceUnit": 6400,
"src": "143:47:11",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 2844,
"name": "IERC165",
"nodeType": "IdentifierPath",
"referencedDeclaration": 6399,
"src": "262:7:11"
},
"id": 2845,
"nodeType": "InheritanceSpecifier",
"src": "262:7:11"
}
],
"canonicalName": "IERC1155Receiver",
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 2843,
"nodeType": "StructuredDocumentation",
"src": "192:39:11",
"text": " @dev _Available since v3.1._"
},
"fullyImplemented": false,
"id": 2880,
"linearizedBaseContracts": [
2880,
6399
],
"name": "IERC1155Receiver",
"nameLocation": "242:16:11",
"nodeType": "ContractDefinition",
"nodes": [
{
"documentation": {
"id": 2846,
"nodeType": "StructuredDocumentation",
"src": "276:826:11",
"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": 2861,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "onERC1155Received",
"nameLocation": "1116:17:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2857,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2848,
"mutability": "mutable",
"name": "operator",
"nameLocation": "1151:8:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1143:16:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2847,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1143:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2850,
"mutability": "mutable",
"name": "from",
"nameLocation": "1177:4:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1169:12:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2849,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1169:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2852,
"mutability": "mutable",
"name": "id",
"nameLocation": "1199:2:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1191:10:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2851,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1191:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2854,
"mutability": "mutable",
"name": "value",
"nameLocation": "1219:5:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1211:13:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2853,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1211:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2856,
"mutability": "mutable",
"name": "data",
"nameLocation": "1249:4:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1234:19:11",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2855,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1234:5:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1133:126:11"
},
"returnParameters": {
"id": 2860,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2859,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1278:6:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2858,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "1278:6:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "1277:8:11"
},
"scope": 2880,
"src": "1107:179:11",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 2862,
"nodeType": "StructuredDocumentation",
"src": "1292:994:11",
"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": 2879,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "onERC1155BatchReceived",
"nameLocation": "2300:22:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2875,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2864,
"mutability": "mutable",
"name": "operator",
"nameLocation": "2340:8:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2332:16:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2863,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2332:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2866,
"mutability": "mutable",
"name": "from",
"nameLocation": "2366:4:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2358:12:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2865,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2358:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2869,
"mutability": "mutable",
"name": "ids",
"nameLocation": "2399:3:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2380:22:11",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 2867,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2380:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2868,
"nodeType": "ArrayTypeName",
"src": "2380:9:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2872,
"mutability": "mutable",
"name": "values",
"nameLocation": "2431:6:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2412:25:11",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 2870,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2412:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2871,
"nodeType": "ArrayTypeName",
"src": "2412:9:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2874,
"mutability": "mutable",
"name": "data",
"nameLocation": "2462:4:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2447:19:11",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2873,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2447:5:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "2322:150:11"
},
"returnParameters": {
"id": 2878,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2877,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2491:6:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2876,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "2491:6:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "2490:8:11"
},
"scope": 2880,
"src": "2291:208:11",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 2881,
"src": "232:2269:11",
"usedErrors": []
}
],
"src": "118:2384:11"
},
"legacyAST": {
"absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol",
"exportedSymbols": {
"IERC1155Receiver": [
2880
],
"IERC165": [
6399
]
},
"id": 2881,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2841,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "118:23:11"
},
{
"absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol",
"file": "../../utils/introspection/IERC165.sol",
"id": 2842,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 2881,
"sourceUnit": 6400,
"src": "143:47:11",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 2844,
"name": "IERC165",
"nodeType": "IdentifierPath",
"referencedDeclaration": 6399,
"src": "262:7:11"
},
"id": 2845,
"nodeType": "InheritanceSpecifier",
"src": "262:7:11"
}
],
"canonicalName": "IERC1155Receiver",
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 2843,
"nodeType": "StructuredDocumentation",
"src": "192:39:11",
"text": " @dev _Available since v3.1._"
},
"fullyImplemented": false,
"id": 2880,
"linearizedBaseContracts": [
2880,
6399
],
"name": "IERC1155Receiver",
"nameLocation": "242:16:11",
"nodeType": "ContractDefinition",
"nodes": [
{
"documentation": {
"id": 2846,
"nodeType": "StructuredDocumentation",
"src": "276:826:11",
"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": 2861,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "onERC1155Received",
"nameLocation": "1116:17:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2857,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2848,
"mutability": "mutable",
"name": "operator",
"nameLocation": "1151:8:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1143:16:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2847,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1143:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2850,
"mutability": "mutable",
"name": "from",
"nameLocation": "1177:4:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1169:12:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2849,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1169:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2852,
"mutability": "mutable",
"name": "id",
"nameLocation": "1199:2:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1191:10:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2851,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1191:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2854,
"mutability": "mutable",
"name": "value",
"nameLocation": "1219:5:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1211:13:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2853,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1211:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2856,
"mutability": "mutable",
"name": "data",
"nameLocation": "1249:4:11",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1234:19:11",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2855,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1234:5:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1133:126:11"
},
"returnParameters": {
"id": 2860,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2859,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2861,
"src": "1278:6:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2858,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "1278:6:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "1277:8:11"
},
"scope": 2880,
"src": "1107:179:11",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 2862,
"nodeType": "StructuredDocumentation",
"src": "1292:994:11",
"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": 2879,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "onERC1155BatchReceived",
"nameLocation": "2300:22:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2875,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2864,
"mutability": "mutable",
"name": "operator",
"nameLocation": "2340:8:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2332:16:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2863,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2332:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2866,
"mutability": "mutable",
"name": "from",
"nameLocation": "2366:4:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2358:12:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2865,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2358:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2869,
"mutability": "mutable",
"name": "ids",
"nameLocation": "2399:3:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2380:22:11",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 2867,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2380:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2868,
"nodeType": "ArrayTypeName",
"src": "2380:9:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2872,
"mutability": "mutable",
"name": "values",
"nameLocation": "2431:6:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2412:25:11",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 2870,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2412:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2871,
"nodeType": "ArrayTypeName",
"src": "2412:9:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2874,
"mutability": "mutable",
"name": "data",
"nameLocation": "2462:4:11",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2447:19:11",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2873,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2447:5:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "2322:150:11"
},
"returnParameters": {
"id": 2878,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2877,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 2879,
"src": "2491:6:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 2876,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "2491:6:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "2490:8:11"
},
"scope": 2880,
"src": "2291:208:11",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 2881,
"src": "232:2269:11",
"usedErrors": []
}
],
"src": "118:2384:11"
},
"compiler": {
"name": "solc",
"version": "0.8.10+commit.fc410830.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.4",
"updatedAt": "2023-06-21T06:18:19.634Z",
"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
}
}