539 lines
20 KiB
JSON
539 lines
20 KiB
JSON
{
|
|
"contractName": "ERC721Receiver",
|
|
"abi": [
|
|
{
|
|
"constant": false,
|
|
"inputs": [
|
|
{
|
|
"name": "_operator",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"name": "_tokenId",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"name": "_data",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "onERC721Received",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"bytecode": "0x",
|
|
"deployedBytecode": "0x",
|
|
"sourceMap": "",
|
|
"deployedSourceMap": "",
|
|
"source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ncontract ERC721Receiver {\n /**\n * @dev Magic value to be returned upon successful reception of an NFT\n * Equals to `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`,\n * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`\n */\n bytes4 internal constant ERC721_RECEIVED = 0x150b7a02;\n\n /**\n * @notice Handle the receipt of an NFT\n * @dev The ERC721 smart contract calls this function on the recipient\n * after a `safetransfer`. This function MAY throw to revert and reject the\n * transfer. Return of other than the magic value MUST result in the\n * transaction being reverted.\n * Note: the contract address is always the message sender.\n * @param _operator The address which called `safeTransferFrom` function\n * @param _from The address which previously owned the token\n * @param _tokenId The NFT identifier which is being transferred\n * @param _data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes _data\n )\n public\n returns(bytes4);\n}\n",
|
|
"sourcePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
|
|
"exportedSymbols": {
|
|
"ERC721Receiver": [
|
|
1368
|
|
]
|
|
},
|
|
"id": 1369,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1351,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".24"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:10"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": "@title ERC721 token receiver interface\n@dev Interface for any contract that wants to support safeTransfers\nfrom ERC721 asset contracts.",
|
|
"fullyImplemented": false,
|
|
"id": 1368,
|
|
"linearizedBaseContracts": [
|
|
1368
|
|
],
|
|
"name": "ERC721Receiver",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 1354,
|
|
"name": "ERC721_RECEIVED",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1368,
|
|
"src": "463:53:10",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 1352,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "463:6:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30783135306237613032",
|
|
"id": 1353,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "506:10:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_353073666_by_1",
|
|
"typeString": "int_const 353073666"
|
|
},
|
|
"value": "0x150b7a02"
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": null,
|
|
"documentation": "@notice Handle the receipt of an NFT\n@dev The ERC721 smart contract calls this function on the recipient\nafter a `safetransfer`. This function MAY throw to revert and reject the\ntransfer. Return of other than the magic value MUST result in the\ntransaction being reverted.\nNote: the contract address is always the message sender.\n@param _operator The address which called `safeTransferFrom` function\n@param _from The address which previously owned the token\n@param _tokenId The NFT identifier which is being transferred\n@param _data Additional data with no specified format\n@return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`",
|
|
"id": 1367,
|
|
"implemented": false,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "onERC721Received",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1363,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1356,
|
|
"name": "_operator",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1271:17:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1355,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1271:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1358,
|
|
"name": "_from",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1294:13:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1357,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1294:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1360,
|
|
"name": "_tokenId",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1313:16:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1359,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1313:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1362,
|
|
"name": "_data",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1335:11:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1361,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1335:5:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1265:85:10"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1366,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1365,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1374:6:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 1364,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1374:6:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1373:8:10"
|
|
},
|
|
"scope": 1368,
|
|
"src": "1240:142:10",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 1369,
|
|
"src": "180:1204:10"
|
|
}
|
|
],
|
|
"src": "0:1385:10"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
|
|
"exportedSymbols": {
|
|
"ERC721Receiver": [
|
|
1368
|
|
]
|
|
},
|
|
"id": 1369,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1351,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".24"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:10"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": "@title ERC721 token receiver interface\n@dev Interface for any contract that wants to support safeTransfers\nfrom ERC721 asset contracts.",
|
|
"fullyImplemented": false,
|
|
"id": 1368,
|
|
"linearizedBaseContracts": [
|
|
1368
|
|
],
|
|
"name": "ERC721Receiver",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 1354,
|
|
"name": "ERC721_RECEIVED",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1368,
|
|
"src": "463:53:10",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 1352,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "463:6:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30783135306237613032",
|
|
"id": 1353,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "506:10:10",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_353073666_by_1",
|
|
"typeString": "int_const 353073666"
|
|
},
|
|
"value": "0x150b7a02"
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": null,
|
|
"documentation": "@notice Handle the receipt of an NFT\n@dev The ERC721 smart contract calls this function on the recipient\nafter a `safetransfer`. This function MAY throw to revert and reject the\ntransfer. Return of other than the magic value MUST result in the\ntransaction being reverted.\nNote: the contract address is always the message sender.\n@param _operator The address which called `safeTransferFrom` function\n@param _from The address which previously owned the token\n@param _tokenId The NFT identifier which is being transferred\n@param _data Additional data with no specified format\n@return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`",
|
|
"id": 1367,
|
|
"implemented": false,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "onERC721Received",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1363,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1356,
|
|
"name": "_operator",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1271:17:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1355,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1271:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1358,
|
|
"name": "_from",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1294:13:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1357,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1294:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1360,
|
|
"name": "_tokenId",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1313:16:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1359,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1313:7:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1362,
|
|
"name": "_data",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1335:11:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1361,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1335:5:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1265:85:10"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1366,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1365,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1367,
|
|
"src": "1374:6:10",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 1364,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1374:6:10",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1373:8:10"
|
|
},
|
|
"scope": 1368,
|
|
"src": "1240:142:10",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 1369,
|
|
"src": "180:1204:10"
|
|
}
|
|
],
|
|
"src": "0:1385:10"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.25+commit.59dbf8f1.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "2.0.2",
|
|
"updatedAt": "2020-03-25T02:14:16.714Z"
|
|
} |