@vporton/future-contracts
Version:
Ethereum accounts bid on future financing (essentially, transfer money from the future) - smart contracts
959 lines • 42.7 kB
JSON
{
"contractName": "ERC1155Receiver",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "ids",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "values",
"type": "uint256[]"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "onERC1155BatchReceived",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "onERC1155Received",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.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\":\"_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. 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\":\"See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\":\"ERC1155Receiver\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"keccak256\":\"0xd6b90e604fb2eb2d641c7110c72440bf2dc999ec6ab8ff60f200e71ca75d1d90\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7b92d8ab83b21ff984b1f0d6d66897d5afb1f2052004cbcb133cea023e0ae468\",\"dweb:/ipfs/QmTarypkQrFp4UMjTh7Zzhz2nZLz5uPS4nJQtHDEuwBVe6\"]},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c\",\"dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je\"]},\"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\":{\"keccak256\":\"0xfce008c2ddf19a62e29e056fdddfa10204b19417ae0f711913703e4ee9dec92c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://37a7bb9249c0e8aaecd0c6f33fae7f03d15aebb015f5f7f1face393cfd58d75b\",\"dweb:/ipfs/QmevqbHb43sTLnpWzrGW9WvWvktMzuP5EzYHhqZox2A5v3\"]},\"@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 \"./IERC1155Receiver.sol\";\nimport \"../../introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n constructor() internal {\n _registerInterface(\n ERC1155Receiver(0).onERC1155Received.selector ^\n ERC1155Receiver(0).onERC1155BatchReceived.selector\n );\n }\n}\n",
"sourcePath": "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol",
"exportedSymbols": {
"ERC1155Receiver": [
4668
],
"ERC165": [
4381
],
"IERC1155Receiver": [
4846
],
"IERC165": [
4393
]
},
"id": 4669,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4642,
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "33:31:22"
},
{
"absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol",
"file": "./IERC1155Receiver.sol",
"id": 4643,
"nodeType": "ImportDirective",
"scope": 4669,
"sourceUnit": 4847,
"src": "66:32:22",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/introspection/ERC165.sol",
"file": "../../introspection/ERC165.sol",
"id": 4644,
"nodeType": "ImportDirective",
"scope": 4669,
"sourceUnit": 4382,
"src": "99:40:22",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 4646,
"name": "ERC165",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4381,
"src": "218:6:22",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC165_$4381",
"typeString": "contract ERC165"
}
},
"id": 4647,
"nodeType": "InheritanceSpecifier",
"src": "218:6:22"
},
{
"baseName": {
"id": 4648,
"name": "IERC1155Receiver",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4846,
"src": "226:16:22",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC1155Receiver_$4846",
"typeString": "contract IERC1155Receiver"
}
},
"id": 4649,
"nodeType": "InheritanceSpecifier",
"src": "226:16:22"
}
],
"contractDependencies": [
4381,
4393,
4846
],
"contractKind": "contract",
"documentation": {
"id": 4645,
"nodeType": "StructuredDocumentation",
"src": "141:39:22",
"text": " @dev _Available since v3.1._"
},
"fullyImplemented": false,
"id": 4668,
"linearizedBaseContracts": [
4668,
4846,
4381,
4393
],
"name": "ERC1155Receiver",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4666,
"nodeType": "Block",
"src": "272:169:22",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 4663,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"arguments": [
{
"hexValue": "30",
"id": 4654,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "330:1:22",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 4653,
"name": "ERC1155Receiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4668,
"src": "314:15:22",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC1155Receiver_$4668_$",
"typeString": "type(contract ERC1155Receiver)"
}
},
"id": 4655,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "314:18:22",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC1155Receiver_$4668",
"typeString": "contract ERC1155Receiver"
}
},
"id": 4656,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "onERC1155Received",
"nodeType": "MemberAccess",
"referencedDeclaration": 4827,
"src": "314:36:22",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$",
"typeString": "function (address,address,uint256,uint256,bytes memory) external returns (bytes4)"
}
},
"id": 4657,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "selector",
"nodeType": "MemberAccess",
"src": "314:45:22",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"expression": {
"expression": {
"arguments": [
{
"hexValue": "30",
"id": 4659,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "390:1:22",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 4658,
"name": "ERC1155Receiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4668,
"src": "374:15:22",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC1155Receiver_$4668_$",
"typeString": "type(contract ERC1155Receiver)"
}
},
"id": 4660,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "374:18:22",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC1155Receiver_$4668",
"typeString": "contract ERC1155Receiver"
}
},
"id": 4661,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "onERC1155BatchReceived",
"nodeType": "MemberAccess",
"referencedDeclaration": 4845,
"src": "374:41:22",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes4_$",
"typeString": "function (address,address,uint256[] memory,uint256[] memory,bytes memory) external returns (bytes4)"
}
},
"id": 4662,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "selector",
"nodeType": "MemberAccess",
"src": "374:50:22",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "314:110:22",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 4652,
"name": "_registerInterface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4380,
"src": "282:18:22",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes4_$returns$__$",
"typeString": "function (bytes4)"
}
},
"id": 4664,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "282:152:22",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4665,
"nodeType": "ExpressionStatement",
"src": "282:152:22"
}
]
},
"id": 4667,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4650,
"nodeType": "ParameterList",
"parameters": [],
"src": "260:2:22"
},
"returnParameters": {
"id": 4651,
"nodeType": "ParameterList",
"parameters": [],
"src": "272:0:22"
},
"scope": 4668,
"src": "249:192:22",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"scope": 4669,
"src": "181:262:22"
}
],
"src": "33:411:22"
},
"legacyAST": {
"attributes": {
"absolutePath": "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol",
"exportedSymbols": {
"ERC1155Receiver": [
4668
],
"ERC165": [
4381
],
"IERC1155Receiver": [
4846
],
"IERC165": [
4393
]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
]
},
"id": 4642,
"name": "PragmaDirective",
"src": "33:31:22"
},
{
"attributes": {
"SourceUnit": 4847,
"absolutePath": "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol",
"file": "./IERC1155Receiver.sol",
"scope": 4669,
"symbolAliases": [
null
],
"unitAlias": ""
},
"id": 4643,
"name": "ImportDirective",
"src": "66:32:22"
},
{
"attributes": {
"SourceUnit": 4382,
"absolutePath": "@openzeppelin/contracts/introspection/ERC165.sol",
"file": "../../introspection/ERC165.sol",
"scope": 4669,
"symbolAliases": [
null
],
"unitAlias": ""
},
"id": 4644,
"name": "ImportDirective",
"src": "99:40:22"
},
{
"attributes": {
"abstract": true,
"contractDependencies": [
4381,
4393,
4846
],
"contractKind": "contract",
"fullyImplemented": false,
"linearizedBaseContracts": [
4668,
4846,
4381,
4393
],
"name": "ERC1155Receiver",
"scope": 4669
},
"children": [
{
"attributes": {
"text": " @dev _Available since v3.1._"
},
"id": 4645,
"name": "StructuredDocumentation",
"src": "141:39:22"
},
{
"attributes": {},
"children": [
{
"attributes": {
"name": "ERC165",
"referencedDeclaration": 4381,
"type": "contract ERC165"
},
"id": 4646,
"name": "UserDefinedTypeName",
"src": "218:6:22"
}
],
"id": 4647,
"name": "InheritanceSpecifier",
"src": "218:6:22"
},
{
"attributes": {},
"children": [
{
"attributes": {
"name": "IERC1155Receiver",
"referencedDeclaration": 4846,
"type": "contract IERC1155Receiver"
},
"id": 4648,
"name": "UserDefinedTypeName",
"src": "226:16:22"
}
],
"id": 4649,
"name": "InheritanceSpecifier",
"src": "226:16:22"
},
{
"attributes": {
"implemented": true,
"isConstructor": true,
"kind": "constructor",
"modifiers": [
null
],
"name": "",
"scope": 4668,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 4650,
"name": "ParameterList",
"src": "260:2:22"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 4651,
"name": "ParameterList",
"src": "272:0:22"
},
{
"children": [
{
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4380,
"type": "function (bytes4)",
"value": "_registerInterface"
},
"id": 4652,
"name": "Identifier",
"src": "282:18:22"
},
{
"attributes": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"operator": "^",
"type": "bytes4"
},
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"member_name": "selector",
"type": "bytes4"
},
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "onERC1155Received",
"referencedDeclaration": 4827,
"type": "function (address,address,uint256,uint256,bytes memory) external returns (bytes4)"
},
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "contract ERC1155Receiver",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4668,
"type": "type(contract ERC1155Receiver)",
"value": "ERC1155Receiver"
},
"id": 4653,
"name": "Identifier",
"src": "314:15:22"
},
{
"attributes": {
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 4654,
"name": "Literal",
"src": "330:1:22"
}
],
"id": 4655,
"name": "FunctionCall",
"src": "314:18:22"
}
],
"id": 4656,
"name": "MemberAccess",
"src": "314:36:22"
}
],
"id": 4657,
"name": "MemberAccess",
"src": "314:45:22"
},
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"member_name": "selector",
"type": "bytes4"
},
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "onERC1155BatchReceived",
"referencedDeclaration": 4845,
"type": "function (address,address,uint256[] memory,uint256[] memory,bytes memory) external returns (bytes4)"
},
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "contract ERC1155Receiver",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4668,
"type": "type(contract ERC1155Receiver)",
"value": "ERC1155Receiver"
},
"id": 4658,
"name": "Identifier",
"src": "374:15:22"
},
{
"attributes": {
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 4659,
"name": "Literal",
"src": "390:1:22"
}
],
"id": 4660,
"name": "FunctionCall",
"src": "374:18:22"
}
],
"id": 4661,
"name": "MemberAccess",
"src": "374:41:22"
}
],
"id": 4662,
"name": "MemberAccess",
"src": "374:50:22"
}
],
"id": 4663,
"name": "BinaryOperation",
"src": "314:110:22"
}
],
"id": 4664,
"name": "FunctionCall",
"src": "282:152:22"
}
],
"id": 4665,
"name": "ExpressionStatement",
"src": "282:152:22"
}
],
"id": 4666,
"name": "Block",
"src": "272:169:22"
}
],
"id": 4667,
"name": "FunctionDefinition",
"src": "249:192:22"
}
],
"id": 4668,
"name": "ContractDefinition",
"src": "181:262:22"
}
],
"id": 4669,
"name": "SourceUnit",
"src": "33:411:22"
},
"compiler": {
"name": "solc",
"version": "0.7.6+commit.7338295f.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.1",
"updatedAt": "2021-06-03T23:56:22.337Z",
"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. 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": "See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas."
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}