aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/artifacts/2.0.0/DummyERC721Receiver.json
blob: 6b913d74dd740a98601168c473a0fb96dd977e41 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
    "schemaVersion": "2.0.0",
    "contractName": "DummyERC721Receiver",
    "compilerOutput": {
        "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"
            },
            {
                "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"
            },
            {
                "anonymous": false,
                "inputs": [
                    {
                        "indexed": false,
                        "name": "from",
                        "type": "address"
                    },
                    {
                        "indexed": false,
                        "name": "tokenId",
                        "type": "uint256"
                    },
                    {
                        "indexed": false,
                        "name": "data",
                        "type": "bytes"
                    }
                ],
                "name": "TokenReceived",
                "type": "event"
            }
        ],
        "evm": {
            "bytecode": {
                "linkReferences": {},
                "object": "0x",
                "opcodes": "",
                "sourceMap": ""
            },
            "deployedBytecode": {
                "linkReferences": {},
                "object": "0x",
                "opcodes": "",
                "sourceMap": ""
            }
        }
    },
    "sources": {
        "2.0.0/test/DummyERC721Receiver/DummyERC721Receiver.sol": {
            "id": 0
        },
        "2.0.0/tokens/ERC721Token/IERC721Receiver.sol": {
            "id": 1
        }
    },
    "sourceCodes": {
        "2.0.0/test/DummyERC721Receiver/DummyERC721Receiver.sol": "/*\nThe MIT License (MIT)\n\nCopyright (c) 2016 Smart Contract Solutions, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\npragma solidity 0.4.24;\n\nimport \"../../tokens/ERC721Token/IERC721Receiver.sol\";\n\n\ncontract DummyERC721Receiver is\n    IERC721Receiver\n{\n\n    // Function selector for ERC721Receiver.onERC721Received\n    // 0x150b7a02\n    bytes4 constant internal ERC721_RECEIVED = bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"));\n\n    event TokenReceived(\n        address from,\n        uint256 tokenId,\n        bytes data\n    );\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(\n        address _from,\n        uint256 _tokenId,\n        bytes _data\n    )\n        public\n        returns (bytes4)\n    {\n        emit TokenReceived(_from, _tokenId, _data);\n        return ERC721_RECEIVED;\n    }\n}\n",
        "2.0.0/tokens/ERC721Token/IERC721Receiver.sol": "/*\n\n  Copyright 2018 ZeroEx Intl.\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\n*/\n\npragma solidity 0.4.24;\n\n\ncontract IERC721Receiver {\n\n    /// @notice Handle the receipt of an NFT\n    /// @dev The ERC721 smart contract calls this function on the recipient\n    ///  after a `transfer`. 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    ///  unless throwing\n    function onERC721Received(\n        address _operator,\n        address _from,\n        uint256 _tokenId,\n        bytes _data\n    )\n        external\n        returns (bytes4);\n}\n"
    },
    "sourceTreeHashHex": "0x00fc24f44208390e6d034615bce1d0a4e1de04d6a1636888696a1d18561a5828",
    "compiler": {
        "name": "solc",
        "version": "soljson-v0.4.24+commit.e67f0147.js",
        "settings": {
            "optimizer": {
                "enabled": true,
                "runs": 1000000
            },
            "outputSelection": {
                "*": {
                    "*": [
                        "abi",
                        "evm.bytecode.object",
                        "evm.bytecode.sourceMap",
                        "evm.deployedBytecode.object",
                        "evm.deployedBytecode.sourceMap"
                    ]
                }
            }
        }
    },
    "networks": {}
}