{ "contractName": "ERC721ReceiverMock", "abi": [ { "inputs": [ { "name": "_retval", "type": "bytes4" }, { "name": "_reverts", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "_address", "type": "address" }, { "indexed": false, "name": "_tokenId", "type": "uint256" }, { "indexed": false, "name": "_data", "type": "bytes" }, { "indexed": false, "name": "_gas", "type": "uint256" } ], "name": "Received", "type": "event" }, { "constant": false, "inputs": [ { "name": "_address", "type": "address" }, { "name": "_tokenId", "type": "uint256" }, { "name": "_data", "type": "bytes" } ], "name": "onERC721Received", "outputs": [ { "name": "", "type": "bytes4" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5060405160408061032a8339810180604052810190808051906020019092919080519060200190929190505050816000806101000a81548163ffffffff02191690837c01000000000000000000000000000000000000000000000000000000009004021790555080600060046101000a81548160ff0219169083151502179055505050610288806100a26000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063f0b9e5ba14610046575b600080fd5b34801561005257600080fd5b506100d7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061012b565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b60008060049054906101000a900460ff1615151561014857600080fd5b7f52548e4e28236d78290c101c358cfbcd432a3b9c0063ecb10e6cb5aad585329b8484845a604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b838110156101eb5780820151818401526020810190506101d0565b50505050905090810190601f1680156102185780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a16000809054906101000a90047c010000000000000000000000000000000000000000000000000000000002905093925050505600a165627a7a72305820f8b4cba0467e03b7d56ebe02cc1741cfe0a1c286bfdebaabf17a8a10e369cf410029", "deployedBytecode": "0x608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063f0b9e5ba14610046575b600080fd5b34801561005257600080fd5b506100d7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061012b565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b60008060049054906101000a900460ff1615151561014857600080fd5b7f52548e4e28236d78290c101c358cfbcd432a3b9c0063ecb10e6cb5aad585329b8484845a604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b838110156101eb5780820151818401526020810190506101d0565b50505050905090810190601f1680156102185780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a16000809054906101000a90047c010000000000000000000000000000000000000000000000000000000002905093925050505600a165627a7a72305820f8b4cba0467e03b7d56ebe02cc1741cfe0a1c286bfdebaabf17a8a10e369cf410029", "sourceMap": "73:592:13:-;;;239:117;8:9:-1;5:2;;;30:1;27;20:12;5:2;239:117:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;320:7;311:6;;:16;;;;;;;;;;;;;;;;;;;343:8;333:7;;:18;;;;;;;;;;;;;;;;;;239:117;;73:592;;;;;;", "deployedSourceMap": "73:592:13:-;;;;;;;;;;;;;;;;;;;;;;;;360:303;;8:9:-1;5:2;;;30:1;27;20:12;5:2;360:303:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;474:6;499:7;;;;;;;;;;;498:8;490:17;;;;;;;;518:121;534:8;550;566:5;579:9;518:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;518:121:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;652:6;;;;;;;;;;;645:13;;360:303;;;;;:::o", "source": "pragma solidity ^0.4.21;\n\nimport \"../token/ERC721/ERC721Receiver.sol\";\n\n\ncontract ERC721ReceiverMock is ERC721Receiver {\n bytes4 retval;\n bool reverts;\n\n event Received(address _address, uint256 _tokenId, bytes _data, uint256 _gas);\n\n function ERC721ReceiverMock(bytes4 _retval, bool _reverts) public {\n retval = _retval;\n reverts = _reverts;\n }\n\n function onERC721Received(\n address _address,\n uint256 _tokenId,\n bytes _data\n )\n public\n returns(bytes4)\n {\n require(!reverts);\n emit Received(\n _address,\n _tokenId,\n _data,\n gasleft() // msg.gas was deprecated in solidityv0.4.21\n );\n return retval;\n }\n}\n", "sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/ERC721ReceiverMock.sol", "ast": { "absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/ERC721ReceiverMock.sol", "exportedSymbols": { "ERC721ReceiverMock": [ 790 ] }, "id": 791, "nodeType": "SourceUnit", "nodes": [ { "id": 729, "literals": [ "solidity", "^", "0.4", ".21" ], "nodeType": "PragmaDirective", "src": "0:24:13" }, { "absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC721/ERC721Receiver.sol", "file": "../token/ERC721/ERC721Receiver.sol", "id": 730, "nodeType": "ImportDirective", "scope": 791, "sourceUnit": 4244, "src": "26:44:13", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 731, "name": "ERC721Receiver", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4243, "src": "104:14:13", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC721Receiver_$4243", "typeString": "contract ERC721Receiver" } }, "id": 732, "nodeType": "InheritanceSpecifier", "src": "104:14:13" } ], "contractDependencies": [ 4243 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 790, "linearizedBaseContracts": [ 790, 4243 ], "name": "ERC721ReceiverMock", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 734, "name": "retval", "nodeType": "VariableDeclaration", "scope": 790, "src": "123:13:13", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 733, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "123:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 736, "name": "reverts", "nodeType": "VariableDeclaration", "scope": 790, "src": "140:12:13", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 735, "name": "bool", "nodeType": "ElementaryTypeName", "src": "140:4:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "anonymous": false, "documentation": null, "id": 746, "name": "Received", "nodeType": "EventDefinition", "parameters": { "id": 745, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 738, "indexed": false, "name": "_address", "nodeType": "VariableDeclaration", "scope": 746, "src": "172:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 737, "name": "address", "nodeType": "ElementaryTypeName", "src": "172:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 740, "indexed": false, "name": "_tokenId", "nodeType": "VariableDeclaration", "scope": 746, "src": "190:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 739, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "190:7:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 742, "indexed": false, "name": "_data", "nodeType": "VariableDeclaration", "scope": 746, "src": "208:11:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 741, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "208:5:13", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 744, "indexed": false, "name": "_gas", "nodeType": "VariableDeclaration", "scope": 746, "src": "221:12:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 743, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "221:7:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "171:63:13" }, "src": "157:78:13" }, { "body": { "id": 761, "nodeType": "Block", "src": "305:51:13", "statements": [ { "expression": { "argumentTypes": null, "id": 755, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 753, "name": "retval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 734, "src": "311:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 754, "name": "_retval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 748, "src": "320:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "src": "311:16:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "id": 756, "nodeType": "ExpressionStatement", "src": "311:16:13" }, { "expression": { "argumentTypes": null, "id": 759, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 757, "name": "reverts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 736, "src": "333:7:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 758, "name": "_reverts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 750, "src": "343:8:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "333:18:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 760, "nodeType": "ExpressionStatement", "src": "333:18:13" } ] }, "documentation": null, "id": 762, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "ERC721ReceiverMock", "nodeType": "FunctionDefinition", "parameters": { "id": 751, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 748, "name": "_retval", "nodeType": "VariableDeclaration", "scope": 762, "src": "267:14:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 747, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "267:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 750, "name": "_reverts", "nodeType": "VariableDeclaration", "scope": 762, "src": "283:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 749, "name": "bool", "nodeType": "ElementaryTypeName", "src": "283:4:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "266:31:13" }, "payable": false, "returnParameters": { "id": 752, "nodeType": "ParameterList", "parameters": [], "src": "305:0:13" }, "scope": 790, "src": "239:117:13", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 788, "nodeType": "Block", "src": "484:179:13", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 775, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "498:8:13", "subExpression": { "argumentTypes": null, "id": 774, "name": "reverts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 736, "src": "499:7:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 773, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "490:7:13", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 776, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "490:17:13", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 777, "nodeType": "ExpressionStatement", "src": "490:17:13" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 779, "name": "_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 764, "src": "534:8:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 780, "name": "_tokenId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 766, "src": "550:8:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 781, "name": "_data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 768, "src": "566:5:13", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 782, "name": "gasleft", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4777, "src": "579:7:13", "typeDescriptions": { "typeIdentifier": "t_function_gasleft_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 783, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "579:9:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 778, "name": "Received", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 746, "src": "518:8:13", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,bytes memory,uint256)" } }, "id": 784, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "518:121:13", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 785, "nodeType": "EmitStatement", "src": "513:126:13" }, { "expression": { "argumentTypes": null, "id": 786, "name": "retval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 734, "src": "652:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "functionReturnParameters": 772, "id": 787, "nodeType": "Return", "src": "645:13:13" } ] }, "documentation": null, "id": 789, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "onERC721Received", "nodeType": "FunctionDefinition", "parameters": { "id": 769, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 764, "name": "_address", "nodeType": "VariableDeclaration", "scope": 789, "src": "391:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 763, "name": "address", "nodeType": "ElementaryTypeName", "src": "391:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 766, "name": "_tokenId", "nodeType": "VariableDeclaration", "scope": 789, "src": "413:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 765, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "413:7:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 768, "name": "_data", "nodeType": "VariableDeclaration", "scope": 789, "src": "435:11:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 767, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "435:5:13", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "385:65:13" }, "payable": false, "returnParameters": { "id": 772, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 771, "name": "", "nodeType": "VariableDeclaration", "scope": 789, "src": "474:6:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 770, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "474:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" } ], "src": "473:8:13" }, "scope": 790, "src": "360:303:13", "stateMutability": "nonpayable", "superFunction": 4242, "visibility": "public" } ], "scope": 791, "src": "73:592:13" } ], "src": "0:666:13" }, "legacyAST": { "absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/ERC721ReceiverMock.sol", "exportedSymbols": { "ERC721ReceiverMock": [ 790 ] }, "id": 791, "nodeType": "SourceUnit", "nodes": [ { "id": 729, "literals": [ "solidity", "^", "0.4", ".21" ], "nodeType": "PragmaDirective", "src": "0:24:13" }, { "absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC721/ERC721Receiver.sol", "file": "../token/ERC721/ERC721Receiver.sol", "id": 730, "nodeType": "ImportDirective", "scope": 791, "sourceUnit": 4244, "src": "26:44:13", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 731, "name": "ERC721Receiver", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4243, "src": "104:14:13", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC721Receiver_$4243", "typeString": "contract ERC721Receiver" } }, "id": 732, "nodeType": "InheritanceSpecifier", "src": "104:14:13" } ], "contractDependencies": [ 4243 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 790, "linearizedBaseContracts": [ 790, 4243 ], "name": "ERC721ReceiverMock", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 734, "name": "retval", "nodeType": "VariableDeclaration", "scope": 790, "src": "123:13:13", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 733, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "123:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 736, "name": "reverts", "nodeType": "VariableDeclaration", "scope": 790, "src": "140:12:13", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 735, "name": "bool", "nodeType": "ElementaryTypeName", "src": "140:4:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "anonymous": false, "documentation": null, "id": 746, "name": "Received", "nodeType": "EventDefinition", "parameters": { "id": 745, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 738, "indexed": false, "name": "_address", "nodeType": "VariableDeclaration", "scope": 746, "src": "172:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 737, "name": "address", "nodeType": "ElementaryTypeName", "src": "172:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 740, "indexed": false, "name": "_tokenId", "nodeType": "VariableDeclaration", "scope": 746, "src": "190:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 739, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "190:7:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 742, "indexed": false, "name": "_data", "nodeType": "VariableDeclaration", "scope": 746, "src": "208:11:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 741, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "208:5:13", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 744, "indexed": false, "name": "_gas", "nodeType": "VariableDeclaration", "scope": 746, "src": "221:12:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 743, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "221:7:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "171:63:13" }, "src": "157:78:13" }, { "body": { "id": 761, "nodeType": "Block", "src": "305:51:13", "statements": [ { "expression": { "argumentTypes": null, "id": 755, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 753, "name": "retval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 734, "src": "311:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 754, "name": "_retval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 748, "src": "320:7:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "src": "311:16:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "id": 756, "nodeType": "ExpressionStatement", "src": "311:16:13" }, { "expression": { "argumentTypes": null, "id": 759, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 757, "name": "reverts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 736, "src": "333:7:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 758, "name": "_reverts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 750, "src": "343:8:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "333:18:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 760, "nodeType": "ExpressionStatement", "src": "333:18:13" } ] }, "documentation": null, "id": 762, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "ERC721ReceiverMock", "nodeType": "FunctionDefinition", "parameters": { "id": 751, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 748, "name": "_retval", "nodeType": "VariableDeclaration", "scope": 762, "src": "267:14:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 747, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "267:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 750, "name": "_reverts", "nodeType": "VariableDeclaration", "scope": 762, "src": "283:13:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 749, "name": "bool", "nodeType": "ElementaryTypeName", "src": "283:4:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "266:31:13" }, "payable": false, "returnParameters": { "id": 752, "nodeType": "ParameterList", "parameters": [], "src": "305:0:13" }, "scope": 790, "src": "239:117:13", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 788, "nodeType": "Block", "src": "484:179:13", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 775, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "498:8:13", "subExpression": { "argumentTypes": null, "id": 774, "name": "reverts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 736, "src": "499:7:13", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 773, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "490:7:13", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 776, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "490:17:13", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 777, "nodeType": "ExpressionStatement", "src": "490:17:13" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 779, "name": "_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 764, "src": "534:8:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 780, "name": "_tokenId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 766, "src": "550:8:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 781, "name": "_data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 768, "src": "566:5:13", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 782, "name": "gasleft", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4777, "src": "579:7:13", "typeDescriptions": { "typeIdentifier": "t_function_gasleft_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 783, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "579:9:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 778, "name": "Received", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 746, "src": "518:8:13", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,bytes memory,uint256)" } }, "id": 784, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "518:121:13", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 785, "nodeType": "EmitStatement", "src": "513:126:13" }, { "expression": { "argumentTypes": null, "id": 786, "name": "retval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 734, "src": "652:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "functionReturnParameters": 772, "id": 787, "nodeType": "Return", "src": "645:13:13" } ] }, "documentation": null, "id": 789, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "onERC721Received", "nodeType": "FunctionDefinition", "parameters": { "id": 769, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 764, "name": "_address", "nodeType": "VariableDeclaration", "scope": 789, "src": "391:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 763, "name": "address", "nodeType": "ElementaryTypeName", "src": "391:7:13", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 766, "name": "_tokenId", "nodeType": "VariableDeclaration", "scope": 789, "src": "413:16:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 765, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "413:7:13", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 768, "name": "_data", "nodeType": "VariableDeclaration", "scope": 789, "src": "435:11:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 767, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "435:5:13", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "385:65:13" }, "payable": false, "returnParameters": { "id": 772, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 771, "name": "", "nodeType": "VariableDeclaration", "scope": 789, "src": "474:6:13", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, "typeName": { "id": 770, "name": "bytes4", "nodeType": "ElementaryTypeName", "src": "474:6:13", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, "value": null, "visibility": "internal" } ], "src": "473:8:13" }, "scope": 790, "src": "360:303:13", "stateMutability": "nonpayable", "superFunction": 4242, "visibility": "public" } ], "scope": 791, "src": "73:592:13" } ], "src": "0:666:13" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2018-08-23T14:35:50.620Z" }