UNPKG

@ethsub/sol

Version:
1,024 lines (1,023 loc) 130 kB
{ "contractName": "ERC721Safe", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"ChainSafe Systems.\",\"kind\":\"dev\",\"methods\":{},\"title\":\"Manages deposited ERC721s.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This contract is intended to be used with ERC721Handler contract.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/ERC721Safe.sol\":\"ERC721Safe\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x9486045e189facd2e868ece35249872598ef03f1087fb6fa4d1161842daa2287\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77c3a04ef8453788b14b1ebbc24dd3f0a18ceb2615cd156aac949a611e552af8\",\"dweb:/ipfs/QmcmqWGguRM3iLuF57tcyrN3F6EA63kzeNkDfQuteBnurr\"]},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"keccak256\":\"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b710eb003944777135f027500a5a57b479fe857849f5f467c1ef9687401e3c95\",\"dweb:/ipfs/QmcELzi6KRzAs3DXwxdsoKWRJ13KSeipKQsJgD3unctdZM\"]},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c\",\"dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"keccak256\":\"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da2918b7aff73dd51d41bfcfa548f81eb50531b8353500fdbdacf297076db070\",\"dweb:/ipfs/Qmb8ixAs1vBjZRowQNuNg6bRf2NZmgZ1JTBxmQS14PHpcL\"]},\"@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol\":{\"keccak256\":\"0x060925a04766df64ac29f56aaa3a38aafd71424ba4d996ca0f14363828b97056\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8593f0fcac22c97956ab3e779e8a55a6c33dd01059fa01f15992518e708f4e6f\",\"dweb:/ipfs/QmWYQcAy7R6v5prSfmigmrhr7nGxwzkbZkmdeMcLNLUG66\"]},\"@openzeppelin/contracts/token/ERC721/ERC721Pausable.sol\":{\"keccak256\":\"0x1c31a4c2ad1af9e25cd8f4ea941ebd6a6a932426183ab39c160cb8e51cfc704f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77dd2448bbeb4a8f6f3273042d02326fa6ba191827e5b37f6f68492b17d022c9\",\"dweb:/ipfs/QmRiAmuxtRcVRhXUymziiTD3r8SGcjxKN95ZLVKd2jtWjN\"]},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2dcdce5ede1e5e650d174ec0b35be7d47b6a50f30bc895ef0d9e59fb75052e45\",\"dweb:/ipfs/QmQ2XFsDLTYqfEdw7pYzHiGtFRY11yQm4b6ynYgKqDxeB8\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"keccak256\":\"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c354c3f6e9c487759aa7869be4fba68e0b2efc777b514d289c4cbd3ff8f7e1a\",\"dweb:/ipfs/QmdF9LcSYVmiUCL7JxLEYmSLrjga6zJsujfi6sgEJD4M1z\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"keccak256\":\"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://430255ad2229ced6d880e61a67bdc6e48dbbaed8354a7c1fe918cd8b8714a886\",\"dweb:/ipfs/QmTHY56odzqEpEC6v6tafaWMYY7vmULw25q5XHJLCCAeox\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada84513617b7c1b2f890b44503735abaec73a1acd030112a17aac7e6c66a4a1\",\"dweb:/ipfs/QmaiFwdio67iJrfjAdkMac24eJ5sS1qD7CZW6PhUU6KjiK\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c\",\"dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/Counters.sol\":{\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://acce8fe6adc670f9987a8b6aedc4cc0abcd0dcd2e152d649a12099d735bd7bad\",\"dweb:/ipfs/QmXAk17oK3daBmA8CGyVcU56L496jW3U6Ef1WkfHyB1JAV\"]},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"keccak256\":\"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f6a6af5d848334e40db419773f6360601e311ffc21c2e274f730b8c542da99fd\",\"dweb:/ipfs/QmfA24cxQ2g41ZWUuDF295dxDJ4xF1bSDYtC3EaLd7CzW8\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4580d57781513d98870d9738c7d39094336e0a70cdb90d68dad549c6ced466ec\",\"dweb:/ipfs/Qmf9YZzzRFuvMnav9dgmeRUpdYMMECiZX8w25sHWVbA18V\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x212fb1b1d4beaf74354dad9bc329f44ee3c5375ef1c32acff76b4ecefc10f1d8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d21c68cb321d1c8d0fa39fd9ecb6bbe3b2f26623b0f38af280a010c916c85f23\",\"dweb:/ipfs/Qmf2P51HRC4ekDHLYfbXu5SXR33gXrWtq6oKSmfyWqVRuC\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5eefac1760f524971e14aa3f3d79515a3d54fd28c1d3bdca0b36127da349b830\",\"dweb:/ipfs/QmUMzkyH3ytJX5gVPizQruNLhkKmuJb3nFqBDad4LPdg5U\"]},\"project:/contracts/ERC721MinterBurnerPauser.sol\":{\"keccak256\":\"0xb0f727d542bf3f517bcc07abab1efb86ef6d37a216b4d41d8a3194c5bcd20a73\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://02dc95a492b39f9ecf35f607479c0320b917aeba7730407734d1aaa02cb3b040\",\"dweb:/ipfs/QmTekLFSqQaJwdJUHQ814cHPrL8DzuWhFEgLzteJE2hmLv\"]},\"project:/contracts/ERC721Safe.sol\":{\"keccak256\":\"0x834bedd29226386aaf241ba2f369c8c3109ef087bf355c0da19cb84b5d3e0846\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://6e38c3ba911aa06dfccf46cd8fec3e562d3766b7e0ae351d931f78d8834c380a\",\"dweb:/ipfs/QmeEutLyHU9mv23PrGGQUTQpSWXcrGxkQF7TbwTtFdET3M\"]},\"project:/contracts/utils/AccessControl.sol\":{\"keccak256\":\"0x0188570bd646df63dd236b997edf12d2e5a566d9fd54b9405c67c6d7eeca353e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://eaa8a02b8fda3d9a50019cb96fec11cfb80b90250e37e91e0ec6cd945efa9810\",\"dweb:/ipfs/QmZ2nuod9fjYvsCjRr4Bhk6FTES4zsofxsQSDFS24JFaGq\"]}},\"version\":1}", "bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea26469706673582212200df9bf9de8a91ed5dd90099c8ac1e7f4db2a7caa9cecc58dd1caeb4ed84b8a3b64736f6c634300060c0033", "deployedBytecode": "0x6080604052600080fdfea26469706673582212200df9bf9de8a91ed5dd90099c8ac1e7f4db2a7caa9cecc58dd1caeb4ed84b8a3b64736f6c634300060c0033", "immutableReferences": {}, "sourceMap": "375:1948:40:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "375:1948:40:-:0;;;;;", "source": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity 0.6.12;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport \"./ERC721MinterBurnerPauser.sol\";\n\n/**\n @title Manages deposited ERC721s.\n @author ChainSafe Systems.\n @notice This contract is intended to be used with ERC721Handler contract.\n */\ncontract ERC721Safe {\n using SafeMath for uint256;\n\n /**\n @notice Used to gain custoday of deposited token.\n @param tokenAddress Address of ERC721 to transfer.\n @param owner Address of current token owner.\n @param recipient Address to transfer token to.\n @param tokenID ID of token to transfer.\n */\n function lockERC721(address tokenAddress, address owner, address recipient, uint tokenID) internal {\n IERC721 erc721 = IERC721(tokenAddress);\n erc721.transferFrom(owner, recipient, tokenID);\n\n }\n\n /**\n @notice Transfers custody of token to recipient.\n @param tokenAddress Address of ERC721 to transfer.\n @param owner Address of current token owner.\n @param recipient Address to transfer token to.\n @param tokenID ID of token to transfer.\n */\n function releaseERC721(address tokenAddress, address owner, address recipient, uint256 tokenID) internal {\n IERC721 erc721 = IERC721(tokenAddress);\n erc721.transferFrom(owner, recipient, tokenID);\n }\n\n /**\n @notice Used to create new ERC721s.\n @param tokenAddress Address of ERC721 to mint.\n @param recipient Address to mint token to.\n @param tokenID ID of token to mint.\n @param data Optional data to send along with mint call.\n */\n function mintERC721(address tokenAddress, address recipient, uint256 tokenID, bytes memory data) internal {\n ERC721MinterBurnerPauser erc721 = ERC721MinterBurnerPauser(tokenAddress);\n erc721.mint(recipient, tokenID, string(data));\n }\n\n /**\n @notice Used to burn ERC721s.\n @param tokenAddress Address of ERC721 to burn.\n @param tokenID ID of token to burn.\n */\n function burnERC721(address tokenAddress, uint256 tokenID) internal {\n ERC721MinterBurnerPauser erc721 = ERC721MinterBurnerPauser(tokenAddress);\n erc721.burn(tokenID);\n }\n\n}\n", "sourcePath": "/home/sigo/w/deer/ethsub/packages/sol/contracts/ERC721Safe.sol", "ast": { "absolutePath": "project:/contracts/ERC721Safe.sol", "exportedSymbols": { "ERC721Safe": [ 8015 ] }, "id": 8016, "license": "LGPL-3.0-only", "nodeType": "SourceUnit", "nodes": [ { "id": 7902, "literals": [ "solidity", "0.6", ".12" ], "nodeType": "PragmaDirective", "src": "42:23:40" }, { "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", "file": "@openzeppelin/contracts/math/SafeMath.sol", "id": 7903, "nodeType": "ImportDirective", "scope": 8016, "sourceUnit": 938, "src": "67:51:40", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721.sol", "file": "@openzeppelin/contracts/token/ERC721/IERC721.sol", "id": 7904, "nodeType": "ImportDirective", "scope": 8016, "sourceUnit": 4447, "src": "119:58:40", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "project:/contracts/ERC721MinterBurnerPauser.sol", "file": "./ERC721MinterBurnerPauser.sol", "id": 7905, "nodeType": "ImportDirective", "scope": 8016, "sourceUnit": 7901, "src": "178:40:40", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 7906, "nodeType": "StructuredDocumentation", "src": "220:154:40", "text": "@title Manages deposited ERC721s.\n@author ChainSafe Systems.\n@notice This contract is intended to be used with ERC721Handler contract." }, "fullyImplemented": true, "id": 8015, "linearizedBaseContracts": [ 8015 ], "name": "ERC721Safe", "nodeType": "ContractDefinition", "nodes": [ { "id": 7909, "libraryName": { "contractScope": null, "id": 7907, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 937, "src": "407:8:40", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$937", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "401:27:40", "typeName": { "id": 7908, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "420:7:40", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "body": { "id": 7935, "nodeType": "Block", "src": "822:112:40", "statements": [ { "assignments": [ 7922 ], "declarations": [ { "constant": false, "id": 7922, "mutability": "mutable", "name": "erc721", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7935, "src": "832:14:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$4446", "typeString": "contract IERC721" }, "typeName": { "contractScope": null, "id": 7921, "name": "IERC721", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4446, "src": "832:7:40", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$4446", "typeString": "contract IERC721" } }, "value": null, "visibility": "internal" } ], "id": 7926, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7924, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7912, "src": "857:12:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 7923, "name": "IERC721", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4446, "src": "849:7:40", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC721_$4446_$", "typeString": "type(contract IERC721)" } }, "id": 7925, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "849:21:40", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$4446", "typeString": "contract IERC721" } }, "nodeType": "VariableDeclarationStatement", "src": "832:38:40" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7930, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7914, "src": "900:5:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 7931, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7916, "src": "907:9:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 7932, "name": "tokenID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7918, "src": "918:7:40", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7927, "name": "erc721", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7922, "src": "880:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$4446", "typeString": "contract IERC721" } }, "id": 7929, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 4399, "src": "880:19:40", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256) external" } }, "id": 7933, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "880:46:40", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7934, "nodeType": "ExpressionStatement", "src": "880:46:40" } ] }, "documentation": { "id": 7910, "nodeType": "StructuredDocumentation", "src": "434:284:40", "text": "@notice Used to gain custoday of deposited token.\n@param tokenAddress Address of ERC721 to transfer.\n@param owner Address of current token owner.\n@param recipient Address to transfer token to.\n@param tokenID ID of token to transfer." }, "id": 7936, "implemented": true, "kind": "function", "modifiers": [], "name": "lockERC721", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7919, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7912, "mutability": "mutable", "name": "tokenAddress", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7936, "src": "743:20:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7911, "name": "address", "nodeType": "ElementaryTypeName", "src": "743:7:40", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7914, "mutability": "mutable", "name": "owner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7936, "src": "765:13:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7913, "name": "address", "nodeType": "ElementaryTypeName", "src": "765:7:40", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7916, "mutability": "mutable", "name": "recipient", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7936, "src": "780:17:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7915, "name": "address", "nodeType": "ElementaryTypeName", "src": "780:7:40", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7918, "mutability": "mutable", "name": "tokenID", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7936, "src": "799:12:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7917, "name": "uint", "nodeType": "ElementaryTypeName", "src": "799:4:40", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "742:70:40" }, "returnParameters": { "id": 7920, "nodeType": "ParameterList", "parameters": [], "src": "822:0:40" }, "scope": 8015, "src": "723:211:40", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 7962, "nodeType": "Block", "src": "1333:111:40", "statements": [ { "assignments": [ 7949 ], "declarations": [ { "constant": false, "id": 7949, "mutability": "mutable", "name": "erc721", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7962, "src": "1343:14:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$4446", "typeString": "contract IERC721" }, "typeName": { "contractScope": null, "id": 7948, "name": "IERC721", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4446, "src": "1343:7:40", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$4446", "typeString": "contract IERC721" } }, "value": null, "visibility": "internal" } ], "id": 7953, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7951, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7939, "src": "1368:12:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 7950, "name": "IERC721", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4446, "src": "1360:7:40", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC721_$4446_$", "typeString": "type(contract IERC721)" } }, "id": 7952, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1360:21:40", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$4446", "typeString": "contract IERC721" } }, "nodeType": "VariableDeclarationStatement", "src": "1343:38:40" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7957, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7941, "src": "1411:5:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 7958, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7943, "src": "1418:9:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 7959, "name": "tokenID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7945, "src": "1429:7:40", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 7954, "name": "erc721", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7949, "src": "1391:6:40", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$4446", "typeString": "contract IERC721" } }, "id": 7956, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 4399, "src": "1391:19:40", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256) external" } }, "id": 7960, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1391:46:40", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 7961, "nodeType": "ExpressionStatement", "src": "1391:46:40" } ] }, "documentation": { "id": 7937, "nodeType": "StructuredDocumentation", "src": "940:283:40", "text": "@notice Transfers custody of token to recipient.\n@param tokenAddress Address of ERC721 to transfer.\n@param owner Address of current token owner.\n@param recipient Address to transfer token to.\n@param tokenID ID of token to transfer." }, "id": 7963, "implemented": true, "kind": "function", "modifiers": [], "name": "releaseERC721", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7946, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7939, "mutability": "mutable", "name": "tokenAddress", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7963, "src": "1251:20:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7938, "name": "address", "nodeType": "ElementaryTypeName", "src": "1251:7:40", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7941, "mutability": "mutable", "name": "owner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7963, "src": "1273:13:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7940, "name": "address", "nodeType": "ElementaryTypeName", "src": "1273:7:40", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7943, "mutability": "mutable", "name": "recipient", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7963, "src": "1288:17:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7942, "name": "address", "nodeType": "ElementaryTypeName", "src": "1288:7:40", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7945, "mutability": "mutable", "name": "tokenID", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7963, "src": "1307:15:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7944, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1307:7:40", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1250:73:40" }, "returnParameters": { "id": 7947, "nodeType": "ParameterList", "parameters": [], "src": "1333:0:40" }, "scope": 8015, "src": "1228:216:40", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 7992, "nodeType": "Block", "src": "1830:144:40", "statements": [ { "assignments": [ 7976 ], "declarations": [ { "constant": false, "id": 7976, "mutability": "mutable", "name": "erc721", "nodeType": "VariableDeclaration", "overrides": null, "scope": 7992, "src": "1840:31:40", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC721MinterBurnerPauser_$7900", "typeString": "contract ERC721MinterBurnerPauser" }, "typeName": { "contractScope": null, "id": 7975, "name": "ERC721MinterBurnerPauser", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 7900, "src": "1840:24:40", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC721MinterBurnerPauser_$7900", "typeString": "contract ERC721MinterBurnerPauser" } }, "value": null, "visibility": "internal" } ], "id": 7980, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7978, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7966, "src": "1899:12:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 7977, "name": "ERC721MinterBurnerPauser", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7900, "src": "1874:24:40", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_ERC721MinterBurnerPauser_$7900_$", "typeString": "type(contract ERC721MinterBurnerPauser)" } }, "id": 7979, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1874:38:40", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_ERC721MinterBurnerPauser_$7900", "typeString": "contract ERC721MinterBurnerPauser" } }, "nodeType": "VariableDeclarationStatement", "src": "1840:72:40" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7984, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7968, "src": "1934:9:40", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 7985, "name": "tokenID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7970, "src": "1945:7:40", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 7988, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7972, "src": "1961:4:40", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "id": 7987, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1954:6:40", "typeDescriptions": { "typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)" }, "typeName": { "id": 7986, "name": "string", "nodeType": "ElementaryTypeName", "src": "1954:6:40", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } }, "id": 7989, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1954:12:40", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "expression": { "argumentTypes": null, "id": 7981, "name": "erc721", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7976, "src": "1922:6:40", "typeDescriptions": {