UNPKG

@gnosis.pm/hg-contracts

Version:

Collection of smart contracts for the Gnosis prediction market platform

1,077 lines 43.3 kB
{ "contractName": "IERC1155TokenReceiver", "abi": [ { "constant": true, "inputs": [ { "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "operator", "type": "address" }, { "name": "from", "type": "address" }, { "name": "id", "type": "uint256" }, { "name": "value", "type": "uint256" }, { "name": "data", "type": "bytes" } ], "name": "onERC1155Received", "outputs": [ { "name": "", "type": "bytes4" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "operator", "type": "address" }, { "name": "from", "type": "address" }, { "name": "ids", "type": "uint256[]" }, { "name": "values", "type": "uint256[]" }, { "name": "data", "type": "bytes" } ], "name": "onERC1155BatchReceived", "outputs": [ { "name": "", "type": "bytes4" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "pragma solidity ^0.5.0;\n\nimport \"openzeppelin-solidity/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*/\ncontract 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\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": "/home/alan/src/github.com/gnosis/hg-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol", "ast": { "absolutePath": "/home/alan/src/github.com/gnosis/hg-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol", "exportedSymbols": { "IERC1155TokenReceiver": [ 778 ] }, "id": 779, "nodeType": "SourceUnit", "nodes": [ { "id": 742, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:3" }, { "absolutePath": "openzeppelin-solidity/contracts/introspection/IERC165.sol", "file": "openzeppelin-solidity/contracts/introspection/IERC165.sol", "id": 743, "nodeType": "ImportDirective", "scope": 779, "sourceUnit": 2560, "src": "25:67:3", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 744, "name": "IERC165", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2559, "src": "239:7:3", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC165_$2559", "typeString": "contract IERC165" } }, "id": 745, "nodeType": "InheritanceSpecifier", "src": "239:7:3" } ], "contractDependencies": [ 2559 ], "contractKind": "contract", "documentation": "@title ERC-1155 Multi Token Receiver Interface\n@dev See https://eips.ethereum.org/EIPS/eip-1155", "fullyImplemented": false, "id": 778, "linearizedBaseContracts": [ 778, 2559 ], "name": "IERC1155TokenReceiver", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": "@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": 760, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155Received", "nodeType": "FunctionDefinition", "parameters": { "id": 756, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 747, "name": "operator", "nodeType": "VariableDeclaration", "scope": 760, "src": "1111:16:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 746, "name": "address", "nodeType": "ElementaryTypeName", "src": "1111:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 749, "name": "from", "nodeType": "VariableDeclaration", "scope": 760, "src": "1137:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 748, "name": "address", "nodeType": "ElementaryTypeName", "src": "1137:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 751, "name": "id", "nodeType": "VariableDeclaration", "scope": 760, "src": "1159:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 750, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1159:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 753, "name": "value", "nodeType": "VariableDeclaration", "scope": 760, "src": "1179:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 752, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1179:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 755, "name": "data", "nodeType": "VariableDeclaration", "scope": 760, "src": "1202:19:3", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 754, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1202:5:3", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "1101:126:3" }, "returnParameters": { "id": 759, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 758, "name": "", "nodeType": "VariableDeclaration", "scope": 760, "src": "1261:6:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 757, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1261:6:3", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" } ], "src": "1260:8:3" }, "scope": 778, "src": "1075:194:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@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": 777, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155BatchReceived", "nodeType": "FunctionDefinition", "parameters": { "id": 773, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 762, "name": "operator", "nodeType": "VariableDeclaration", "scope": 777, "src": "2298:16:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 761, "name": "address", "nodeType": "ElementaryTypeName", "src": "2298:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 764, "name": "from", "nodeType": "VariableDeclaration", "scope": 777, "src": "2324:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 763, "name": "address", "nodeType": "ElementaryTypeName", "src": "2324:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 767, "name": "ids", "nodeType": "VariableDeclaration", "scope": 777, "src": "2346:22:3", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 765, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2346:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 766, "length": null, "nodeType": "ArrayTypeName", "src": "2346:9:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 770, "name": "values", "nodeType": "VariableDeclaration", "scope": 777, "src": "2378:25:3", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 768, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2378:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 769, "length": null, "nodeType": "ArrayTypeName", "src": "2378:9:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 772, "name": "data", "nodeType": "VariableDeclaration", "scope": 777, "src": "2413:19:3", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 771, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2413:5:3", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "2288:150:3" }, "returnParameters": { "id": 776, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 775, "name": "", "nodeType": "VariableDeclaration", "scope": 777, "src": "2472:6:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 774, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "2472:6:3", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" } ], "src": "2471:8:3" }, "scope": 778, "src": "2257:223:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], "scope": 779, "src": "205:2277:3" } ], "src": "0:2483:3" }, "legacyAST": { "absolutePath": "/home/alan/src/github.com/gnosis/hg-contracts/contracts/ERC1155/IERC1155TokenReceiver.sol", "exportedSymbols": { "IERC1155TokenReceiver": [ 778 ] }, "id": 779, "nodeType": "SourceUnit", "nodes": [ { "id": 742, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:3" }, { "absolutePath": "openzeppelin-solidity/contracts/introspection/IERC165.sol", "file": "openzeppelin-solidity/contracts/introspection/IERC165.sol", "id": 743, "nodeType": "ImportDirective", "scope": 779, "sourceUnit": 2560, "src": "25:67:3", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 744, "name": "IERC165", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2559, "src": "239:7:3", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC165_$2559", "typeString": "contract IERC165" } }, "id": 745, "nodeType": "InheritanceSpecifier", "src": "239:7:3" } ], "contractDependencies": [ 2559 ], "contractKind": "contract", "documentation": "@title ERC-1155 Multi Token Receiver Interface\n@dev See https://eips.ethereum.org/EIPS/eip-1155", "fullyImplemented": false, "id": 778, "linearizedBaseContracts": [ 778, 2559 ], "name": "IERC1155TokenReceiver", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": "@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": 760, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155Received", "nodeType": "FunctionDefinition", "parameters": { "id": 756, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 747, "name": "operator", "nodeType": "VariableDeclaration", "scope": 760, "src": "1111:16:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 746, "name": "address", "nodeType": "ElementaryTypeName", "src": "1111:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 749, "name": "from", "nodeType": "VariableDeclaration", "scope": 760, "src": "1137:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 748, "name": "address", "nodeType": "ElementaryTypeName", "src": "1137:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 751, "name": "id", "nodeType": "VariableDeclaration", "scope": 760, "src": "1159:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 750, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1159:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 753, "name": "value", "nodeType": "VariableDeclaration", "scope": 760, "src": "1179:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 752, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1179:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 755, "name": "data", "nodeType": "VariableDeclaration", "scope": 760, "src": "1202:19:3", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 754, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1202:5:3", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "1101:126:3" }, "returnParameters": { "id": 759, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 758, "name": "", "nodeType": "VariableDeclaration", "scope": 760, "src": "1261:6:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 757, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "1261:6:3", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" } ], "src": "1260:8:3" }, "scope": 778, "src": "1075:194:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@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": 777, "implemented": false, "kind": "function", "modifiers": [], "name": "onERC1155BatchReceived", "nodeType": "FunctionDefinition", "parameters": { "id": 773, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 762, "name": "operator", "nodeType": "VariableDeclaration", "scope": 777, "src": "2298:16:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 761, "name": "address", "nodeType": "ElementaryTypeName", "src": "2298:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 764, "name": "from", "nodeType": "VariableDeclaration", "scope": 777, "src": "2324:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 763, "name": "address", "nodeType": "ElementaryTypeName", "src": "2324:7:3", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 767, "name": "ids", "nodeType": "VariableDeclaration", "scope": 777, "src": "2346:22:3", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 765, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2346:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 766, "length": null, "nodeType": "ArrayTypeName", "src": "2346:9:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 770, "name": "values", "nodeType": "VariableDeclaration", "scope": 777, "src": "2378:25:3", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 768, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2378:7:3", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 769, "length": null, "nodeType": "ArrayTypeName", "src": "2378:9:3", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 772, "name": "data", "nodeType": "VariableDeclaration", "scope": 777, "src": "2413:19:3", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 771, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2413:5:3", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "2288:150:3" }, "returnParameters": { "id": 776, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 775, "name": "", "nodeType": "VariableDeclaration", "scope": 777, "src": "2472:6:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 774, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "2472:6:3", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" } ], "src": "2471:8:3" }, "scope": 778, "src": "2257:223:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], "scope": 779, "src": "205:2277:3" } ], "src": "0:2483:3" }, "compiler": { "name": "solc", "version": "0.5.1+commit.c8a2cb62.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.3", "updatedAt": "2019-06-08T17:32:19.210Z", "devdoc": { "details": "See https://eips.ethereum.org/EIPS/eip-1155", "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)" }, "return": "`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" }, "return": "`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 [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) 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" }, "userdoc": { "methods": {} } }