├── .github ├── FUNDING.yml └── workflows │ └── mint.yml ├── .gitignore ├── .openzeppelin ├── rinkeby.json └── unknown-1337.json ├── .prettierignore ├── .prettierrc ├── LICENSE.md ├── README.md ├── build └── contracts │ ├── AddressUpgradeable.json │ ├── ContextUpgradeable.json │ ├── CountersUpgradeable.json │ ├── ERC165Upgradeable.json │ ├── ERC721Upgradeable.json │ ├── IERC165Upgradeable.json │ ├── IERC721EnumerableUpgradeable.json │ ├── IERC721MetadataUpgradeable.json │ ├── IERC721ReceiverUpgradeable.json │ ├── IERC721Upgradeable.json │ ├── Initializable.json │ ├── Migrations.json │ ├── NFTT.json │ ├── OwnableUpgradeable.json │ ├── ReentrancyGuardUpgradeable.json │ └── StringsUpgradeable.json ├── contracts ├── Migrations.sol └── NFTT.sol ├── coverage.json ├── devops ├── changeAPI.js ├── mint.js └── test.js ├── migrations ├── 1_initial_migration.js └── 2_deploy_contracts.js ├── package.json ├── test └── NFTT.test.ts ├── truffle-config-ci.js ├── truffle-config.js ├── tsconfig.json ├── types └── truffle-contracts │ ├── ERC165Upgradeable.d.ts │ ├── ERC721Upgradeable.d.ts │ ├── IERC165Upgradeable.d.ts │ ├── IERC721EnumerableUpgradeable.d.ts │ ├── IERC721MetadataUpgradeable.d.ts │ ├── IERC721ReceiverUpgradeable.d.ts │ ├── IERC721Upgradeable.d.ts │ ├── Migrations.d.ts │ ├── NFTT.d.ts │ ├── OwnableUpgradeable.d.ts │ ├── index.d.ts │ └── types.d.ts └── yarn.lock /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: silviopaganini 4 | custom: 'https://gitcoin.co/grants/2468/erc721-nft-marketplace' 5 | -------------------------------------------------------------------------------- /.github/workflows/mint.yml: -------------------------------------------------------------------------------- 1 | name: Mint more NFTs 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | name: 6 | description: 'Number of NFTs to mint' 7 | required: true 8 | default: '10' 9 | jobs: 10 | mint: 11 | name: Mint NFTs 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Clone Repository 15 | uses: actions/checkout@v2 16 | 17 | - name: ❄️ Cache node modules 18 | uses: actions/cache@v2 19 | with: 20 | path: '**/node_modules' 21 | key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} 22 | 23 | - name: Install 24 | run: yarn 25 | 26 | - name: Install CLI 27 | uses: dopplerhq/cli-action@v1 28 | 29 | - name: Use the correct Truffle file 30 | run: | 31 | rm truffle-config.js 32 | mv truffle-config-ci.js truffle-config.js 33 | 34 | - name: Truffle Mint 35 | run: doppler run --command "node_modules/.bin/truffle exec devops/mint.js --network rinkeby --nfts ${{ github.event.inputs.name }}" --token=${{secrets.DOPPLER_TOKEN}} 36 | 37 | - name: Checkout Lambda repo 38 | uses: actions/checkout@v2 39 | with: 40 | token: ${{secrets.GH_TOKEN}} 41 | repository: silviopaganini/nft-market-service 42 | path: lambda 43 | ref: master 44 | 45 | - name: Update DB 46 | run: | 47 | cd lambda 48 | rm db/index.ts 49 | mv ../db.ts db/index.ts 50 | 51 | git config user.name github-actions 52 | git config user.email github-actions@github.com 53 | 54 | git add . 55 | git commit -m "update database" 56 | git push origin master 57 | 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | /src/contracts 9 | 10 | # testing 11 | /coverage 12 | 13 | # misc 14 | .DS_Store 15 | .env 16 | .env.staging 17 | my.secrets 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /.openzeppelin/rinkeby.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifestVersion": "3.1", 3 | "impls": { 4 | "088fcec78ab9a2670735e454248afe73e7e176299c438ec864c80373198f4566": { 5 | "address": "0xECF3dd8ec103e14eEDE580b85D1A26b1B1266979", 6 | "txHash": "0xdf932931c8b07d1381dc6369d0e22123483192155b2ab7f094a07d81c164f5b8", 7 | "layout": { 8 | "storage": [ 9 | { 10 | "contract": "Initializable", 11 | "label": "_initialized", 12 | "type": "t_bool", 13 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:25" 14 | }, 15 | { 16 | "contract": "Initializable", 17 | "label": "_initializing", 18 | "type": "t_bool", 19 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:30" 20 | }, 21 | { 22 | "contract": "ContextUpgradeable", 23 | "label": "__gap", 24 | "type": "t_array(t_uint256)50_storage", 25 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" 26 | }, 27 | { 28 | "contract": "ERC165Upgradeable", 29 | "label": "__gap", 30 | "type": "t_array(t_uint256)50_storage", 31 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:35" 32 | }, 33 | { 34 | "contract": "ERC721Upgradeable", 35 | "label": "_name", 36 | "type": "t_string_storage", 37 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:25" 38 | }, 39 | { 40 | "contract": "ERC721Upgradeable", 41 | "label": "_symbol", 42 | "type": "t_string_storage", 43 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:28" 44 | }, 45 | { 46 | "contract": "ERC721Upgradeable", 47 | "label": "_owners", 48 | "type": "t_mapping(t_uint256,t_address)", 49 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:31" 50 | }, 51 | { 52 | "contract": "ERC721Upgradeable", 53 | "label": "_balances", 54 | "type": "t_mapping(t_address,t_uint256)", 55 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:34" 56 | }, 57 | { 58 | "contract": "ERC721Upgradeable", 59 | "label": "_tokenApprovals", 60 | "type": "t_mapping(t_uint256,t_address)", 61 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:37" 62 | }, 63 | { 64 | "contract": "ERC721Upgradeable", 65 | "label": "_operatorApprovals", 66 | "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", 67 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:40" 68 | }, 69 | { 70 | "contract": "ERC721Upgradeable", 71 | "label": "__gap", 72 | "type": "t_array(t_uint256)44_storage", 73 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:384" 74 | }, 75 | { 76 | "contract": "OwnableUpgradeable", 77 | "label": "_owner", 78 | "type": "t_address", 79 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" 80 | }, 81 | { 82 | "contract": "OwnableUpgradeable", 83 | "label": "__gap", 84 | "type": "t_array(t_uint256)49_storage", 85 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" 86 | }, 87 | { 88 | "contract": "ReentrancyGuardUpgradeable", 89 | "label": "_status", 90 | "type": "t_uint256", 91 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:37" 92 | }, 93 | { 94 | "contract": "ReentrancyGuardUpgradeable", 95 | "label": "__gap", 96 | "type": "t_array(t_uint256)49_storage", 97 | "src": "../node_modules/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:67" 98 | }, 99 | { 100 | "contract": "NFTT", 101 | "label": "_tokenIds", 102 | "type": "t_struct(Counter)2032_storage", 103 | "src": "NFTT.sol:12" 104 | }, 105 | { 106 | "contract": "NFTT", 107 | "label": "_tokenMeta", 108 | "type": "t_mapping(t_uint256,t_struct(TokenMeta)70_storage)", 109 | "src": "NFTT.sol:14" 110 | }, 111 | { 112 | "contract": "NFTT", 113 | "label": "baseURI", 114 | "type": "t_string_storage", 115 | "src": "NFTT.sol:16" 116 | } 117 | ], 118 | "types": { 119 | "t_struct(Counter)2032_storage": { 120 | "label": "struct CountersUpgradeable.Counter", 121 | "members": [ 122 | { 123 | "label": "_value", 124 | "type": "t_uint256" 125 | } 126 | ] 127 | }, 128 | "t_uint256": { 129 | "label": "uint256" 130 | }, 131 | "t_mapping(t_uint256,t_struct(TokenMeta)70_storage)": { 132 | "label": "mapping(uint256 => struct NFTT.TokenMeta)" 133 | }, 134 | "t_struct(TokenMeta)70_storage": { 135 | "label": "struct NFTT.TokenMeta", 136 | "members": [ 137 | { 138 | "label": "id", 139 | "type": "t_uint256" 140 | }, 141 | { 142 | "label": "price", 143 | "type": "t_uint256" 144 | }, 145 | { 146 | "label": "name", 147 | "type": "t_string_storage" 148 | }, 149 | { 150 | "label": "uri", 151 | "type": "t_string_storage" 152 | }, 153 | { 154 | "label": "sale", 155 | "type": "t_bool" 156 | } 157 | ] 158 | }, 159 | "t_string_storage": { 160 | "label": "string" 161 | }, 162 | "t_bool": { 163 | "label": "bool" 164 | }, 165 | "t_array(t_uint256)49_storage": { 166 | "label": "uint256[49]" 167 | }, 168 | "t_address": { 169 | "label": "address" 170 | }, 171 | "t_mapping(t_uint256,t_address)": { 172 | "label": "mapping(uint256 => address)" 173 | }, 174 | "t_mapping(t_address,t_uint256)": { 175 | "label": "mapping(address => uint256)" 176 | }, 177 | "t_mapping(t_address,t_mapping(t_address,t_bool))": { 178 | "label": "mapping(address => mapping(address => bool))" 179 | }, 180 | "t_mapping(t_address,t_bool)": { 181 | "label": "mapping(address => bool)" 182 | }, 183 | "t_array(t_uint256)44_storage": { 184 | "label": "uint256[44]" 185 | }, 186 | "t_array(t_uint256)50_storage": { 187 | "label": "uint256[50]" 188 | } 189 | } 190 | } 191 | } 192 | }, 193 | "admin": { 194 | "address": "0x43A0beFf69e66498e239ede33eBABB813BFf4E55", 195 | "txHash": "0x1227338f15db636079803885f67d32e42bd0d753f7798078247c33bf65b3a1bf" 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .crcf 2 | .next 3 | .storybook 4 | .vscode 5 | build 6 | coverage 7 | docs -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "tabWidth": 2, 4 | "semi": false, 5 | "singleQuote": true, 6 | "useTabs": false, 7 | "printWidth": 100, 8 | "bracketSpacing": true, 9 | "jsxBracketSameLine": false, 10 | "arrowParens": "avoid" 11 | } 12 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Silvio Paganini 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NFT Contracts 2 | 3 | ![](https://img.shields.io/badge/Coverage-95.12%25-83A603.svg?prefix=$coverage$) 4 | [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=round)](https://github.com/prettier/prettier) 5 | ![GitHub](https://img.shields.io/github/license/silviopaganini/nft-contracts?style=round) 6 | 7 | NFT Contract used on [NFT Marketplace](https://github.com/silviopaganini/nft-market) 8 | 9 | ## Tech Stack 10 | 11 | - OpenZeppelin 12 | - Truffle / Ganache 13 | 14 | ## Minting 15 | 16 | Minting happens automatically when the Github Action is triggered manually, for more details check `.github/workflows/mint` 17 | 18 | ## 💰 Sponsor this project 19 | 20 | Donations in ETH or BTC are welcome 21 | 22 | **ETH** `0xD20634a78Fa0e98104419a63C278648ccCff4Ce7` 23 | 24 | **BTC** `35pDYqWj5zyogGbNb15W44e9veu6899cZj` -------------------------------------------------------------------------------- /build/contracts/ContextUpgradeable.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "ContextUpgradeable", 3 | "abi": [], 4 | "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":\"ContextUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x60aac6a853246704b017e55f9d3b456debfd0a7f49dd9a99e7113bed03ef0696\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://67add465d6dec3198061b5fb7ed4d8b0e1a26f0c0200115d338241ca74a693de\",\"dweb:/ipfs/Qmerko5uM4L1jwJKK7yPiqTq1QTgd6cbNEy6ffmTLBj6MW\"]},\"/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x5642ae1d6b33c5c0b71a8412c6c64cbcf2468b84a002bee3e33cdb5644d25cdb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://07ba474854eacf022fca2ab63af2b09653f476a9ef2d144ea3d022a0c0b92726\",\"dweb:/ipfs/QmVNfrArMejFSrPMktAtDte64FJ2fGPQHqgSXDz2SH6dse\"]},\"/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x8e9eb503de1189f50c5f16fef327da310b11898d6b9ab3ca937df07c35233b9e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9631a7abcad07067f268b6295668a287e205ea9a8dc0fca02c2bf4db6c39431d\",\"dweb:/ipfs/QmUYFfB2AngTZLEsah4u8Z44riaB6yWkUXeasi1oG7ipfS\"]}},\"version\":1}", 5 | "bytecode": "0x", 6 | "deployedBytecode": "0x", 7 | "immutableReferences": {}, 8 | "generatedSources": [], 9 | "deployedGeneratedSources": [], 10 | "sourceMap": "", 11 | "deployedSourceMap": "", 12 | "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n uint256[50] private __gap;\n}\n", 13 | "sourcePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol", 14 | "ast": { 15 | "absolutePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol", 16 | "exportedSymbols": { 17 | "AddressUpgradeable": [ 18 | 1981 19 | ], 20 | "ContextUpgradeable": [ 21 | 2026 22 | ], 23 | "Initializable": [ 24 | 636 25 | ] 26 | }, 27 | "id": 2027, 28 | "license": "MIT", 29 | "nodeType": "SourceUnit", 30 | "nodes": [ 31 | { 32 | "id": 1983, 33 | "literals": [ 34 | "solidity", 35 | "^", 36 | "0.8", 37 | ".0" 38 | ], 39 | "nodeType": "PragmaDirective", 40 | "src": "33:23:11" 41 | }, 42 | { 43 | "absolutePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol", 44 | "file": "../proxy/utils/Initializable.sol", 45 | "id": 1984, 46 | "nameLocation": "-1:-1:-1", 47 | "nodeType": "ImportDirective", 48 | "scope": 2027, 49 | "sourceUnit": 637, 50 | "src": "57:42:11", 51 | "symbolAliases": [], 52 | "unitAlias": "" 53 | }, 54 | { 55 | "abstract": true, 56 | "baseContracts": [ 57 | { 58 | "baseName": { 59 | "id": 1985, 60 | "name": "Initializable", 61 | "nodeType": "IdentifierPath", 62 | "referencedDeclaration": 636, 63 | "src": "637:13:11" 64 | }, 65 | "id": 1986, 66 | "nodeType": "InheritanceSpecifier", 67 | "src": "637:13:11" 68 | } 69 | ], 70 | "contractDependencies": [ 71 | 636 72 | ], 73 | "contractKind": "contract", 74 | "fullyImplemented": true, 75 | "id": 2026, 76 | "linearizedBaseContracts": [ 77 | 2026, 78 | 636 79 | ], 80 | "name": "ContextUpgradeable", 81 | "nameLocation": "615:18:11", 82 | "nodeType": "ContractDefinition", 83 | "nodes": [ 84 | { 85 | "body": { 86 | "id": 1994, 87 | "nodeType": "Block", 88 | "src": "704:43:11", 89 | "statements": [ 90 | { 91 | "expression": { 92 | "arguments": [], 93 | "expression": { 94 | "argumentTypes": [], 95 | "id": 1991, 96 | "name": "__Context_init_unchained", 97 | "nodeType": "Identifier", 98 | "overloadedDeclarations": [], 99 | "referencedDeclaration": 2001, 100 | "src": "714:24:11", 101 | "typeDescriptions": { 102 | "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", 103 | "typeString": "function ()" 104 | } 105 | }, 106 | "id": 1992, 107 | "isConstant": false, 108 | "isLValue": false, 109 | "isPure": false, 110 | "kind": "functionCall", 111 | "lValueRequested": false, 112 | "names": [], 113 | "nodeType": "FunctionCall", 114 | "src": "714:26:11", 115 | "tryCall": false, 116 | "typeDescriptions": { 117 | "typeIdentifier": "t_tuple$__$", 118 | "typeString": "tuple()" 119 | } 120 | }, 121 | "id": 1993, 122 | "nodeType": "ExpressionStatement", 123 | "src": "714:26:11" 124 | } 125 | ] 126 | }, 127 | "id": 1995, 128 | "implemented": true, 129 | "kind": "function", 130 | "modifiers": [ 131 | { 132 | "id": 1989, 133 | "kind": "modifierInvocation", 134 | "modifierName": { 135 | "id": 1988, 136 | "name": "initializer", 137 | "nodeType": "IdentifierPath", 138 | "referencedDeclaration": 635, 139 | "src": "692:11:11" 140 | }, 141 | "nodeType": "ModifierInvocation", 142 | "src": "692:11:11" 143 | } 144 | ], 145 | "name": "__Context_init", 146 | "nameLocation": "666:14:11", 147 | "nodeType": "FunctionDefinition", 148 | "parameters": { 149 | "id": 1987, 150 | "nodeType": "ParameterList", 151 | "parameters": [], 152 | "src": "680:2:11" 153 | }, 154 | "returnParameters": { 155 | "id": 1990, 156 | "nodeType": "ParameterList", 157 | "parameters": [], 158 | "src": "704:0:11" 159 | }, 160 | "scope": 2026, 161 | "src": "657:90:11", 162 | "stateMutability": "nonpayable", 163 | "virtual": false, 164 | "visibility": "internal" 165 | }, 166 | { 167 | "body": { 168 | "id": 2000, 169 | "nodeType": "Block", 170 | "src": "810:7:11", 171 | "statements": [] 172 | }, 173 | "id": 2001, 174 | "implemented": true, 175 | "kind": "function", 176 | "modifiers": [ 177 | { 178 | "id": 1998, 179 | "kind": "modifierInvocation", 180 | "modifierName": { 181 | "id": 1997, 182 | "name": "initializer", 183 | "nodeType": "IdentifierPath", 184 | "referencedDeclaration": 635, 185 | "src": "798:11:11" 186 | }, 187 | "nodeType": "ModifierInvocation", 188 | "src": "798:11:11" 189 | } 190 | ], 191 | "name": "__Context_init_unchained", 192 | "nameLocation": "762:24:11", 193 | "nodeType": "FunctionDefinition", 194 | "parameters": { 195 | "id": 1996, 196 | "nodeType": "ParameterList", 197 | "parameters": [], 198 | "src": "786:2:11" 199 | }, 200 | "returnParameters": { 201 | "id": 1999, 202 | "nodeType": "ParameterList", 203 | "parameters": [], 204 | "src": "810:0:11" 205 | }, 206 | "scope": 2026, 207 | "src": "753:64:11", 208 | "stateMutability": "nonpayable", 209 | "virtual": false, 210 | "visibility": "internal" 211 | }, 212 | { 213 | "body": { 214 | "id": 2009, 215 | "nodeType": "Block", 216 | "src": "884:34:11", 217 | "statements": [ 218 | { 219 | "expression": { 220 | "expression": { 221 | "id": 2006, 222 | "name": "msg", 223 | "nodeType": "Identifier", 224 | "overloadedDeclarations": [], 225 | "referencedDeclaration": 4294967281, 226 | "src": "901:3:11", 227 | "typeDescriptions": { 228 | "typeIdentifier": "t_magic_message", 229 | "typeString": "msg" 230 | } 231 | }, 232 | "id": 2007, 233 | "isConstant": false, 234 | "isLValue": false, 235 | "isPure": false, 236 | "lValueRequested": false, 237 | "memberName": "sender", 238 | "nodeType": "MemberAccess", 239 | "src": "901:10:11", 240 | "typeDescriptions": { 241 | "typeIdentifier": "t_address", 242 | "typeString": "address" 243 | } 244 | }, 245 | "functionReturnParameters": 2005, 246 | "id": 2008, 247 | "nodeType": "Return", 248 | "src": "894:17:11" 249 | } 250 | ] 251 | }, 252 | "id": 2010, 253 | "implemented": true, 254 | "kind": "function", 255 | "modifiers": [], 256 | "name": "_msgSender", 257 | "nameLocation": "831:10:11", 258 | "nodeType": "FunctionDefinition", 259 | "parameters": { 260 | "id": 2002, 261 | "nodeType": "ParameterList", 262 | "parameters": [], 263 | "src": "841:2:11" 264 | }, 265 | "returnParameters": { 266 | "id": 2005, 267 | "nodeType": "ParameterList", 268 | "parameters": [ 269 | { 270 | "constant": false, 271 | "id": 2004, 272 | "mutability": "mutable", 273 | "name": "", 274 | "nameLocation": "-1:-1:-1", 275 | "nodeType": "VariableDeclaration", 276 | "scope": 2010, 277 | "src": "875:7:11", 278 | "stateVariable": false, 279 | "storageLocation": "default", 280 | "typeDescriptions": { 281 | "typeIdentifier": "t_address", 282 | "typeString": "address" 283 | }, 284 | "typeName": { 285 | "id": 2003, 286 | "name": "address", 287 | "nodeType": "ElementaryTypeName", 288 | "src": "875:7:11", 289 | "stateMutability": "nonpayable", 290 | "typeDescriptions": { 291 | "typeIdentifier": "t_address", 292 | "typeString": "address" 293 | } 294 | }, 295 | "visibility": "internal" 296 | } 297 | ], 298 | "src": "874:9:11" 299 | }, 300 | "scope": 2026, 301 | "src": "822:96:11", 302 | "stateMutability": "view", 303 | "virtual": true, 304 | "visibility": "internal" 305 | }, 306 | { 307 | "body": { 308 | "id": 2020, 309 | "nodeType": "Block", 310 | "src": "991:165:11", 311 | "statements": [ 312 | { 313 | "expression": { 314 | "id": 2015, 315 | "name": "this", 316 | "nodeType": "Identifier", 317 | "overloadedDeclarations": [], 318 | "referencedDeclaration": 4294967268, 319 | "src": "1001:4:11", 320 | "typeDescriptions": { 321 | "typeIdentifier": "t_contract$_ContextUpgradeable_$2026", 322 | "typeString": "contract ContextUpgradeable" 323 | } 324 | }, 325 | "id": 2016, 326 | "nodeType": "ExpressionStatement", 327 | "src": "1001:4:11" 328 | }, 329 | { 330 | "expression": { 331 | "expression": { 332 | "id": 2017, 333 | "name": "msg", 334 | "nodeType": "Identifier", 335 | "overloadedDeclarations": [], 336 | "referencedDeclaration": 4294967281, 337 | "src": "1141:3:11", 338 | "typeDescriptions": { 339 | "typeIdentifier": "t_magic_message", 340 | "typeString": "msg" 341 | } 342 | }, 343 | "id": 2018, 344 | "isConstant": false, 345 | "isLValue": false, 346 | "isPure": false, 347 | "lValueRequested": false, 348 | "memberName": "data", 349 | "nodeType": "MemberAccess", 350 | "src": "1141:8:11", 351 | "typeDescriptions": { 352 | "typeIdentifier": "t_bytes_calldata_ptr", 353 | "typeString": "bytes calldata" 354 | } 355 | }, 356 | "functionReturnParameters": 2014, 357 | "id": 2019, 358 | "nodeType": "Return", 359 | "src": "1134:15:11" 360 | } 361 | ] 362 | }, 363 | "id": 2021, 364 | "implemented": true, 365 | "kind": "function", 366 | "modifiers": [], 367 | "name": "_msgData", 368 | "nameLocation": "933:8:11", 369 | "nodeType": "FunctionDefinition", 370 | "parameters": { 371 | "id": 2011, 372 | "nodeType": "ParameterList", 373 | "parameters": [], 374 | "src": "941:2:11" 375 | }, 376 | "returnParameters": { 377 | "id": 2014, 378 | "nodeType": "ParameterList", 379 | "parameters": [ 380 | { 381 | "constant": false, 382 | "id": 2013, 383 | "mutability": "mutable", 384 | "name": "", 385 | "nameLocation": "-1:-1:-1", 386 | "nodeType": "VariableDeclaration", 387 | "scope": 2021, 388 | "src": "975:14:11", 389 | "stateVariable": false, 390 | "storageLocation": "calldata", 391 | "typeDescriptions": { 392 | "typeIdentifier": "t_bytes_calldata_ptr", 393 | "typeString": "bytes" 394 | }, 395 | "typeName": { 396 | "id": 2012, 397 | "name": "bytes", 398 | "nodeType": "ElementaryTypeName", 399 | "src": "975:5:11", 400 | "typeDescriptions": { 401 | "typeIdentifier": "t_bytes_storage_ptr", 402 | "typeString": "bytes" 403 | } 404 | }, 405 | "visibility": "internal" 406 | } 407 | ], 408 | "src": "974:16:11" 409 | }, 410 | "scope": 2026, 411 | "src": "924:232:11", 412 | "stateMutability": "view", 413 | "virtual": true, 414 | "visibility": "internal" 415 | }, 416 | { 417 | "constant": false, 418 | "id": 2025, 419 | "mutability": "mutable", 420 | "name": "__gap", 421 | "nameLocation": "1181:5:11", 422 | "nodeType": "VariableDeclaration", 423 | "scope": 2026, 424 | "src": "1161:25:11", 425 | "stateVariable": true, 426 | "storageLocation": "default", 427 | "typeDescriptions": { 428 | "typeIdentifier": "t_array$_t_uint256_$50_storage", 429 | "typeString": "uint256[50]" 430 | }, 431 | "typeName": { 432 | "baseType": { 433 | "id": 2022, 434 | "name": "uint256", 435 | "nodeType": "ElementaryTypeName", 436 | "src": "1161:7:11", 437 | "typeDescriptions": { 438 | "typeIdentifier": "t_uint256", 439 | "typeString": "uint256" 440 | } 441 | }, 442 | "id": 2024, 443 | "length": { 444 | "hexValue": "3530", 445 | "id": 2023, 446 | "isConstant": false, 447 | "isLValue": false, 448 | "isPure": true, 449 | "kind": "number", 450 | "lValueRequested": false, 451 | "nodeType": "Literal", 452 | "src": "1169:2:11", 453 | "typeDescriptions": { 454 | "typeIdentifier": "t_rational_50_by_1", 455 | "typeString": "int_const 50" 456 | }, 457 | "value": "50" 458 | }, 459 | "nodeType": "ArrayTypeName", 460 | "src": "1161:11:11", 461 | "typeDescriptions": { 462 | "typeIdentifier": "t_array$_t_uint256_$50_storage_ptr", 463 | "typeString": "uint256[50]" 464 | } 465 | }, 466 | "visibility": "private" 467 | } 468 | ], 469 | "scope": 2027, 470 | "src": "597:592:11" 471 | } 472 | ], 473 | "src": "33:1157:11" 474 | }, 475 | "legacyAST": { 476 | "absolutePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol", 477 | "exportedSymbols": { 478 | "AddressUpgradeable": [ 479 | 1981 480 | ], 481 | "ContextUpgradeable": [ 482 | 2026 483 | ], 484 | "Initializable": [ 485 | 636 486 | ] 487 | }, 488 | "id": 2027, 489 | "license": "MIT", 490 | "nodeType": "SourceUnit", 491 | "nodes": [ 492 | { 493 | "id": 1983, 494 | "literals": [ 495 | "solidity", 496 | "^", 497 | "0.8", 498 | ".0" 499 | ], 500 | "nodeType": "PragmaDirective", 501 | "src": "33:23:11" 502 | }, 503 | { 504 | "absolutePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol", 505 | "file": "../proxy/utils/Initializable.sol", 506 | "id": 1984, 507 | "nameLocation": "-1:-1:-1", 508 | "nodeType": "ImportDirective", 509 | "scope": 2027, 510 | "sourceUnit": 637, 511 | "src": "57:42:11", 512 | "symbolAliases": [], 513 | "unitAlias": "" 514 | }, 515 | { 516 | "abstract": true, 517 | "baseContracts": [ 518 | { 519 | "baseName": { 520 | "id": 1985, 521 | "name": "Initializable", 522 | "nodeType": "IdentifierPath", 523 | "referencedDeclaration": 636, 524 | "src": "637:13:11" 525 | }, 526 | "id": 1986, 527 | "nodeType": "InheritanceSpecifier", 528 | "src": "637:13:11" 529 | } 530 | ], 531 | "contractDependencies": [ 532 | 636 533 | ], 534 | "contractKind": "contract", 535 | "fullyImplemented": true, 536 | "id": 2026, 537 | "linearizedBaseContracts": [ 538 | 2026, 539 | 636 540 | ], 541 | "name": "ContextUpgradeable", 542 | "nameLocation": "615:18:11", 543 | "nodeType": "ContractDefinition", 544 | "nodes": [ 545 | { 546 | "body": { 547 | "id": 1994, 548 | "nodeType": "Block", 549 | "src": "704:43:11", 550 | "statements": [ 551 | { 552 | "expression": { 553 | "arguments": [], 554 | "expression": { 555 | "argumentTypes": [], 556 | "id": 1991, 557 | "name": "__Context_init_unchained", 558 | "nodeType": "Identifier", 559 | "overloadedDeclarations": [], 560 | "referencedDeclaration": 2001, 561 | "src": "714:24:11", 562 | "typeDescriptions": { 563 | "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", 564 | "typeString": "function ()" 565 | } 566 | }, 567 | "id": 1992, 568 | "isConstant": false, 569 | "isLValue": false, 570 | "isPure": false, 571 | "kind": "functionCall", 572 | "lValueRequested": false, 573 | "names": [], 574 | "nodeType": "FunctionCall", 575 | "src": "714:26:11", 576 | "tryCall": false, 577 | "typeDescriptions": { 578 | "typeIdentifier": "t_tuple$__$", 579 | "typeString": "tuple()" 580 | } 581 | }, 582 | "id": 1993, 583 | "nodeType": "ExpressionStatement", 584 | "src": "714:26:11" 585 | } 586 | ] 587 | }, 588 | "id": 1995, 589 | "implemented": true, 590 | "kind": "function", 591 | "modifiers": [ 592 | { 593 | "id": 1989, 594 | "kind": "modifierInvocation", 595 | "modifierName": { 596 | "id": 1988, 597 | "name": "initializer", 598 | "nodeType": "IdentifierPath", 599 | "referencedDeclaration": 635, 600 | "src": "692:11:11" 601 | }, 602 | "nodeType": "ModifierInvocation", 603 | "src": "692:11:11" 604 | } 605 | ], 606 | "name": "__Context_init", 607 | "nameLocation": "666:14:11", 608 | "nodeType": "FunctionDefinition", 609 | "parameters": { 610 | "id": 1987, 611 | "nodeType": "ParameterList", 612 | "parameters": [], 613 | "src": "680:2:11" 614 | }, 615 | "returnParameters": { 616 | "id": 1990, 617 | "nodeType": "ParameterList", 618 | "parameters": [], 619 | "src": "704:0:11" 620 | }, 621 | "scope": 2026, 622 | "src": "657:90:11", 623 | "stateMutability": "nonpayable", 624 | "virtual": false, 625 | "visibility": "internal" 626 | }, 627 | { 628 | "body": { 629 | "id": 2000, 630 | "nodeType": "Block", 631 | "src": "810:7:11", 632 | "statements": [] 633 | }, 634 | "id": 2001, 635 | "implemented": true, 636 | "kind": "function", 637 | "modifiers": [ 638 | { 639 | "id": 1998, 640 | "kind": "modifierInvocation", 641 | "modifierName": { 642 | "id": 1997, 643 | "name": "initializer", 644 | "nodeType": "IdentifierPath", 645 | "referencedDeclaration": 635, 646 | "src": "798:11:11" 647 | }, 648 | "nodeType": "ModifierInvocation", 649 | "src": "798:11:11" 650 | } 651 | ], 652 | "name": "__Context_init_unchained", 653 | "nameLocation": "762:24:11", 654 | "nodeType": "FunctionDefinition", 655 | "parameters": { 656 | "id": 1996, 657 | "nodeType": "ParameterList", 658 | "parameters": [], 659 | "src": "786:2:11" 660 | }, 661 | "returnParameters": { 662 | "id": 1999, 663 | "nodeType": "ParameterList", 664 | "parameters": [], 665 | "src": "810:0:11" 666 | }, 667 | "scope": 2026, 668 | "src": "753:64:11", 669 | "stateMutability": "nonpayable", 670 | "virtual": false, 671 | "visibility": "internal" 672 | }, 673 | { 674 | "body": { 675 | "id": 2009, 676 | "nodeType": "Block", 677 | "src": "884:34:11", 678 | "statements": [ 679 | { 680 | "expression": { 681 | "expression": { 682 | "id": 2006, 683 | "name": "msg", 684 | "nodeType": "Identifier", 685 | "overloadedDeclarations": [], 686 | "referencedDeclaration": 4294967281, 687 | "src": "901:3:11", 688 | "typeDescriptions": { 689 | "typeIdentifier": "t_magic_message", 690 | "typeString": "msg" 691 | } 692 | }, 693 | "id": 2007, 694 | "isConstant": false, 695 | "isLValue": false, 696 | "isPure": false, 697 | "lValueRequested": false, 698 | "memberName": "sender", 699 | "nodeType": "MemberAccess", 700 | "src": "901:10:11", 701 | "typeDescriptions": { 702 | "typeIdentifier": "t_address", 703 | "typeString": "address" 704 | } 705 | }, 706 | "functionReturnParameters": 2005, 707 | "id": 2008, 708 | "nodeType": "Return", 709 | "src": "894:17:11" 710 | } 711 | ] 712 | }, 713 | "id": 2010, 714 | "implemented": true, 715 | "kind": "function", 716 | "modifiers": [], 717 | "name": "_msgSender", 718 | "nameLocation": "831:10:11", 719 | "nodeType": "FunctionDefinition", 720 | "parameters": { 721 | "id": 2002, 722 | "nodeType": "ParameterList", 723 | "parameters": [], 724 | "src": "841:2:11" 725 | }, 726 | "returnParameters": { 727 | "id": 2005, 728 | "nodeType": "ParameterList", 729 | "parameters": [ 730 | { 731 | "constant": false, 732 | "id": 2004, 733 | "mutability": "mutable", 734 | "name": "", 735 | "nameLocation": "-1:-1:-1", 736 | "nodeType": "VariableDeclaration", 737 | "scope": 2010, 738 | "src": "875:7:11", 739 | "stateVariable": false, 740 | "storageLocation": "default", 741 | "typeDescriptions": { 742 | "typeIdentifier": "t_address", 743 | "typeString": "address" 744 | }, 745 | "typeName": { 746 | "id": 2003, 747 | "name": "address", 748 | "nodeType": "ElementaryTypeName", 749 | "src": "875:7:11", 750 | "stateMutability": "nonpayable", 751 | "typeDescriptions": { 752 | "typeIdentifier": "t_address", 753 | "typeString": "address" 754 | } 755 | }, 756 | "visibility": "internal" 757 | } 758 | ], 759 | "src": "874:9:11" 760 | }, 761 | "scope": 2026, 762 | "src": "822:96:11", 763 | "stateMutability": "view", 764 | "virtual": true, 765 | "visibility": "internal" 766 | }, 767 | { 768 | "body": { 769 | "id": 2020, 770 | "nodeType": "Block", 771 | "src": "991:165:11", 772 | "statements": [ 773 | { 774 | "expression": { 775 | "id": 2015, 776 | "name": "this", 777 | "nodeType": "Identifier", 778 | "overloadedDeclarations": [], 779 | "referencedDeclaration": 4294967268, 780 | "src": "1001:4:11", 781 | "typeDescriptions": { 782 | "typeIdentifier": "t_contract$_ContextUpgradeable_$2026", 783 | "typeString": "contract ContextUpgradeable" 784 | } 785 | }, 786 | "id": 2016, 787 | "nodeType": "ExpressionStatement", 788 | "src": "1001:4:11" 789 | }, 790 | { 791 | "expression": { 792 | "expression": { 793 | "id": 2017, 794 | "name": "msg", 795 | "nodeType": "Identifier", 796 | "overloadedDeclarations": [], 797 | "referencedDeclaration": 4294967281, 798 | "src": "1141:3:11", 799 | "typeDescriptions": { 800 | "typeIdentifier": "t_magic_message", 801 | "typeString": "msg" 802 | } 803 | }, 804 | "id": 2018, 805 | "isConstant": false, 806 | "isLValue": false, 807 | "isPure": false, 808 | "lValueRequested": false, 809 | "memberName": "data", 810 | "nodeType": "MemberAccess", 811 | "src": "1141:8:11", 812 | "typeDescriptions": { 813 | "typeIdentifier": "t_bytes_calldata_ptr", 814 | "typeString": "bytes calldata" 815 | } 816 | }, 817 | "functionReturnParameters": 2014, 818 | "id": 2019, 819 | "nodeType": "Return", 820 | "src": "1134:15:11" 821 | } 822 | ] 823 | }, 824 | "id": 2021, 825 | "implemented": true, 826 | "kind": "function", 827 | "modifiers": [], 828 | "name": "_msgData", 829 | "nameLocation": "933:8:11", 830 | "nodeType": "FunctionDefinition", 831 | "parameters": { 832 | "id": 2011, 833 | "nodeType": "ParameterList", 834 | "parameters": [], 835 | "src": "941:2:11" 836 | }, 837 | "returnParameters": { 838 | "id": 2014, 839 | "nodeType": "ParameterList", 840 | "parameters": [ 841 | { 842 | "constant": false, 843 | "id": 2013, 844 | "mutability": "mutable", 845 | "name": "", 846 | "nameLocation": "-1:-1:-1", 847 | "nodeType": "VariableDeclaration", 848 | "scope": 2021, 849 | "src": "975:14:11", 850 | "stateVariable": false, 851 | "storageLocation": "calldata", 852 | "typeDescriptions": { 853 | "typeIdentifier": "t_bytes_calldata_ptr", 854 | "typeString": "bytes" 855 | }, 856 | "typeName": { 857 | "id": 2012, 858 | "name": "bytes", 859 | "nodeType": "ElementaryTypeName", 860 | "src": "975:5:11", 861 | "typeDescriptions": { 862 | "typeIdentifier": "t_bytes_storage_ptr", 863 | "typeString": "bytes" 864 | } 865 | }, 866 | "visibility": "internal" 867 | } 868 | ], 869 | "src": "974:16:11" 870 | }, 871 | "scope": 2026, 872 | "src": "924:232:11", 873 | "stateMutability": "view", 874 | "virtual": true, 875 | "visibility": "internal" 876 | }, 877 | { 878 | "constant": false, 879 | "id": 2025, 880 | "mutability": "mutable", 881 | "name": "__gap", 882 | "nameLocation": "1181:5:11", 883 | "nodeType": "VariableDeclaration", 884 | "scope": 2026, 885 | "src": "1161:25:11", 886 | "stateVariable": true, 887 | "storageLocation": "default", 888 | "typeDescriptions": { 889 | "typeIdentifier": "t_array$_t_uint256_$50_storage", 890 | "typeString": "uint256[50]" 891 | }, 892 | "typeName": { 893 | "baseType": { 894 | "id": 2022, 895 | "name": "uint256", 896 | "nodeType": "ElementaryTypeName", 897 | "src": "1161:7:11", 898 | "typeDescriptions": { 899 | "typeIdentifier": "t_uint256", 900 | "typeString": "uint256" 901 | } 902 | }, 903 | "id": 2024, 904 | "length": { 905 | "hexValue": "3530", 906 | "id": 2023, 907 | "isConstant": false, 908 | "isLValue": false, 909 | "isPure": true, 910 | "kind": "number", 911 | "lValueRequested": false, 912 | "nodeType": "Literal", 913 | "src": "1169:2:11", 914 | "typeDescriptions": { 915 | "typeIdentifier": "t_rational_50_by_1", 916 | "typeString": "int_const 50" 917 | }, 918 | "value": "50" 919 | }, 920 | "nodeType": "ArrayTypeName", 921 | "src": "1161:11:11", 922 | "typeDescriptions": { 923 | "typeIdentifier": "t_array$_t_uint256_$50_storage_ptr", 924 | "typeString": "uint256[50]" 925 | } 926 | }, 927 | "visibility": "private" 928 | } 929 | ], 930 | "scope": 2027, 931 | "src": "597:592:11" 932 | } 933 | ], 934 | "src": "33:1157:11" 935 | }, 936 | "compiler": { 937 | "name": "solc", 938 | "version": "0.8.3+commit.8d00100c.Emscripten.clang" 939 | }, 940 | "networks": {}, 941 | "schemaVersion": "3.3.4", 942 | "updatedAt": "2021-04-09T12:17:08.678Z", 943 | "devdoc": { 944 | "kind": "dev", 945 | "methods": {}, 946 | "version": 1 947 | }, 948 | "userdoc": { 949 | "kind": "user", 950 | "methods": {}, 951 | "version": 1 952 | } 953 | } -------------------------------------------------------------------------------- /build/contracts/IERC165Upgradeable.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "IERC165Upgradeable", 3 | "abi": [ 4 | { 5 | "inputs": [ 6 | { 7 | "internalType": "bytes4", 8 | "name": "interfaceId", 9 | "type": "bytes4" 10 | } 11 | ], 12 | "name": "supportsInterface", 13 | "outputs": [ 14 | { 15 | "internalType": "bool", 16 | "name": "", 17 | "type": "bool" 18 | } 19 | ], 20 | "stateMutability": "view", 21 | "type": "function" 22 | } 23 | ], 24 | "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[EIP]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":\"IERC165Upgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"keccak256\":\"0x1c4860acd323e34a67b3e97faab9aaa55fe8e92b1dcf08b5f47f3468d58ce75c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3c2746f8ebb4bfb6b8e8a768296c7f85f11b36f4873daabb91933c3602f00590\",\"dweb:/ipfs/QmdumDez8WEdk9FDuP7Jp5pDSJiQeFtFSJw3B5CEHJL4KU\"]}},\"version\":1}", 25 | "bytecode": "0x", 26 | "deployedBytecode": "0x", 27 | "immutableReferences": {}, 28 | "generatedSources": [], 29 | "deployedGeneratedSources": [], 30 | "sourceMap": "", 31 | "deployedSourceMap": "", 32 | "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n", 33 | "sourcePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol", 34 | "ast": { 35 | "absolutePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol", 36 | "exportedSymbols": { 37 | "IERC165Upgradeable": [ 38 | 2348 39 | ] 40 | }, 41 | "id": 2349, 42 | "license": "MIT", 43 | "nodeType": "SourceUnit", 44 | "nodes": [ 45 | { 46 | "id": 2338, 47 | "literals": [ 48 | "solidity", 49 | "^", 50 | "0.8", 51 | ".0" 52 | ], 53 | "nodeType": "PragmaDirective", 54 | "src": "33:23:15" 55 | }, 56 | { 57 | "abstract": false, 58 | "baseContracts": [], 59 | "contractDependencies": [], 60 | "contractKind": "interface", 61 | "documentation": { 62 | "id": 2339, 63 | "nodeType": "StructuredDocumentation", 64 | "src": "58:279:15", 65 | "text": " @dev Interface of the ERC165 standard, as defined in the\n https://eips.ethereum.org/EIPS/eip-165[EIP].\n Implementers can declare support of contract interfaces, which can then be\n queried by others ({ERC165Checker}).\n For an implementation, see {ERC165}." 66 | }, 67 | "fullyImplemented": false, 68 | "id": 2348, 69 | "linearizedBaseContracts": [ 70 | 2348 71 | ], 72 | "name": "IERC165Upgradeable", 73 | "nameLocation": "348:18:15", 74 | "nodeType": "ContractDefinition", 75 | "nodes": [ 76 | { 77 | "documentation": { 78 | "id": 2340, 79 | "nodeType": "StructuredDocumentation", 80 | "src": "373:340:15", 81 | "text": " @dev Returns true if this contract implements the interface defined by\n `interfaceId`. See the corresponding\n https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n to learn more about how these ids are created.\n This function call must use less than 30 000 gas." 82 | }, 83 | "functionSelector": "01ffc9a7", 84 | "id": 2347, 85 | "implemented": false, 86 | "kind": "function", 87 | "modifiers": [], 88 | "name": "supportsInterface", 89 | "nameLocation": "727:17:15", 90 | "nodeType": "FunctionDefinition", 91 | "parameters": { 92 | "id": 2343, 93 | "nodeType": "ParameterList", 94 | "parameters": [ 95 | { 96 | "constant": false, 97 | "id": 2342, 98 | "mutability": "mutable", 99 | "name": "interfaceId", 100 | "nameLocation": "752:11:15", 101 | "nodeType": "VariableDeclaration", 102 | "scope": 2347, 103 | "src": "745:18:15", 104 | "stateVariable": false, 105 | "storageLocation": "default", 106 | "typeDescriptions": { 107 | "typeIdentifier": "t_bytes4", 108 | "typeString": "bytes4" 109 | }, 110 | "typeName": { 111 | "id": 2341, 112 | "name": "bytes4", 113 | "nodeType": "ElementaryTypeName", 114 | "src": "745:6:15", 115 | "typeDescriptions": { 116 | "typeIdentifier": "t_bytes4", 117 | "typeString": "bytes4" 118 | } 119 | }, 120 | "visibility": "internal" 121 | } 122 | ], 123 | "src": "744:20:15" 124 | }, 125 | "returnParameters": { 126 | "id": 2346, 127 | "nodeType": "ParameterList", 128 | "parameters": [ 129 | { 130 | "constant": false, 131 | "id": 2345, 132 | "mutability": "mutable", 133 | "name": "", 134 | "nameLocation": "-1:-1:-1", 135 | "nodeType": "VariableDeclaration", 136 | "scope": 2347, 137 | "src": "788:4:15", 138 | "stateVariable": false, 139 | "storageLocation": "default", 140 | "typeDescriptions": { 141 | "typeIdentifier": "t_bool", 142 | "typeString": "bool" 143 | }, 144 | "typeName": { 145 | "id": 2344, 146 | "name": "bool", 147 | "nodeType": "ElementaryTypeName", 148 | "src": "788:4:15", 149 | "typeDescriptions": { 150 | "typeIdentifier": "t_bool", 151 | "typeString": "bool" 152 | } 153 | }, 154 | "visibility": "internal" 155 | } 156 | ], 157 | "src": "787:6:15" 158 | }, 159 | "scope": 2348, 160 | "src": "718:76:15", 161 | "stateMutability": "view", 162 | "virtual": false, 163 | "visibility": "external" 164 | } 165 | ], 166 | "scope": 2349, 167 | "src": "338:458:15" 168 | } 169 | ], 170 | "src": "33:764:15" 171 | }, 172 | "legacyAST": { 173 | "absolutePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol", 174 | "exportedSymbols": { 175 | "IERC165Upgradeable": [ 176 | 2348 177 | ] 178 | }, 179 | "id": 2349, 180 | "license": "MIT", 181 | "nodeType": "SourceUnit", 182 | "nodes": [ 183 | { 184 | "id": 2338, 185 | "literals": [ 186 | "solidity", 187 | "^", 188 | "0.8", 189 | ".0" 190 | ], 191 | "nodeType": "PragmaDirective", 192 | "src": "33:23:15" 193 | }, 194 | { 195 | "abstract": false, 196 | "baseContracts": [], 197 | "contractDependencies": [], 198 | "contractKind": "interface", 199 | "documentation": { 200 | "id": 2339, 201 | "nodeType": "StructuredDocumentation", 202 | "src": "58:279:15", 203 | "text": " @dev Interface of the ERC165 standard, as defined in the\n https://eips.ethereum.org/EIPS/eip-165[EIP].\n Implementers can declare support of contract interfaces, which can then be\n queried by others ({ERC165Checker}).\n For an implementation, see {ERC165}." 204 | }, 205 | "fullyImplemented": false, 206 | "id": 2348, 207 | "linearizedBaseContracts": [ 208 | 2348 209 | ], 210 | "name": "IERC165Upgradeable", 211 | "nameLocation": "348:18:15", 212 | "nodeType": "ContractDefinition", 213 | "nodes": [ 214 | { 215 | "documentation": { 216 | "id": 2340, 217 | "nodeType": "StructuredDocumentation", 218 | "src": "373:340:15", 219 | "text": " @dev Returns true if this contract implements the interface defined by\n `interfaceId`. See the corresponding\n https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n to learn more about how these ids are created.\n This function call must use less than 30 000 gas." 220 | }, 221 | "functionSelector": "01ffc9a7", 222 | "id": 2347, 223 | "implemented": false, 224 | "kind": "function", 225 | "modifiers": [], 226 | "name": "supportsInterface", 227 | "nameLocation": "727:17:15", 228 | "nodeType": "FunctionDefinition", 229 | "parameters": { 230 | "id": 2343, 231 | "nodeType": "ParameterList", 232 | "parameters": [ 233 | { 234 | "constant": false, 235 | "id": 2342, 236 | "mutability": "mutable", 237 | "name": "interfaceId", 238 | "nameLocation": "752:11:15", 239 | "nodeType": "VariableDeclaration", 240 | "scope": 2347, 241 | "src": "745:18:15", 242 | "stateVariable": false, 243 | "storageLocation": "default", 244 | "typeDescriptions": { 245 | "typeIdentifier": "t_bytes4", 246 | "typeString": "bytes4" 247 | }, 248 | "typeName": { 249 | "id": 2341, 250 | "name": "bytes4", 251 | "nodeType": "ElementaryTypeName", 252 | "src": "745:6:15", 253 | "typeDescriptions": { 254 | "typeIdentifier": "t_bytes4", 255 | "typeString": "bytes4" 256 | } 257 | }, 258 | "visibility": "internal" 259 | } 260 | ], 261 | "src": "744:20:15" 262 | }, 263 | "returnParameters": { 264 | "id": 2346, 265 | "nodeType": "ParameterList", 266 | "parameters": [ 267 | { 268 | "constant": false, 269 | "id": 2345, 270 | "mutability": "mutable", 271 | "name": "", 272 | "nameLocation": "-1:-1:-1", 273 | "nodeType": "VariableDeclaration", 274 | "scope": 2347, 275 | "src": "788:4:15", 276 | "stateVariable": false, 277 | "storageLocation": "default", 278 | "typeDescriptions": { 279 | "typeIdentifier": "t_bool", 280 | "typeString": "bool" 281 | }, 282 | "typeName": { 283 | "id": 2344, 284 | "name": "bool", 285 | "nodeType": "ElementaryTypeName", 286 | "src": "788:4:15", 287 | "typeDescriptions": { 288 | "typeIdentifier": "t_bool", 289 | "typeString": "bool" 290 | } 291 | }, 292 | "visibility": "internal" 293 | } 294 | ], 295 | "src": "787:6:15" 296 | }, 297 | "scope": 2348, 298 | "src": "718:76:15", 299 | "stateMutability": "view", 300 | "virtual": false, 301 | "visibility": "external" 302 | } 303 | ], 304 | "scope": 2349, 305 | "src": "338:458:15" 306 | } 307 | ], 308 | "src": "33:764:15" 309 | }, 310 | "compiler": { 311 | "name": "solc", 312 | "version": "0.8.3+commit.8d00100c.Emscripten.clang" 313 | }, 314 | "networks": {}, 315 | "schemaVersion": "3.3.4", 316 | "updatedAt": "2021-04-09T12:17:08.695Z", 317 | "devdoc": { 318 | "details": "Interface of the ERC165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[EIP]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.", 319 | "kind": "dev", 320 | "methods": { 321 | "supportsInterface(bytes4)": { 322 | "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas." 323 | } 324 | }, 325 | "version": 1 326 | }, 327 | "userdoc": { 328 | "kind": "user", 329 | "methods": {}, 330 | "version": 1 331 | } 332 | } -------------------------------------------------------------------------------- /build/contracts/IERC721ReceiverUpgradeable.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "IERC721ReceiverUpgradeable", 3 | "abi": [ 4 | { 5 | "inputs": [ 6 | { 7 | "internalType": "address", 8 | "name": "operator", 9 | "type": "address" 10 | }, 11 | { 12 | "internalType": "address", 13 | "name": "from", 14 | "type": "address" 15 | }, 16 | { 17 | "internalType": "uint256", 18 | "name": "tokenId", 19 | "type": "uint256" 20 | }, 21 | { 22 | "internalType": "bytes", 23 | "name": "data", 24 | "type": "bytes" 25 | } 26 | ], 27 | "name": "onERC721Received", 28 | "outputs": [ 29 | { 30 | "internalType": "bytes4", 31 | "name": "", 32 | "type": "bytes4" 33 | } 34 | ], 35 | "stateMutability": "nonpayable", 36 | "type": "function" 37 | } 38 | ], 39 | "metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface for any contract that wants to support safeTransfers from ERC721 asset contracts.\",\"kind\":\"dev\",\"methods\":{\"onERC721Received(address,address,uint256,bytes)\":{\"details\":\"Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} by `operator` from `from`, this function is called. It must return its Solidity selector to confirm the token transfer. If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\"}},\"title\":\"ERC721 token receiver interface\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\":\"IERC721ReceiverUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\":{\"keccak256\":\"0x33620beff0655c5e728a72fff76fb6ce2dc32fc6b61eb8e435b12ed1adf31525\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6b88aa0f47c7cea8e39cbf6025935242c0466a8b68d2d3bf5efc6d5d31185dc2\",\"dweb:/ipfs/QmPfTy74xdPaHJx6RuEz4LorCsSeMndeffZqvEspACjjQj\"]}},\"version\":1}", 40 | "bytecode": "0x", 41 | "deployedBytecode": "0x", 42 | "immutableReferences": {}, 43 | "generatedSources": [], 44 | "deployedGeneratedSources": [], 45 | "sourceMap": "", 46 | "deployedSourceMap": "", 47 | "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\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 */\ninterface IERC721ReceiverUpgradeable {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\n}\n", 48 | "sourcePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol", 49 | "ast": { 50 | "absolutePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol", 51 | "exportedSymbols": { 52 | "IERC721ReceiverUpgradeable": [ 53 | 1563 54 | ] 55 | }, 56 | "id": 1564, 57 | "license": "MIT", 58 | "nodeType": "SourceUnit", 59 | "nodes": [ 60 | { 61 | "id": 1547, 62 | "literals": [ 63 | "solidity", 64 | "^", 65 | "0.8", 66 | ".0" 67 | ], 68 | "nodeType": "PragmaDirective", 69 | "src": "33:23:6" 70 | }, 71 | { 72 | "abstract": false, 73 | "baseContracts": [], 74 | "contractDependencies": [], 75 | "contractKind": "interface", 76 | "documentation": { 77 | "id": 1548, 78 | "nodeType": "StructuredDocumentation", 79 | "src": "58:152:6", 80 | "text": " @title ERC721 token receiver interface\n @dev Interface for any contract that wants to support safeTransfers\n from ERC721 asset contracts." 81 | }, 82 | "fullyImplemented": false, 83 | "id": 1563, 84 | "linearizedBaseContracts": [ 85 | 1563 86 | ], 87 | "name": "IERC721ReceiverUpgradeable", 88 | "nameLocation": "221:26:6", 89 | "nodeType": "ContractDefinition", 90 | "nodes": [ 91 | { 92 | "documentation": { 93 | "id": 1549, 94 | "nodeType": "StructuredDocumentation", 95 | "src": "254:485:6", 96 | "text": " @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n by `operator` from `from`, this function is called.\n It must return its Solidity selector to confirm the token transfer.\n If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`." 97 | }, 98 | "functionSelector": "150b7a02", 99 | "id": 1562, 100 | "implemented": false, 101 | "kind": "function", 102 | "modifiers": [], 103 | "name": "onERC721Received", 104 | "nameLocation": "753:16:6", 105 | "nodeType": "FunctionDefinition", 106 | "parameters": { 107 | "id": 1558, 108 | "nodeType": "ParameterList", 109 | "parameters": [ 110 | { 111 | "constant": false, 112 | "id": 1551, 113 | "mutability": "mutable", 114 | "name": "operator", 115 | "nameLocation": "778:8:6", 116 | "nodeType": "VariableDeclaration", 117 | "scope": 1562, 118 | "src": "770:16:6", 119 | "stateVariable": false, 120 | "storageLocation": "default", 121 | "typeDescriptions": { 122 | "typeIdentifier": "t_address", 123 | "typeString": "address" 124 | }, 125 | "typeName": { 126 | "id": 1550, 127 | "name": "address", 128 | "nodeType": "ElementaryTypeName", 129 | "src": "770:7:6", 130 | "stateMutability": "nonpayable", 131 | "typeDescriptions": { 132 | "typeIdentifier": "t_address", 133 | "typeString": "address" 134 | } 135 | }, 136 | "visibility": "internal" 137 | }, 138 | { 139 | "constant": false, 140 | "id": 1553, 141 | "mutability": "mutable", 142 | "name": "from", 143 | "nameLocation": "796:4:6", 144 | "nodeType": "VariableDeclaration", 145 | "scope": 1562, 146 | "src": "788:12:6", 147 | "stateVariable": false, 148 | "storageLocation": "default", 149 | "typeDescriptions": { 150 | "typeIdentifier": "t_address", 151 | "typeString": "address" 152 | }, 153 | "typeName": { 154 | "id": 1552, 155 | "name": "address", 156 | "nodeType": "ElementaryTypeName", 157 | "src": "788:7:6", 158 | "stateMutability": "nonpayable", 159 | "typeDescriptions": { 160 | "typeIdentifier": "t_address", 161 | "typeString": "address" 162 | } 163 | }, 164 | "visibility": "internal" 165 | }, 166 | { 167 | "constant": false, 168 | "id": 1555, 169 | "mutability": "mutable", 170 | "name": "tokenId", 171 | "nameLocation": "810:7:6", 172 | "nodeType": "VariableDeclaration", 173 | "scope": 1562, 174 | "src": "802:15:6", 175 | "stateVariable": false, 176 | "storageLocation": "default", 177 | "typeDescriptions": { 178 | "typeIdentifier": "t_uint256", 179 | "typeString": "uint256" 180 | }, 181 | "typeName": { 182 | "id": 1554, 183 | "name": "uint256", 184 | "nodeType": "ElementaryTypeName", 185 | "src": "802:7:6", 186 | "typeDescriptions": { 187 | "typeIdentifier": "t_uint256", 188 | "typeString": "uint256" 189 | } 190 | }, 191 | "visibility": "internal" 192 | }, 193 | { 194 | "constant": false, 195 | "id": 1557, 196 | "mutability": "mutable", 197 | "name": "data", 198 | "nameLocation": "834:4:6", 199 | "nodeType": "VariableDeclaration", 200 | "scope": 1562, 201 | "src": "819:19:6", 202 | "stateVariable": false, 203 | "storageLocation": "calldata", 204 | "typeDescriptions": { 205 | "typeIdentifier": "t_bytes_calldata_ptr", 206 | "typeString": "bytes" 207 | }, 208 | "typeName": { 209 | "id": 1556, 210 | "name": "bytes", 211 | "nodeType": "ElementaryTypeName", 212 | "src": "819:5:6", 213 | "typeDescriptions": { 214 | "typeIdentifier": "t_bytes_storage_ptr", 215 | "typeString": "bytes" 216 | } 217 | }, 218 | "visibility": "internal" 219 | } 220 | ], 221 | "src": "769:70:6" 222 | }, 223 | "returnParameters": { 224 | "id": 1561, 225 | "nodeType": "ParameterList", 226 | "parameters": [ 227 | { 228 | "constant": false, 229 | "id": 1560, 230 | "mutability": "mutable", 231 | "name": "", 232 | "nameLocation": "-1:-1:-1", 233 | "nodeType": "VariableDeclaration", 234 | "scope": 1562, 235 | "src": "858:6:6", 236 | "stateVariable": false, 237 | "storageLocation": "default", 238 | "typeDescriptions": { 239 | "typeIdentifier": "t_bytes4", 240 | "typeString": "bytes4" 241 | }, 242 | "typeName": { 243 | "id": 1559, 244 | "name": "bytes4", 245 | "nodeType": "ElementaryTypeName", 246 | "src": "858:6:6", 247 | "typeDescriptions": { 248 | "typeIdentifier": "t_bytes4", 249 | "typeString": "bytes4" 250 | } 251 | }, 252 | "visibility": "internal" 253 | } 254 | ], 255 | "src": "857:8:6" 256 | }, 257 | "scope": 1563, 258 | "src": "744:122:6", 259 | "stateMutability": "nonpayable", 260 | "virtual": false, 261 | "visibility": "external" 262 | } 263 | ], 264 | "scope": 1564, 265 | "src": "211:657:6" 266 | } 267 | ], 268 | "src": "33:836:6" 269 | }, 270 | "legacyAST": { 271 | "absolutePath": "/Users/paganinisilvio/Desktop/Workspace/LVR/contracts/node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol", 272 | "exportedSymbols": { 273 | "IERC721ReceiverUpgradeable": [ 274 | 1563 275 | ] 276 | }, 277 | "id": 1564, 278 | "license": "MIT", 279 | "nodeType": "SourceUnit", 280 | "nodes": [ 281 | { 282 | "id": 1547, 283 | "literals": [ 284 | "solidity", 285 | "^", 286 | "0.8", 287 | ".0" 288 | ], 289 | "nodeType": "PragmaDirective", 290 | "src": "33:23:6" 291 | }, 292 | { 293 | "abstract": false, 294 | "baseContracts": [], 295 | "contractDependencies": [], 296 | "contractKind": "interface", 297 | "documentation": { 298 | "id": 1548, 299 | "nodeType": "StructuredDocumentation", 300 | "src": "58:152:6", 301 | "text": " @title ERC721 token receiver interface\n @dev Interface for any contract that wants to support safeTransfers\n from ERC721 asset contracts." 302 | }, 303 | "fullyImplemented": false, 304 | "id": 1563, 305 | "linearizedBaseContracts": [ 306 | 1563 307 | ], 308 | "name": "IERC721ReceiverUpgradeable", 309 | "nameLocation": "221:26:6", 310 | "nodeType": "ContractDefinition", 311 | "nodes": [ 312 | { 313 | "documentation": { 314 | "id": 1549, 315 | "nodeType": "StructuredDocumentation", 316 | "src": "254:485:6", 317 | "text": " @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n by `operator` from `from`, this function is called.\n It must return its Solidity selector to confirm the token transfer.\n If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`." 318 | }, 319 | "functionSelector": "150b7a02", 320 | "id": 1562, 321 | "implemented": false, 322 | "kind": "function", 323 | "modifiers": [], 324 | "name": "onERC721Received", 325 | "nameLocation": "753:16:6", 326 | "nodeType": "FunctionDefinition", 327 | "parameters": { 328 | "id": 1558, 329 | "nodeType": "ParameterList", 330 | "parameters": [ 331 | { 332 | "constant": false, 333 | "id": 1551, 334 | "mutability": "mutable", 335 | "name": "operator", 336 | "nameLocation": "778:8:6", 337 | "nodeType": "VariableDeclaration", 338 | "scope": 1562, 339 | "src": "770:16:6", 340 | "stateVariable": false, 341 | "storageLocation": "default", 342 | "typeDescriptions": { 343 | "typeIdentifier": "t_address", 344 | "typeString": "address" 345 | }, 346 | "typeName": { 347 | "id": 1550, 348 | "name": "address", 349 | "nodeType": "ElementaryTypeName", 350 | "src": "770:7:6", 351 | "stateMutability": "nonpayable", 352 | "typeDescriptions": { 353 | "typeIdentifier": "t_address", 354 | "typeString": "address" 355 | } 356 | }, 357 | "visibility": "internal" 358 | }, 359 | { 360 | "constant": false, 361 | "id": 1553, 362 | "mutability": "mutable", 363 | "name": "from", 364 | "nameLocation": "796:4:6", 365 | "nodeType": "VariableDeclaration", 366 | "scope": 1562, 367 | "src": "788:12:6", 368 | "stateVariable": false, 369 | "storageLocation": "default", 370 | "typeDescriptions": { 371 | "typeIdentifier": "t_address", 372 | "typeString": "address" 373 | }, 374 | "typeName": { 375 | "id": 1552, 376 | "name": "address", 377 | "nodeType": "ElementaryTypeName", 378 | "src": "788:7:6", 379 | "stateMutability": "nonpayable", 380 | "typeDescriptions": { 381 | "typeIdentifier": "t_address", 382 | "typeString": "address" 383 | } 384 | }, 385 | "visibility": "internal" 386 | }, 387 | { 388 | "constant": false, 389 | "id": 1555, 390 | "mutability": "mutable", 391 | "name": "tokenId", 392 | "nameLocation": "810:7:6", 393 | "nodeType": "VariableDeclaration", 394 | "scope": 1562, 395 | "src": "802:15:6", 396 | "stateVariable": false, 397 | "storageLocation": "default", 398 | "typeDescriptions": { 399 | "typeIdentifier": "t_uint256", 400 | "typeString": "uint256" 401 | }, 402 | "typeName": { 403 | "id": 1554, 404 | "name": "uint256", 405 | "nodeType": "ElementaryTypeName", 406 | "src": "802:7:6", 407 | "typeDescriptions": { 408 | "typeIdentifier": "t_uint256", 409 | "typeString": "uint256" 410 | } 411 | }, 412 | "visibility": "internal" 413 | }, 414 | { 415 | "constant": false, 416 | "id": 1557, 417 | "mutability": "mutable", 418 | "name": "data", 419 | "nameLocation": "834:4:6", 420 | "nodeType": "VariableDeclaration", 421 | "scope": 1562, 422 | "src": "819:19:6", 423 | "stateVariable": false, 424 | "storageLocation": "calldata", 425 | "typeDescriptions": { 426 | "typeIdentifier": "t_bytes_calldata_ptr", 427 | "typeString": "bytes" 428 | }, 429 | "typeName": { 430 | "id": 1556, 431 | "name": "bytes", 432 | "nodeType": "ElementaryTypeName", 433 | "src": "819:5:6", 434 | "typeDescriptions": { 435 | "typeIdentifier": "t_bytes_storage_ptr", 436 | "typeString": "bytes" 437 | } 438 | }, 439 | "visibility": "internal" 440 | } 441 | ], 442 | "src": "769:70:6" 443 | }, 444 | "returnParameters": { 445 | "id": 1561, 446 | "nodeType": "ParameterList", 447 | "parameters": [ 448 | { 449 | "constant": false, 450 | "id": 1560, 451 | "mutability": "mutable", 452 | "name": "", 453 | "nameLocation": "-1:-1:-1", 454 | "nodeType": "VariableDeclaration", 455 | "scope": 1562, 456 | "src": "858:6:6", 457 | "stateVariable": false, 458 | "storageLocation": "default", 459 | "typeDescriptions": { 460 | "typeIdentifier": "t_bytes4", 461 | "typeString": "bytes4" 462 | }, 463 | "typeName": { 464 | "id": 1559, 465 | "name": "bytes4", 466 | "nodeType": "ElementaryTypeName", 467 | "src": "858:6:6", 468 | "typeDescriptions": { 469 | "typeIdentifier": "t_bytes4", 470 | "typeString": "bytes4" 471 | } 472 | }, 473 | "visibility": "internal" 474 | } 475 | ], 476 | "src": "857:8:6" 477 | }, 478 | "scope": 1563, 479 | "src": "744:122:6", 480 | "stateMutability": "nonpayable", 481 | "virtual": false, 482 | "visibility": "external" 483 | } 484 | ], 485 | "scope": 1564, 486 | "src": "211:657:6" 487 | } 488 | ], 489 | "src": "33:836:6" 490 | }, 491 | "compiler": { 492 | "name": "solc", 493 | "version": "0.8.3+commit.8d00100c.Emscripten.clang" 494 | }, 495 | "networks": {}, 496 | "schemaVersion": "3.3.4", 497 | "updatedAt": "2021-04-09T12:17:08.648Z", 498 | "devdoc": { 499 | "details": "Interface for any contract that wants to support safeTransfers from ERC721 asset contracts.", 500 | "kind": "dev", 501 | "methods": { 502 | "onERC721Received(address,address,uint256,bytes)": { 503 | "details": "Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} by `operator` from `from`, this function is called. It must return its Solidity selector to confirm the token transfer. If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`." 504 | } 505 | }, 506 | "title": "ERC721 token receiver interface", 507 | "version": 1 508 | }, 509 | "userdoc": { 510 | "kind": "user", 511 | "methods": {}, 512 | "version": 1 513 | } 514 | } -------------------------------------------------------------------------------- /contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.4.22 <0.9.0; 3 | 4 | contract Migrations { 5 | address public owner = msg.sender; 6 | uint public last_completed_migration; 7 | 8 | modifier restricted() { 9 | require( 10 | msg.sender == owner, 11 | "This function is restricted to the contract's owner" 12 | ); 13 | _; 14 | } 15 | 16 | function setCompleted(uint completed) public restricted { 17 | last_completed_migration = completed; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /contracts/NFTT.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.4.22 <0.9.0; 3 | pragma experimental ABIEncoderV2; 4 | 5 | import "../node_modules/@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; 6 | import "../node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; 7 | import "../node_modules/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; 8 | import "../node_modules/@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; 9 | 10 | contract NFTT is ERC721Upgradeable, OwnableUpgradeable, ReentrancyGuardUpgradeable { 11 | using CountersUpgradeable for CountersUpgradeable.Counter; 12 | CountersUpgradeable.Counter private _tokenIds; 13 | 14 | mapping (uint256 => TokenMeta) private _tokenMeta; 15 | 16 | string baseURI; 17 | 18 | struct TokenMeta { 19 | uint256 id; 20 | uint256 price; 21 | string name; 22 | string uri; 23 | bool sale; 24 | } 25 | 26 | function initialize() public initializer { 27 | OwnableUpgradeable.__Ownable_init(); 28 | ReentrancyGuardUpgradeable.__ReentrancyGuard_init(); 29 | ERC721Upgradeable.__ERC721_init("NFTT", "NFTT"); 30 | setBaseURI("https://rh25q24tvf.execute-api.eu-west-2.amazonaws.com/dev/token?id="); 31 | } 32 | 33 | /** 34 | * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden 35 | * in child contracts. 36 | */ 37 | function _baseURI() internal view override virtual returns (string memory) { 38 | return baseURI; 39 | } 40 | 41 | function setBaseURI(string memory _newBaseURI) public virtual onlyOwner { 42 | baseURI = _newBaseURI; 43 | } 44 | 45 | function getAllOnSale () public view virtual returns( TokenMeta[] memory ) { 46 | TokenMeta[] memory tokensOnSale = new TokenMeta[](_tokenIds.current()); 47 | uint256 counter = 0; 48 | 49 | for(uint i = 1; i < _tokenIds.current() + 1; i++) { 50 | if(_tokenMeta[i].sale == true) { 51 | tokensOnSale[counter] = _tokenMeta[i]; 52 | counter++; 53 | } 54 | } 55 | return tokensOnSale; 56 | } 57 | 58 | /** 59 | * @dev sets maps token to its price 60 | * @param _tokenId uint256 token ID (token number) 61 | * @param _sale bool token on sale 62 | * @param _price unit256 token price 63 | * 64 | * Requirements: 65 | * `tokenId` must exist 66 | * `price` must be more than 0 67 | * `owner` must the msg.owner 68 | */ 69 | function setTokenSale(uint256 _tokenId, bool _sale, uint256 _price) public { 70 | require(_exists(_tokenId), "ERC721Metadata: Sale set of nonexistent token"); 71 | require(_price > 0); 72 | require(ownerOf(_tokenId) == _msgSender()); 73 | 74 | _tokenMeta[_tokenId].sale = _sale; 75 | setTokenPrice(_tokenId, _price); 76 | } 77 | 78 | /** 79 | * @dev sets maps token to its price 80 | * @param _tokenId uint256 token ID (token number) 81 | * @param _price uint256 token price 82 | * 83 | * Requirements: 84 | * `tokenId` must exist 85 | * `owner` must the msg.owner 86 | */ 87 | function setTokenPrice(uint256 _tokenId, uint256 _price) public { 88 | require(_exists(_tokenId), "ERC721Metadata: Price set of nonexistent token"); 89 | require(ownerOf(_tokenId) == _msgSender()); 90 | _tokenMeta[_tokenId].price = _price; 91 | } 92 | 93 | function tokenPrice(uint256 tokenId) public view virtual returns (uint256) { 94 | require(_exists(tokenId), "ERC721Metadata: Price query for nonexistent token"); 95 | return _tokenMeta[tokenId].price; 96 | } 97 | 98 | /** 99 | * @dev sets token meta 100 | * @param _tokenId uint256 token ID (token number) 101 | * @param _meta TokenMeta 102 | * 103 | * Requirements: 104 | * `tokenId` must exist 105 | * `owner` must the msg.owner 106 | */ 107 | function _setTokenMeta(uint256 _tokenId, TokenMeta memory _meta) private { 108 | require(_exists(_tokenId)); 109 | require(ownerOf(_tokenId) == _msgSender()); 110 | _tokenMeta[_tokenId] = _meta; 111 | } 112 | 113 | function tokenMeta(uint256 _tokenId) public view returns (TokenMeta memory) { 114 | require(_exists(_tokenId)); 115 | return _tokenMeta[_tokenId]; 116 | } 117 | 118 | /** 119 | * @dev purchase _tokenId 120 | * @param _tokenId uint256 token ID (token number) 121 | */ 122 | function purchaseToken(uint256 _tokenId) public payable nonReentrant { 123 | require(msg.sender != address(0) && msg.sender != ownerOf(_tokenId)); 124 | require(msg.value >= _tokenMeta[_tokenId].price); 125 | address tokenSeller = ownerOf(_tokenId); 126 | 127 | payable(tokenSeller).transfer(msg.value); 128 | 129 | setApprovalForAll(tokenSeller, true); 130 | _transfer(tokenSeller, msg.sender, _tokenId); 131 | _tokenMeta[_tokenId].sale = false; 132 | } 133 | 134 | function mintCollectable( 135 | address _owner, 136 | string memory _tokenURI, 137 | string memory _name, 138 | uint256 _price, 139 | bool _sale 140 | ) 141 | public 142 | onlyOwner 143 | returns (uint256) 144 | { 145 | require(_price > 0); 146 | 147 | _tokenIds.increment(); 148 | 149 | uint256 newItemId = _tokenIds.current(); 150 | _mint(_owner, newItemId); 151 | 152 | TokenMeta memory meta = TokenMeta(newItemId, _price, _name, _tokenURI, _sale); 153 | _setTokenMeta(newItemId, meta); 154 | 155 | return newItemId; 156 | } 157 | } -------------------------------------------------------------------------------- /coverage.json: -------------------------------------------------------------------------------- 1 | {"contracts/NFTT.sol":{"l":{"27":3,"28":3,"29":3,"30":3,"38":0,"42":3,"46":1,"47":1,"49":1,"50":1,"51":0,"52":0,"55":1,"70":1,"71":1,"72":1,"74":1,"75":1,"88":2,"89":2,"90":2,"94":1,"95":1,"108":1,"109":1,"110":1,"114":2,"115":2,"123":5,"124":3,"125":1,"127":1,"129":1,"130":1,"131":1,"145":1,"147":1,"149":1,"150":1,"152":1,"153":1,"155":1},"path":"/Users/paganinisilvio/Desktop/Workspace/NFT/contracts/contracts/NFTT.sol","s":{"1":3,"2":3,"3":3,"4":3,"5":0,"6":3,"7":1,"8":1,"9":1,"10":1,"11":0,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":2,"19":2,"20":2,"21":1,"22":1,"23":1,"24":1,"25":1,"26":2,"27":2,"28":5,"29":3,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1},"b":{"1":[0,1],"2":[1,0],"3":[1,0],"4":[1,0],"5":[2,0],"6":[2,0],"7":[1,0],"8":[1,0],"9":[1,0],"10":[2,0],"11":[3,2],"12":[1,2],"13":[1,0]},"f":{"1":3,"2":0,"3":3,"4":1,"5":1,"6":2,"7":1,"8":1,"9":2,"10":5,"11":1},"fnMap":{"1":{"name":"initialize","line":26,"loc":{"start":{"line":26,"column":4},"end":{"line":31,"column":4}}},"2":{"name":"_baseURI","line":37,"loc":{"start":{"line":37,"column":4},"end":{"line":39,"column":4}}},"3":{"name":"setBaseURI","line":41,"loc":{"start":{"line":41,"column":4},"end":{"line":43,"column":4}}},"4":{"name":"getAllOnSale","line":45,"loc":{"start":{"line":45,"column":4},"end":{"line":56,"column":4}}},"5":{"name":"setTokenSale","line":69,"loc":{"start":{"line":69,"column":4},"end":{"line":76,"column":4}}},"6":{"name":"setTokenPrice","line":87,"loc":{"start":{"line":87,"column":4},"end":{"line":91,"column":4}}},"7":{"name":"tokenPrice","line":93,"loc":{"start":{"line":93,"column":4},"end":{"line":96,"column":4}}},"8":{"name":"_setTokenMeta","line":107,"loc":{"start":{"line":107,"column":4},"end":{"line":111,"column":4}}},"9":{"name":"tokenMeta","line":113,"loc":{"start":{"line":113,"column":4},"end":{"line":116,"column":4}}},"10":{"name":"purchaseToken","line":122,"loc":{"start":{"line":122,"column":4},"end":{"line":132,"column":4}}},"11":{"name":"mintCollectable","line":142,"loc":{"start":{"line":134,"column":4},"end":{"line":156,"column":4}}}},"statementMap":{"1":{"start":{"line":27,"column":8},"end":{"line":27,"column":42}},"2":{"start":{"line":28,"column":8},"end":{"line":28,"column":58}},"3":{"start":{"line":29,"column":8},"end":{"line":29,"column":54}},"4":{"start":{"line":30,"column":8},"end":{"line":30,"column":89}},"5":{"start":{"line":38,"column":8},"end":{"line":38,"column":22}},"6":{"start":{"line":42,"column":8},"end":{"line":42,"column":28}},"7":{"start":{"line":46,"column":8},"end":{"line":46,"column":78}},"8":{"start":{"line":47,"column":8},"end":{"line":47,"column":27}},"9":{"start":{"line":49,"column":8},"end":{"line":49,"column":1764}},"10":{"start":{"line":50,"column":12},"end":{"line":50,"column":1832}},"11":{"start":{"line":51,"column":16},"end":{"line":51,"column":52}},"12":{"start":{"line":55,"column":8},"end":{"line":55,"column":27}},"13":{"start":{"line":70,"column":8},"end":{"line":70,"column":82}},"14":{"start":{"line":71,"column":8},"end":{"line":71,"column":26}},"15":{"start":{"line":72,"column":8},"end":{"line":72,"column":49}},"16":{"start":{"line":74,"column":8},"end":{"line":74,"column":40}},"17":{"start":{"line":75,"column":8},"end":{"line":75,"column":38}},"18":{"start":{"line":88,"column":8},"end":{"line":88,"column":83}},"19":{"start":{"line":89,"column":8},"end":{"line":89,"column":49}},"20":{"start":{"line":90,"column":8},"end":{"line":90,"column":42}},"21":{"start":{"line":94,"column":8},"end":{"line":94,"column":85}},"22":{"start":{"line":95,"column":8},"end":{"line":95,"column":40}},"23":{"start":{"line":108,"column":8},"end":{"line":108,"column":33}},"24":{"start":{"line":109,"column":8},"end":{"line":109,"column":49}},"25":{"start":{"line":110,"column":8},"end":{"line":110,"column":35}},"26":{"start":{"line":114,"column":8},"end":{"line":114,"column":33}},"27":{"start":{"line":115,"column":8},"end":{"line":115,"column":35}},"28":{"start":{"line":123,"column":8},"end":{"line":123,"column":75}},"29":{"start":{"line":124,"column":8},"end":{"line":124,"column":55}},"30":{"start":{"line":125,"column":8},"end":{"line":125,"column":47}},"31":{"start":{"line":127,"column":8},"end":{"line":127,"column":47}},"32":{"start":{"line":129,"column":8},"end":{"line":129,"column":43}},"33":{"start":{"line":130,"column":8},"end":{"line":130,"column":51}},"34":{"start":{"line":131,"column":8},"end":{"line":131,"column":40}},"35":{"start":{"line":145,"column":8},"end":{"line":145,"column":26}},"36":{"start":{"line":147,"column":8},"end":{"line":147,"column":28}},"37":{"start":{"line":149,"column":8},"end":{"line":149,"column":47}},"38":{"start":{"line":150,"column":8},"end":{"line":150,"column":31}},"39":{"start":{"line":152,"column":8},"end":{"line":152,"column":85}},"40":{"start":{"line":153,"column":8},"end":{"line":153,"column":37}},"41":{"start":{"line":155,"column":8},"end":{"line":155,"column":24}}},"branchMap":{"1":{"line":50,"type":"if","locations":[{"start":{"line":50,"column":12},"end":{"line":50,"column":12}},{"start":{"line":50,"column":12},"end":{"line":50,"column":12}}]},"2":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":70,"column":8}},{"start":{"line":70,"column":8},"end":{"line":70,"column":8}}]},"3":{"line":71,"type":"if","locations":[{"start":{"line":71,"column":8},"end":{"line":71,"column":8}},{"start":{"line":71,"column":8},"end":{"line":71,"column":8}}]},"4":{"line":72,"type":"if","locations":[{"start":{"line":72,"column":8},"end":{"line":72,"column":8}},{"start":{"line":72,"column":8},"end":{"line":72,"column":8}}]},"5":{"line":88,"type":"if","locations":[{"start":{"line":88,"column":8},"end":{"line":88,"column":8}},{"start":{"line":88,"column":8},"end":{"line":88,"column":8}}]},"6":{"line":89,"type":"if","locations":[{"start":{"line":89,"column":8},"end":{"line":89,"column":8}},{"start":{"line":89,"column":8},"end":{"line":89,"column":8}}]},"7":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":8},"end":{"line":94,"column":8}},{"start":{"line":94,"column":8},"end":{"line":94,"column":8}}]},"8":{"line":108,"type":"if","locations":[{"start":{"line":108,"column":8},"end":{"line":108,"column":8}},{"start":{"line":108,"column":8},"end":{"line":108,"column":8}}]},"9":{"line":109,"type":"if","locations":[{"start":{"line":109,"column":8},"end":{"line":109,"column":8}},{"start":{"line":109,"column":8},"end":{"line":109,"column":8}}]},"10":{"line":114,"type":"if","locations":[{"start":{"line":114,"column":8},"end":{"line":114,"column":8}},{"start":{"line":114,"column":8},"end":{"line":114,"column":8}}]},"11":{"line":123,"type":"if","locations":[{"start":{"line":123,"column":8},"end":{"line":123,"column":8}},{"start":{"line":123,"column":8},"end":{"line":123,"column":8}}]},"12":{"line":124,"type":"if","locations":[{"start":{"line":124,"column":8},"end":{"line":124,"column":8}},{"start":{"line":124,"column":8},"end":{"line":124,"column":8}}]},"13":{"line":145,"type":"if","locations":[{"start":{"line":145,"column":8},"end":{"line":145,"column":8}},{"start":{"line":145,"column":8},"end":{"line":145,"column":8}}]}}}} -------------------------------------------------------------------------------- /devops/changeAPI.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config() 2 | const HDWalletProvider = require('@truffle/hdwallet-provider') 3 | const { ethers } = require('ethers') 4 | const NFTT = artifacts.require('NFTT.sol') 5 | 6 | const start = async callback => { 7 | try { 8 | const accounts = () => 9 | new HDWalletProvider({ 10 | mnemonic: process.env.KEY_MNEMONIC, 11 | providerOrUrl: process.env.WALLET_PROVIDER_URL, 12 | }) 13 | 14 | const FROM = ethers.utils.getAddress(accounts().getAddresses()[0]) 15 | const contract = await NFTT.deployed() 16 | 17 | const response = await contract.setBaseURI('https://api.nft.fluuu.id/prod/token/', { 18 | from: FROM, 19 | }) 20 | 21 | callback(JSON.stringify(response)) 22 | } catch (e) { 23 | callback(e) 24 | } 25 | } 26 | 27 | module.exports = start 28 | -------------------------------------------------------------------------------- /devops/mint.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config() 2 | const HDWalletProvider = require('@truffle/hdwallet-provider') 3 | const colors = require('colors') 4 | const fetch = require('node-fetch') 5 | const { utils, ethers } = require('ethers') 6 | const NFTT = artifacts.require('NFTT.sol') 7 | const path = require('path') 8 | const fs = require('fs') 9 | const argv = require('minimist')(process.argv.slice(2), { string: ['nfts'] }) 10 | 11 | const { SERVICE_URL } = process.env 12 | 13 | const start = async callback => { 14 | try { 15 | const objectsToBeMinted = [] 16 | 17 | const currentTokens = await (await fetch(`${SERVICE_URL}/token`)).json() 18 | const currentIndex = currentTokens.length 19 | const AMOUNT = Number(argv.nfts) || 1 20 | 21 | const accounts = () => 22 | new HDWalletProvider({ 23 | mnemonic: process.env.KEY_MNEMONIC, 24 | providerOrUrl: process.env.WALLET_PROVIDER_URL, 25 | }) 26 | 27 | const FROM = ethers.utils.getAddress(accounts().getAddresses()[0]) 28 | 29 | for (let i = currentIndex; i < currentIndex + AMOUNT; i++) { 30 | objectsToBeMinted.push(`Robot ${i}`) 31 | } 32 | 33 | const mintAssetsOnIPFS = await ( 34 | await fetch(`${SERVICE_URL}/mint`, { 35 | method: 'POST', 36 | body: JSON.stringify({ objectsToBeMinted }), 37 | }) 38 | ).json() 39 | 40 | const contract = await NFTT.deployed() 41 | const price = '1.5' 42 | 43 | const priceWei = utils.parseEther(price) 44 | const ipfsURLs = [] 45 | 46 | const mintedTokens = await Promise.all( 47 | mintAssetsOnIPFS.map(async token => { 48 | ipfsURLs.push({ 49 | name: token.name, 50 | image: `https://ipfs.io/ipfs/${token.path}`, 51 | description: `Description for ${token.name}`, 52 | external_url: 'https://s2paganini.com/', 53 | }) 54 | return await contract.mintCollectable(FROM, token.path, token.name, priceWei, true, { 55 | from: FROM, 56 | }) 57 | }) 58 | ) 59 | 60 | const content = `export const tokenProps = ${JSON.stringify([...currentTokens, ...ipfsURLs])}` 61 | 62 | const file = path.resolve(__dirname, '../', 'db.ts') 63 | await fs.writeFileSync(file, content) 64 | 65 | console.log(colors.green(`⚡️ Tokens created: ${colors.white(mintedTokens.length)}`)) 66 | callback() 67 | process.exit(0) 68 | } catch (e) { 69 | console.log(e) 70 | callback(e) 71 | } 72 | } 73 | 74 | module.exports = start 75 | -------------------------------------------------------------------------------- /devops/test.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config() 2 | const argv = require('minimist')(process.argv.slice(2), { string: ['nfts'] }) 3 | 4 | const fs = require('fs') 5 | const path = require('path') 6 | 7 | const start = async callback => { 8 | try { 9 | const a = [{ a: 1, b: 2, c: 3 }] 10 | 11 | console.log(argv.nfts) 12 | 13 | const w = path.resolve(__dirname, '../', 'db.ts') 14 | const content = `export const tokenProps = ${JSON.stringify(a)}` 15 | 16 | await fs.writeFileSync(w, content) 17 | //file written successfully 18 | callback() 19 | } catch (e) { 20 | console.log(e) 21 | // throw new Error(e) 22 | callback(e) 23 | } 24 | } 25 | 26 | module.exports = start 27 | -------------------------------------------------------------------------------- /migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | const Migrations = artifacts.require('Migrations') 2 | 3 | module.exports = function (deployer) { 4 | deployer.deploy(Migrations) 5 | } 6 | -------------------------------------------------------------------------------- /migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- 1 | const colors = require('colors') 2 | const NFTT = artifacts.require('NFTT.sol') 3 | const { deployProxy } = require('@openzeppelin/truffle-upgrades') 4 | 5 | module.exports = async deployer => { 6 | const app = await deployProxy(NFTT, { deployer, initializer: 'initialize' }) 7 | const owner = await app.owner() 8 | console.log(colors.grey(`NFTT contract owner: ${owner}`)) 9 | console.log(colors.green('NFTT contract address:')) 10 | console.log(colors.yellow(app.address)) 11 | } 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@fluuuid/nft-contracts", 3 | "version": "1.1.0", 4 | "description": "nft contracts for NFT marketplace prototype", 5 | "main": "index.js", 6 | "author": "Silvio Paganini ", 7 | "license": "MIT", 8 | "private": true, 9 | "dependencies": { 10 | "@openzeppelin/contracts-upgradeable": "^4.3.1", 11 | "@openzeppelin/truffle-upgrades": "^1.8.0", 12 | "@truffle/hdwallet-provider": "^1.4.1", 13 | "@types/bn.js": "^5.1.0", 14 | "@types/chai": "^4.2.21", 15 | "@types/mocha": "^8.2.3", 16 | "colors": "^1.4.0", 17 | "dotenv": "^10.0.0", 18 | "ethers": "^5.4.1", 19 | "minimist": "^1.2.5", 20 | "node-fetch": "^2.6.1", 21 | "truffle": "^5.3.14" 22 | }, 23 | "peerDependencies":{ 24 | "@typechain/truffle-v5": "^5.0.0" 25 | }, 26 | "scripts": { 27 | "generate-types": "npx typechain --target=truffle-v5 'build/contracts/*.json'", 28 | "lint": "prettier --write './**/*.{js,jsx,ts,tsx}'", 29 | "test": "truffle test", 30 | "coverage": "truffle run coverage", 31 | "populate": "truffle exec devops/mint.js", 32 | "populate:rinkeby": "truffle exec --network rinkeby devops/mint.js", 33 | "migrate": "truffle migrate --network development --reset", 34 | "migrate:populate": "truffle migrate --network development --reset && yarn populate", 35 | "migrate:rinkeby": "truffle migrate --network rinkeby --reset" 36 | }, 37 | "devDependencies": { 38 | "@openzeppelin/test-helpers": "^0.5.12", 39 | "prettier": "^2.3.2", 40 | "solidity-coverage": "^0.7.16", 41 | "ts-node": "^10.1.0", 42 | "typechain": "^5.1.1", 43 | "typescript": "^4.3.5" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /test/NFTT.test.ts: -------------------------------------------------------------------------------- 1 | import { NFTTInstance } from '../types/truffle-contracts' 2 | 3 | const NFTT = artifacts.require('NFTT') 4 | const { BN, constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers') 5 | 6 | let contractInstance: NFTTInstance 7 | 8 | contract('NFTT', async accounts => { 9 | beforeEach(async () => { 10 | contractInstance = await NFTT.deployed() 11 | }) 12 | 13 | it('should mint a token and emmit a Transfer event', async () => { 14 | const priceWei = new BN(1.5) 15 | const tokenId = new BN(1) 16 | 17 | const mintTo = accounts[0] 18 | const receipt = await contractInstance.mintCollectable( 19 | mintTo, 20 | tokenId, 21 | 'Token 1', 22 | priceWei, 23 | true, 24 | { 25 | from: mintTo, 26 | } 27 | ) 28 | 29 | expectEvent(receipt, 'Transfer', { 30 | from: constants.ZERO_ADDRESS, 31 | to: mintTo, 32 | tokenId, 33 | }) 34 | }) 35 | 36 | it('should revert for transfering to zero address', async () => { 37 | const from = accounts[0] 38 | const to = constants.ZERO_ADDRESS 39 | 40 | await expectRevert( 41 | contractInstance.transferFrom(from, to, 1, { from }), 42 | 'ERC721: transfer to the zero address' 43 | ) 44 | }) 45 | 46 | it('should match token meta', async () => { 47 | const priceWei = new BN(1.5) 48 | const tokenId = new BN(1) 49 | 50 | const { id, price, name, uri, sale } = await contractInstance.tokenMeta(tokenId) 51 | 52 | assert.equal(id, tokenId) 53 | assert.equal(price, priceWei) 54 | assert.equal(name, 'Token 1') 55 | assert.equal(uri, '1') 56 | assert.equal(sale, true) 57 | }) 58 | 59 | it('should transfer token successfully, match new owner and emit a Transfer event', async () => { 60 | const from = accounts[0] 61 | const to = accounts[1] 62 | 63 | const tokenId = new BN(1) 64 | 65 | const receipt = await contractInstance.transferFrom(from, to, tokenId, { from }) 66 | 67 | const ownerNFTT = await contractInstance.ownerOf(tokenId) 68 | assert.equal(ownerNFTT, to) 69 | 70 | expectEvent(receipt, 'Transfer', { 71 | from, 72 | to, 73 | tokenId, 74 | }) 75 | }) 76 | 77 | it('should purchase token', async () => { 78 | const sender = accounts[0] 79 | const tokenId = new BN(1) 80 | 81 | await contractInstance.purchaseToken(tokenId, { from: sender, value: new BN(1.5) }) 82 | const newOwner = await contractInstance.ownerOf(tokenId) 83 | 84 | assert.equal(newOwner, sender) 85 | }) 86 | 87 | it('should revert for buying already owned token', async () => { 88 | const sender = accounts[0] 89 | const tokenId = new BN(1) 90 | 91 | await expectRevert.unspecified( 92 | contractInstance.purchaseToken(tokenId, { from: sender, value: new BN(1.5) }) 93 | ) 94 | }) 95 | 96 | it('should revert for trying to buy token for less than the set price', async () => { 97 | const sender = accounts[1] 98 | const tokenId = new BN(1) 99 | 100 | await expectRevert.unspecified( 101 | contractInstance.purchaseToken(tokenId, { from: sender, value: new BN(0.1) }) 102 | ) 103 | }) 104 | 105 | it('should return all tokens on sale', async () => { 106 | const tokens = await contractInstance.getAllOnSale() 107 | assert.equal(tokens.length, 1) 108 | }) 109 | 110 | it('should change token price', async () => { 111 | const newPrice = new BN(2) 112 | const tokenId = new BN(1) 113 | 114 | await contractInstance.setTokenPrice(tokenId, newPrice, { from: accounts[0] }) 115 | 116 | const price = await contractInstance.tokenPrice(tokenId) 117 | 118 | assert.equal(price.toString(), newPrice.toString()) 119 | }) 120 | 121 | it('should remove token from sale', async () => { 122 | const tokenId = new BN(1) 123 | const price = new BN(2) 124 | 125 | await contractInstance.setTokenSale(tokenId, false, price, { from: accounts[0] }) 126 | 127 | const { sale } = await contractInstance.tokenMeta(tokenId) 128 | 129 | assert.equal(sale, false) 130 | }) 131 | }) 132 | -------------------------------------------------------------------------------- /truffle-config-ci.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config() 2 | const HDWalletProvider = require('@truffle/hdwallet-provider') 3 | 4 | module.exports = { 5 | /** 6 | * Networks define how you connect to your ethereum client and let you set the 7 | * defaults web3 uses to send transactions. If you don't specify one truffle 8 | * will spin up a development blockchain for you on port 9545 when you 9 | * run `develop` or `test`. You can ask a truffle command to use a specific 10 | * network from the command line, e.g 11 | * 12 | * $ truffle test --network 13 | */ 14 | 15 | networks: { 16 | // Useful for testing. The `development` name is special - truffle uses it by default 17 | // if it's defined here and no other network is specified at the command line. 18 | // You should run a client (like ganache-cli, geth or parity) in a separate terminal 19 | // tab if you use this network and you must also set the `host`, `port` and `network_id` 20 | // options below to some value. 21 | // 22 | // Another network with more advanced options... 23 | // advanced: { 24 | // port: 8777, // Custom port 25 | // network_id: 1342, // Custom network 26 | // gas: 8500000, // Gas sent with each transaction (default: ~6700000) 27 | // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) 28 | // from:
, // Account to send txs from (default: accounts[0]) 29 | // websocket: true // Enable EventEmitter interface for web3 (default: false) 30 | // }, 31 | // Useful for deploying to a public network. 32 | // NB: It's important to wrap the provider as a function. 33 | // ropsten: { 34 | // provider: () => 35 | // new HDWalletProvider({ 36 | // mnemonic: process.env.KEY_MNEMONIC, 37 | // providerOrUrl: `https://ropsten.infura.io/v3/${process.env.INFURA_PROJECT_ID}`, 38 | // addressIndex: 0, 39 | // }), 40 | // network_id: 3, // Ropsten's id 41 | // gas: 5500000, // Ropsten has a lower block limit than mainnet 42 | // confirmations: 2, // # of confs to wait between deployments. (default: 0) 43 | // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) 44 | // skipDryRun: true, // Skip dry run before migrations? (default: false for public nets ) 45 | // }, 46 | 47 | rinkeby: { 48 | provider: function () { 49 | return new HDWalletProvider({ 50 | mnemonic: process.env.KEY_MNEMONIC, 51 | providerOrUrl: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`, 52 | addressIndex: 0, 53 | }) 54 | }, 55 | network_id: 4, 56 | gas: 4500000, 57 | gasPrice: 10000000000, 58 | }, 59 | 60 | // Useful for private networks 61 | // private: { 62 | // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), 63 | // network_id: 2111, // This network is yours, in the cloud. 64 | // production: true // Treats this network as if it was a public net. (default: false) 65 | // } 66 | }, 67 | 68 | // Set default mocha options here, use special reporters etc. 69 | mocha: { 70 | // timeout: 100000 71 | }, 72 | 73 | // Configure your compilers 74 | compilers: { 75 | solc: { 76 | version: '^0.8.0', // Fetch exact version from solc-bin (default: truffle's version) 77 | // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) 78 | // settings: { // See the solidity docs for advice about optimization and evmVersion 79 | // optimizer: { 80 | // enabled: false, 81 | // runs: 200 82 | // }, 83 | // evmVersion: "byzantium" 84 | // } 85 | }, 86 | }, 87 | 88 | // Truffle DB is currently disabled by default; to enable it, change enabled: false to enabled: true 89 | // 90 | // Note: if you migrated your contracts prior to enabling this field in your Truffle project and want 91 | // those previously migrated contracts available in the .db directory, you will need to run the following: 92 | // $ truffle migrate --reset --compile-all 93 | 94 | // db: { 95 | // enabled: false, 96 | // }, 97 | 98 | etherscan: { 99 | apiKey: process.env.APIETHERSCAN, 100 | }, 101 | } 102 | -------------------------------------------------------------------------------- /truffle-config.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config() 2 | const HDWalletProvider = require('@truffle/hdwallet-provider') 3 | 4 | require('ts-node').register({ 5 | files: true, 6 | }) 7 | 8 | module.exports = { 9 | /** 10 | * Networks define how you connect to your ethereum client and let you set the 11 | * defaults web3 uses to send transactions. If you don't specify one truffle 12 | * will spin up a development blockchain for you on port 9545 when you 13 | * run `develop` or `test`. You can ask a truffle command to use a specific 14 | * network from the command line, e.g 15 | * 16 | * $ truffle test --network 17 | */ 18 | 19 | networks: { 20 | // Useful for testing. The `development` name is special - truffle uses it by default 21 | // if it's defined here and no other network is specified at the command line. 22 | // You should run a client (like ganache-cli, geth or parity) in a separate terminal 23 | // tab if you use this network and you must also set the `host`, `port` and `network_id` 24 | // options below to some value. 25 | // 26 | development: { 27 | host: process.env.RPC_HOST, // Localhost (default: none) 28 | port: 7545, 29 | gas: 6721975, 30 | gasPrice: 20000000000, 31 | network_id: 5777, 32 | from: new HDWalletProvider( 33 | process.env.KEY_MNEMONIC, 34 | process.env.WALLET_PROVIDER_URL 35 | ).getAddress(0), 36 | }, 37 | // Another network with more advanced options... 38 | // advanced: { 39 | // port: 8777, // Custom port 40 | // network_id: 1342, // Custom network 41 | // gas: 8500000, // Gas sent with each transaction (default: ~6700000) 42 | // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) 43 | // from:
, // Account to send txs from (default: accounts[0]) 44 | // websocket: true // Enable EventEmitter interface for web3 (default: false) 45 | // }, 46 | // Useful for deploying to a public network. 47 | // NB: It's important to wrap the provider as a function. 48 | // ropsten: { 49 | // provider: () => 50 | // new HDWalletProvider({ 51 | // mnemonic: process.env.KEY_MNEMONIC, 52 | // providerOrUrl: `https://ropsten.infura.io/v3/${process.env.INFURA_PROJECT_ID}`, 53 | // addressIndex: 0, 54 | // }), 55 | // network_id: 3, // Ropsten's id 56 | // gas: 5500000, // Ropsten has a lower block limit than mainnet 57 | // confirmations: 2, // # of confs to wait between deployments. (default: 0) 58 | // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) 59 | // skipDryRun: true, // Skip dry run before migrations? (default: false for public nets ) 60 | // }, 61 | 62 | rinkeby: { 63 | provider: function () { 64 | return new HDWalletProvider({ 65 | mnemonic: process.env.KEY_MNEMONIC, 66 | providerOrUrl: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`, 67 | addressIndex: 0, 68 | }) 69 | }, 70 | network_id: 4, 71 | gas: 4500000, 72 | gasPrice: 10000000000, 73 | }, 74 | 75 | // Useful for private networks 76 | // private: { 77 | // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), 78 | // network_id: 2111, // This network is yours, in the cloud. 79 | // production: true // Treats this network as if it was a public net. (default: false) 80 | // } 81 | }, 82 | 83 | // Set default mocha options here, use special reporters etc. 84 | mocha: { 85 | // timeout: 100000 86 | }, 87 | 88 | // Configure your compilers 89 | compilers: { 90 | solc: { 91 | version: '^0.8.0', // Fetch exact version from solc-bin (default: truffle's version) 92 | // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) 93 | // settings: { // See the solidity docs for advice about optimization and evmVersion 94 | // optimizer: { 95 | // enabled: false, 96 | // runs: 200 97 | // }, 98 | // evmVersion: "byzantium" 99 | // } 100 | }, 101 | }, 102 | 103 | // Truffle DB is currently disabled by default; to enable it, change enabled: false to enabled: true 104 | // 105 | // Note: if you migrated your contracts prior to enabling this field in your Truffle project and want 106 | // those previously migrated contracts available in the .db directory, you will need to run the following: 107 | // $ truffle migrate --reset --compile-all 108 | 109 | // db: { 110 | // enabled: false, 111 | // }, 112 | 113 | plugins: ['solidity-coverage'], 114 | 115 | etherscan: { 116 | apiKey: process.env.APIETHERSCAN, 117 | }, 118 | } 119 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["ES2018"], 4 | "module": "CommonJS", 5 | "target": "ES2018", 6 | "strict": true, 7 | "esModuleInterop": true, 8 | "typeRoots": ["./node_modules/@types", "./types"], 9 | "types": ["node", "truffle-contracts"] 10 | }, 11 | "include": ["**/*.ts"], 12 | "exclude": ["node_modules", "example", "build"] 13 | } -------------------------------------------------------------------------------- /types/truffle-contracts/ERC165Upgradeable.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface ERC165UpgradeableContract 9 | extends Truffle.Contract { 10 | "new"(meta?: Truffle.TransactionDetails): Promise; 11 | } 12 | 13 | type AllEvents = never; 14 | 15 | export interface ERC165UpgradeableInstance extends Truffle.ContractInstance { 16 | /** 17 | * See {IERC165-supportsInterface}. 18 | */ 19 | supportsInterface( 20 | interfaceId: string, 21 | txDetails?: Truffle.TransactionDetails 22 | ): Promise; 23 | 24 | methods: { 25 | /** 26 | * See {IERC165-supportsInterface}. 27 | */ 28 | supportsInterface( 29 | interfaceId: string, 30 | txDetails?: Truffle.TransactionDetails 31 | ): Promise; 32 | }; 33 | 34 | getPastEvents(event: string): Promise; 35 | getPastEvents( 36 | event: string, 37 | options: PastEventOptions, 38 | callback: (error: Error, event: EventData) => void 39 | ): Promise; 40 | getPastEvents(event: string, options: PastEventOptions): Promise; 41 | getPastEvents( 42 | event: string, 43 | callback: (error: Error, event: EventData) => void 44 | ): Promise; 45 | } 46 | -------------------------------------------------------------------------------- /types/truffle-contracts/ERC721Upgradeable.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface ERC721UpgradeableContract 9 | extends Truffle.Contract { 10 | "new"(meta?: Truffle.TransactionDetails): Promise; 11 | } 12 | 13 | export interface Approval { 14 | name: "Approval"; 15 | args: { 16 | owner: string; 17 | approved: string; 18 | tokenId: BN; 19 | 0: string; 20 | 1: string; 21 | 2: BN; 22 | }; 23 | } 24 | 25 | export interface ApprovalForAll { 26 | name: "ApprovalForAll"; 27 | args: { 28 | owner: string; 29 | operator: string; 30 | approved: boolean; 31 | 0: string; 32 | 1: string; 33 | 2: boolean; 34 | }; 35 | } 36 | 37 | export interface Transfer { 38 | name: "Transfer"; 39 | args: { 40 | from: string; 41 | to: string; 42 | tokenId: BN; 43 | 0: string; 44 | 1: string; 45 | 2: BN; 46 | }; 47 | } 48 | 49 | type AllEvents = Approval | ApprovalForAll | Transfer; 50 | 51 | export interface ERC721UpgradeableInstance extends Truffle.ContractInstance { 52 | /** 53 | * See {IERC165-supportsInterface}. 54 | */ 55 | supportsInterface( 56 | interfaceId: string, 57 | txDetails?: Truffle.TransactionDetails 58 | ): Promise; 59 | 60 | /** 61 | * See {IERC721-balanceOf}. 62 | */ 63 | balanceOf(owner: string, txDetails?: Truffle.TransactionDetails): Promise; 64 | 65 | /** 66 | * See {IERC721-ownerOf}. 67 | */ 68 | ownerOf( 69 | tokenId: number | BN | string, 70 | txDetails?: Truffle.TransactionDetails 71 | ): Promise; 72 | 73 | /** 74 | * See {IERC721Metadata-name}. 75 | */ 76 | name(txDetails?: Truffle.TransactionDetails): Promise; 77 | 78 | /** 79 | * See {IERC721Metadata-symbol}. 80 | */ 81 | symbol(txDetails?: Truffle.TransactionDetails): Promise; 82 | 83 | /** 84 | * See {IERC721Metadata-tokenURI}. 85 | */ 86 | tokenURI( 87 | tokenId: number | BN | string, 88 | txDetails?: Truffle.TransactionDetails 89 | ): Promise; 90 | 91 | /** 92 | * See {IERC721-approve}. 93 | */ 94 | approve: { 95 | ( 96 | to: string, 97 | tokenId: number | BN | string, 98 | txDetails?: Truffle.TransactionDetails 99 | ): Promise>; 100 | call( 101 | to: string, 102 | tokenId: number | BN | string, 103 | txDetails?: Truffle.TransactionDetails 104 | ): Promise; 105 | sendTransaction( 106 | to: string, 107 | tokenId: number | BN | string, 108 | txDetails?: Truffle.TransactionDetails 109 | ): Promise; 110 | estimateGas( 111 | to: string, 112 | tokenId: number | BN | string, 113 | txDetails?: Truffle.TransactionDetails 114 | ): Promise; 115 | }; 116 | 117 | /** 118 | * See {IERC721-getApproved}. 119 | */ 120 | getApproved( 121 | tokenId: number | BN | string, 122 | txDetails?: Truffle.TransactionDetails 123 | ): Promise; 124 | 125 | /** 126 | * See {IERC721-setApprovalForAll}. 127 | */ 128 | setApprovalForAll: { 129 | ( 130 | operator: string, 131 | approved: boolean, 132 | txDetails?: Truffle.TransactionDetails 133 | ): Promise>; 134 | call( 135 | operator: string, 136 | approved: boolean, 137 | txDetails?: Truffle.TransactionDetails 138 | ): Promise; 139 | sendTransaction( 140 | operator: string, 141 | approved: boolean, 142 | txDetails?: Truffle.TransactionDetails 143 | ): Promise; 144 | estimateGas( 145 | operator: string, 146 | approved: boolean, 147 | txDetails?: Truffle.TransactionDetails 148 | ): Promise; 149 | }; 150 | 151 | /** 152 | * See {IERC721-isApprovedForAll}. 153 | */ 154 | isApprovedForAll( 155 | owner: string, 156 | operator: string, 157 | txDetails?: Truffle.TransactionDetails 158 | ): Promise; 159 | 160 | /** 161 | * See {IERC721-transferFrom}. 162 | */ 163 | transferFrom: { 164 | ( 165 | from: string, 166 | to: string, 167 | tokenId: number | BN | string, 168 | txDetails?: Truffle.TransactionDetails 169 | ): Promise>; 170 | call( 171 | from: string, 172 | to: string, 173 | tokenId: number | BN | string, 174 | txDetails?: Truffle.TransactionDetails 175 | ): Promise; 176 | sendTransaction( 177 | from: string, 178 | to: string, 179 | tokenId: number | BN | string, 180 | txDetails?: Truffle.TransactionDetails 181 | ): Promise; 182 | estimateGas( 183 | from: string, 184 | to: string, 185 | tokenId: number | BN | string, 186 | txDetails?: Truffle.TransactionDetails 187 | ): Promise; 188 | }; 189 | 190 | methods: { 191 | /** 192 | * See {IERC165-supportsInterface}. 193 | */ 194 | supportsInterface( 195 | interfaceId: string, 196 | txDetails?: Truffle.TransactionDetails 197 | ): Promise; 198 | 199 | /** 200 | * See {IERC721-balanceOf}. 201 | */ 202 | balanceOf( 203 | owner: string, 204 | txDetails?: Truffle.TransactionDetails 205 | ): Promise; 206 | 207 | /** 208 | * See {IERC721-ownerOf}. 209 | */ 210 | ownerOf( 211 | tokenId: number | BN | string, 212 | txDetails?: Truffle.TransactionDetails 213 | ): Promise; 214 | 215 | /** 216 | * See {IERC721Metadata-name}. 217 | */ 218 | name(txDetails?: Truffle.TransactionDetails): Promise; 219 | 220 | /** 221 | * See {IERC721Metadata-symbol}. 222 | */ 223 | symbol(txDetails?: Truffle.TransactionDetails): Promise; 224 | 225 | /** 226 | * See {IERC721Metadata-tokenURI}. 227 | */ 228 | tokenURI( 229 | tokenId: number | BN | string, 230 | txDetails?: Truffle.TransactionDetails 231 | ): Promise; 232 | 233 | /** 234 | * See {IERC721-approve}. 235 | */ 236 | approve: { 237 | ( 238 | to: string, 239 | tokenId: number | BN | string, 240 | txDetails?: Truffle.TransactionDetails 241 | ): Promise>; 242 | call( 243 | to: string, 244 | tokenId: number | BN | string, 245 | txDetails?: Truffle.TransactionDetails 246 | ): Promise; 247 | sendTransaction( 248 | to: string, 249 | tokenId: number | BN | string, 250 | txDetails?: Truffle.TransactionDetails 251 | ): Promise; 252 | estimateGas( 253 | to: string, 254 | tokenId: number | BN | string, 255 | txDetails?: Truffle.TransactionDetails 256 | ): Promise; 257 | }; 258 | 259 | /** 260 | * See {IERC721-getApproved}. 261 | */ 262 | getApproved( 263 | tokenId: number | BN | string, 264 | txDetails?: Truffle.TransactionDetails 265 | ): Promise; 266 | 267 | /** 268 | * See {IERC721-setApprovalForAll}. 269 | */ 270 | setApprovalForAll: { 271 | ( 272 | operator: string, 273 | approved: boolean, 274 | txDetails?: Truffle.TransactionDetails 275 | ): Promise>; 276 | call( 277 | operator: string, 278 | approved: boolean, 279 | txDetails?: Truffle.TransactionDetails 280 | ): Promise; 281 | sendTransaction( 282 | operator: string, 283 | approved: boolean, 284 | txDetails?: Truffle.TransactionDetails 285 | ): Promise; 286 | estimateGas( 287 | operator: string, 288 | approved: boolean, 289 | txDetails?: Truffle.TransactionDetails 290 | ): Promise; 291 | }; 292 | 293 | /** 294 | * See {IERC721-isApprovedForAll}. 295 | */ 296 | isApprovedForAll( 297 | owner: string, 298 | operator: string, 299 | txDetails?: Truffle.TransactionDetails 300 | ): Promise; 301 | 302 | /** 303 | * See {IERC721-transferFrom}. 304 | */ 305 | transferFrom: { 306 | ( 307 | from: string, 308 | to: string, 309 | tokenId: number | BN | string, 310 | txDetails?: Truffle.TransactionDetails 311 | ): Promise>; 312 | call( 313 | from: string, 314 | to: string, 315 | tokenId: number | BN | string, 316 | txDetails?: Truffle.TransactionDetails 317 | ): Promise; 318 | sendTransaction( 319 | from: string, 320 | to: string, 321 | tokenId: number | BN | string, 322 | txDetails?: Truffle.TransactionDetails 323 | ): Promise; 324 | estimateGas( 325 | from: string, 326 | to: string, 327 | tokenId: number | BN | string, 328 | txDetails?: Truffle.TransactionDetails 329 | ): Promise; 330 | }; 331 | 332 | /** 333 | * See {IERC721-safeTransferFrom}. 334 | */ 335 | "safeTransferFrom(address,address,uint256)": { 336 | ( 337 | from: string, 338 | to: string, 339 | tokenId: number | BN | string, 340 | txDetails?: Truffle.TransactionDetails 341 | ): Promise>; 342 | call( 343 | from: string, 344 | to: string, 345 | tokenId: number | BN | string, 346 | txDetails?: Truffle.TransactionDetails 347 | ): Promise; 348 | sendTransaction( 349 | from: string, 350 | to: string, 351 | tokenId: number | BN | string, 352 | txDetails?: Truffle.TransactionDetails 353 | ): Promise; 354 | estimateGas( 355 | from: string, 356 | to: string, 357 | tokenId: number | BN | string, 358 | txDetails?: Truffle.TransactionDetails 359 | ): Promise; 360 | }; 361 | 362 | /** 363 | * See {IERC721-safeTransferFrom}. 364 | */ 365 | "safeTransferFrom(address,address,uint256,bytes)": { 366 | ( 367 | from: string, 368 | to: string, 369 | tokenId: number | BN | string, 370 | _data: string, 371 | txDetails?: Truffle.TransactionDetails 372 | ): Promise>; 373 | call( 374 | from: string, 375 | to: string, 376 | tokenId: number | BN | string, 377 | _data: string, 378 | txDetails?: Truffle.TransactionDetails 379 | ): Promise; 380 | sendTransaction( 381 | from: string, 382 | to: string, 383 | tokenId: number | BN | string, 384 | _data: string, 385 | txDetails?: Truffle.TransactionDetails 386 | ): Promise; 387 | estimateGas( 388 | from: string, 389 | to: string, 390 | tokenId: number | BN | string, 391 | _data: string, 392 | txDetails?: Truffle.TransactionDetails 393 | ): Promise; 394 | }; 395 | }; 396 | 397 | getPastEvents(event: string): Promise; 398 | getPastEvents( 399 | event: string, 400 | options: PastEventOptions, 401 | callback: (error: Error, event: EventData) => void 402 | ): Promise; 403 | getPastEvents(event: string, options: PastEventOptions): Promise; 404 | getPastEvents( 405 | event: string, 406 | callback: (error: Error, event: EventData) => void 407 | ): Promise; 408 | } 409 | -------------------------------------------------------------------------------- /types/truffle-contracts/IERC165Upgradeable.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface IERC165UpgradeableContract 9 | extends Truffle.Contract { 10 | "new"(meta?: Truffle.TransactionDetails): Promise; 11 | } 12 | 13 | type AllEvents = never; 14 | 15 | export interface IERC165UpgradeableInstance extends Truffle.ContractInstance { 16 | /** 17 | * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. 18 | */ 19 | supportsInterface( 20 | interfaceId: string, 21 | txDetails?: Truffle.TransactionDetails 22 | ): Promise; 23 | 24 | methods: { 25 | /** 26 | * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. 27 | */ 28 | supportsInterface( 29 | interfaceId: string, 30 | txDetails?: Truffle.TransactionDetails 31 | ): Promise; 32 | }; 33 | 34 | getPastEvents(event: string): Promise; 35 | getPastEvents( 36 | event: string, 37 | options: PastEventOptions, 38 | callback: (error: Error, event: EventData) => void 39 | ): Promise; 40 | getPastEvents(event: string, options: PastEventOptions): Promise; 41 | getPastEvents( 42 | event: string, 43 | callback: (error: Error, event: EventData) => void 44 | ): Promise; 45 | } 46 | -------------------------------------------------------------------------------- /types/truffle-contracts/IERC721EnumerableUpgradeable.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface IERC721EnumerableUpgradeableContract 9 | extends Truffle.Contract { 10 | "new"( 11 | meta?: Truffle.TransactionDetails 12 | ): Promise; 13 | } 14 | 15 | export interface Approval { 16 | name: "Approval"; 17 | args: { 18 | owner: string; 19 | approved: string; 20 | tokenId: BN; 21 | 0: string; 22 | 1: string; 23 | 2: BN; 24 | }; 25 | } 26 | 27 | export interface ApprovalForAll { 28 | name: "ApprovalForAll"; 29 | args: { 30 | owner: string; 31 | operator: string; 32 | approved: boolean; 33 | 0: string; 34 | 1: string; 35 | 2: boolean; 36 | }; 37 | } 38 | 39 | export interface Transfer { 40 | name: "Transfer"; 41 | args: { 42 | from: string; 43 | to: string; 44 | tokenId: BN; 45 | 0: string; 46 | 1: string; 47 | 2: BN; 48 | }; 49 | } 50 | 51 | type AllEvents = Approval | ApprovalForAll | Transfer; 52 | 53 | export interface IERC721EnumerableUpgradeableInstance 54 | extends Truffle.ContractInstance { 55 | /** 56 | * Gives permission to `to` to transfer `tokenId` token to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. Requirements: - The caller must own the token or be an approved operator. - `tokenId` must exist. Emits an {Approval} event. 57 | */ 58 | approve: { 59 | ( 60 | to: string, 61 | tokenId: number | BN | string, 62 | txDetails?: Truffle.TransactionDetails 63 | ): Promise>; 64 | call( 65 | to: string, 66 | tokenId: number | BN | string, 67 | txDetails?: Truffle.TransactionDetails 68 | ): Promise; 69 | sendTransaction( 70 | to: string, 71 | tokenId: number | BN | string, 72 | txDetails?: Truffle.TransactionDetails 73 | ): Promise; 74 | estimateGas( 75 | to: string, 76 | tokenId: number | BN | string, 77 | txDetails?: Truffle.TransactionDetails 78 | ): Promise; 79 | }; 80 | 81 | /** 82 | * Returns the number of tokens in ``owner``'s account. 83 | */ 84 | balanceOf(owner: string, txDetails?: Truffle.TransactionDetails): Promise; 85 | 86 | /** 87 | * Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist. 88 | */ 89 | getApproved( 90 | tokenId: number | BN | string, 91 | txDetails?: Truffle.TransactionDetails 92 | ): Promise; 93 | 94 | /** 95 | * Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll} 96 | */ 97 | isApprovedForAll( 98 | owner: string, 99 | operator: string, 100 | txDetails?: Truffle.TransactionDetails 101 | ): Promise; 102 | 103 | /** 104 | * Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist. 105 | */ 106 | ownerOf( 107 | tokenId: number | BN | string, 108 | txDetails?: Truffle.TransactionDetails 109 | ): Promise; 110 | 111 | /** 112 | * Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the caller. Emits an {ApprovalForAll} event. 113 | */ 114 | setApprovalForAll: { 115 | ( 116 | operator: string, 117 | _approved: boolean, 118 | txDetails?: Truffle.TransactionDetails 119 | ): Promise>; 120 | call( 121 | operator: string, 122 | _approved: boolean, 123 | txDetails?: Truffle.TransactionDetails 124 | ): Promise; 125 | sendTransaction( 126 | operator: string, 127 | _approved: boolean, 128 | txDetails?: Truffle.TransactionDetails 129 | ): Promise; 130 | estimateGas( 131 | operator: string, 132 | _approved: boolean, 133 | txDetails?: Truffle.TransactionDetails 134 | ): Promise; 135 | }; 136 | 137 | /** 138 | * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. 139 | */ 140 | supportsInterface( 141 | interfaceId: string, 142 | txDetails?: Truffle.TransactionDetails 143 | ): Promise; 144 | 145 | /** 146 | * Transfers `tokenId` token from `from` to `to`. WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event. 147 | */ 148 | transferFrom: { 149 | ( 150 | from: string, 151 | to: string, 152 | tokenId: number | BN | string, 153 | txDetails?: Truffle.TransactionDetails 154 | ): Promise>; 155 | call( 156 | from: string, 157 | to: string, 158 | tokenId: number | BN | string, 159 | txDetails?: Truffle.TransactionDetails 160 | ): Promise; 161 | sendTransaction( 162 | from: string, 163 | to: string, 164 | tokenId: number | BN | string, 165 | txDetails?: Truffle.TransactionDetails 166 | ): Promise; 167 | estimateGas( 168 | from: string, 169 | to: string, 170 | tokenId: number | BN | string, 171 | txDetails?: Truffle.TransactionDetails 172 | ): Promise; 173 | }; 174 | 175 | /** 176 | * Returns the total amount of tokens stored by the contract. 177 | */ 178 | totalSupply(txDetails?: Truffle.TransactionDetails): Promise; 179 | 180 | /** 181 | * Returns a token ID owned by `owner` at a given `index` of its token list. Use along with {balanceOf} to enumerate all of ``owner``'s tokens. 182 | */ 183 | tokenOfOwnerByIndex( 184 | owner: string, 185 | index: number | BN | string, 186 | txDetails?: Truffle.TransactionDetails 187 | ): Promise; 188 | 189 | /** 190 | * Returns a token ID at a given `index` of all the tokens stored by the contract. Use along with {totalSupply} to enumerate all tokens. 191 | */ 192 | tokenByIndex( 193 | index: number | BN | string, 194 | txDetails?: Truffle.TransactionDetails 195 | ): Promise; 196 | 197 | methods: { 198 | /** 199 | * Gives permission to `to` to transfer `tokenId` token to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. Requirements: - The caller must own the token or be an approved operator. - `tokenId` must exist. Emits an {Approval} event. 200 | */ 201 | approve: { 202 | ( 203 | to: string, 204 | tokenId: number | BN | string, 205 | txDetails?: Truffle.TransactionDetails 206 | ): Promise>; 207 | call( 208 | to: string, 209 | tokenId: number | BN | string, 210 | txDetails?: Truffle.TransactionDetails 211 | ): Promise; 212 | sendTransaction( 213 | to: string, 214 | tokenId: number | BN | string, 215 | txDetails?: Truffle.TransactionDetails 216 | ): Promise; 217 | estimateGas( 218 | to: string, 219 | tokenId: number | BN | string, 220 | txDetails?: Truffle.TransactionDetails 221 | ): Promise; 222 | }; 223 | 224 | /** 225 | * Returns the number of tokens in ``owner``'s account. 226 | */ 227 | balanceOf( 228 | owner: string, 229 | txDetails?: Truffle.TransactionDetails 230 | ): Promise; 231 | 232 | /** 233 | * Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist. 234 | */ 235 | getApproved( 236 | tokenId: number | BN | string, 237 | txDetails?: Truffle.TransactionDetails 238 | ): Promise; 239 | 240 | /** 241 | * Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll} 242 | */ 243 | isApprovedForAll( 244 | owner: string, 245 | operator: string, 246 | txDetails?: Truffle.TransactionDetails 247 | ): Promise; 248 | 249 | /** 250 | * Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist. 251 | */ 252 | ownerOf( 253 | tokenId: number | BN | string, 254 | txDetails?: Truffle.TransactionDetails 255 | ): Promise; 256 | 257 | /** 258 | * Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the caller. Emits an {ApprovalForAll} event. 259 | */ 260 | setApprovalForAll: { 261 | ( 262 | operator: string, 263 | _approved: boolean, 264 | txDetails?: Truffle.TransactionDetails 265 | ): Promise>; 266 | call( 267 | operator: string, 268 | _approved: boolean, 269 | txDetails?: Truffle.TransactionDetails 270 | ): Promise; 271 | sendTransaction( 272 | operator: string, 273 | _approved: boolean, 274 | txDetails?: Truffle.TransactionDetails 275 | ): Promise; 276 | estimateGas( 277 | operator: string, 278 | _approved: boolean, 279 | txDetails?: Truffle.TransactionDetails 280 | ): Promise; 281 | }; 282 | 283 | /** 284 | * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. 285 | */ 286 | supportsInterface( 287 | interfaceId: string, 288 | txDetails?: Truffle.TransactionDetails 289 | ): Promise; 290 | 291 | /** 292 | * Transfers `tokenId` token from `from` to `to`. WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event. 293 | */ 294 | transferFrom: { 295 | ( 296 | from: string, 297 | to: string, 298 | tokenId: number | BN | string, 299 | txDetails?: Truffle.TransactionDetails 300 | ): Promise>; 301 | call( 302 | from: string, 303 | to: string, 304 | tokenId: number | BN | string, 305 | txDetails?: Truffle.TransactionDetails 306 | ): Promise; 307 | sendTransaction( 308 | from: string, 309 | to: string, 310 | tokenId: number | BN | string, 311 | txDetails?: Truffle.TransactionDetails 312 | ): Promise; 313 | estimateGas( 314 | from: string, 315 | to: string, 316 | tokenId: number | BN | string, 317 | txDetails?: Truffle.TransactionDetails 318 | ): Promise; 319 | }; 320 | 321 | /** 322 | * Returns the total amount of tokens stored by the contract. 323 | */ 324 | totalSupply(txDetails?: Truffle.TransactionDetails): Promise; 325 | 326 | /** 327 | * Returns a token ID owned by `owner` at a given `index` of its token list. Use along with {balanceOf} to enumerate all of ``owner``'s tokens. 328 | */ 329 | tokenOfOwnerByIndex( 330 | owner: string, 331 | index: number | BN | string, 332 | txDetails?: Truffle.TransactionDetails 333 | ): Promise; 334 | 335 | /** 336 | * Returns a token ID at a given `index` of all the tokens stored by the contract. Use along with {totalSupply} to enumerate all tokens. 337 | */ 338 | tokenByIndex( 339 | index: number | BN | string, 340 | txDetails?: Truffle.TransactionDetails 341 | ): Promise; 342 | 343 | /** 344 | * Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event. 345 | */ 346 | "safeTransferFrom(address,address,uint256)": { 347 | ( 348 | from: string, 349 | to: string, 350 | tokenId: number | BN | string, 351 | txDetails?: Truffle.TransactionDetails 352 | ): Promise>; 353 | call( 354 | from: string, 355 | to: string, 356 | tokenId: number | BN | string, 357 | txDetails?: Truffle.TransactionDetails 358 | ): Promise; 359 | sendTransaction( 360 | from: string, 361 | to: string, 362 | tokenId: number | BN | string, 363 | txDetails?: Truffle.TransactionDetails 364 | ): Promise; 365 | estimateGas( 366 | from: string, 367 | to: string, 368 | tokenId: number | BN | string, 369 | txDetails?: Truffle.TransactionDetails 370 | ): Promise; 371 | }; 372 | 373 | /** 374 | * Safely transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event. 375 | */ 376 | "safeTransferFrom(address,address,uint256,bytes)": { 377 | ( 378 | from: string, 379 | to: string, 380 | tokenId: number | BN | string, 381 | data: string, 382 | txDetails?: Truffle.TransactionDetails 383 | ): Promise>; 384 | call( 385 | from: string, 386 | to: string, 387 | tokenId: number | BN | string, 388 | data: string, 389 | txDetails?: Truffle.TransactionDetails 390 | ): Promise; 391 | sendTransaction( 392 | from: string, 393 | to: string, 394 | tokenId: number | BN | string, 395 | data: string, 396 | txDetails?: Truffle.TransactionDetails 397 | ): Promise; 398 | estimateGas( 399 | from: string, 400 | to: string, 401 | tokenId: number | BN | string, 402 | data: string, 403 | txDetails?: Truffle.TransactionDetails 404 | ): Promise; 405 | }; 406 | }; 407 | 408 | getPastEvents(event: string): Promise; 409 | getPastEvents( 410 | event: string, 411 | options: PastEventOptions, 412 | callback: (error: Error, event: EventData) => void 413 | ): Promise; 414 | getPastEvents(event: string, options: PastEventOptions): Promise; 415 | getPastEvents( 416 | event: string, 417 | callback: (error: Error, event: EventData) => void 418 | ): Promise; 419 | } 420 | -------------------------------------------------------------------------------- /types/truffle-contracts/IERC721MetadataUpgradeable.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface IERC721MetadataUpgradeableContract 9 | extends Truffle.Contract { 10 | "new"( 11 | meta?: Truffle.TransactionDetails 12 | ): Promise; 13 | } 14 | 15 | export interface Approval { 16 | name: "Approval"; 17 | args: { 18 | owner: string; 19 | approved: string; 20 | tokenId: BN; 21 | 0: string; 22 | 1: string; 23 | 2: BN; 24 | }; 25 | } 26 | 27 | export interface ApprovalForAll { 28 | name: "ApprovalForAll"; 29 | args: { 30 | owner: string; 31 | operator: string; 32 | approved: boolean; 33 | 0: string; 34 | 1: string; 35 | 2: boolean; 36 | }; 37 | } 38 | 39 | export interface Transfer { 40 | name: "Transfer"; 41 | args: { 42 | from: string; 43 | to: string; 44 | tokenId: BN; 45 | 0: string; 46 | 1: string; 47 | 2: BN; 48 | }; 49 | } 50 | 51 | type AllEvents = Approval | ApprovalForAll | Transfer; 52 | 53 | export interface IERC721MetadataUpgradeableInstance 54 | extends Truffle.ContractInstance { 55 | /** 56 | * Gives permission to `to` to transfer `tokenId` token to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. Requirements: - The caller must own the token or be an approved operator. - `tokenId` must exist. Emits an {Approval} event. 57 | */ 58 | approve: { 59 | ( 60 | to: string, 61 | tokenId: number | BN | string, 62 | txDetails?: Truffle.TransactionDetails 63 | ): Promise>; 64 | call( 65 | to: string, 66 | tokenId: number | BN | string, 67 | txDetails?: Truffle.TransactionDetails 68 | ): Promise; 69 | sendTransaction( 70 | to: string, 71 | tokenId: number | BN | string, 72 | txDetails?: Truffle.TransactionDetails 73 | ): Promise; 74 | estimateGas( 75 | to: string, 76 | tokenId: number | BN | string, 77 | txDetails?: Truffle.TransactionDetails 78 | ): Promise; 79 | }; 80 | 81 | /** 82 | * Returns the number of tokens in ``owner``'s account. 83 | */ 84 | balanceOf(owner: string, txDetails?: Truffle.TransactionDetails): Promise; 85 | 86 | /** 87 | * Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist. 88 | */ 89 | getApproved( 90 | tokenId: number | BN | string, 91 | txDetails?: Truffle.TransactionDetails 92 | ): Promise; 93 | 94 | /** 95 | * Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll} 96 | */ 97 | isApprovedForAll( 98 | owner: string, 99 | operator: string, 100 | txDetails?: Truffle.TransactionDetails 101 | ): Promise; 102 | 103 | /** 104 | * Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist. 105 | */ 106 | ownerOf( 107 | tokenId: number | BN | string, 108 | txDetails?: Truffle.TransactionDetails 109 | ): Promise; 110 | 111 | /** 112 | * Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the caller. Emits an {ApprovalForAll} event. 113 | */ 114 | setApprovalForAll: { 115 | ( 116 | operator: string, 117 | _approved: boolean, 118 | txDetails?: Truffle.TransactionDetails 119 | ): Promise>; 120 | call( 121 | operator: string, 122 | _approved: boolean, 123 | txDetails?: Truffle.TransactionDetails 124 | ): Promise; 125 | sendTransaction( 126 | operator: string, 127 | _approved: boolean, 128 | txDetails?: Truffle.TransactionDetails 129 | ): Promise; 130 | estimateGas( 131 | operator: string, 132 | _approved: boolean, 133 | txDetails?: Truffle.TransactionDetails 134 | ): Promise; 135 | }; 136 | 137 | /** 138 | * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. 139 | */ 140 | supportsInterface( 141 | interfaceId: string, 142 | txDetails?: Truffle.TransactionDetails 143 | ): Promise; 144 | 145 | /** 146 | * Transfers `tokenId` token from `from` to `to`. WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event. 147 | */ 148 | transferFrom: { 149 | ( 150 | from: string, 151 | to: string, 152 | tokenId: number | BN | string, 153 | txDetails?: Truffle.TransactionDetails 154 | ): Promise>; 155 | call( 156 | from: string, 157 | to: string, 158 | tokenId: number | BN | string, 159 | txDetails?: Truffle.TransactionDetails 160 | ): Promise; 161 | sendTransaction( 162 | from: string, 163 | to: string, 164 | tokenId: number | BN | string, 165 | txDetails?: Truffle.TransactionDetails 166 | ): Promise; 167 | estimateGas( 168 | from: string, 169 | to: string, 170 | tokenId: number | BN | string, 171 | txDetails?: Truffle.TransactionDetails 172 | ): Promise; 173 | }; 174 | 175 | /** 176 | * Returns the token collection name. 177 | */ 178 | name(txDetails?: Truffle.TransactionDetails): Promise; 179 | 180 | /** 181 | * Returns the token collection symbol. 182 | */ 183 | symbol(txDetails?: Truffle.TransactionDetails): Promise; 184 | 185 | /** 186 | * Returns the Uniform Resource Identifier (URI) for `tokenId` token. 187 | */ 188 | tokenURI( 189 | tokenId: number | BN | string, 190 | txDetails?: Truffle.TransactionDetails 191 | ): Promise; 192 | 193 | methods: { 194 | /** 195 | * Gives permission to `to` to transfer `tokenId` token to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. Requirements: - The caller must own the token or be an approved operator. - `tokenId` must exist. Emits an {Approval} event. 196 | */ 197 | approve: { 198 | ( 199 | to: string, 200 | tokenId: number | BN | string, 201 | txDetails?: Truffle.TransactionDetails 202 | ): Promise>; 203 | call( 204 | to: string, 205 | tokenId: number | BN | string, 206 | txDetails?: Truffle.TransactionDetails 207 | ): Promise; 208 | sendTransaction( 209 | to: string, 210 | tokenId: number | BN | string, 211 | txDetails?: Truffle.TransactionDetails 212 | ): Promise; 213 | estimateGas( 214 | to: string, 215 | tokenId: number | BN | string, 216 | txDetails?: Truffle.TransactionDetails 217 | ): Promise; 218 | }; 219 | 220 | /** 221 | * Returns the number of tokens in ``owner``'s account. 222 | */ 223 | balanceOf( 224 | owner: string, 225 | txDetails?: Truffle.TransactionDetails 226 | ): Promise; 227 | 228 | /** 229 | * Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist. 230 | */ 231 | getApproved( 232 | tokenId: number | BN | string, 233 | txDetails?: Truffle.TransactionDetails 234 | ): Promise; 235 | 236 | /** 237 | * Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll} 238 | */ 239 | isApprovedForAll( 240 | owner: string, 241 | operator: string, 242 | txDetails?: Truffle.TransactionDetails 243 | ): Promise; 244 | 245 | /** 246 | * Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist. 247 | */ 248 | ownerOf( 249 | tokenId: number | BN | string, 250 | txDetails?: Truffle.TransactionDetails 251 | ): Promise; 252 | 253 | /** 254 | * Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the caller. Emits an {ApprovalForAll} event. 255 | */ 256 | setApprovalForAll: { 257 | ( 258 | operator: string, 259 | _approved: boolean, 260 | txDetails?: Truffle.TransactionDetails 261 | ): Promise>; 262 | call( 263 | operator: string, 264 | _approved: boolean, 265 | txDetails?: Truffle.TransactionDetails 266 | ): Promise; 267 | sendTransaction( 268 | operator: string, 269 | _approved: boolean, 270 | txDetails?: Truffle.TransactionDetails 271 | ): Promise; 272 | estimateGas( 273 | operator: string, 274 | _approved: boolean, 275 | txDetails?: Truffle.TransactionDetails 276 | ): Promise; 277 | }; 278 | 279 | /** 280 | * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. 281 | */ 282 | supportsInterface( 283 | interfaceId: string, 284 | txDetails?: Truffle.TransactionDetails 285 | ): Promise; 286 | 287 | /** 288 | * Transfers `tokenId` token from `from` to `to`. WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event. 289 | */ 290 | transferFrom: { 291 | ( 292 | from: string, 293 | to: string, 294 | tokenId: number | BN | string, 295 | txDetails?: Truffle.TransactionDetails 296 | ): Promise>; 297 | call( 298 | from: string, 299 | to: string, 300 | tokenId: number | BN | string, 301 | txDetails?: Truffle.TransactionDetails 302 | ): Promise; 303 | sendTransaction( 304 | from: string, 305 | to: string, 306 | tokenId: number | BN | string, 307 | txDetails?: Truffle.TransactionDetails 308 | ): Promise; 309 | estimateGas( 310 | from: string, 311 | to: string, 312 | tokenId: number | BN | string, 313 | txDetails?: Truffle.TransactionDetails 314 | ): Promise; 315 | }; 316 | 317 | /** 318 | * Returns the token collection name. 319 | */ 320 | name(txDetails?: Truffle.TransactionDetails): Promise; 321 | 322 | /** 323 | * Returns the token collection symbol. 324 | */ 325 | symbol(txDetails?: Truffle.TransactionDetails): Promise; 326 | 327 | /** 328 | * Returns the Uniform Resource Identifier (URI) for `tokenId` token. 329 | */ 330 | tokenURI( 331 | tokenId: number | BN | string, 332 | txDetails?: Truffle.TransactionDetails 333 | ): Promise; 334 | 335 | /** 336 | * Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event. 337 | */ 338 | "safeTransferFrom(address,address,uint256)": { 339 | ( 340 | from: string, 341 | to: string, 342 | tokenId: number | BN | string, 343 | txDetails?: Truffle.TransactionDetails 344 | ): Promise>; 345 | call( 346 | from: string, 347 | to: string, 348 | tokenId: number | BN | string, 349 | txDetails?: Truffle.TransactionDetails 350 | ): Promise; 351 | sendTransaction( 352 | from: string, 353 | to: string, 354 | tokenId: number | BN | string, 355 | txDetails?: Truffle.TransactionDetails 356 | ): Promise; 357 | estimateGas( 358 | from: string, 359 | to: string, 360 | tokenId: number | BN | string, 361 | txDetails?: Truffle.TransactionDetails 362 | ): Promise; 363 | }; 364 | 365 | /** 366 | * Safely transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event. 367 | */ 368 | "safeTransferFrom(address,address,uint256,bytes)": { 369 | ( 370 | from: string, 371 | to: string, 372 | tokenId: number | BN | string, 373 | data: string, 374 | txDetails?: Truffle.TransactionDetails 375 | ): Promise>; 376 | call( 377 | from: string, 378 | to: string, 379 | tokenId: number | BN | string, 380 | data: string, 381 | txDetails?: Truffle.TransactionDetails 382 | ): Promise; 383 | sendTransaction( 384 | from: string, 385 | to: string, 386 | tokenId: number | BN | string, 387 | data: string, 388 | txDetails?: Truffle.TransactionDetails 389 | ): Promise; 390 | estimateGas( 391 | from: string, 392 | to: string, 393 | tokenId: number | BN | string, 394 | data: string, 395 | txDetails?: Truffle.TransactionDetails 396 | ): Promise; 397 | }; 398 | }; 399 | 400 | getPastEvents(event: string): Promise; 401 | getPastEvents( 402 | event: string, 403 | options: PastEventOptions, 404 | callback: (error: Error, event: EventData) => void 405 | ): Promise; 406 | getPastEvents(event: string, options: PastEventOptions): Promise; 407 | getPastEvents( 408 | event: string, 409 | callback: (error: Error, event: EventData) => void 410 | ): Promise; 411 | } 412 | -------------------------------------------------------------------------------- /types/truffle-contracts/IERC721ReceiverUpgradeable.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface IERC721ReceiverUpgradeableContract 9 | extends Truffle.Contract { 10 | "new"( 11 | meta?: Truffle.TransactionDetails 12 | ): Promise; 13 | } 14 | 15 | type AllEvents = never; 16 | 17 | export interface IERC721ReceiverUpgradeableInstance 18 | extends Truffle.ContractInstance { 19 | /** 20 | * Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} by `operator` from `from`, this function is called. It must return its Solidity selector to confirm the token transfer. If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. 21 | */ 22 | onERC721Received: { 23 | ( 24 | operator: string, 25 | from: string, 26 | tokenId: number | BN | string, 27 | data: string, 28 | txDetails?: Truffle.TransactionDetails 29 | ): Promise>; 30 | call( 31 | operator: string, 32 | from: string, 33 | tokenId: number | BN | string, 34 | data: string, 35 | txDetails?: Truffle.TransactionDetails 36 | ): Promise; 37 | sendTransaction( 38 | operator: string, 39 | from: string, 40 | tokenId: number | BN | string, 41 | data: string, 42 | txDetails?: Truffle.TransactionDetails 43 | ): Promise; 44 | estimateGas( 45 | operator: string, 46 | from: string, 47 | tokenId: number | BN | string, 48 | data: string, 49 | txDetails?: Truffle.TransactionDetails 50 | ): Promise; 51 | }; 52 | 53 | methods: { 54 | /** 55 | * Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} by `operator` from `from`, this function is called. It must return its Solidity selector to confirm the token transfer. If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. 56 | */ 57 | onERC721Received: { 58 | ( 59 | operator: string, 60 | from: string, 61 | tokenId: number | BN | string, 62 | data: string, 63 | txDetails?: Truffle.TransactionDetails 64 | ): Promise>; 65 | call( 66 | operator: string, 67 | from: string, 68 | tokenId: number | BN | string, 69 | data: string, 70 | txDetails?: Truffle.TransactionDetails 71 | ): Promise; 72 | sendTransaction( 73 | operator: string, 74 | from: string, 75 | tokenId: number | BN | string, 76 | data: string, 77 | txDetails?: Truffle.TransactionDetails 78 | ): Promise; 79 | estimateGas( 80 | operator: string, 81 | from: string, 82 | tokenId: number | BN | string, 83 | data: string, 84 | txDetails?: Truffle.TransactionDetails 85 | ): Promise; 86 | }; 87 | }; 88 | 89 | getPastEvents(event: string): Promise; 90 | getPastEvents( 91 | event: string, 92 | options: PastEventOptions, 93 | callback: (error: Error, event: EventData) => void 94 | ): Promise; 95 | getPastEvents(event: string, options: PastEventOptions): Promise; 96 | getPastEvents( 97 | event: string, 98 | callback: (error: Error, event: EventData) => void 99 | ): Promise; 100 | } 101 | -------------------------------------------------------------------------------- /types/truffle-contracts/IERC721Upgradeable.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface IERC721UpgradeableContract 9 | extends Truffle.Contract { 10 | "new"(meta?: Truffle.TransactionDetails): Promise; 11 | } 12 | 13 | export interface Approval { 14 | name: "Approval"; 15 | args: { 16 | owner: string; 17 | approved: string; 18 | tokenId: BN; 19 | 0: string; 20 | 1: string; 21 | 2: BN; 22 | }; 23 | } 24 | 25 | export interface ApprovalForAll { 26 | name: "ApprovalForAll"; 27 | args: { 28 | owner: string; 29 | operator: string; 30 | approved: boolean; 31 | 0: string; 32 | 1: string; 33 | 2: boolean; 34 | }; 35 | } 36 | 37 | export interface Transfer { 38 | name: "Transfer"; 39 | args: { 40 | from: string; 41 | to: string; 42 | tokenId: BN; 43 | 0: string; 44 | 1: string; 45 | 2: BN; 46 | }; 47 | } 48 | 49 | type AllEvents = Approval | ApprovalForAll | Transfer; 50 | 51 | export interface IERC721UpgradeableInstance extends Truffle.ContractInstance { 52 | /** 53 | * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. 54 | */ 55 | supportsInterface( 56 | interfaceId: string, 57 | txDetails?: Truffle.TransactionDetails 58 | ): Promise; 59 | 60 | /** 61 | * Returns the number of tokens in ``owner``'s account. 62 | */ 63 | balanceOf(owner: string, txDetails?: Truffle.TransactionDetails): Promise; 64 | 65 | /** 66 | * Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist. 67 | */ 68 | ownerOf( 69 | tokenId: number | BN | string, 70 | txDetails?: Truffle.TransactionDetails 71 | ): Promise; 72 | 73 | /** 74 | * Transfers `tokenId` token from `from` to `to`. WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event. 75 | */ 76 | transferFrom: { 77 | ( 78 | from: string, 79 | to: string, 80 | tokenId: number | BN | string, 81 | txDetails?: Truffle.TransactionDetails 82 | ): Promise>; 83 | call( 84 | from: string, 85 | to: string, 86 | tokenId: number | BN | string, 87 | txDetails?: Truffle.TransactionDetails 88 | ): Promise; 89 | sendTransaction( 90 | from: string, 91 | to: string, 92 | tokenId: number | BN | string, 93 | txDetails?: Truffle.TransactionDetails 94 | ): Promise; 95 | estimateGas( 96 | from: string, 97 | to: string, 98 | tokenId: number | BN | string, 99 | txDetails?: Truffle.TransactionDetails 100 | ): Promise; 101 | }; 102 | 103 | /** 104 | * Gives permission to `to` to transfer `tokenId` token to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. Requirements: - The caller must own the token or be an approved operator. - `tokenId` must exist. Emits an {Approval} event. 105 | */ 106 | approve: { 107 | ( 108 | to: string, 109 | tokenId: number | BN | string, 110 | txDetails?: Truffle.TransactionDetails 111 | ): Promise>; 112 | call( 113 | to: string, 114 | tokenId: number | BN | string, 115 | txDetails?: Truffle.TransactionDetails 116 | ): Promise; 117 | sendTransaction( 118 | to: string, 119 | tokenId: number | BN | string, 120 | txDetails?: Truffle.TransactionDetails 121 | ): Promise; 122 | estimateGas( 123 | to: string, 124 | tokenId: number | BN | string, 125 | txDetails?: Truffle.TransactionDetails 126 | ): Promise; 127 | }; 128 | 129 | /** 130 | * Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist. 131 | */ 132 | getApproved( 133 | tokenId: number | BN | string, 134 | txDetails?: Truffle.TransactionDetails 135 | ): Promise; 136 | 137 | /** 138 | * Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the caller. Emits an {ApprovalForAll} event. 139 | */ 140 | setApprovalForAll: { 141 | ( 142 | operator: string, 143 | _approved: boolean, 144 | txDetails?: Truffle.TransactionDetails 145 | ): Promise>; 146 | call( 147 | operator: string, 148 | _approved: boolean, 149 | txDetails?: Truffle.TransactionDetails 150 | ): Promise; 151 | sendTransaction( 152 | operator: string, 153 | _approved: boolean, 154 | txDetails?: Truffle.TransactionDetails 155 | ): Promise; 156 | estimateGas( 157 | operator: string, 158 | _approved: boolean, 159 | txDetails?: Truffle.TransactionDetails 160 | ): Promise; 161 | }; 162 | 163 | /** 164 | * Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll} 165 | */ 166 | isApprovedForAll( 167 | owner: string, 168 | operator: string, 169 | txDetails?: Truffle.TransactionDetails 170 | ): Promise; 171 | 172 | methods: { 173 | /** 174 | * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. 175 | */ 176 | supportsInterface( 177 | interfaceId: string, 178 | txDetails?: Truffle.TransactionDetails 179 | ): Promise; 180 | 181 | /** 182 | * Returns the number of tokens in ``owner``'s account. 183 | */ 184 | balanceOf( 185 | owner: string, 186 | txDetails?: Truffle.TransactionDetails 187 | ): Promise; 188 | 189 | /** 190 | * Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist. 191 | */ 192 | ownerOf( 193 | tokenId: number | BN | string, 194 | txDetails?: Truffle.TransactionDetails 195 | ): Promise; 196 | 197 | /** 198 | * Transfers `tokenId` token from `from` to `to`. WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event. 199 | */ 200 | transferFrom: { 201 | ( 202 | from: string, 203 | to: string, 204 | tokenId: number | BN | string, 205 | txDetails?: Truffle.TransactionDetails 206 | ): Promise>; 207 | call( 208 | from: string, 209 | to: string, 210 | tokenId: number | BN | string, 211 | txDetails?: Truffle.TransactionDetails 212 | ): Promise; 213 | sendTransaction( 214 | from: string, 215 | to: string, 216 | tokenId: number | BN | string, 217 | txDetails?: Truffle.TransactionDetails 218 | ): Promise; 219 | estimateGas( 220 | from: string, 221 | to: string, 222 | tokenId: number | BN | string, 223 | txDetails?: Truffle.TransactionDetails 224 | ): Promise; 225 | }; 226 | 227 | /** 228 | * Gives permission to `to` to transfer `tokenId` token to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. Requirements: - The caller must own the token or be an approved operator. - `tokenId` must exist. Emits an {Approval} event. 229 | */ 230 | approve: { 231 | ( 232 | to: string, 233 | tokenId: number | BN | string, 234 | txDetails?: Truffle.TransactionDetails 235 | ): Promise>; 236 | call( 237 | to: string, 238 | tokenId: number | BN | string, 239 | txDetails?: Truffle.TransactionDetails 240 | ): Promise; 241 | sendTransaction( 242 | to: string, 243 | tokenId: number | BN | string, 244 | txDetails?: Truffle.TransactionDetails 245 | ): Promise; 246 | estimateGas( 247 | to: string, 248 | tokenId: number | BN | string, 249 | txDetails?: Truffle.TransactionDetails 250 | ): Promise; 251 | }; 252 | 253 | /** 254 | * Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist. 255 | */ 256 | getApproved( 257 | tokenId: number | BN | string, 258 | txDetails?: Truffle.TransactionDetails 259 | ): Promise; 260 | 261 | /** 262 | * Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the caller. Emits an {ApprovalForAll} event. 263 | */ 264 | setApprovalForAll: { 265 | ( 266 | operator: string, 267 | _approved: boolean, 268 | txDetails?: Truffle.TransactionDetails 269 | ): Promise>; 270 | call( 271 | operator: string, 272 | _approved: boolean, 273 | txDetails?: Truffle.TransactionDetails 274 | ): Promise; 275 | sendTransaction( 276 | operator: string, 277 | _approved: boolean, 278 | txDetails?: Truffle.TransactionDetails 279 | ): Promise; 280 | estimateGas( 281 | operator: string, 282 | _approved: boolean, 283 | txDetails?: Truffle.TransactionDetails 284 | ): Promise; 285 | }; 286 | 287 | /** 288 | * Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll} 289 | */ 290 | isApprovedForAll( 291 | owner: string, 292 | operator: string, 293 | txDetails?: Truffle.TransactionDetails 294 | ): Promise; 295 | 296 | /** 297 | * Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event. 298 | */ 299 | "safeTransferFrom(address,address,uint256)": { 300 | ( 301 | from: string, 302 | to: string, 303 | tokenId: number | BN | string, 304 | txDetails?: Truffle.TransactionDetails 305 | ): Promise>; 306 | call( 307 | from: string, 308 | to: string, 309 | tokenId: number | BN | string, 310 | txDetails?: Truffle.TransactionDetails 311 | ): Promise; 312 | sendTransaction( 313 | from: string, 314 | to: string, 315 | tokenId: number | BN | string, 316 | txDetails?: Truffle.TransactionDetails 317 | ): Promise; 318 | estimateGas( 319 | from: string, 320 | to: string, 321 | tokenId: number | BN | string, 322 | txDetails?: Truffle.TransactionDetails 323 | ): Promise; 324 | }; 325 | 326 | /** 327 | * Safely transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event. 328 | */ 329 | "safeTransferFrom(address,address,uint256,bytes)": { 330 | ( 331 | from: string, 332 | to: string, 333 | tokenId: number | BN | string, 334 | data: string, 335 | txDetails?: Truffle.TransactionDetails 336 | ): Promise>; 337 | call( 338 | from: string, 339 | to: string, 340 | tokenId: number | BN | string, 341 | data: string, 342 | txDetails?: Truffle.TransactionDetails 343 | ): Promise; 344 | sendTransaction( 345 | from: string, 346 | to: string, 347 | tokenId: number | BN | string, 348 | data: string, 349 | txDetails?: Truffle.TransactionDetails 350 | ): Promise; 351 | estimateGas( 352 | from: string, 353 | to: string, 354 | tokenId: number | BN | string, 355 | data: string, 356 | txDetails?: Truffle.TransactionDetails 357 | ): Promise; 358 | }; 359 | }; 360 | 361 | getPastEvents(event: string): Promise; 362 | getPastEvents( 363 | event: string, 364 | options: PastEventOptions, 365 | callback: (error: Error, event: EventData) => void 366 | ): Promise; 367 | getPastEvents(event: string, options: PastEventOptions): Promise; 368 | getPastEvents( 369 | event: string, 370 | callback: (error: Error, event: EventData) => void 371 | ): Promise; 372 | } 373 | -------------------------------------------------------------------------------- /types/truffle-contracts/Migrations.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface MigrationsContract 9 | extends Truffle.Contract { 10 | "new"(meta?: Truffle.TransactionDetails): Promise; 11 | } 12 | 13 | type AllEvents = never; 14 | 15 | export interface MigrationsInstance extends Truffle.ContractInstance { 16 | last_completed_migration(txDetails?: Truffle.TransactionDetails): Promise; 17 | 18 | owner(txDetails?: Truffle.TransactionDetails): Promise; 19 | 20 | setCompleted: { 21 | ( 22 | completed: number | BN | string, 23 | txDetails?: Truffle.TransactionDetails 24 | ): Promise>; 25 | call( 26 | completed: number | BN | string, 27 | txDetails?: Truffle.TransactionDetails 28 | ): Promise; 29 | sendTransaction( 30 | completed: number | BN | string, 31 | txDetails?: Truffle.TransactionDetails 32 | ): Promise; 33 | estimateGas( 34 | completed: number | BN | string, 35 | txDetails?: Truffle.TransactionDetails 36 | ): Promise; 37 | }; 38 | 39 | methods: { 40 | last_completed_migration( 41 | txDetails?: Truffle.TransactionDetails 42 | ): Promise; 43 | 44 | owner(txDetails?: Truffle.TransactionDetails): Promise; 45 | 46 | setCompleted: { 47 | ( 48 | completed: number | BN | string, 49 | txDetails?: Truffle.TransactionDetails 50 | ): Promise>; 51 | call( 52 | completed: number | BN | string, 53 | txDetails?: Truffle.TransactionDetails 54 | ): Promise; 55 | sendTransaction( 56 | completed: number | BN | string, 57 | txDetails?: Truffle.TransactionDetails 58 | ): Promise; 59 | estimateGas( 60 | completed: number | BN | string, 61 | txDetails?: Truffle.TransactionDetails 62 | ): Promise; 63 | }; 64 | }; 65 | 66 | getPastEvents(event: string): Promise; 67 | getPastEvents( 68 | event: string, 69 | options: PastEventOptions, 70 | callback: (error: Error, event: EventData) => void 71 | ): Promise; 72 | getPastEvents(event: string, options: PastEventOptions): Promise; 73 | getPastEvents( 74 | event: string, 75 | callback: (error: Error, event: EventData) => void 76 | ): Promise; 77 | } 78 | -------------------------------------------------------------------------------- /types/truffle-contracts/NFTT.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface NFTTContract extends Truffle.Contract { 9 | "new"(meta?: Truffle.TransactionDetails): Promise; 10 | } 11 | 12 | export interface Approval { 13 | name: "Approval"; 14 | args: { 15 | owner: string; 16 | approved: string; 17 | tokenId: BN; 18 | 0: string; 19 | 1: string; 20 | 2: BN; 21 | }; 22 | } 23 | 24 | export interface ApprovalForAll { 25 | name: "ApprovalForAll"; 26 | args: { 27 | owner: string; 28 | operator: string; 29 | approved: boolean; 30 | 0: string; 31 | 1: string; 32 | 2: boolean; 33 | }; 34 | } 35 | 36 | export interface OwnershipTransferred { 37 | name: "OwnershipTransferred"; 38 | args: { 39 | previousOwner: string; 40 | newOwner: string; 41 | 0: string; 42 | 1: string; 43 | }; 44 | } 45 | 46 | export interface Transfer { 47 | name: "Transfer"; 48 | args: { 49 | from: string; 50 | to: string; 51 | tokenId: BN; 52 | 0: string; 53 | 1: string; 54 | 2: BN; 55 | }; 56 | } 57 | 58 | type AllEvents = Approval | ApprovalForAll | OwnershipTransferred | Transfer; 59 | 60 | export interface NFTTInstance extends Truffle.ContractInstance { 61 | /** 62 | * See {IERC721-approve}. 63 | */ 64 | approve: { 65 | ( 66 | to: string, 67 | tokenId: number | BN | string, 68 | txDetails?: Truffle.TransactionDetails 69 | ): Promise>; 70 | call( 71 | to: string, 72 | tokenId: number | BN | string, 73 | txDetails?: Truffle.TransactionDetails 74 | ): Promise; 75 | sendTransaction( 76 | to: string, 77 | tokenId: number | BN | string, 78 | txDetails?: Truffle.TransactionDetails 79 | ): Promise; 80 | estimateGas( 81 | to: string, 82 | tokenId: number | BN | string, 83 | txDetails?: Truffle.TransactionDetails 84 | ): Promise; 85 | }; 86 | 87 | /** 88 | * See {IERC721-balanceOf}. 89 | */ 90 | balanceOf(owner: string, txDetails?: Truffle.TransactionDetails): Promise; 91 | 92 | /** 93 | * See {IERC721-getApproved}. 94 | */ 95 | getApproved( 96 | tokenId: number | BN | string, 97 | txDetails?: Truffle.TransactionDetails 98 | ): Promise; 99 | 100 | /** 101 | * See {IERC721-isApprovedForAll}. 102 | */ 103 | isApprovedForAll( 104 | owner: string, 105 | operator: string, 106 | txDetails?: Truffle.TransactionDetails 107 | ): Promise; 108 | 109 | /** 110 | * See {IERC721Metadata-name}. 111 | */ 112 | name(txDetails?: Truffle.TransactionDetails): Promise; 113 | 114 | /** 115 | * Returns the address of the current owner. 116 | */ 117 | owner(txDetails?: Truffle.TransactionDetails): Promise; 118 | 119 | /** 120 | * See {IERC721-ownerOf}. 121 | */ 122 | ownerOf( 123 | tokenId: number | BN | string, 124 | txDetails?: Truffle.TransactionDetails 125 | ): Promise; 126 | 127 | /** 128 | * Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. 129 | */ 130 | renounceOwnership: { 131 | (txDetails?: Truffle.TransactionDetails): Promise< 132 | Truffle.TransactionResponse 133 | >; 134 | call(txDetails?: Truffle.TransactionDetails): Promise; 135 | sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; 136 | estimateGas(txDetails?: Truffle.TransactionDetails): Promise; 137 | }; 138 | 139 | /** 140 | * See {IERC721-setApprovalForAll}. 141 | */ 142 | setApprovalForAll: { 143 | ( 144 | operator: string, 145 | approved: boolean, 146 | txDetails?: Truffle.TransactionDetails 147 | ): Promise>; 148 | call( 149 | operator: string, 150 | approved: boolean, 151 | txDetails?: Truffle.TransactionDetails 152 | ): Promise; 153 | sendTransaction( 154 | operator: string, 155 | approved: boolean, 156 | txDetails?: Truffle.TransactionDetails 157 | ): Promise; 158 | estimateGas( 159 | operator: string, 160 | approved: boolean, 161 | txDetails?: Truffle.TransactionDetails 162 | ): Promise; 163 | }; 164 | 165 | /** 166 | * See {IERC165-supportsInterface}. 167 | */ 168 | supportsInterface( 169 | interfaceId: string, 170 | txDetails?: Truffle.TransactionDetails 171 | ): Promise; 172 | 173 | /** 174 | * See {IERC721Metadata-symbol}. 175 | */ 176 | symbol(txDetails?: Truffle.TransactionDetails): Promise; 177 | 178 | /** 179 | * See {IERC721Metadata-tokenURI}. 180 | */ 181 | tokenURI( 182 | tokenId: number | BN | string, 183 | txDetails?: Truffle.TransactionDetails 184 | ): Promise; 185 | 186 | /** 187 | * See {IERC721-transferFrom}. 188 | */ 189 | transferFrom: { 190 | ( 191 | from: string, 192 | to: string, 193 | tokenId: number | BN | string, 194 | txDetails?: Truffle.TransactionDetails 195 | ): Promise>; 196 | call( 197 | from: string, 198 | to: string, 199 | tokenId: number | BN | string, 200 | txDetails?: Truffle.TransactionDetails 201 | ): Promise; 202 | sendTransaction( 203 | from: string, 204 | to: string, 205 | tokenId: number | BN | string, 206 | txDetails?: Truffle.TransactionDetails 207 | ): Promise; 208 | estimateGas( 209 | from: string, 210 | to: string, 211 | tokenId: number | BN | string, 212 | txDetails?: Truffle.TransactionDetails 213 | ): Promise; 214 | }; 215 | 216 | /** 217 | * Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner. 218 | */ 219 | transferOwnership: { 220 | (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< 221 | Truffle.TransactionResponse 222 | >; 223 | call( 224 | newOwner: string, 225 | txDetails?: Truffle.TransactionDetails 226 | ): Promise; 227 | sendTransaction( 228 | newOwner: string, 229 | txDetails?: Truffle.TransactionDetails 230 | ): Promise; 231 | estimateGas( 232 | newOwner: string, 233 | txDetails?: Truffle.TransactionDetails 234 | ): Promise; 235 | }; 236 | 237 | initialize: { 238 | (txDetails?: Truffle.TransactionDetails): Promise< 239 | Truffle.TransactionResponse 240 | >; 241 | call(txDetails?: Truffle.TransactionDetails): Promise; 242 | sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; 243 | estimateGas(txDetails?: Truffle.TransactionDetails): Promise; 244 | }; 245 | 246 | setBaseURI: { 247 | (_newBaseURI: string, txDetails?: Truffle.TransactionDetails): Promise< 248 | Truffle.TransactionResponse 249 | >; 250 | call( 251 | _newBaseURI: string, 252 | txDetails?: Truffle.TransactionDetails 253 | ): Promise; 254 | sendTransaction( 255 | _newBaseURI: string, 256 | txDetails?: Truffle.TransactionDetails 257 | ): Promise; 258 | estimateGas( 259 | _newBaseURI: string, 260 | txDetails?: Truffle.TransactionDetails 261 | ): Promise; 262 | }; 263 | 264 | getAllOnSale( 265 | txDetails?: Truffle.TransactionDetails 266 | ): Promise<{ id: BN; price: BN; name: string; uri: string; sale: boolean }[]>; 267 | 268 | /** 269 | * sets maps token to its price 270 | * @param _price unit256 token price Requirements: `tokenId` must exist `price` must be more than 0 `owner` must the msg.owner 271 | * @param _sale bool token on sale 272 | * @param _tokenId uint256 token ID (token number) 273 | */ 274 | setTokenSale: { 275 | ( 276 | _tokenId: number | BN | string, 277 | _sale: boolean, 278 | _price: number | BN | string, 279 | txDetails?: Truffle.TransactionDetails 280 | ): Promise>; 281 | call( 282 | _tokenId: number | BN | string, 283 | _sale: boolean, 284 | _price: number | BN | string, 285 | txDetails?: Truffle.TransactionDetails 286 | ): Promise; 287 | sendTransaction( 288 | _tokenId: number | BN | string, 289 | _sale: boolean, 290 | _price: number | BN | string, 291 | txDetails?: Truffle.TransactionDetails 292 | ): Promise; 293 | estimateGas( 294 | _tokenId: number | BN | string, 295 | _sale: boolean, 296 | _price: number | BN | string, 297 | txDetails?: Truffle.TransactionDetails 298 | ): Promise; 299 | }; 300 | 301 | /** 302 | * sets maps token to its price 303 | * @param _price uint256 token price Requirements: `tokenId` must exist `owner` must the msg.owner 304 | * @param _tokenId uint256 token ID (token number) 305 | */ 306 | setTokenPrice: { 307 | ( 308 | _tokenId: number | BN | string, 309 | _price: number | BN | string, 310 | txDetails?: Truffle.TransactionDetails 311 | ): Promise>; 312 | call( 313 | _tokenId: number | BN | string, 314 | _price: number | BN | string, 315 | txDetails?: Truffle.TransactionDetails 316 | ): Promise; 317 | sendTransaction( 318 | _tokenId: number | BN | string, 319 | _price: number | BN | string, 320 | txDetails?: Truffle.TransactionDetails 321 | ): Promise; 322 | estimateGas( 323 | _tokenId: number | BN | string, 324 | _price: number | BN | string, 325 | txDetails?: Truffle.TransactionDetails 326 | ): Promise; 327 | }; 328 | 329 | tokenPrice( 330 | tokenId: number | BN | string, 331 | txDetails?: Truffle.TransactionDetails 332 | ): Promise; 333 | 334 | tokenMeta( 335 | _tokenId: number | BN | string, 336 | txDetails?: Truffle.TransactionDetails 337 | ): Promise<{ id: BN; price: BN; name: string; uri: string; sale: boolean }>; 338 | 339 | /** 340 | * purchase _tokenId 341 | * @param _tokenId uint256 token ID (token number) 342 | */ 343 | purchaseToken: { 344 | ( 345 | _tokenId: number | BN | string, 346 | txDetails?: Truffle.TransactionDetails 347 | ): Promise>; 348 | call( 349 | _tokenId: number | BN | string, 350 | txDetails?: Truffle.TransactionDetails 351 | ): Promise; 352 | sendTransaction( 353 | _tokenId: number | BN | string, 354 | txDetails?: Truffle.TransactionDetails 355 | ): Promise; 356 | estimateGas( 357 | _tokenId: number | BN | string, 358 | txDetails?: Truffle.TransactionDetails 359 | ): Promise; 360 | }; 361 | 362 | mintCollectable: { 363 | ( 364 | _owner: string, 365 | _tokenURI: string, 366 | _name: string, 367 | _price: number | BN | string, 368 | _sale: boolean, 369 | txDetails?: Truffle.TransactionDetails 370 | ): Promise>; 371 | call( 372 | _owner: string, 373 | _tokenURI: string, 374 | _name: string, 375 | _price: number | BN | string, 376 | _sale: boolean, 377 | txDetails?: Truffle.TransactionDetails 378 | ): Promise; 379 | sendTransaction( 380 | _owner: string, 381 | _tokenURI: string, 382 | _name: string, 383 | _price: number | BN | string, 384 | _sale: boolean, 385 | txDetails?: Truffle.TransactionDetails 386 | ): Promise; 387 | estimateGas( 388 | _owner: string, 389 | _tokenURI: string, 390 | _name: string, 391 | _price: number | BN | string, 392 | _sale: boolean, 393 | txDetails?: Truffle.TransactionDetails 394 | ): Promise; 395 | }; 396 | 397 | methods: { 398 | /** 399 | * See {IERC721-approve}. 400 | */ 401 | approve: { 402 | ( 403 | to: string, 404 | tokenId: number | BN | string, 405 | txDetails?: Truffle.TransactionDetails 406 | ): Promise>; 407 | call( 408 | to: string, 409 | tokenId: number | BN | string, 410 | txDetails?: Truffle.TransactionDetails 411 | ): Promise; 412 | sendTransaction( 413 | to: string, 414 | tokenId: number | BN | string, 415 | txDetails?: Truffle.TransactionDetails 416 | ): Promise; 417 | estimateGas( 418 | to: string, 419 | tokenId: number | BN | string, 420 | txDetails?: Truffle.TransactionDetails 421 | ): Promise; 422 | }; 423 | 424 | /** 425 | * See {IERC721-balanceOf}. 426 | */ 427 | balanceOf( 428 | owner: string, 429 | txDetails?: Truffle.TransactionDetails 430 | ): Promise; 431 | 432 | /** 433 | * See {IERC721-getApproved}. 434 | */ 435 | getApproved( 436 | tokenId: number | BN | string, 437 | txDetails?: Truffle.TransactionDetails 438 | ): Promise; 439 | 440 | /** 441 | * See {IERC721-isApprovedForAll}. 442 | */ 443 | isApprovedForAll( 444 | owner: string, 445 | operator: string, 446 | txDetails?: Truffle.TransactionDetails 447 | ): Promise; 448 | 449 | /** 450 | * See {IERC721Metadata-name}. 451 | */ 452 | name(txDetails?: Truffle.TransactionDetails): Promise; 453 | 454 | /** 455 | * Returns the address of the current owner. 456 | */ 457 | owner(txDetails?: Truffle.TransactionDetails): Promise; 458 | 459 | /** 460 | * See {IERC721-ownerOf}. 461 | */ 462 | ownerOf( 463 | tokenId: number | BN | string, 464 | txDetails?: Truffle.TransactionDetails 465 | ): Promise; 466 | 467 | /** 468 | * Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. 469 | */ 470 | renounceOwnership: { 471 | (txDetails?: Truffle.TransactionDetails): Promise< 472 | Truffle.TransactionResponse 473 | >; 474 | call(txDetails?: Truffle.TransactionDetails): Promise; 475 | sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; 476 | estimateGas(txDetails?: Truffle.TransactionDetails): Promise; 477 | }; 478 | 479 | /** 480 | * See {IERC721-setApprovalForAll}. 481 | */ 482 | setApprovalForAll: { 483 | ( 484 | operator: string, 485 | approved: boolean, 486 | txDetails?: Truffle.TransactionDetails 487 | ): Promise>; 488 | call( 489 | operator: string, 490 | approved: boolean, 491 | txDetails?: Truffle.TransactionDetails 492 | ): Promise; 493 | sendTransaction( 494 | operator: string, 495 | approved: boolean, 496 | txDetails?: Truffle.TransactionDetails 497 | ): Promise; 498 | estimateGas( 499 | operator: string, 500 | approved: boolean, 501 | txDetails?: Truffle.TransactionDetails 502 | ): Promise; 503 | }; 504 | 505 | /** 506 | * See {IERC165-supportsInterface}. 507 | */ 508 | supportsInterface( 509 | interfaceId: string, 510 | txDetails?: Truffle.TransactionDetails 511 | ): Promise; 512 | 513 | /** 514 | * See {IERC721Metadata-symbol}. 515 | */ 516 | symbol(txDetails?: Truffle.TransactionDetails): Promise; 517 | 518 | /** 519 | * See {IERC721Metadata-tokenURI}. 520 | */ 521 | tokenURI( 522 | tokenId: number | BN | string, 523 | txDetails?: Truffle.TransactionDetails 524 | ): Promise; 525 | 526 | /** 527 | * See {IERC721-transferFrom}. 528 | */ 529 | transferFrom: { 530 | ( 531 | from: string, 532 | to: string, 533 | tokenId: number | BN | string, 534 | txDetails?: Truffle.TransactionDetails 535 | ): Promise>; 536 | call( 537 | from: string, 538 | to: string, 539 | tokenId: number | BN | string, 540 | txDetails?: Truffle.TransactionDetails 541 | ): Promise; 542 | sendTransaction( 543 | from: string, 544 | to: string, 545 | tokenId: number | BN | string, 546 | txDetails?: Truffle.TransactionDetails 547 | ): Promise; 548 | estimateGas( 549 | from: string, 550 | to: string, 551 | tokenId: number | BN | string, 552 | txDetails?: Truffle.TransactionDetails 553 | ): Promise; 554 | }; 555 | 556 | /** 557 | * Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner. 558 | */ 559 | transferOwnership: { 560 | (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< 561 | Truffle.TransactionResponse 562 | >; 563 | call( 564 | newOwner: string, 565 | txDetails?: Truffle.TransactionDetails 566 | ): Promise; 567 | sendTransaction( 568 | newOwner: string, 569 | txDetails?: Truffle.TransactionDetails 570 | ): Promise; 571 | estimateGas( 572 | newOwner: string, 573 | txDetails?: Truffle.TransactionDetails 574 | ): Promise; 575 | }; 576 | 577 | initialize: { 578 | (txDetails?: Truffle.TransactionDetails): Promise< 579 | Truffle.TransactionResponse 580 | >; 581 | call(txDetails?: Truffle.TransactionDetails): Promise; 582 | sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; 583 | estimateGas(txDetails?: Truffle.TransactionDetails): Promise; 584 | }; 585 | 586 | setBaseURI: { 587 | (_newBaseURI: string, txDetails?: Truffle.TransactionDetails): Promise< 588 | Truffle.TransactionResponse 589 | >; 590 | call( 591 | _newBaseURI: string, 592 | txDetails?: Truffle.TransactionDetails 593 | ): Promise; 594 | sendTransaction( 595 | _newBaseURI: string, 596 | txDetails?: Truffle.TransactionDetails 597 | ): Promise; 598 | estimateGas( 599 | _newBaseURI: string, 600 | txDetails?: Truffle.TransactionDetails 601 | ): Promise; 602 | }; 603 | 604 | getAllOnSale( 605 | txDetails?: Truffle.TransactionDetails 606 | ): Promise< 607 | { id: BN; price: BN; name: string; uri: string; sale: boolean }[] 608 | >; 609 | 610 | /** 611 | * sets maps token to its price 612 | * @param _price unit256 token price Requirements: `tokenId` must exist `price` must be more than 0 `owner` must the msg.owner 613 | * @param _sale bool token on sale 614 | * @param _tokenId uint256 token ID (token number) 615 | */ 616 | setTokenSale: { 617 | ( 618 | _tokenId: number | BN | string, 619 | _sale: boolean, 620 | _price: number | BN | string, 621 | txDetails?: Truffle.TransactionDetails 622 | ): Promise>; 623 | call( 624 | _tokenId: number | BN | string, 625 | _sale: boolean, 626 | _price: number | BN | string, 627 | txDetails?: Truffle.TransactionDetails 628 | ): Promise; 629 | sendTransaction( 630 | _tokenId: number | BN | string, 631 | _sale: boolean, 632 | _price: number | BN | string, 633 | txDetails?: Truffle.TransactionDetails 634 | ): Promise; 635 | estimateGas( 636 | _tokenId: number | BN | string, 637 | _sale: boolean, 638 | _price: number | BN | string, 639 | txDetails?: Truffle.TransactionDetails 640 | ): Promise; 641 | }; 642 | 643 | /** 644 | * sets maps token to its price 645 | * @param _price uint256 token price Requirements: `tokenId` must exist `owner` must the msg.owner 646 | * @param _tokenId uint256 token ID (token number) 647 | */ 648 | setTokenPrice: { 649 | ( 650 | _tokenId: number | BN | string, 651 | _price: number | BN | string, 652 | txDetails?: Truffle.TransactionDetails 653 | ): Promise>; 654 | call( 655 | _tokenId: number | BN | string, 656 | _price: number | BN | string, 657 | txDetails?: Truffle.TransactionDetails 658 | ): Promise; 659 | sendTransaction( 660 | _tokenId: number | BN | string, 661 | _price: number | BN | string, 662 | txDetails?: Truffle.TransactionDetails 663 | ): Promise; 664 | estimateGas( 665 | _tokenId: number | BN | string, 666 | _price: number | BN | string, 667 | txDetails?: Truffle.TransactionDetails 668 | ): Promise; 669 | }; 670 | 671 | tokenPrice( 672 | tokenId: number | BN | string, 673 | txDetails?: Truffle.TransactionDetails 674 | ): Promise; 675 | 676 | tokenMeta( 677 | _tokenId: number | BN | string, 678 | txDetails?: Truffle.TransactionDetails 679 | ): Promise<{ id: BN; price: BN; name: string; uri: string; sale: boolean }>; 680 | 681 | /** 682 | * purchase _tokenId 683 | * @param _tokenId uint256 token ID (token number) 684 | */ 685 | purchaseToken: { 686 | ( 687 | _tokenId: number | BN | string, 688 | txDetails?: Truffle.TransactionDetails 689 | ): Promise>; 690 | call( 691 | _tokenId: number | BN | string, 692 | txDetails?: Truffle.TransactionDetails 693 | ): Promise; 694 | sendTransaction( 695 | _tokenId: number | BN | string, 696 | txDetails?: Truffle.TransactionDetails 697 | ): Promise; 698 | estimateGas( 699 | _tokenId: number | BN | string, 700 | txDetails?: Truffle.TransactionDetails 701 | ): Promise; 702 | }; 703 | 704 | mintCollectable: { 705 | ( 706 | _owner: string, 707 | _tokenURI: string, 708 | _name: string, 709 | _price: number | BN | string, 710 | _sale: boolean, 711 | txDetails?: Truffle.TransactionDetails 712 | ): Promise>; 713 | call( 714 | _owner: string, 715 | _tokenURI: string, 716 | _name: string, 717 | _price: number | BN | string, 718 | _sale: boolean, 719 | txDetails?: Truffle.TransactionDetails 720 | ): Promise; 721 | sendTransaction( 722 | _owner: string, 723 | _tokenURI: string, 724 | _name: string, 725 | _price: number | BN | string, 726 | _sale: boolean, 727 | txDetails?: Truffle.TransactionDetails 728 | ): Promise; 729 | estimateGas( 730 | _owner: string, 731 | _tokenURI: string, 732 | _name: string, 733 | _price: number | BN | string, 734 | _sale: boolean, 735 | txDetails?: Truffle.TransactionDetails 736 | ): Promise; 737 | }; 738 | 739 | /** 740 | * See {IERC721-safeTransferFrom}. 741 | */ 742 | "safeTransferFrom(address,address,uint256)": { 743 | ( 744 | from: string, 745 | to: string, 746 | tokenId: number | BN | string, 747 | txDetails?: Truffle.TransactionDetails 748 | ): Promise>; 749 | call( 750 | from: string, 751 | to: string, 752 | tokenId: number | BN | string, 753 | txDetails?: Truffle.TransactionDetails 754 | ): Promise; 755 | sendTransaction( 756 | from: string, 757 | to: string, 758 | tokenId: number | BN | string, 759 | txDetails?: Truffle.TransactionDetails 760 | ): Promise; 761 | estimateGas( 762 | from: string, 763 | to: string, 764 | tokenId: number | BN | string, 765 | txDetails?: Truffle.TransactionDetails 766 | ): Promise; 767 | }; 768 | 769 | /** 770 | * See {IERC721-safeTransferFrom}. 771 | */ 772 | "safeTransferFrom(address,address,uint256,bytes)": { 773 | ( 774 | from: string, 775 | to: string, 776 | tokenId: number | BN | string, 777 | _data: string, 778 | txDetails?: Truffle.TransactionDetails 779 | ): Promise>; 780 | call( 781 | from: string, 782 | to: string, 783 | tokenId: number | BN | string, 784 | _data: string, 785 | txDetails?: Truffle.TransactionDetails 786 | ): Promise; 787 | sendTransaction( 788 | from: string, 789 | to: string, 790 | tokenId: number | BN | string, 791 | _data: string, 792 | txDetails?: Truffle.TransactionDetails 793 | ): Promise; 794 | estimateGas( 795 | from: string, 796 | to: string, 797 | tokenId: number | BN | string, 798 | _data: string, 799 | txDetails?: Truffle.TransactionDetails 800 | ): Promise; 801 | }; 802 | }; 803 | 804 | getPastEvents(event: string): Promise; 805 | getPastEvents( 806 | event: string, 807 | options: PastEventOptions, 808 | callback: (error: Error, event: EventData) => void 809 | ): Promise; 810 | getPastEvents(event: string, options: PastEventOptions): Promise; 811 | getPastEvents( 812 | event: string, 813 | callback: (error: Error, event: EventData) => void 814 | ): Promise; 815 | } 816 | -------------------------------------------------------------------------------- /types/truffle-contracts/OwnableUpgradeable.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import BN from "bn.js"; 6 | import { EventData, PastEventOptions } from "web3-eth-contract"; 7 | 8 | export interface OwnableUpgradeableContract 9 | extends Truffle.Contract { 10 | "new"(meta?: Truffle.TransactionDetails): Promise; 11 | } 12 | 13 | export interface OwnershipTransferred { 14 | name: "OwnershipTransferred"; 15 | args: { 16 | previousOwner: string; 17 | newOwner: string; 18 | 0: string; 19 | 1: string; 20 | }; 21 | } 22 | 23 | type AllEvents = OwnershipTransferred; 24 | 25 | export interface OwnableUpgradeableInstance extends Truffle.ContractInstance { 26 | /** 27 | * Returns the address of the current owner. 28 | */ 29 | owner(txDetails?: Truffle.TransactionDetails): Promise; 30 | 31 | /** 32 | * Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. 33 | */ 34 | renounceOwnership: { 35 | (txDetails?: Truffle.TransactionDetails): Promise< 36 | Truffle.TransactionResponse 37 | >; 38 | call(txDetails?: Truffle.TransactionDetails): Promise; 39 | sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; 40 | estimateGas(txDetails?: Truffle.TransactionDetails): Promise; 41 | }; 42 | 43 | /** 44 | * Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner. 45 | */ 46 | transferOwnership: { 47 | (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< 48 | Truffle.TransactionResponse 49 | >; 50 | call( 51 | newOwner: string, 52 | txDetails?: Truffle.TransactionDetails 53 | ): Promise; 54 | sendTransaction( 55 | newOwner: string, 56 | txDetails?: Truffle.TransactionDetails 57 | ): Promise; 58 | estimateGas( 59 | newOwner: string, 60 | txDetails?: Truffle.TransactionDetails 61 | ): Promise; 62 | }; 63 | 64 | methods: { 65 | /** 66 | * Returns the address of the current owner. 67 | */ 68 | owner(txDetails?: Truffle.TransactionDetails): Promise; 69 | 70 | /** 71 | * Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. 72 | */ 73 | renounceOwnership: { 74 | (txDetails?: Truffle.TransactionDetails): Promise< 75 | Truffle.TransactionResponse 76 | >; 77 | call(txDetails?: Truffle.TransactionDetails): Promise; 78 | sendTransaction(txDetails?: Truffle.TransactionDetails): Promise; 79 | estimateGas(txDetails?: Truffle.TransactionDetails): Promise; 80 | }; 81 | 82 | /** 83 | * Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner. 84 | */ 85 | transferOwnership: { 86 | (newOwner: string, txDetails?: Truffle.TransactionDetails): Promise< 87 | Truffle.TransactionResponse 88 | >; 89 | call( 90 | newOwner: string, 91 | txDetails?: Truffle.TransactionDetails 92 | ): Promise; 93 | sendTransaction( 94 | newOwner: string, 95 | txDetails?: Truffle.TransactionDetails 96 | ): Promise; 97 | estimateGas( 98 | newOwner: string, 99 | txDetails?: Truffle.TransactionDetails 100 | ): Promise; 101 | }; 102 | }; 103 | 104 | getPastEvents(event: string): Promise; 105 | getPastEvents( 106 | event: string, 107 | options: PastEventOptions, 108 | callback: (error: Error, event: EventData) => void 109 | ): Promise; 110 | getPastEvents(event: string, options: PastEventOptions): Promise; 111 | getPastEvents( 112 | event: string, 113 | callback: (error: Error, event: EventData) => void 114 | ): Promise; 115 | } 116 | -------------------------------------------------------------------------------- /types/truffle-contracts/index.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | 5 | import { ERC165UpgradeableContract } from "./ERC165Upgradeable"; 6 | import { ERC721UpgradeableContract } from "./ERC721Upgradeable"; 7 | import { IERC165UpgradeableContract } from "./IERC165Upgradeable"; 8 | import { IERC721EnumerableUpgradeableContract } from "./IERC721EnumerableUpgradeable"; 9 | import { IERC721MetadataUpgradeableContract } from "./IERC721MetadataUpgradeable"; 10 | import { IERC721ReceiverUpgradeableContract } from "./IERC721ReceiverUpgradeable"; 11 | import { IERC721UpgradeableContract } from "./IERC721Upgradeable"; 12 | import { MigrationsContract } from "./Migrations"; 13 | import { NFTTContract } from "./NFTT"; 14 | import { OwnableUpgradeableContract } from "./OwnableUpgradeable"; 15 | 16 | declare global { 17 | namespace Truffle { 18 | interface Artifacts { 19 | require(name: "ERC165Upgradeable"): ERC165UpgradeableContract; 20 | require(name: "ERC721Upgradeable"): ERC721UpgradeableContract; 21 | require(name: "IERC165Upgradeable"): IERC165UpgradeableContract; 22 | require( 23 | name: "IERC721EnumerableUpgradeable" 24 | ): IERC721EnumerableUpgradeableContract; 25 | require( 26 | name: "IERC721MetadataUpgradeable" 27 | ): IERC721MetadataUpgradeableContract; 28 | require( 29 | name: "IERC721ReceiverUpgradeable" 30 | ): IERC721ReceiverUpgradeableContract; 31 | require(name: "IERC721Upgradeable"): IERC721UpgradeableContract; 32 | require(name: "Migrations"): MigrationsContract; 33 | require(name: "NFTT"): NFTTContract; 34 | require(name: "OwnableUpgradeable"): OwnableUpgradeableContract; 35 | } 36 | } 37 | } 38 | 39 | export { 40 | ERC165UpgradeableContract, 41 | ERC165UpgradeableInstance, 42 | } from "./ERC165Upgradeable"; 43 | export { 44 | ERC721UpgradeableContract, 45 | ERC721UpgradeableInstance, 46 | } from "./ERC721Upgradeable"; 47 | export { 48 | IERC165UpgradeableContract, 49 | IERC165UpgradeableInstance, 50 | } from "./IERC165Upgradeable"; 51 | export { 52 | IERC721EnumerableUpgradeableContract, 53 | IERC721EnumerableUpgradeableInstance, 54 | } from "./IERC721EnumerableUpgradeable"; 55 | export { 56 | IERC721MetadataUpgradeableContract, 57 | IERC721MetadataUpgradeableInstance, 58 | } from "./IERC721MetadataUpgradeable"; 59 | export { 60 | IERC721ReceiverUpgradeableContract, 61 | IERC721ReceiverUpgradeableInstance, 62 | } from "./IERC721ReceiverUpgradeable"; 63 | export { 64 | IERC721UpgradeableContract, 65 | IERC721UpgradeableInstance, 66 | } from "./IERC721Upgradeable"; 67 | export { MigrationsContract, MigrationsInstance } from "./Migrations"; 68 | export { NFTTContract, NFTTInstance } from "./NFTT"; 69 | export { 70 | OwnableUpgradeableContract, 71 | OwnableUpgradeableInstance, 72 | } from "./OwnableUpgradeable"; 73 | -------------------------------------------------------------------------------- /types/truffle-contracts/types.d.ts: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | /** 5 | * Globals 6 | */ 7 | /// 8 | /// 9 | 10 | declare type EventEmitter = import("events").EventEmitter; 11 | 12 | declare type BN = import("bn.js"); 13 | declare type Web3 = import("web3").default; 14 | declare type AbiItem = import("web3-utils").AbiItem; 15 | declare type TransactionConfig = import("web3-core").TransactionConfig; 16 | declare type PromiEvent = import("web3-core").PromiEvent; 17 | declare type TransactionReceipt = import("web3-core").TransactionReceipt; 18 | declare type Web3EventOptions = import("web3-eth-contract").EventOptions; 19 | 20 | declare const assert: Chai.AssertStatic; 21 | declare const expect: Chai.ExpectStatic; 22 | 23 | declare const web3: Web3; 24 | 25 | declare const artifacts: Truffle.Artifacts; 26 | 27 | /** 28 | * Global contract function 29 | */ 30 | interface ContractFunction extends Mocha.SuiteFunction { 31 | ( 32 | title: string, 33 | fn: (this: Mocha.Suite, accounts: Truffle.Accounts) => void 34 | ): Mocha.Suite; 35 | only: ExclusiveContractFunction; 36 | skip: PendingContractFunction; 37 | } 38 | 39 | interface ExclusiveContractFunction extends Mocha.ExclusiveSuiteFunction { 40 | ( 41 | title: string, 42 | fn: (this: Mocha.Suite, accounts: Truffle.Accounts) => void 43 | ): Mocha.Suite; 44 | } 45 | 46 | interface PendingContractFunction extends Mocha.PendingSuiteFunction { 47 | ( 48 | title: string, 49 | fn: (this: Mocha.Suite, accounts: Truffle.Accounts) => void 50 | ): Mocha.Suite | void; 51 | } 52 | 53 | declare const contract: ContractFunction; 54 | 55 | /** 56 | * Namespace 57 | */ 58 | declare namespace Truffle { 59 | type Accounts = string[]; 60 | 61 | interface TransactionDetails { 62 | from?: string; 63 | gas?: BN | number | string; 64 | gasPrice?: BN | number | string; 65 | value?: BN | string; 66 | } 67 | 68 | export interface TransactionLog { 69 | address: string; 70 | event: EVENTS["name"]; 71 | args: EVENTS["args"]; 72 | blockHash: string; 73 | blockNumber: number; 74 | logIndex: number; 75 | transactionHash: string; 76 | transactionIndex: number; 77 | type: string; 78 | } 79 | 80 | export interface TransactionResponse { 81 | tx: string; 82 | receipt: any; 83 | logs: TransactionLog[]; 84 | } 85 | 86 | export interface AnyEvent { 87 | name: string; 88 | args: any; 89 | } 90 | 91 | interface Contract extends ContractNew { 92 | deployed(): Promise; 93 | at(address: string): Promise; 94 | link(name: string, address: string): void; 95 | link(contract: Contract): void; 96 | address: string; 97 | contractName: string; 98 | } 99 | 100 | interface EventOptions { 101 | filter?: Web3EventOptions["filter"]; 102 | fromBlock?: Web3EventOptions["fromBlock"]; 103 | topics?: Web3EventOptions["topics"]; 104 | } 105 | 106 | interface ContractInstance { 107 | address: string; 108 | contract: any; 109 | transactionHash: string; 110 | abi: AbiItem[]; 111 | allEvents(params?: EventOptions): EventEmitter; 112 | send( 113 | value: Required["value"], 114 | txParams?: TransactionConfig 115 | ): PromiEvent; 116 | sendTransaction( 117 | transactionConfig: TransactionConfig 118 | ): PromiEvent; 119 | } 120 | 121 | interface ContractNew { 122 | "new"(...args: ARGs): any; 123 | } 124 | 125 | interface Deployer { 126 | link( 127 | library: Truffle.Contract, 128 | destination: Truffle.Contract 129 | ): Deployer; 130 | link( 131 | library: Truffle.Contract, 132 | destinations: Array> 133 | ): Deployer; 134 | deploy(c: ContractNew, ...args: T): Deployer; 135 | } 136 | 137 | type Migration = ( 138 | deploy: Deployer, 139 | network: string, 140 | accounts: Accounts 141 | ) => void; 142 | } 143 | --------------------------------------------------------------------------------