UNPKG

@vporton/future-contracts

Version:

Ethereum accounts bid on future financing (essentially, transfer money from the future) - smart contracts

1,150 lines 50.3 kB
{ "contractName": "IERC1155TokenReceiver", "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\":{\"details\":\"See https://eips.ethereum.org/EIPS/eip-1155\",\"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.\"}},\"title\":\"ERC-1155 Multi Token Receiver Interface\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/user/Projects/future-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol\":\"IERC1155TokenReceiver\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"/home/user/Projects/future-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol\":{\"keccak256\":\"0x98ca1a630f95be9e74f5d1d40e108f38ffcdf8ec0ca90068e43dab203777ba96\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://37c61c32fd3932bd37aa8e984e446acf0bdcdc0855ae92c69a95b9ce4e2fa8cc\",\"dweb:/ipfs/QmbgBBkmGhTjJcbQo5KwRY2P77AtZ9y8zuAxVohVSNEhnc\"]},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c\",\"dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\npragma solidity ^0.7.1;\n\nimport \"@openzeppelin/contracts/introspection/IERC165.sol\";\n\n/**\n @title ERC-1155 Multi Token Receiver Interface\n @dev See https://eips.ethereum.org/EIPS/eip-1155\n*/\nabstract contract IERC1155TokenReceiver 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 virtual\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 virtual\n returns(bytes4);\n}\n", "sourcePath": "/home/user/Projects/future-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol", "ast": { "absolutePath": "/home/user/Projects/future-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol", "exportedSymbols": { "IERC1155TokenReceiver": [ 3809 ], "IERC165": [ 4393 ] }, "id": 3810, "license": "LGPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [ { "id": 3770, "literals": [ "solidity", "^", "0.7", ".1" ], "nodeType": "PragmaDirective", "src": "46:23:9" }, { "absolutePath": "@openzeppelin/contracts/introspection/IERC165.sol", "file": "@openzeppelin/contracts/introspection/IERC165.sol", "id": 3771, "nodeType": "ImportDirective", "scope": 3810, "sourceUnit": 4394, "src": "71:59:9", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 3773, "name": "IERC165", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4393, "src": "286:7:9", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC165_$4393", "typeString": "contract IERC165" } }, "id": 3774, "nodeType": "InheritanceSpecifier", "src": "286:7:9" } ], "contractDependencies": [ 4393 ], "contractKind": "contract", "documentation": { "id": 3772, "nodeType": "StructuredDocumentation", "src": "132:110:9", "text": "@title ERC-1155 Multi Token Receiver Interface\n@dev See https://eips.ethereum.org/EIPS/eip-1155" }, "fullyImplemented": false, "id": 3809, "linearizedBaseContracts": [ 3809, 4393 ], "name": "IERC1155TokenReceiver", "nodeType": "ContractDefinition", "nodes": [ { "documentation": { "id": 3775, "nodeType": "StructuredDocumentation", "src": "301:816:9", "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": 3790, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155Received", "nodeType": "FunctionDefinition", "parameters": { "id": 3786, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3777, "mutability": "mutable", "name": "operator", "nodeType": "VariableDeclaration", "scope": 3790, "src": "1158:16:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3776, "name": "address", "nodeType": "ElementaryTypeName", "src": "1158:7:9", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 3779, "mutability": "mutable", "name": "from", "nodeType": "VariableDeclaration", "scope": 3790, "src": "1184:12:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3778, "name": "address", "nodeType": "ElementaryTypeName", "src": "1184:7:9", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 3781, "mutability": "mutable", "name": "id", "nodeType": "VariableDeclaration", "scope": 3790, "src": "1206:10:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3780, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1206:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 3783, "mutability": "mutable", "name": "value", "nodeType": "VariableDeclaration", "scope": 3790, "src": "1226:13:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3782, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1226:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 3785, "mutability": "mutable", "name": "data", "nodeType": "VariableDeclaration", "scope": 3790, "src": "1249:19:9", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 3784, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1249:5:9", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "1148:126:9" }, "returnParameters": { "id": 3789, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3788, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 3790, "src": "1316:6:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 3787, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1316:6:9", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "1315:8:9" }, "scope": 3809, "src": "1122:202:9", "stateMutability": "nonpayable", "virtual": true, "visibility": "external" }, { "documentation": { "id": 3791, "nodeType": "StructuredDocumentation", "src": "1330:977:9", "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": 3808, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155BatchReceived", "nodeType": "FunctionDefinition", "parameters": { "id": 3804, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3793, "mutability": "mutable", "name": "operator", "nodeType": "VariableDeclaration", "scope": 3808, "src": "2353:16:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3792, "name": "address", "nodeType": "ElementaryTypeName", "src": "2353:7:9", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 3795, "mutability": "mutable", "name": "from", "nodeType": "VariableDeclaration", "scope": 3808, "src": "2379:12:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3794, "name": "address", "nodeType": "ElementaryTypeName", "src": "2379:7:9", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 3798, "mutability": "mutable", "name": "ids", "nodeType": "VariableDeclaration", "scope": 3808, "src": "2401:22:9", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 3796, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2401:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 3797, "nodeType": "ArrayTypeName", "src": "2401:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" }, { "constant": false, "id": 3801, "mutability": "mutable", "name": "values", "nodeType": "VariableDeclaration", "scope": 3808, "src": "2433:25:9", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 3799, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2433:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 3800, "nodeType": "ArrayTypeName", "src": "2433:9:9", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" }, { "constant": false, "id": 3803, "mutability": "mutable", "name": "data", "nodeType": "VariableDeclaration", "scope": 3808, "src": "2468:19:9", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 3802, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2468:5:9", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "2343:150:9" }, "returnParameters": { "id": 3807, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3806, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "scope": 3808, "src": "2535:6:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 3805, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "2535:6:9", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "visibility": "internal" } ], "src": "2534:8:9" }, "scope": 3809, "src": "2312:231:9", "stateMutability": "nonpayable", "virtual": true, "visibility": "external" } ], "scope": 3810, "src": "243:2302:9" } ], "src": "46:2500:9" }, "legacyAST": { "attributes": { "absolutePath": "/home/user/Projects/future-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol", "exportedSymbols": { "IERC1155TokenReceiver": [ 3809 ], "IERC165": [ 4393 ] }, "license": "LGPL-3.0-or-later" }, "children": [ { "attributes": { "literals": [ "solidity", "^", "0.7", ".1" ] }, "id": 3770, "name": "PragmaDirective", "src": "46:23:9" }, { "attributes": { "SourceUnit": 4394, "absolutePath": "@openzeppelin/contracts/introspection/IERC165.sol", "file": "@openzeppelin/contracts/introspection/IERC165.sol", "scope": 3810, "symbolAliases": [ null ], "unitAlias": "" }, "id": 3771, "name": "ImportDirective", "src": "71:59:9" }, { "attributes": { "abstract": true, "contractDependencies": [ 4393 ], "contractKind": "contract", "fullyImplemented": false, "linearizedBaseContracts": [ 3809, 4393 ], "name": "IERC1155TokenReceiver", "scope": 3810 }, "children": [ { "attributes": { "text": "@title ERC-1155 Multi Token Receiver Interface\n@dev See https://eips.ethereum.org/EIPS/eip-1155" }, "id": 3772, "name": "StructuredDocumentation", "src": "132:110:9" }, { "attributes": {}, "children": [ { "attributes": { "name": "IERC165", "referencedDeclaration": 4393, "type": "contract IERC165" }, "id": 3773, "name": "UserDefinedTypeName", "src": "286:7:9" } ], "id": 3774, "name": "InheritanceSpecifier", "src": "286:7:9" }, { "attributes": { "functionSelector": "f23a6e61", "implemented": false, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "onERC1155Received", "scope": 3809, "stateMutability": "nonpayable", "virtual": true, "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": 3775, "name": "StructuredDocumentation", "src": "301:816:9" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "operator", "scope": 3790, "stateVariable": false, "storageLocation": "default", "type": "address", "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "stateMutability": "nonpayable", "type": "address" }, "id": 3776, "name": "ElementaryTypeName", "src": "1158:7:9" } ], "id": 3777, "name": "VariableDeclaration", "src": "1158:16:9" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "from", "scope": 3790, "stateVariable": false, "storageLocation": "default", "type": "address", "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "stateMutability": "nonpayable", "type": "address" }, "id": 3778, "name": "ElementaryTypeName", "src": "1184:7:9" } ], "id": 3779, "name": "VariableDeclaration", "src": "1184:12:9" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "id", "scope": 3790, "stateVariable": false, "storageLocation": "default", "type": "uint256", "visibility": "internal" }, "children": [ { "attributes": { "name": "uint256", "type": "uint256" }, "id": 3780, "name": "ElementaryTypeName", "src": "1206:7:9" } ], "id": 3781, "name": "VariableDeclaration", "src": "1206:10:9" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "value", "scope": 3790, "stateVariable": false, "storageLocation": "default", "type": "uint256", "visibility": "internal" }, "children": [ { "attributes": { "name": "uint256", "type": "uint256" }, "id": 3782, "name": "ElementaryTypeName", "src": "1226:7:9" } ], "id": 3783, "name": "VariableDeclaration", "src": "1226:13:9" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "data", "scope": 3790, "stateVariable": false, "storageLocation": "calldata", "type": "bytes", "visibility": "internal" }, "children": [ { "attributes": { "name": "bytes", "type": "bytes" }, "id": 3784, "name": "ElementaryTypeName", "src": "1249:5:9" } ], "id": 3785, "name": "VariableDeclaration", "src": "1249:19:9" } ], "id": 3786, "name": "ParameterList", "src": "1148:126:9" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "", "scope": 3790, "stateVariable": false, "storageLocation": "default", "type": "bytes4", "visibility": "internal" }, "children": [ { "attributes": { "name": "bytes4", "type": "bytes4" }, "id": 3787, "name": "ElementaryTypeName", "src": "1316:6:9" } ], "id": 3788, "name": "VariableDeclaration", "src": "1316:6:9" } ], "id": 3789, "name": "ParameterList", "src": "1315:8:9" } ], "id": 3790, "name": "FunctionDefinition", "src": "1122:202:9" }, { "attributes": { "functionSelector": "bc197c81", "implemented": false, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "onERC1155BatchReceived", "scope": 3809, "stateMutability": "nonpayable", "virtual": true, "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": 3791, "name": "StructuredDocumentation", "src": "1330:977:9" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "operator", "scope": 3808, "stateVariable": false, "storageLocation": "default", "type": "address", "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "stateMutability": "nonpayable", "type": "address" }, "id": 3792, "name": "ElementaryTypeName", "src": "2353:7:9" } ], "id": 3793, "name": "VariableDeclaration", "src": "2353:16:9" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "from", "scope": 3808, "stateVariable": false, "storageLocation": "default", "type": "address", "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "stateMutability": "nonpayable", "type": "address" }, "id": 3794, "name": "ElementaryTypeName", "src": "2379:7:9" } ], "id": 3795, "name": "VariableDeclaration", "src": "2379:12:9" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "ids", "scope": 3808, "stateVariable": false, "storageLocation": "calldata", "type": "uint256[]", "visibility": "internal" }, "children": [ { "attributes": { "type": "uint256[]" }, "children": [ { "attributes": { "name": "uint256", "type": "uint256" }, "id": 3796, "name": "ElementaryTypeName", "src": "2401:7:9" } ], "id": 3797, "name": "ArrayTypeName", "src": "2401:9:9" } ], "id": 3798, "name": "VariableDeclaration", "src": "2401:22:9" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "values", "scope": 3808, "stateVariable": false, "storageLocation": "calldata", "type": "uint256[]", "visibility": "internal" }, "children": [ { "attributes": { "type": "uint256[]" }, "children": [ { "attributes": { "name": "uint256", "type": "uint256" }, "id": 3799, "name": "ElementaryTypeName", "src": "2433:7:9" } ], "id": 3800, "name": "ArrayTypeName", "src": "2433:9:9" } ], "id": 3801, "name": "VariableDeclaration", "src": "2433:25:9" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "data", "scope": 3808, "stateVariable": false, "storageLocation": "calldata", "type": "bytes", "visibility": "internal" }, "children": [ { "attributes": { "name": "bytes", "type": "bytes" }, "id": 3802, "name": "ElementaryTypeName", "src": "2468:5:9" } ], "id": 3803, "name": "VariableDeclaration", "src": "2468:19:9" } ], "id": 3804, "name": "ParameterList", "src": "2343:150:9" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "", "scope": 3808, "stateVariable": false, "storageLocation": "default", "type": "bytes4", "visibility": "internal" }, "children": [ { "attributes": { "name": "bytes4", "type": "bytes4" }, "id": 3805, "name": "ElementaryTypeName", "src": "2535:6:9" } ], "id": 3806, "name": "VariableDeclaration", "src": "2535:6:9" } ], "id": 3807, "name": "ParameterList", "src": "2534:8:9" } ], "id": 3808, "name": "FunctionDefinition", "src": "2312:231:9" } ], "id": 3809, "name": "ContractDefinition", "src": "243:2302:9" } ], "id": 3810, "name": "SourceUnit", "src": "46:2500:9" }, "compiler": { "name": "solc", "version": "0.7.6+commit.7338295f.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.4.1", "updatedAt": "2021-06-03T23:56:22.301Z", "devdoc": { "details": "See https://eips.ethereum.org/EIPS/eip-1155", "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/