@vporton/future-contracts
Version:
Ethereum accounts bid on future financing (essentially, transfer money from the future) - smart contracts
938 lines • 42.5 kB
JSON
{
"contractName": "ERC1155TokenReceiver",
"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\":{\"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\":{\"/home/user/Projects/future-contracts/contracts/ERC1155/ERC1155TokenReceiver.sol\":\"ERC1155TokenReceiver\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"/home/user/Projects/future-contracts/contracts/ERC1155/ERC1155TokenReceiver.sol\":{\"keccak256\":\"0x536d5df7ff8865f35b0f37f45cca74a23de682f3d207607cac46275a65063557\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://581542ce79abdf2ccae7db3c6a1ef2a1aebf79ebf64c3e8ff33fcca6277e4edc\",\"dweb:/ipfs/QmXp4QYLpKusJFyP2TmbA42p1t8m4xSs5CRRuzNTa6TDxF\"]},\"/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/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\"]}},\"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 \"./IERC1155TokenReceiver.sol\";\nimport \"@openzeppelin/contracts/introspection/ERC165.sol\";\n\nabstract contract ERC1155TokenReceiver is ERC165, IERC1155TokenReceiver {\n constructor() {\n _registerInterface(\n ERC1155TokenReceiver(0).onERC1155Received.selector ^\n ERC1155TokenReceiver(0).onERC1155BatchReceived.selector\n );\n }\n}\n",
"sourcePath": "/home/user/Projects/future-contracts/contracts/ERC1155/ERC1155TokenReceiver.sol",
"ast": {
"absolutePath": "/home/user/Projects/future-contracts/contracts/ERC1155/ERC1155TokenReceiver.sol",
"exportedSymbols": {
"ERC1155TokenReceiver": [
3323
],
"ERC165": [
4381
],
"IERC1155TokenReceiver": [
3809
],
"IERC165": [
4393
]
},
"id": 3324,
"license": "LGPL-3.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3298,
"literals": [
"solidity",
"^",
"0.7",
".1"
],
"nodeType": "PragmaDirective",
"src": "46:23:6"
},
{
"absolutePath": "/home/user/Projects/future-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol",
"file": "./IERC1155TokenReceiver.sol",
"id": 3299,
"nodeType": "ImportDirective",
"scope": 3324,
"sourceUnit": 3810,
"src": "71:37:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/introspection/ERC165.sol",
"file": "@openzeppelin/contracts/introspection/ERC165.sol",
"id": 3300,
"nodeType": "ImportDirective",
"scope": 3324,
"sourceUnit": 4382,
"src": "109:58:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": true,
"baseContracts": [
{
"baseName": {
"id": 3301,
"name": "ERC165",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4381,
"src": "211:6:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC165_$4381",
"typeString": "contract ERC165"
}
},
"id": 3302,
"nodeType": "InheritanceSpecifier",
"src": "211:6:6"
},
{
"baseName": {
"id": 3303,
"name": "IERC1155TokenReceiver",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3809,
"src": "219:21:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC1155TokenReceiver_$3809",
"typeString": "contract IERC1155TokenReceiver"
}
},
"id": 3304,
"nodeType": "InheritanceSpecifier",
"src": "219:21:6"
}
],
"contractDependencies": [
3809,
4381,
4393
],
"contractKind": "contract",
"fullyImplemented": false,
"id": 3323,
"linearizedBaseContracts": [
3323,
3809,
4381,
4393
],
"name": "ERC1155TokenReceiver",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 3321,
"nodeType": "Block",
"src": "261:179:6",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 3318,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"arguments": [
{
"hexValue": "30",
"id": 3309,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "324:1:6",
"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": 3308,
"name": "ERC1155TokenReceiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3323,
"src": "303:20:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$3323_$",
"typeString": "type(contract ERC1155TokenReceiver)"
}
},
"id": 3310,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "303:23:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC1155TokenReceiver_$3323",
"typeString": "contract ERC1155TokenReceiver"
}
},
"id": 3311,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "onERC1155Received",
"nodeType": "MemberAccess",
"referencedDeclaration": 3790,
"src": "303:41:6",
"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": 3312,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "selector",
"nodeType": "MemberAccess",
"src": "303:50:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "^",
"rightExpression": {
"expression": {
"expression": {
"arguments": [
{
"hexValue": "30",
"id": 3314,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "389:1:6",
"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": 3313,
"name": "ERC1155TokenReceiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3323,
"src": "368:20:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$3323_$",
"typeString": "type(contract ERC1155TokenReceiver)"
}
},
"id": 3315,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "368:23:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC1155TokenReceiver_$3323",
"typeString": "contract ERC1155TokenReceiver"
}
},
"id": 3316,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "onERC1155BatchReceived",
"nodeType": "MemberAccess",
"referencedDeclaration": 3808,
"src": "368:46:6",
"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": 3317,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "selector",
"nodeType": "MemberAccess",
"src": "368:55:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "303:120:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 3307,
"name": "_registerInterface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4380,
"src": "271:18:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes4_$returns$__$",
"typeString": "function (bytes4)"
}
},
"id": 3319,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "271:162:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3320,
"nodeType": "ExpressionStatement",
"src": "271:162:6"
}
]
},
"id": 3322,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3305,
"nodeType": "ParameterList",
"parameters": [],
"src": "258:2:6"
},
"returnParameters": {
"id": 3306,
"nodeType": "ParameterList",
"parameters": [],
"src": "261:0:6"
},
"scope": 3323,
"src": "247:193:6",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"scope": 3324,
"src": "169:273:6"
}
],
"src": "46:397:6"
},
"legacyAST": {
"attributes": {
"absolutePath": "/home/user/Projects/future-contracts/contracts/ERC1155/ERC1155TokenReceiver.sol",
"exportedSymbols": {
"ERC1155TokenReceiver": [
3323
],
"ERC165": [
4381
],
"IERC1155TokenReceiver": [
3809
],
"IERC165": [
4393
]
},
"license": "LGPL-3.0-or-later"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.7",
".1"
]
},
"id": 3298,
"name": "PragmaDirective",
"src": "46:23:6"
},
{
"attributes": {
"SourceUnit": 3810,
"absolutePath": "/home/user/Projects/future-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol",
"file": "./IERC1155TokenReceiver.sol",
"scope": 3324,
"symbolAliases": [
null
],
"unitAlias": ""
},
"id": 3299,
"name": "ImportDirective",
"src": "71:37:6"
},
{
"attributes": {
"SourceUnit": 4382,
"absolutePath": "@openzeppelin/contracts/introspection/ERC165.sol",
"file": "@openzeppelin/contracts/introspection/ERC165.sol",
"scope": 3324,
"symbolAliases": [
null
],
"unitAlias": ""
},
"id": 3300,
"name": "ImportDirective",
"src": "109:58:6"
},
{
"attributes": {
"abstract": true,
"contractDependencies": [
3809,
4381,
4393
],
"contractKind": "contract",
"fullyImplemented": false,
"linearizedBaseContracts": [
3323,
3809,
4381,
4393
],
"name": "ERC1155TokenReceiver",
"scope": 3324
},
"children": [
{
"attributes": {},
"children": [
{
"attributes": {
"name": "ERC165",
"referencedDeclaration": 4381,
"type": "contract ERC165"
},
"id": 3301,
"name": "UserDefinedTypeName",
"src": "211:6:6"
}
],
"id": 3302,
"name": "InheritanceSpecifier",
"src": "211:6:6"
},
{
"attributes": {},
"children": [
{
"attributes": {
"name": "IERC1155TokenReceiver",
"referencedDeclaration": 3809,
"type": "contract IERC1155TokenReceiver"
},
"id": 3303,
"name": "UserDefinedTypeName",
"src": "219:21:6"
}
],
"id": 3304,
"name": "InheritanceSpecifier",
"src": "219:21:6"
},
{
"attributes": {
"implemented": true,
"isConstructor": true,
"kind": "constructor",
"modifiers": [
null
],
"name": "",
"scope": 3323,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 3305,
"name": "ParameterList",
"src": "258:2:6"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 3306,
"name": "ParameterList",
"src": "261:0:6"
},
{
"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": 3307,
"name": "Identifier",
"src": "271:18:6"
},
{
"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": 3790,
"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 ERC1155TokenReceiver",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3323,
"type": "type(contract ERC1155TokenReceiver)",
"value": "ERC1155TokenReceiver"
},
"id": 3308,
"name": "Identifier",
"src": "303:20:6"
},
{
"attributes": {
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 3309,
"name": "Literal",
"src": "324:1:6"
}
],
"id": 3310,
"name": "FunctionCall",
"src": "303:23:6"
}
],
"id": 3311,
"name": "MemberAccess",
"src": "303:41:6"
}
],
"id": 3312,
"name": "MemberAccess",
"src": "303:50:6"
},
{
"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": 3808,
"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 ERC1155TokenReceiver",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3323,
"type": "type(contract ERC1155TokenReceiver)",
"value": "ERC1155TokenReceiver"
},
"id": 3313,
"name": "Identifier",
"src": "368:20:6"
},
{
"attributes": {
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 3314,
"name": "Literal",
"src": "389:1:6"
}
],
"id": 3315,
"name": "FunctionCall",
"src": "368:23:6"
}
],
"id": 3316,
"name": "MemberAccess",
"src": "368:46:6"
}
],
"id": 3317,
"name": "MemberAccess",
"src": "368:55:6"
}
],
"id": 3318,
"name": "BinaryOperation",
"src": "303:120:6"
}
],
"id": 3319,
"name": "FunctionCall",
"src": "271:162:6"
}
],
"id": 3320,
"name": "ExpressionStatement",
"src": "271:162:6"
}
],
"id": 3321,
"name": "Block",
"src": "261:179:6"
}
],
"id": 3322,
"name": "FunctionDefinition",
"src": "247:193:6"
}
],
"id": 3323,
"name": "ContractDefinition",
"src": "169:273:6"
}
],
"id": 3324,
"name": "SourceUnit",
"src": "46:397:6"
},
"compiler": {
"name": "solc",
"version": "0.7.6+commit.7338295f.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.1",
"updatedAt": "2021-06-03T23:56:22.294Z",
"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": "See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas."
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}