@vporton/future-contracts
Version:
Ethereum accounts bid on future financing (essentially, transfer money from the future) - smart contracts
1,166 lines • 49.9 kB
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.7.6+commit.7338295f\"},\"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\":{\"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. 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. 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\":{},\"notice\":\"_Available since v3.1._\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":\"IERC1155Receiver\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c\",\"dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je\"]},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"keccak256\":\"0x2690a9b7f4f7489b8d25a4fc6bffc02ec3971fb41ed6c8b59adef2833bdab07c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8148c99452b6793ac9599abdc8bdaf4eeb47f34590beea8aa01089be14e2990c\",\"dweb:/ipfs/QmNdenmZ4EDfH9TuBas3pHeGuZvDNo2rsfgUj6ka8vuH37\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n\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 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\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n )\n external\n 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. 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\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n )\n external\n returns(bytes4);\n}\n",
"sourcePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol",
"exportedSymbols": {
"IERC1155Receiver": [
4846
],
"IERC165": [
4393
]
},
"id": 4847,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4807,
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "33:31:25"
},
{
"absolutePath": "@openzeppelin/contracts/introspection/IERC165.sol",
"file": "../../introspection/IERC165.sol",
"id": 4808,
"nodeType": "ImportDirective",
"scope": 4847,
"sourceUnit": 4394,
"src": "66:41:25",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 4810,
"name": "IERC165",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4393,
"src": "174:7:25",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC165_$4393",
"typeString": "contract IERC165"
}
},
"id": 4811,
"nodeType": "InheritanceSpecifier",
"src": "174:7:25"
}
],
"contractDependencies": [
4393
],
"contractKind": "interface",
"documentation": {
"id": 4809,
"nodeType": "StructuredDocumentation",
"src": "109:34:25",
"text": " _Available since v3.1._"
},
"fullyImplemented": false,
"id": 4846,
"linearizedBaseContracts": [
4846,
4393
],
"name": "IERC1155Receiver",
"nodeType": "ContractDefinition",
"nodes": [
{
"documentation": {
"id": 4812,
"nodeType": "StructuredDocumentation",
"src": "189:816:25",
"text": "@dev Handles the receipt of a single ERC1155 token type. This function is\ncalled at the end of a `safeTransferFrom` after the balance has been updated.\nTo 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": 4827,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "onERC1155Received",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4823,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4814,
"mutability": "mutable",
"name": "operator",
"nodeType": "VariableDeclaration",
"scope": 4827,
"src": "1046:16:25",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4813,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1046:7:25",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4816,
"mutability": "mutable",
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 4827,
"src": "1072:12:25",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4815,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1072:7:25",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4818,
"mutability": "mutable",
"name": "id",
"nodeType": "VariableDeclaration",
"scope": 4827,
"src": "1094:10:25",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4817,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1094:7:25",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4820,
"mutability": "mutable",
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 4827,
"src": "1114:13:25",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4819,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1114:7:25",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4822,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 4827,
"src": "1137:19:25",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 4821,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1137:5:25",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1036:126:25"
},
"returnParameters": {
"id": 4826,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4825,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4827,
"src": "1196:6:25",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 4824,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "1196:6:25",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "1195:8:25"
},
"scope": 4846,
"src": "1010:194:25",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 4828,
"nodeType": "StructuredDocumentation",
"src": "1210:977:25",
"text": "@dev Handles the receipt of a multiple ERC1155 token types. This function\nis called at the end of a `safeBatchTransferFrom` after the balances have\nbeen updated. 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": 4845,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "onERC1155BatchReceived",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4841,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4830,
"mutability": "mutable",
"name": "operator",
"nodeType": "VariableDeclaration",
"scope": 4845,
"src": "2233:16:25",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4829,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2233:7:25",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4832,
"mutability": "mutable",
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 4845,
"src": "2259:12:25",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4831,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2259:7:25",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4835,
"mutability": "mutable",
"name": "ids",
"nodeType": "VariableDeclaration",
"scope": 4845,
"src": "2281:22:25",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 4833,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2281:7:25",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4834,
"nodeType": "ArrayTypeName",
"src": "2281:9:25",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4838,
"mutability": "mutable",
"name": "values",
"nodeType": "VariableDeclaration",
"scope": 4845,
"src": "2313:25:25",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 4836,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2313:7:25",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4837,
"nodeType": "ArrayTypeName",
"src": "2313:9:25",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4840,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 4845,
"src": "2348:19:25",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 4839,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2348:5:25",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "2223:150:25"
},
"returnParameters": {
"id": 4844,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4843,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4845,
"src": "2407:6:25",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 4842,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "2407:6:25",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "2406:8:25"
},
"scope": 4846,
"src": "2192:223:25",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 4847,
"src": "144:2273:25"
}
],
"src": "33:2385:25"
},
"legacyAST": {
"attributes": {
"absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol",
"exportedSymbols": {
"IERC1155Receiver": [
4846
],
"IERC165": [
4393
]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
]
},
"id": 4807,
"name": "PragmaDirective",
"src": "33:31:25"
},
{
"attributes": {
"SourceUnit": 4394,
"absolutePath": "@openzeppelin/contracts/introspection/IERC165.sol",
"file": "../../introspection/IERC165.sol",
"scope": 4847,
"symbolAliases": [
null
],
"unitAlias": ""
},
"id": 4808,
"name": "ImportDirective",
"src": "66:41:25"
},
{
"attributes": {
"abstract": false,
"contractDependencies": [
4393
],
"contractKind": "interface",
"fullyImplemented": false,
"linearizedBaseContracts": [
4846,
4393
],
"name": "IERC1155Receiver",
"scope": 4847
},
"children": [
{
"attributes": {
"text": " _Available since v3.1._"
},
"id": 4809,
"name": "StructuredDocumentation",
"src": "109:34:25"
},
{
"attributes": {},
"children": [
{
"attributes": {
"name": "IERC165",
"referencedDeclaration": 4393,
"type": "contract IERC165"
},
"id": 4810,
"name": "UserDefinedTypeName",
"src": "174:7:25"
}
],
"id": 4811,
"name": "InheritanceSpecifier",
"src": "174:7:25"
},
{
"attributes": {
"functionSelector": "f23a6e61",
"implemented": false,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "onERC1155Received",
"scope": 4846,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"attributes": {
"text": "@dev Handles the receipt of a single ERC1155 token type. This function is\ncalled at the end of a `safeTransferFrom` after the balance has been updated.\nTo 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"
},
"id": 4812,
"name": "StructuredDocumentation",
"src": "189:816:25"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "operator",
"scope": 4827,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 4813,
"name": "ElementaryTypeName",
"src": "1046:7:25"
}
],
"id": 4814,
"name": "VariableDeclaration",
"src": "1046:16:25"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "from",
"scope": 4827,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 4815,
"name": "ElementaryTypeName",
"src": "1072:7:25"
}
],
"id": 4816,
"name": "VariableDeclaration",
"src": "1072:12:25"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "id",
"scope": 4827,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 4817,
"name": "ElementaryTypeName",
"src": "1094:7:25"
}
],
"id": 4818,
"name": "VariableDeclaration",
"src": "1094:10:25"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "value",
"scope": 4827,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 4819,
"name": "ElementaryTypeName",
"src": "1114:7:25"
}
],
"id": 4820,
"name": "VariableDeclaration",
"src": "1114:13:25"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "data",
"scope": 4827,
"stateVariable": false,
"storageLocation": "calldata",
"type": "bytes",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 4821,
"name": "ElementaryTypeName",
"src": "1137:5:25"
}
],
"id": 4822,
"name": "VariableDeclaration",
"src": "1137:19:25"
}
],
"id": 4823,
"name": "ParameterList",
"src": "1036:126:25"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"scope": 4827,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes4",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes4",
"type": "bytes4"
},
"id": 4824,
"name": "ElementaryTypeName",
"src": "1196:6:25"
}
],
"id": 4825,
"name": "VariableDeclaration",
"src": "1196:6:25"
}
],
"id": 4826,
"name": "ParameterList",
"src": "1195:8:25"
}
],
"id": 4827,
"name": "FunctionDefinition",
"src": "1010:194:25"
},
{
"attributes": {
"functionSelector": "bc197c81",
"implemented": false,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "onERC1155BatchReceived",
"scope": 4846,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"attributes": {
"text": "@dev Handles the receipt of a multiple ERC1155 token types. This function\nis called at the end of a `safeBatchTransferFrom` after the balances have\nbeen updated. 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"
},
"id": 4828,
"name": "StructuredDocumentation",
"src": "1210:977:25"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "operator",
"scope": 4845,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 4829,
"name": "ElementaryTypeName",
"src": "2233:7:25"
}
],
"id": 4830,
"name": "VariableDeclaration",
"src": "2233:16:25"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "from",
"scope": 4845,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 4831,
"name": "ElementaryTypeName",
"src": "2259:7:25"
}
],
"id": 4832,
"name": "VariableDeclaration",
"src": "2259:12:25"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "ids",
"scope": 4845,
"stateVariable": false,
"storageLocation": "calldata",
"type": "uint256[]",
"visibility": "internal"
},
"children": [
{
"attributes": {
"type": "uint256[]"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 4833,
"name": "ElementaryTypeName",
"src": "2281:7:25"
}
],
"id": 4834,
"name": "ArrayTypeName",
"src": "2281:9:25"
}
],
"id": 4835,
"name": "VariableDeclaration",
"src": "2281:22:25"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "values",
"scope": 4845,
"stateVariable": false,
"storageLocation": "calldata",
"type": "uint256[]",
"visibility": "internal"
},
"children": [
{
"attributes": {
"type": "uint256[]"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 4836,
"name": "ElementaryTypeName",
"src": "2313:7:25"
}
],
"id": 4837,
"name": "ArrayTypeName",
"src": "2313:9:25"
}
],
"id": 4838,
"name": "VariableDeclaration",
"src": "2313:25:25"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "data",
"scope": 4845,
"stateVariable": false,
"storageLocation": "calldata",
"type": "bytes",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 4839,
"name": "ElementaryTypeName",
"src": "2348:5:25"
}
],
"id": 4840,
"name": "VariableDeclaration",
"src": "2348:19:25"
}
],
"id": 4841,
"name": "ParameterList",
"src": "2223:150:25"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "",
"scope": 4845,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes4",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes4",
"type": "bytes4"
},
"id": 4842,
"name": "ElementaryTypeName",
"src": "2407:6:25"
}
],
"id": 4843,
"name": "VariableDeclaration",
"src": "2407:6:25"
}
],
"id": 4844,
"name": "ParameterList",
"src": "2406:8:25"
}
],
"id": 4845,
"name": "FunctionDefinition",
"src": "2192:223:25"
}
],
"id": 4846,
"name": "ContractDefinition",
"src": "144:2273:25"
}
],
"id": 4847,
"name": "SourceUnit",
"src": "33:2385:25"
},
"compiler": {
"name": "solc",
"version": "0.7.6+commit.7338295f.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.1",
"updatedAt": "2021-06-03T23:56:22.338Z",
"devdoc": {
"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. 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. 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": {},
"notice": "_Available since v3.1._",
"version": 1
}
}