483 lines
18 KiB
JSON
483 lines
18 KiB
JSON
{
|
|
"contractName": "ERC721Receiver",
|
|
"abi": [
|
|
{
|
|
"constant": false,
|
|
"inputs": [
|
|
{
|
|
"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.21;\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,uint256,bytes)\"))`,\n * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`\n */\n bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;\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. This function MUST use 50,000 gas or less. Return of other\n * than the magic value MUST result in the transaction being reverted.\n * Note: the contract address is always the message sender.\n * @param _from The sending address\n * @param _tokenId The NFT identifier which is being transfered\n * @param _data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC721Received(address,uint256,bytes)\"))`\n */\n function onERC721Received(address _from, uint256 _tokenId, bytes _data) public returns(bytes4);\n}\n",
|
|
"sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC721/ERC721Receiver.sol",
|
|
"ast": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC721/ERC721Receiver.sol",
|
|
"exportedSymbols": {
|
|
"ERC721Receiver": [
|
|
4243
|
|
]
|
|
},
|
|
"id": 4244,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 4228,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:49"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": "@title ERC721 token receiver interface\n@dev Interface for any contract that wants to support safeTransfers\n from ERC721 asset contracts.",
|
|
"fullyImplemented": false,
|
|
"id": 4243,
|
|
"linearizedBaseContracts": [
|
|
4243
|
|
],
|
|
"name": "ERC721Receiver",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 4231,
|
|
"name": "ERC721_RECEIVED",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4243,
|
|
"src": "456:44:49",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 4229,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "456:6:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30786630623965356261",
|
|
"id": 4230,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "490:10:49",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4038714810_by_1",
|
|
"typeString": "int_const 4038714810"
|
|
},
|
|
"value": "0xf0b9e5ba"
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": null,
|
|
"documentation": "@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. This function MUST use 50,000 gas or less. Return of other\n than the magic value MUST result in the transaction being reverted.\n Note: the contract address is always the message sender.\n@param _from The sending address\n@param _tokenId The NFT identifier which is being transfered\n@param _data Additional data with no specified format\n@return `bytes4(keccak256(\"onERC721Received(address,uint256,bytes)\"))`",
|
|
"id": 4242,
|
|
"implemented": false,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "onERC721Received",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 4238,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 4233,
|
|
"name": "_from",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4242,
|
|
"src": "1188:13:49",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 4232,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1188:7:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 4235,
|
|
"name": "_tokenId",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4242,
|
|
"src": "1203:16:49",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 4234,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1203:7:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 4237,
|
|
"name": "_data",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4242,
|
|
"src": "1221:11:49",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 4236,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1221:5:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1187:46:49"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 4241,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 4240,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4242,
|
|
"src": "1249:6:49",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 4239,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1249:6:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1248:8:49"
|
|
},
|
|
"scope": 4243,
|
|
"src": "1162:95:49",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 4244,
|
|
"src": "181:1078:49"
|
|
}
|
|
],
|
|
"src": "0:1260:49"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/token/ERC721/ERC721Receiver.sol",
|
|
"exportedSymbols": {
|
|
"ERC721Receiver": [
|
|
4243
|
|
]
|
|
},
|
|
"id": 4244,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 4228,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:49"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": "@title ERC721 token receiver interface\n@dev Interface for any contract that wants to support safeTransfers\n from ERC721 asset contracts.",
|
|
"fullyImplemented": false,
|
|
"id": 4243,
|
|
"linearizedBaseContracts": [
|
|
4243
|
|
],
|
|
"name": "ERC721Receiver",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 4231,
|
|
"name": "ERC721_RECEIVED",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4243,
|
|
"src": "456:44:49",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 4229,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "456:6:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30786630623965356261",
|
|
"id": 4230,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "490:10:49",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_4038714810_by_1",
|
|
"typeString": "int_const 4038714810"
|
|
},
|
|
"value": "0xf0b9e5ba"
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": null,
|
|
"documentation": "@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. This function MUST use 50,000 gas or less. Return of other\n than the magic value MUST result in the transaction being reverted.\n Note: the contract address is always the message sender.\n@param _from The sending address\n@param _tokenId The NFT identifier which is being transfered\n@param _data Additional data with no specified format\n@return `bytes4(keccak256(\"onERC721Received(address,uint256,bytes)\"))`",
|
|
"id": 4242,
|
|
"implemented": false,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "onERC721Received",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 4238,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 4233,
|
|
"name": "_from",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4242,
|
|
"src": "1188:13:49",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 4232,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1188:7:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 4235,
|
|
"name": "_tokenId",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4242,
|
|
"src": "1203:16:49",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 4234,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1203:7:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 4237,
|
|
"name": "_data",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4242,
|
|
"src": "1221:11:49",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 4236,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1221:5:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1187:46:49"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 4241,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 4240,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 4242,
|
|
"src": "1249:6:49",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 4239,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1249:6:49",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1248:8:49"
|
|
},
|
|
"scope": 4243,
|
|
"src": "1162:95:49",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 4244,
|
|
"src": "181:1078:49"
|
|
}
|
|
],
|
|
"src": "0:1260:49"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "2.0.1",
|
|
"updatedAt": "2018-08-23T14:35:50.651Z"
|
|
} |