├── .gitattributes ├── .gitignore ├── app ├── public │ ├── robots.txt │ ├── favicon.ico │ └── index.html ├── src │ ├── logo.png │ ├── App.test.js │ ├── index.css │ ├── drizzleOptions.js │ ├── index.js │ ├── App.js │ ├── App.css │ ├── MyComponent.js │ ├── serviceWorker.js │ ├── CryptoMuseum.js │ └── contracts │ │ ├── IERC165.json │ │ ├── IERC721Receiver.json │ │ ├── Context.json │ │ ├── Migrations.json │ │ ├── IERC721Metadata.json │ │ └── IERC721Enumerable.json ├── .gitignore ├── package.json └── README.md ├── migrations ├── 1_initial_migration.js └── 2_deploy_contracts.js ├── contracts ├── Migrations.sol └── CryptoMuseum.sol ├── test ├── TestSimpleStorage.sol └── simplestorage.js ├── package.json └── truffle-config.js /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /app/src/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamueleA/crypto-museum-demo/HEAD/app/src/logo.png -------------------------------------------------------------------------------- /app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SamueleA/crypto-museum-demo/HEAD/app/public/favicon.ico -------------------------------------------------------------------------------- /migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | var Migrations = artifacts.require("Migrations"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(Migrations); 5 | }; 6 | -------------------------------------------------------------------------------- /migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- 1 | const CryptoMuseum = artifacts.require("CryptoMuseum"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(CryptoMuseum); 5 | }; 6 | -------------------------------------------------------------------------------- /app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /app/.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 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity >=0.4.21 <0.7.0; 2 | 3 | contract Migrations { 4 | address public owner; 5 | uint public last_completed_migration; 6 | 7 | constructor() public { 8 | owner = msg.sender; 9 | } 10 | 11 | modifier restricted() { 12 | if (msg.sender == owner) _; 13 | } 14 | 15 | function setCompleted(uint completed) public restricted { 16 | last_completed_migration = completed; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | background-color: #5170CF !important; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /app/src/drizzleOptions.js: -------------------------------------------------------------------------------- 1 | import Web3 from "web3"; 2 | import CryptoMuseum from "./contracts/CryptoMuseum.json"; 3 | 4 | const options = { 5 | web3: { 6 | block: false, 7 | // customProvider: new Web3("ws://localhost:7545"), 8 | // fallback: { 9 | // type: 'ws', 10 | // url: 'ws://127.0.0.1:7545' 11 | // }, 12 | }, 13 | contracts: [CryptoMuseum], 14 | events: { 15 | SimpleStorage: ["StorageSet"], 16 | }, 17 | }; 18 | 19 | export default options; 20 | -------------------------------------------------------------------------------- /test/TestSimpleStorage.sol: -------------------------------------------------------------------------------- 1 | pragma solidity >=0.4.21 <0.7.0; 2 | 3 | import "truffle/Assert.sol"; 4 | import "truffle/DeployedAddresses.sol"; 5 | import "../contracts/SimpleStorage.sol"; 6 | 7 | contract TestSimpleStorage { 8 | function testItStoresAValue() public { 9 | SimpleStorage simpleStorage = SimpleStorage(DeployedAddresses.SimpleStorage()); 10 | 11 | simpleStorage.set(89); 12 | 13 | uint expected = 89; 14 | 15 | Assert.equal(simpleStorage.storedData(), expected, "It should store the value 89."); 16 | } 17 | } -------------------------------------------------------------------------------- /test/simplestorage.js: -------------------------------------------------------------------------------- 1 | const SimpleStorage = artifacts.require("SimpleStorage"); 2 | 3 | contract("SimpleStorage", accounts => { 4 | it("...should store the value 89.", async () => { 5 | const simpleStorageInstance = await SimpleStorage.deployed(); 6 | 7 | // Set value of 89 8 | await simpleStorageInstance.set(89, { from: accounts[0] }); 9 | 10 | // Get stored value 11 | const storedData = await simpleStorageInstance.storedData.call(); 12 | 13 | assert.equal(storedData, 89, "The value 89 was not stored."); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import './index.css'; 5 | import * as serviceWorker from './serviceWorker'; 6 | import 'bootstrap/dist/css/bootstrap.min.css'; 7 | 8 | ReactDOM.render(, document.getElementById('root')); 9 | 10 | // If you want your app to work offline and load faster, you can change 11 | // unregister() to register() below. Note this comes with some pitfalls. 12 | // Learn more about service workers: https://bit.ly/CRA-PWA 13 | serviceWorker.unregister(); 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "drizzle-box", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "truffle-config.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1", 11 | "verify": "truffle run verify CryptoMuseum --network ropsten" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/truffle-box/drizzle-box.git" 16 | }, 17 | "keywords": [], 18 | "author": "", 19 | "license": "ISC", 20 | "bugs": { 21 | "url": "https://github.com/truffle-box/drizzle-box/issues" 22 | }, 23 | "homepage": "https://github.com/truffle-box/drizzle-box#readme", 24 | "dependencies": { 25 | "@openzeppelin/contracts": "^3.0.1", 26 | "truffle-hdwallet-provider": "^1.0.17" 27 | }, 28 | "devDependencies": { 29 | "truffle-plugin-verify": "^0.3.10" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /contracts/CryptoMuseum.sol: -------------------------------------------------------------------------------- 1 | pragma solidity >=0.5.0; 2 | 3 | import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; 4 | 5 | contract CryptoMuseum is ERC721 { 6 | constructor() ERC721("CryptoMuseum", "CM") public { 7 | } 8 | 9 | mapping(uint256 => string) private _CIDS; 10 | 11 | function CID(uint256 tokenId) public view returns (string memory) { 12 | require(_exists(tokenId), "ERC721Metadata: CID query for nonexistent token"); 13 | 14 | string memory _CID = _CIDS[tokenId]; 15 | 16 | return _CID; 17 | } 18 | 19 | function _setTokenCID(uint256 tokenId, string memory _CID) internal virtual { 20 | require(_exists(tokenId), "ERC721Metadata: CID set of nonexistent token"); 21 | _CIDS[tokenId] = _CID; 22 | } 23 | 24 | 25 | function mint(string memory _CID) public { 26 | uint256 _newId = totalSupply() + 1; 27 | _safeMint(msg.sender, _newId); 28 | _setTokenCID(_newId, _CID); 29 | } 30 | } -------------------------------------------------------------------------------- /truffle-config.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const HDWalletProvider = require("truffle-hdwallet-provider"); 3 | const mnemonic = process.env.MNEMONIC_ROPSTEN; 4 | const infuraAccessKey = process.env.INFURA_ACCESS_KEY 5 | 6 | module.exports = { 7 | contracts_build_directory: path.join(__dirname, "app/src/contracts"), 8 | networks: { 9 | develop: { // default with truffle unbox is 7545, but we can use develop to test changes, ex. truffle migrate --network develop 10 | host: "127.0.0.1", 11 | port: 7545, 12 | network_id: "5777" 13 | }, 14 | ropsten: { 15 | network_id: "3", 16 | provider: () => { 17 | return new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/${infuraAccessKey}`); 18 | }, 19 | } 20 | }, 21 | compilers: { 22 | solc: { 23 | version: "0.6.2", 24 | }, 25 | }, 26 | plugins: [ 27 | 'truffle-plugin-verify' 28 | ], 29 | api_keys: { 30 | etherscan: process.env.ETHERSCAN_API_KEY 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@drizzle/react-components": "^1.5.1", 7 | "@drizzle/react-plugin": "^1.5.1", 8 | "@drizzle/store": "^1.5.1", 9 | "aws-sdk": "^2.677.0", 10 | "bootstrap": "^4.5.0", 11 | "react": "^16.11.0", 12 | "react-bootstrap": "^1.0.1", 13 | "react-dom": "^16.11.0", 14 | "react-images-upload": "^1.2.8", 15 | "react-scripts": "3.2.0" 16 | }, 17 | "scripts": { 18 | "start": "react-scripts start", 19 | "build": "react-scripts build", 20 | "test": "react-scripts test", 21 | "eject": "react-scripts eject" 22 | }, 23 | "eslintConfig": { 24 | "extends": "react-app" 25 | }, 26 | "browserslist": { 27 | "production": [ 28 | ">0.2%", 29 | "not dead", 30 | "not op_mini all" 31 | ], 32 | "development": [ 33 | "last 1 chrome version", 34 | "last 1 firefox version", 35 | "last 1 safari version" 36 | ] 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/App.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Jumbotron } from 'react-bootstrap'; 3 | import { DrizzleContext } from "@drizzle/react-plugin"; 4 | import { Drizzle } from "@drizzle/store"; 5 | import drizzleOptions from "./drizzleOptions"; 6 | // import MyComponent from "./MyComponent"; 7 | import CryptoMuseum from './CryptoMuseum'; 8 | import "./App.css"; 9 | 10 | const drizzle = new Drizzle(drizzleOptions); 11 | 12 | const App = () => { 13 | return ( 14 | 15 | 16 | {drizzleContext => { 17 | const { drizzle, drizzleState, initialized } = drizzleContext; 18 | 19 | if (!initialized || drizzleState.web3.status === 'failed') { 20 | return ( 21 | 22 |
23 |
Connect Metamask to start the app
24 |
This app works on the Ropsten Testnet
25 |
26 |
27 | ) 28 | } 29 | 30 | return ( 31 | 32 | ) 33 | }} 34 |
35 |
36 | ); 37 | } 38 | 39 | export default App; 40 | -------------------------------------------------------------------------------- /app/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | margin: 2rem; 4 | } 5 | 6 | .section { 7 | text-align: left; 8 | max-width: 720px; 9 | margin: 4rem auto auto; 10 | } 11 | 12 | .collection-container { 13 | display: flex; 14 | flex-flow: row wrap; 15 | } 16 | 17 | .token-container { 18 | display: inline-block; 19 | height: 344px; 20 | margin: 20px; 21 | padding: 10px; 22 | background-color: #E9ECEF; 23 | border-radius: 5px; 24 | } 25 | 26 | .artwork-container { 27 | display: flex; 28 | justify-content: center; 29 | align-items: center; 30 | width: 300px; 31 | height: 300px; 32 | } 33 | 34 | .artwork { 35 | max-height: 300px; 36 | max-width: 300px; 37 | } 38 | 39 | .button { 40 | width: 120px; 41 | } 42 | 43 | .uploader { 44 | margin: 0 auto; 45 | max-width: 500px; 46 | } 47 | 48 | .steps { 49 | margin: 20px 0; 50 | } 51 | .collection-title { 52 | color: white; 53 | } 54 | 55 | .title { 56 | color: white; 57 | margin-bottom: 20px; 58 | font-weight: bold; 59 | } 60 | 61 | .subtitle, .subtitle > a, .subtitle > a:hover { 62 | color: white; 63 | margin-bottom: 10px; 64 | } 65 | 66 | .add-nft-title { 67 | margin-top: 40px; 68 | } 69 | 70 | .colleciton-subtitle { 71 | color: #ffffff; 72 | } 73 | 74 | .no-artwork { 75 | margin-top: 20px; 76 | } 77 | 78 | .loading-text { 79 | font-size: 30px; 80 | margin: 0 auto; 81 | } 82 | 83 | .loading-jumbo { 84 | width: 600px; 85 | margin: 100px auto; 86 | } 87 | 88 | .loading-image { 89 | display: flex; 90 | width: 300px; 91 | height: 300px; 92 | justify-content: center; 93 | align-items: center; 94 | } -------------------------------------------------------------------------------- /app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | Crypto Museum 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 2 | 3 | ## Available Scripts 4 | 5 | In the project directory, you can run: 6 | 7 | ### `yarn start` 8 | 9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 11 | 12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console. 14 | 15 | ### `yarn test` 16 | 17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 19 | 20 | ### `yarn build` 21 | 22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance. 24 | 25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed! 27 | 28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 29 | 30 | ### `yarn eject` 31 | 32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 33 | 34 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 35 | 36 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 37 | 38 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 39 | 40 | ## Learn More 41 | 42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 43 | 44 | To learn React, check out the [React documentation](https://reactjs.org/). 45 | 46 | ### Code Splitting 47 | 48 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting 49 | 50 | ### Analyzing the Bundle Size 51 | 52 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size 53 | 54 | ### Making a Progressive Web App 55 | 56 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app 57 | 58 | ### Advanced Configuration 59 | 60 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration 61 | 62 | ### Deployment 63 | 64 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment 65 | 66 | ### `yarn build` fails to minify 67 | 68 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify 69 | -------------------------------------------------------------------------------- /app/src/MyComponent.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { newContextComponents } from "@drizzle/react-components"; 3 | import logo from "./logo.png"; 4 | 5 | const { AccountData, ContractData, ContractForm } = newContextComponents; 6 | 7 | export default ({ drizzle, drizzleState }) => { 8 | // destructure drizzle and drizzleState from props 9 | return ( 10 |
11 |
12 | drizzle-logo 13 |

Drizzle Examples

14 |

15 | Examples of how to get started with Drizzle in various situations. 16 |

17 |
18 | 19 |
20 |

Active Account

21 | 28 |
29 | 30 |
31 |

SimpleStorage

32 |

33 | This shows a simple ContractData component with no arguments, along 34 | with a form to set its value. 35 |

36 |

37 | Stored Value: 38 | 44 |

45 | 46 |
47 | 48 |
49 |

TutorialToken

50 |

51 | Here we have a form with custom, friendly labels. Also note the token 52 | symbol will not display a loading indicator. We've suppressed it with 53 | the hideIndicator prop because we know this variable is 54 | constant. 55 |

56 |

57 | Total Supply: 58 | {" "} 65 | 72 |

73 |

74 | My Balance: 75 | 82 |

83 |

Send Tokens

84 | 90 |
91 | 92 |
93 |

ComplexStorage

94 |

95 | Finally this contract shows data types with additional considerations. 96 | Note in the code the strings below are converted from bytes to UTF-8 97 | strings and the device data struct is iterated as a list. 98 |

99 |

100 | String 1: 101 | 108 |

109 |

110 | String 2: 111 | 118 |

119 | Single Device Data: 120 | 126 |
127 |
128 | ); 129 | }; 130 | -------------------------------------------------------------------------------- /app/src/serviceWorker.js: -------------------------------------------------------------------------------- 1 | // This optional code is used to register a service worker. 2 | // register() is not called by default. 3 | 4 | // This lets the app load faster on subsequent visits in production, and gives 5 | // it offline capabilities. However, it also means that developers (and users) 6 | // will only see deployed updates on subsequent visits to a page, after all the 7 | // existing tabs open on the page have been closed, since previously cached 8 | // resources are updated in the background. 9 | 10 | // To learn more about the benefits of this model and instructions on how to 11 | // opt-in, read https://bit.ly/CRA-PWA 12 | 13 | const isLocalhost = Boolean( 14 | window.location.hostname === 'localhost' || 15 | // [::1] is the IPv6 localhost address. 16 | window.location.hostname === '[::1]' || 17 | // 127.0.0.1/8 is considered localhost for IPv4. 18 | window.location.hostname.match( 19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ 20 | ) 21 | ); 22 | 23 | export function register(config) { 24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 25 | // The URL constructor is available in all browsers that support SW. 26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); 27 | if (publicUrl.origin !== window.location.origin) { 28 | // Our service worker won't work if PUBLIC_URL is on a different origin 29 | // from what our page is served on. This might happen if a CDN is used to 30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374 31 | return; 32 | } 33 | 34 | window.addEventListener('load', () => { 35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 36 | 37 | if (isLocalhost) { 38 | // This is running on localhost. Let's check if a service worker still exists or not. 39 | checkValidServiceWorker(swUrl, config); 40 | 41 | // Add some additional logging to localhost, pointing developers to the 42 | // service worker/PWA documentation. 43 | navigator.serviceWorker.ready.then(() => { 44 | console.log( 45 | 'This web app is being served cache-first by a service ' + 46 | 'worker. To learn more, visit https://bit.ly/CRA-PWA' 47 | ); 48 | }); 49 | } else { 50 | // Is not localhost. Just register service worker 51 | registerValidSW(swUrl, config); 52 | } 53 | }); 54 | } 55 | } 56 | 57 | function registerValidSW(swUrl, config) { 58 | navigator.serviceWorker 59 | .register(swUrl) 60 | .then(registration => { 61 | registration.onupdatefound = () => { 62 | const installingWorker = registration.installing; 63 | if (installingWorker == null) { 64 | return; 65 | } 66 | installingWorker.onstatechange = () => { 67 | if (installingWorker.state === 'installed') { 68 | if (navigator.serviceWorker.controller) { 69 | // At this point, the updated precached content has been fetched, 70 | // but the previous service worker will still serve the older 71 | // content until all client tabs are closed. 72 | console.log( 73 | 'New content is available and will be used when all ' + 74 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' 75 | ); 76 | 77 | // Execute callback 78 | if (config && config.onUpdate) { 79 | config.onUpdate(registration); 80 | } 81 | } else { 82 | // At this point, everything has been precached. 83 | // It's the perfect time to display a 84 | // "Content is cached for offline use." message. 85 | console.log('Content is cached for offline use.'); 86 | 87 | // Execute callback 88 | if (config && config.onSuccess) { 89 | config.onSuccess(registration); 90 | } 91 | } 92 | } 93 | }; 94 | }; 95 | }) 96 | .catch(error => { 97 | console.error('Error during service worker registration:', error); 98 | }); 99 | } 100 | 101 | function checkValidServiceWorker(swUrl, config) { 102 | // Check if the service worker can be found. If it can't reload the page. 103 | fetch(swUrl) 104 | .then(response => { 105 | // Ensure service worker exists, and that we really are getting a JS file. 106 | const contentType = response.headers.get('content-type'); 107 | if ( 108 | response.status === 404 || 109 | (contentType != null && contentType.indexOf('javascript') === -1) 110 | ) { 111 | // No service worker found. Probably a different app. Reload the page. 112 | navigator.serviceWorker.ready.then(registration => { 113 | registration.unregister().then(() => { 114 | window.location.reload(); 115 | }); 116 | }); 117 | } else { 118 | // Service worker found. Proceed as normal. 119 | registerValidSW(swUrl, config); 120 | } 121 | }) 122 | .catch(() => { 123 | console.log( 124 | 'No internet connection found. App is running in offline mode.' 125 | ); 126 | }); 127 | } 128 | 129 | export function unregister() { 130 | if ('serviceWorker' in navigator) { 131 | navigator.serviceWorker.ready.then(registration => { 132 | registration.unregister(); 133 | }); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /app/src/CryptoMuseum.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useRef } from "react"; 2 | import { Spinner, Button, Jumbotron } from 'react-bootstrap'; 3 | import fleekStorage from '@fleekhq/fleek-storage-js'; 4 | import { newContextComponents } from "@drizzle/react-components"; 5 | import ImageUploader from "react-images-upload"; 6 | 7 | const { ContractData } = newContextComponents; 8 | 9 | export default ({ drizzle, drizzleState }) => { 10 | const imageUploaderRef = useRef(null); 11 | const [artwork, setArtwork] = useState(null); 12 | const [loading, setLoading] = useState(false); 13 | const [txQueue, setTxQueue] = useState([]); 14 | const onDrop = (picture) => { 15 | if (picture.length) { 16 | return setArtwork(picture[0]) 17 | } 18 | setArtwork(null) 19 | }; 20 | 21 | const clearPreview = () => { 22 | setArtwork(null); 23 | imageUploaderRef.current.clearPictures(); 24 | }; 25 | 26 | const createNFTTransaction = async (hash) => { 27 | const tokenURI = `https://ipfs.io/ipfs/${hash}`; 28 | 29 | const removeFromQueue = () => { 30 | const newTxQueue = txQueue.filter((uri) => uri !== tokenURI); 31 | setTxQueue(newTxQueue); 32 | } 33 | 34 | try { 35 | setTxQueue([...txQueue, tokenURI]); 36 | await drizzle.contracts.CryptoMuseum.methods.mint(hash).send({from: drizzleState.accounts[0]}) 37 | removeFromQueue(tokenURI); 38 | } catch(e) { 39 | console.error(e); 40 | removeFromQueue(tokenURI); 41 | } 42 | }; 43 | 44 | const handleButtonClick = async (newTokenId) => { 45 | setLoading(true) 46 | try { 47 | const date = new Date(); 48 | const timestamp = date.getTime(); 49 | 50 | const { hash } = await fleekStorage.upload({ 51 | apiKey: 'API_KEY', 52 | apiSecret: 'API_SECRET', 53 | key: `nft/${newTokenId}-${timestamp}`, 54 | data: artwork, 55 | }); 56 | 57 | setLoading(false); 58 | clearPreview(); 59 | createNFTTransaction(hash) 60 | } catch(e) { 61 | console.error(e); 62 | setLoading(false); 63 | } 64 | } 65 | 66 | const getTokenDisplay = (tokenId) => { 67 | return ( 68 |
69 | token ID: {tokenId} 70 | ( 77 |
78 | 79 |
80 | )} 81 | /> 82 |
83 | ) 84 | }; 85 | 86 | return ( 87 |
88 |

The Crypto Museum

89 |
90 | {"ERC-721 Address: "} 91 | 96 | {drizzle.contractList[0].address} 97 | 98 |
99 | 100 |
The Crypto Museum is a Dapp meant to demo the capabilities of Fleek's Storage SDK, which facilitates the permanent storage of files to IPFS.
101 |
The Museum itself is an ERC-721 contract that allows users to upload a piece of artwork and mint a new ERC-721 token.
102 |
An art gallery allows users to view their token collection.
103 |
NOTE: This app runs on the Ropsten Testnet
104 |
105 |

Add a new NFT to your collection!

106 |
107 |
108 | 1. Upload artwork 109 |
110 |
111 | imageUploaderRef.current = iu} 120 | /> 121 |
122 |
123 | 2. Create an NFT! 124 |
125 | Connect to the Ropsten Network on Metamask. Go here for Ropsten Ether. 126 |
127 |
128 | ( 134 |
135 | 145 |
146 | )} 147 | /> 148 |
149 | 3. Your artwork will appear in your collection once the transaction is accepted 150 |
151 |
152 | {txQueue.length === 1 && ( 153 | <> 154 | Minting a new token... 155 | 156 | )} 157 | {txQueue.length > 1 && ( 158 | <> 159 | Minting {txQueue.length} new tokens... 160 | 161 | )} 162 |
163 | { 164 | txQueue.length > 0 && ( 165 |
166 | 167 |
168 | ) 169 | } 170 |
171 |

Collection

172 |
These fine pieces of art belong to: {drizzleState.accounts[0]}
173 | { 180 | const emptyArray = []; 181 | const arrayLength = Number(balanceOf); 182 | for(let i=0;i 186 | You have no artwork in your collection! 187 | 188 | ) 189 | } 190 | return ( 191 |
192 | {emptyArray.map(( _, index) => { 193 | return ( 194 | ( 202 | <> 203 | {getTokenDisplay(tokenId)} 204 | 205 | )} 206 | /> 207 | )} 208 | )} 209 |
210 | ); 211 | }} 212 | /> 213 |
214 | ); 215 | }; 216 | -------------------------------------------------------------------------------- /app/src/contracts/IERC165.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "IERC165", 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.6.2+commit.bacdbe57\"},\"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}.\",\"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.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/introspection/IERC165.sol\":\"IERC165\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0x9175561c374ec1fc33045e5dfdde2057e63e00debf432875f9e1e3395d99c149\",\"urls\":[\"bzz-raw://b0167043c1938b56904deaa481a73041aa4a9e054c60db0b0dfbebfe7869c06a\",\"dweb:/ipfs/QmUoYjhymBr6WUpExKgRvKxXD5fcdpQEe1o9ResKZu6CC5\"]}},\"version\":1}", 25 | "bytecode": "0x", 26 | "deployedBytecode": "0x", 27 | "sourceMap": "", 28 | "deployedSourceMap": "", 29 | "source": "pragma solidity ^0.6.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 IERC165 {\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", 30 | "sourcePath": "@openzeppelin/contracts/introspection/IERC165.sol", 31 | "ast": { 32 | "absolutePath": "@openzeppelin/contracts/introspection/IERC165.sol", 33 | "exportedSymbols": { 34 | "IERC165": [ 35 | 212 36 | ] 37 | }, 38 | "id": 213, 39 | "nodeType": "SourceUnit", 40 | "nodes": [ 41 | { 42 | "id": 204, 43 | "literals": [ 44 | "solidity", 45 | "^", 46 | "0.6", 47 | ".0" 48 | ], 49 | "nodeType": "PragmaDirective", 50 | "src": "0:23:4" 51 | }, 52 | { 53 | "abstract": false, 54 | "baseContracts": [], 55 | "contractDependencies": [], 56 | "contractKind": "interface", 57 | "documentation": "@dev Interface of the ERC165 standard, as defined in the\nhttps://eips.ethereum.org/EIPS/eip-165[EIP].\n * Implementers can declare support of contract interfaces, which can then be\nqueried by others ({ERC165Checker}).\n * For an implementation, see {ERC165}.", 58 | "fullyImplemented": false, 59 | "id": 212, 60 | "linearizedBaseContracts": [ 61 | 212 62 | ], 63 | "name": "IERC165", 64 | "nodeType": "ContractDefinition", 65 | "nodes": [ 66 | { 67 | "body": null, 68 | "documentation": "@dev Returns true if this contract implements the interface defined by\n`interfaceId`. See the corresponding\nhttps://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\nto learn more about how these ids are created.\n * This function call must use less than 30 000 gas.", 69 | "functionSelector": "01ffc9a7", 70 | "id": 211, 71 | "implemented": false, 72 | "kind": "function", 73 | "modifiers": [], 74 | "name": "supportsInterface", 75 | "nodeType": "FunctionDefinition", 76 | "overrides": null, 77 | "parameters": { 78 | "id": 207, 79 | "nodeType": "ParameterList", 80 | "parameters": [ 81 | { 82 | "constant": false, 83 | "id": 206, 84 | "name": "interfaceId", 85 | "nodeType": "VariableDeclaration", 86 | "overrides": null, 87 | "scope": 211, 88 | "src": "701:18:4", 89 | "stateVariable": false, 90 | "storageLocation": "default", 91 | "typeDescriptions": { 92 | "typeIdentifier": "t_bytes4", 93 | "typeString": "bytes4" 94 | }, 95 | "typeName": { 96 | "id": 205, 97 | "name": "bytes4", 98 | "nodeType": "ElementaryTypeName", 99 | "src": "701:6:4", 100 | "typeDescriptions": { 101 | "typeIdentifier": "t_bytes4", 102 | "typeString": "bytes4" 103 | } 104 | }, 105 | "value": null, 106 | "visibility": "internal" 107 | } 108 | ], 109 | "src": "700:20:4" 110 | }, 111 | "returnParameters": { 112 | "id": 210, 113 | "nodeType": "ParameterList", 114 | "parameters": [ 115 | { 116 | "constant": false, 117 | "id": 209, 118 | "name": "", 119 | "nodeType": "VariableDeclaration", 120 | "overrides": null, 121 | "scope": 211, 122 | "src": "744:4:4", 123 | "stateVariable": false, 124 | "storageLocation": "default", 125 | "typeDescriptions": { 126 | "typeIdentifier": "t_bool", 127 | "typeString": "bool" 128 | }, 129 | "typeName": { 130 | "id": 208, 131 | "name": "bool", 132 | "nodeType": "ElementaryTypeName", 133 | "src": "744:4:4", 134 | "typeDescriptions": { 135 | "typeIdentifier": "t_bool", 136 | "typeString": "bool" 137 | } 138 | }, 139 | "value": null, 140 | "visibility": "internal" 141 | } 142 | ], 143 | "src": "743:6:4" 144 | }, 145 | "scope": 212, 146 | "src": "674:76:4", 147 | "stateMutability": "view", 148 | "virtual": false, 149 | "visibility": "external" 150 | } 151 | ], 152 | "scope": 213, 153 | "src": "305:447:4" 154 | } 155 | ], 156 | "src": "0:753:4" 157 | }, 158 | "legacyAST": { 159 | "absolutePath": "@openzeppelin/contracts/introspection/IERC165.sol", 160 | "exportedSymbols": { 161 | "IERC165": [ 162 | 212 163 | ] 164 | }, 165 | "id": 213, 166 | "nodeType": "SourceUnit", 167 | "nodes": [ 168 | { 169 | "id": 204, 170 | "literals": [ 171 | "solidity", 172 | "^", 173 | "0.6", 174 | ".0" 175 | ], 176 | "nodeType": "PragmaDirective", 177 | "src": "0:23:4" 178 | }, 179 | { 180 | "abstract": false, 181 | "baseContracts": [], 182 | "contractDependencies": [], 183 | "contractKind": "interface", 184 | "documentation": "@dev Interface of the ERC165 standard, as defined in the\nhttps://eips.ethereum.org/EIPS/eip-165[EIP].\n * Implementers can declare support of contract interfaces, which can then be\nqueried by others ({ERC165Checker}).\n * For an implementation, see {ERC165}.", 185 | "fullyImplemented": false, 186 | "id": 212, 187 | "linearizedBaseContracts": [ 188 | 212 189 | ], 190 | "name": "IERC165", 191 | "nodeType": "ContractDefinition", 192 | "nodes": [ 193 | { 194 | "body": null, 195 | "documentation": "@dev Returns true if this contract implements the interface defined by\n`interfaceId`. See the corresponding\nhttps://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\nto learn more about how these ids are created.\n * This function call must use less than 30 000 gas.", 196 | "functionSelector": "01ffc9a7", 197 | "id": 211, 198 | "implemented": false, 199 | "kind": "function", 200 | "modifiers": [], 201 | "name": "supportsInterface", 202 | "nodeType": "FunctionDefinition", 203 | "overrides": null, 204 | "parameters": { 205 | "id": 207, 206 | "nodeType": "ParameterList", 207 | "parameters": [ 208 | { 209 | "constant": false, 210 | "id": 206, 211 | "name": "interfaceId", 212 | "nodeType": "VariableDeclaration", 213 | "overrides": null, 214 | "scope": 211, 215 | "src": "701:18:4", 216 | "stateVariable": false, 217 | "storageLocation": "default", 218 | "typeDescriptions": { 219 | "typeIdentifier": "t_bytes4", 220 | "typeString": "bytes4" 221 | }, 222 | "typeName": { 223 | "id": 205, 224 | "name": "bytes4", 225 | "nodeType": "ElementaryTypeName", 226 | "src": "701:6:4", 227 | "typeDescriptions": { 228 | "typeIdentifier": "t_bytes4", 229 | "typeString": "bytes4" 230 | } 231 | }, 232 | "value": null, 233 | "visibility": "internal" 234 | } 235 | ], 236 | "src": "700:20:4" 237 | }, 238 | "returnParameters": { 239 | "id": 210, 240 | "nodeType": "ParameterList", 241 | "parameters": [ 242 | { 243 | "constant": false, 244 | "id": 209, 245 | "name": "", 246 | "nodeType": "VariableDeclaration", 247 | "overrides": null, 248 | "scope": 211, 249 | "src": "744:4:4", 250 | "stateVariable": false, 251 | "storageLocation": "default", 252 | "typeDescriptions": { 253 | "typeIdentifier": "t_bool", 254 | "typeString": "bool" 255 | }, 256 | "typeName": { 257 | "id": 208, 258 | "name": "bool", 259 | "nodeType": "ElementaryTypeName", 260 | "src": "744:4:4", 261 | "typeDescriptions": { 262 | "typeIdentifier": "t_bool", 263 | "typeString": "bool" 264 | } 265 | }, 266 | "value": null, 267 | "visibility": "internal" 268 | } 269 | ], 270 | "src": "743:6:4" 271 | }, 272 | "scope": 212, 273 | "src": "674:76:4", 274 | "stateMutability": "view", 275 | "virtual": false, 276 | "visibility": "external" 277 | } 278 | ], 279 | "scope": 213, 280 | "src": "305:447:4" 281 | } 282 | ], 283 | "src": "0:753:4" 284 | }, 285 | "compiler": { 286 | "name": "solc", 287 | "version": "0.6.2+commit.bacdbe57.Emscripten.clang" 288 | }, 289 | "networks": {}, 290 | "schemaVersion": "3.1.0", 291 | "updatedAt": "2020-05-16T12:08:04.818Z", 292 | "devdoc": { 293 | "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}.", 294 | "methods": { 295 | "supportsInterface(bytes4)": { 296 | "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." 297 | } 298 | } 299 | }, 300 | "userdoc": { 301 | "methods": {} 302 | } 303 | } -------------------------------------------------------------------------------- /app/src/contracts/IERC721Receiver.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "IERC721Receiver", 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.6.2+commit.bacdbe57\"},\"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.\",\"methods\":{\"onERC721Received(address,address,uint256,bytes)\":{\"details\":\"The ERC721 smart contract calls this function on the recipient after a {IERC721-safeTransferFrom}. This function MUST return the function selector, otherwise the caller will revert the transaction. The selector to be returned can be obtained as `this.onERC721Received.selector`. This function MAY throw to revert and reject the transfer. Note: the ERC721 contract address is always the message sender.\",\"params\":{\"data\":\"Additional data with no specified format\",\"from\":\"The address which previously owned the token\",\"operator\":\"The address which called `safeTransferFrom` function\",\"tokenId\":\"The NFT identifier which is being transferred\"},\"returns\":{\"_0\":\"bytes4 `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\"}}},\"title\":\"ERC721 token receiver interface\"},\"userdoc\":{\"methods\":{\"onERC721Received(address,address,uint256,bytes)\":{\"notice\":\"Handle the receipt of an NFT\"}}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":\"IERC721Receiver\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0x0c25ff00a747f1df6cb5e5c103adb98334df7e9561b0d46079454131c139bff9\",\"urls\":[\"bzz-raw://9417ce94829309329fa0f0dc50089696bc55f9f675c4b2ffcb31f960fe706250\",\"dweb:/ipfs/QmdckiAmnW2uhXK2V2enu7bEbqiMR6hzMD1ytGH43pKLhE\"]}},\"version\":1}", 40 | "bytecode": "0x", 41 | "deployedBytecode": "0x", 42 | "sourceMap": "", 43 | "deployedSourceMap": "", 44 | "source": "pragma solidity ^0.6.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 */\nabstract contract IERC721Receiver {\n /**\n * @notice Handle the receipt of an NFT\n * @dev The ERC721 smart contract calls this function on the recipient\n * after a {IERC721-safeTransferFrom}. This function MUST return the function selector,\n * otherwise the caller will revert the transaction. The selector to be\n * returned can be obtained as `this.onERC721Received.selector`. This\n * function MAY throw to revert and reject the transfer.\n * Note: the ERC721 contract address is always the message sender.\n * @param operator The address which called `safeTransferFrom` function\n * @param from The address which previously owned the token\n * @param tokenId The NFT identifier which is being transferred\n * @param data Additional data with no specified format\n * @return bytes4 `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n */\n function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data)\n public virtual returns (bytes4);\n}\n", 45 | "sourcePath": "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol", 46 | "ast": { 47 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol", 48 | "exportedSymbols": { 49 | "IERC721Receiver": [ 50 | 1487 51 | ] 52 | }, 53 | "id": 1488, 54 | "nodeType": "SourceUnit", 55 | "nodes": [ 56 | { 57 | "id": 1473, 58 | "literals": [ 59 | "solidity", 60 | "^", 61 | "0.6", 62 | ".0" 63 | ], 64 | "nodeType": "PragmaDirective", 65 | "src": "0:23:10" 66 | }, 67 | { 68 | "abstract": true, 69 | "baseContracts": [], 70 | "contractDependencies": [], 71 | "contractKind": "contract", 72 | "documentation": "@title ERC721 token receiver interface\n@dev Interface for any contract that wants to support safeTransfers\nfrom ERC721 asset contracts.", 73 | "fullyImplemented": false, 74 | "id": 1487, 75 | "linearizedBaseContracts": [ 76 | 1487 77 | ], 78 | "name": "IERC721Receiver", 79 | "nodeType": "ContractDefinition", 80 | "nodes": [ 81 | { 82 | "body": null, 83 | "documentation": "@notice Handle the receipt of an NFT\n@dev The ERC721 smart contract calls this function on the recipient\nafter a {IERC721-safeTransferFrom}. This function MUST return the function selector,\notherwise the caller will revert the transaction. The selector to be\nreturned can be obtained as `this.onERC721Received.selector`. This\nfunction MAY throw to revert and reject the transfer.\nNote: the ERC721 contract address is always the message sender.\n@param operator The address which called `safeTransferFrom` function\n@param from The address which previously owned the token\n@param tokenId The NFT identifier which is being transferred\n@param data Additional data with no specified format\n@return bytes4 `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`", 84 | "functionSelector": "150b7a02", 85 | "id": 1486, 86 | "implemented": false, 87 | "kind": "function", 88 | "modifiers": [], 89 | "name": "onERC721Received", 90 | "nodeType": "FunctionDefinition", 91 | "overrides": null, 92 | "parameters": { 93 | "id": 1482, 94 | "nodeType": "ParameterList", 95 | "parameters": [ 96 | { 97 | "constant": false, 98 | "id": 1475, 99 | "name": "operator", 100 | "nodeType": "VariableDeclaration", 101 | "overrides": null, 102 | "scope": 1486, 103 | "src": "1114:16:10", 104 | "stateVariable": false, 105 | "storageLocation": "default", 106 | "typeDescriptions": { 107 | "typeIdentifier": "t_address", 108 | "typeString": "address" 109 | }, 110 | "typeName": { 111 | "id": 1474, 112 | "name": "address", 113 | "nodeType": "ElementaryTypeName", 114 | "src": "1114:7:10", 115 | "stateMutability": "nonpayable", 116 | "typeDescriptions": { 117 | "typeIdentifier": "t_address", 118 | "typeString": "address" 119 | } 120 | }, 121 | "value": null, 122 | "visibility": "internal" 123 | }, 124 | { 125 | "constant": false, 126 | "id": 1477, 127 | "name": "from", 128 | "nodeType": "VariableDeclaration", 129 | "overrides": null, 130 | "scope": 1486, 131 | "src": "1132:12:10", 132 | "stateVariable": false, 133 | "storageLocation": "default", 134 | "typeDescriptions": { 135 | "typeIdentifier": "t_address", 136 | "typeString": "address" 137 | }, 138 | "typeName": { 139 | "id": 1476, 140 | "name": "address", 141 | "nodeType": "ElementaryTypeName", 142 | "src": "1132:7:10", 143 | "stateMutability": "nonpayable", 144 | "typeDescriptions": { 145 | "typeIdentifier": "t_address", 146 | "typeString": "address" 147 | } 148 | }, 149 | "value": null, 150 | "visibility": "internal" 151 | }, 152 | { 153 | "constant": false, 154 | "id": 1479, 155 | "name": "tokenId", 156 | "nodeType": "VariableDeclaration", 157 | "overrides": null, 158 | "scope": 1486, 159 | "src": "1146:15:10", 160 | "stateVariable": false, 161 | "storageLocation": "default", 162 | "typeDescriptions": { 163 | "typeIdentifier": "t_uint256", 164 | "typeString": "uint256" 165 | }, 166 | "typeName": { 167 | "id": 1478, 168 | "name": "uint256", 169 | "nodeType": "ElementaryTypeName", 170 | "src": "1146:7:10", 171 | "typeDescriptions": { 172 | "typeIdentifier": "t_uint256", 173 | "typeString": "uint256" 174 | } 175 | }, 176 | "value": null, 177 | "visibility": "internal" 178 | }, 179 | { 180 | "constant": false, 181 | "id": 1481, 182 | "name": "data", 183 | "nodeType": "VariableDeclaration", 184 | "overrides": null, 185 | "scope": 1486, 186 | "src": "1163:17:10", 187 | "stateVariable": false, 188 | "storageLocation": "memory", 189 | "typeDescriptions": { 190 | "typeIdentifier": "t_bytes_memory_ptr", 191 | "typeString": "bytes" 192 | }, 193 | "typeName": { 194 | "id": 1480, 195 | "name": "bytes", 196 | "nodeType": "ElementaryTypeName", 197 | "src": "1163:5:10", 198 | "typeDescriptions": { 199 | "typeIdentifier": "t_bytes_storage_ptr", 200 | "typeString": "bytes" 201 | } 202 | }, 203 | "value": null, 204 | "visibility": "internal" 205 | } 206 | ], 207 | "src": "1113:68:10" 208 | }, 209 | "returnParameters": { 210 | "id": 1485, 211 | "nodeType": "ParameterList", 212 | "parameters": [ 213 | { 214 | "constant": false, 215 | "id": 1484, 216 | "name": "", 217 | "nodeType": "VariableDeclaration", 218 | "overrides": null, 219 | "scope": 1486, 220 | "src": "1210:6:10", 221 | "stateVariable": false, 222 | "storageLocation": "default", 223 | "typeDescriptions": { 224 | "typeIdentifier": "t_bytes4", 225 | "typeString": "bytes4" 226 | }, 227 | "typeName": { 228 | "id": 1483, 229 | "name": "bytes4", 230 | "nodeType": "ElementaryTypeName", 231 | "src": "1210:6:10", 232 | "typeDescriptions": { 233 | "typeIdentifier": "t_bytes4", 234 | "typeString": "bytes4" 235 | } 236 | }, 237 | "value": null, 238 | "visibility": "internal" 239 | } 240 | ], 241 | "src": "1209:8:10" 242 | }, 243 | "scope": 1487, 244 | "src": "1088:130:10", 245 | "stateMutability": "nonpayable", 246 | "virtual": true, 247 | "visibility": "public" 248 | } 249 | ], 250 | "scope": 1488, 251 | "src": "178:1042:10" 252 | } 253 | ], 254 | "src": "0:1221:10" 255 | }, 256 | "legacyAST": { 257 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol", 258 | "exportedSymbols": { 259 | "IERC721Receiver": [ 260 | 1487 261 | ] 262 | }, 263 | "id": 1488, 264 | "nodeType": "SourceUnit", 265 | "nodes": [ 266 | { 267 | "id": 1473, 268 | "literals": [ 269 | "solidity", 270 | "^", 271 | "0.6", 272 | ".0" 273 | ], 274 | "nodeType": "PragmaDirective", 275 | "src": "0:23:10" 276 | }, 277 | { 278 | "abstract": true, 279 | "baseContracts": [], 280 | "contractDependencies": [], 281 | "contractKind": "contract", 282 | "documentation": "@title ERC721 token receiver interface\n@dev Interface for any contract that wants to support safeTransfers\nfrom ERC721 asset contracts.", 283 | "fullyImplemented": false, 284 | "id": 1487, 285 | "linearizedBaseContracts": [ 286 | 1487 287 | ], 288 | "name": "IERC721Receiver", 289 | "nodeType": "ContractDefinition", 290 | "nodes": [ 291 | { 292 | "body": null, 293 | "documentation": "@notice Handle the receipt of an NFT\n@dev The ERC721 smart contract calls this function on the recipient\nafter a {IERC721-safeTransferFrom}. This function MUST return the function selector,\notherwise the caller will revert the transaction. The selector to be\nreturned can be obtained as `this.onERC721Received.selector`. This\nfunction MAY throw to revert and reject the transfer.\nNote: the ERC721 contract address is always the message sender.\n@param operator The address which called `safeTransferFrom` function\n@param from The address which previously owned the token\n@param tokenId The NFT identifier which is being transferred\n@param data Additional data with no specified format\n@return bytes4 `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`", 294 | "functionSelector": "150b7a02", 295 | "id": 1486, 296 | "implemented": false, 297 | "kind": "function", 298 | "modifiers": [], 299 | "name": "onERC721Received", 300 | "nodeType": "FunctionDefinition", 301 | "overrides": null, 302 | "parameters": { 303 | "id": 1482, 304 | "nodeType": "ParameterList", 305 | "parameters": [ 306 | { 307 | "constant": false, 308 | "id": 1475, 309 | "name": "operator", 310 | "nodeType": "VariableDeclaration", 311 | "overrides": null, 312 | "scope": 1486, 313 | "src": "1114:16:10", 314 | "stateVariable": false, 315 | "storageLocation": "default", 316 | "typeDescriptions": { 317 | "typeIdentifier": "t_address", 318 | "typeString": "address" 319 | }, 320 | "typeName": { 321 | "id": 1474, 322 | "name": "address", 323 | "nodeType": "ElementaryTypeName", 324 | "src": "1114:7:10", 325 | "stateMutability": "nonpayable", 326 | "typeDescriptions": { 327 | "typeIdentifier": "t_address", 328 | "typeString": "address" 329 | } 330 | }, 331 | "value": null, 332 | "visibility": "internal" 333 | }, 334 | { 335 | "constant": false, 336 | "id": 1477, 337 | "name": "from", 338 | "nodeType": "VariableDeclaration", 339 | "overrides": null, 340 | "scope": 1486, 341 | "src": "1132:12:10", 342 | "stateVariable": false, 343 | "storageLocation": "default", 344 | "typeDescriptions": { 345 | "typeIdentifier": "t_address", 346 | "typeString": "address" 347 | }, 348 | "typeName": { 349 | "id": 1476, 350 | "name": "address", 351 | "nodeType": "ElementaryTypeName", 352 | "src": "1132:7:10", 353 | "stateMutability": "nonpayable", 354 | "typeDescriptions": { 355 | "typeIdentifier": "t_address", 356 | "typeString": "address" 357 | } 358 | }, 359 | "value": null, 360 | "visibility": "internal" 361 | }, 362 | { 363 | "constant": false, 364 | "id": 1479, 365 | "name": "tokenId", 366 | "nodeType": "VariableDeclaration", 367 | "overrides": null, 368 | "scope": 1486, 369 | "src": "1146:15:10", 370 | "stateVariable": false, 371 | "storageLocation": "default", 372 | "typeDescriptions": { 373 | "typeIdentifier": "t_uint256", 374 | "typeString": "uint256" 375 | }, 376 | "typeName": { 377 | "id": 1478, 378 | "name": "uint256", 379 | "nodeType": "ElementaryTypeName", 380 | "src": "1146:7:10", 381 | "typeDescriptions": { 382 | "typeIdentifier": "t_uint256", 383 | "typeString": "uint256" 384 | } 385 | }, 386 | "value": null, 387 | "visibility": "internal" 388 | }, 389 | { 390 | "constant": false, 391 | "id": 1481, 392 | "name": "data", 393 | "nodeType": "VariableDeclaration", 394 | "overrides": null, 395 | "scope": 1486, 396 | "src": "1163:17:10", 397 | "stateVariable": false, 398 | "storageLocation": "memory", 399 | "typeDescriptions": { 400 | "typeIdentifier": "t_bytes_memory_ptr", 401 | "typeString": "bytes" 402 | }, 403 | "typeName": { 404 | "id": 1480, 405 | "name": "bytes", 406 | "nodeType": "ElementaryTypeName", 407 | "src": "1163:5:10", 408 | "typeDescriptions": { 409 | "typeIdentifier": "t_bytes_storage_ptr", 410 | "typeString": "bytes" 411 | } 412 | }, 413 | "value": null, 414 | "visibility": "internal" 415 | } 416 | ], 417 | "src": "1113:68:10" 418 | }, 419 | "returnParameters": { 420 | "id": 1485, 421 | "nodeType": "ParameterList", 422 | "parameters": [ 423 | { 424 | "constant": false, 425 | "id": 1484, 426 | "name": "", 427 | "nodeType": "VariableDeclaration", 428 | "overrides": null, 429 | "scope": 1486, 430 | "src": "1210:6:10", 431 | "stateVariable": false, 432 | "storageLocation": "default", 433 | "typeDescriptions": { 434 | "typeIdentifier": "t_bytes4", 435 | "typeString": "bytes4" 436 | }, 437 | "typeName": { 438 | "id": 1483, 439 | "name": "bytes4", 440 | "nodeType": "ElementaryTypeName", 441 | "src": "1210:6:10", 442 | "typeDescriptions": { 443 | "typeIdentifier": "t_bytes4", 444 | "typeString": "bytes4" 445 | } 446 | }, 447 | "value": null, 448 | "visibility": "internal" 449 | } 450 | ], 451 | "src": "1209:8:10" 452 | }, 453 | "scope": 1487, 454 | "src": "1088:130:10", 455 | "stateMutability": "nonpayable", 456 | "virtual": true, 457 | "visibility": "public" 458 | } 459 | ], 460 | "scope": 1488, 461 | "src": "178:1042:10" 462 | } 463 | ], 464 | "src": "0:1221:10" 465 | }, 466 | "compiler": { 467 | "name": "solc", 468 | "version": "0.6.2+commit.bacdbe57.Emscripten.clang" 469 | }, 470 | "networks": {}, 471 | "schemaVersion": "3.1.0", 472 | "updatedAt": "2020-05-16T12:08:04.860Z", 473 | "devdoc": { 474 | "details": "Interface for any contract that wants to support safeTransfers from ERC721 asset contracts.", 475 | "methods": { 476 | "onERC721Received(address,address,uint256,bytes)": { 477 | "details": "The ERC721 smart contract calls this function on the recipient after a {IERC721-safeTransferFrom}. This function MUST return the function selector, otherwise the caller will revert the transaction. The selector to be returned can be obtained as `this.onERC721Received.selector`. This function MAY throw to revert and reject the transfer. Note: the ERC721 contract address is always the message sender.", 478 | "params": { 479 | "data": "Additional data with no specified format", 480 | "from": "The address which previously owned the token", 481 | "operator": "The address which called `safeTransferFrom` function", 482 | "tokenId": "The NFT identifier which is being transferred" 483 | }, 484 | "returns": { 485 | "_0": "bytes4 `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`" 486 | } 487 | } 488 | }, 489 | "title": "ERC721 token receiver interface" 490 | }, 491 | "userdoc": { 492 | "methods": { 493 | "onERC721Received(address,address,uint256,bytes)": { 494 | "notice": "Handle the receipt of an NFT" 495 | } 496 | } 497 | } 498 | } -------------------------------------------------------------------------------- /app/src/contracts/Context.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "Context", 3 | "abi": [ 4 | { 5 | "inputs": [], 6 | "stateMutability": "nonpayable", 7 | "type": "constructor" 8 | } 9 | ], 10 | "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/GSN/Context.sol\":\"Context\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]}},\"version\":1}", 11 | "bytecode": "0x", 12 | "deployedBytecode": "0x", 13 | "sourceMap": "", 14 | "deployedSourceMap": "", 15 | "source": "pragma solidity ^0.6.0;\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 GSN 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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n", 16 | "sourcePath": "@openzeppelin/contracts/GSN/Context.sol", 17 | "ast": { 18 | "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", 19 | "exportedSymbols": { 20 | "Context": [ 21 | 149 22 | ] 23 | }, 24 | "id": 150, 25 | "nodeType": "SourceUnit", 26 | "nodes": [ 27 | { 28 | "id": 124, 29 | "literals": [ 30 | "solidity", 31 | "^", 32 | "0.6", 33 | ".0" 34 | ], 35 | "nodeType": "PragmaDirective", 36 | "src": "0:23:2" 37 | }, 38 | { 39 | "abstract": false, 40 | "baseContracts": [], 41 | "contractDependencies": [], 42 | "contractKind": "contract", 43 | "documentation": null, 44 | "fullyImplemented": true, 45 | "id": 149, 46 | "linearizedBaseContracts": [ 47 | 149 48 | ], 49 | "name": "Context", 50 | "nodeType": "ContractDefinition", 51 | "nodes": [ 52 | { 53 | "body": { 54 | "id": 127, 55 | "nodeType": "Block", 56 | "src": "726:3:2", 57 | "statements": [] 58 | }, 59 | "documentation": null, 60 | "id": 128, 61 | "implemented": true, 62 | "kind": "constructor", 63 | "modifiers": [], 64 | "name": "", 65 | "nodeType": "FunctionDefinition", 66 | "overrides": null, 67 | "parameters": { 68 | "id": 125, 69 | "nodeType": "ParameterList", 70 | "parameters": [], 71 | "src": "714:2:2" 72 | }, 73 | "returnParameters": { 74 | "id": 126, 75 | "nodeType": "ParameterList", 76 | "parameters": [], 77 | "src": "726:0:2" 78 | }, 79 | "scope": 149, 80 | "src": "702:27:2", 81 | "stateMutability": "nonpayable", 82 | "virtual": false, 83 | "visibility": "internal" 84 | }, 85 | { 86 | "body": { 87 | "id": 136, 88 | "nodeType": "Block", 89 | "src": "805:34:2", 90 | "statements": [ 91 | { 92 | "expression": { 93 | "argumentTypes": null, 94 | "expression": { 95 | "argumentTypes": null, 96 | "id": 133, 97 | "name": "msg", 98 | "nodeType": "Identifier", 99 | "overloadedDeclarations": [], 100 | "referencedDeclaration": -15, 101 | "src": "822:3:2", 102 | "typeDescriptions": { 103 | "typeIdentifier": "t_magic_message", 104 | "typeString": "msg" 105 | } 106 | }, 107 | "id": 134, 108 | "isConstant": false, 109 | "isLValue": false, 110 | "isPure": false, 111 | "lValueRequested": false, 112 | "memberName": "sender", 113 | "nodeType": "MemberAccess", 114 | "referencedDeclaration": null, 115 | "src": "822:10:2", 116 | "typeDescriptions": { 117 | "typeIdentifier": "t_address_payable", 118 | "typeString": "address payable" 119 | } 120 | }, 121 | "functionReturnParameters": 132, 122 | "id": 135, 123 | "nodeType": "Return", 124 | "src": "815:17:2" 125 | } 126 | ] 127 | }, 128 | "documentation": null, 129 | "id": 137, 130 | "implemented": true, 131 | "kind": "function", 132 | "modifiers": [], 133 | "name": "_msgSender", 134 | "nodeType": "FunctionDefinition", 135 | "overrides": null, 136 | "parameters": { 137 | "id": 129, 138 | "nodeType": "ParameterList", 139 | "parameters": [], 140 | "src": "754:2:2" 141 | }, 142 | "returnParameters": { 143 | "id": 132, 144 | "nodeType": "ParameterList", 145 | "parameters": [ 146 | { 147 | "constant": false, 148 | "id": 131, 149 | "name": "", 150 | "nodeType": "VariableDeclaration", 151 | "overrides": null, 152 | "scope": 137, 153 | "src": "788:15:2", 154 | "stateVariable": false, 155 | "storageLocation": "default", 156 | "typeDescriptions": { 157 | "typeIdentifier": "t_address_payable", 158 | "typeString": "address payable" 159 | }, 160 | "typeName": { 161 | "id": 130, 162 | "name": "address", 163 | "nodeType": "ElementaryTypeName", 164 | "src": "788:15:2", 165 | "stateMutability": "payable", 166 | "typeDescriptions": { 167 | "typeIdentifier": "t_address_payable", 168 | "typeString": "address payable" 169 | } 170 | }, 171 | "value": null, 172 | "visibility": "internal" 173 | } 174 | ], 175 | "src": "787:17:2" 176 | }, 177 | "scope": 149, 178 | "src": "735:104:2", 179 | "stateMutability": "view", 180 | "virtual": true, 181 | "visibility": "internal" 182 | }, 183 | { 184 | "body": { 185 | "id": 147, 186 | "nodeType": "Block", 187 | "src": "910:165:2", 188 | "statements": [ 189 | { 190 | "expression": { 191 | "argumentTypes": null, 192 | "id": 142, 193 | "name": "this", 194 | "nodeType": "Identifier", 195 | "overloadedDeclarations": [], 196 | "referencedDeclaration": -28, 197 | "src": "920:4:2", 198 | "typeDescriptions": { 199 | "typeIdentifier": "t_contract$_Context_$149", 200 | "typeString": "contract Context" 201 | } 202 | }, 203 | "id": 143, 204 | "nodeType": "ExpressionStatement", 205 | "src": "920:4:2" 206 | }, 207 | { 208 | "expression": { 209 | "argumentTypes": null, 210 | "expression": { 211 | "argumentTypes": null, 212 | "id": 144, 213 | "name": "msg", 214 | "nodeType": "Identifier", 215 | "overloadedDeclarations": [], 216 | "referencedDeclaration": -15, 217 | "src": "1060:3:2", 218 | "typeDescriptions": { 219 | "typeIdentifier": "t_magic_message", 220 | "typeString": "msg" 221 | } 222 | }, 223 | "id": 145, 224 | "isConstant": false, 225 | "isLValue": false, 226 | "isPure": false, 227 | "lValueRequested": false, 228 | "memberName": "data", 229 | "nodeType": "MemberAccess", 230 | "referencedDeclaration": null, 231 | "src": "1060:8:2", 232 | "typeDescriptions": { 233 | "typeIdentifier": "t_bytes_calldata_ptr", 234 | "typeString": "bytes calldata" 235 | } 236 | }, 237 | "functionReturnParameters": 141, 238 | "id": 146, 239 | "nodeType": "Return", 240 | "src": "1053:15:2" 241 | } 242 | ] 243 | }, 244 | "documentation": null, 245 | "id": 148, 246 | "implemented": true, 247 | "kind": "function", 248 | "modifiers": [], 249 | "name": "_msgData", 250 | "nodeType": "FunctionDefinition", 251 | "overrides": null, 252 | "parameters": { 253 | "id": 138, 254 | "nodeType": "ParameterList", 255 | "parameters": [], 256 | "src": "862:2:2" 257 | }, 258 | "returnParameters": { 259 | "id": 141, 260 | "nodeType": "ParameterList", 261 | "parameters": [ 262 | { 263 | "constant": false, 264 | "id": 140, 265 | "name": "", 266 | "nodeType": "VariableDeclaration", 267 | "overrides": null, 268 | "scope": 148, 269 | "src": "896:12:2", 270 | "stateVariable": false, 271 | "storageLocation": "memory", 272 | "typeDescriptions": { 273 | "typeIdentifier": "t_bytes_memory_ptr", 274 | "typeString": "bytes" 275 | }, 276 | "typeName": { 277 | "id": 139, 278 | "name": "bytes", 279 | "nodeType": "ElementaryTypeName", 280 | "src": "896:5:2", 281 | "typeDescriptions": { 282 | "typeIdentifier": "t_bytes_storage_ptr", 283 | "typeString": "bytes" 284 | } 285 | }, 286 | "value": null, 287 | "visibility": "internal" 288 | } 289 | ], 290 | "src": "895:14:2" 291 | }, 292 | "scope": 149, 293 | "src": "845:230:2", 294 | "stateMutability": "view", 295 | "virtual": true, 296 | "visibility": "internal" 297 | } 298 | ], 299 | "scope": 150, 300 | "src": "525:552:2" 301 | } 302 | ], 303 | "src": "0:1078:2" 304 | }, 305 | "legacyAST": { 306 | "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", 307 | "exportedSymbols": { 308 | "Context": [ 309 | 149 310 | ] 311 | }, 312 | "id": 150, 313 | "nodeType": "SourceUnit", 314 | "nodes": [ 315 | { 316 | "id": 124, 317 | "literals": [ 318 | "solidity", 319 | "^", 320 | "0.6", 321 | ".0" 322 | ], 323 | "nodeType": "PragmaDirective", 324 | "src": "0:23:2" 325 | }, 326 | { 327 | "abstract": false, 328 | "baseContracts": [], 329 | "contractDependencies": [], 330 | "contractKind": "contract", 331 | "documentation": null, 332 | "fullyImplemented": true, 333 | "id": 149, 334 | "linearizedBaseContracts": [ 335 | 149 336 | ], 337 | "name": "Context", 338 | "nodeType": "ContractDefinition", 339 | "nodes": [ 340 | { 341 | "body": { 342 | "id": 127, 343 | "nodeType": "Block", 344 | "src": "726:3:2", 345 | "statements": [] 346 | }, 347 | "documentation": null, 348 | "id": 128, 349 | "implemented": true, 350 | "kind": "constructor", 351 | "modifiers": [], 352 | "name": "", 353 | "nodeType": "FunctionDefinition", 354 | "overrides": null, 355 | "parameters": { 356 | "id": 125, 357 | "nodeType": "ParameterList", 358 | "parameters": [], 359 | "src": "714:2:2" 360 | }, 361 | "returnParameters": { 362 | "id": 126, 363 | "nodeType": "ParameterList", 364 | "parameters": [], 365 | "src": "726:0:2" 366 | }, 367 | "scope": 149, 368 | "src": "702:27:2", 369 | "stateMutability": "nonpayable", 370 | "virtual": false, 371 | "visibility": "internal" 372 | }, 373 | { 374 | "body": { 375 | "id": 136, 376 | "nodeType": "Block", 377 | "src": "805:34:2", 378 | "statements": [ 379 | { 380 | "expression": { 381 | "argumentTypes": null, 382 | "expression": { 383 | "argumentTypes": null, 384 | "id": 133, 385 | "name": "msg", 386 | "nodeType": "Identifier", 387 | "overloadedDeclarations": [], 388 | "referencedDeclaration": -15, 389 | "src": "822:3:2", 390 | "typeDescriptions": { 391 | "typeIdentifier": "t_magic_message", 392 | "typeString": "msg" 393 | } 394 | }, 395 | "id": 134, 396 | "isConstant": false, 397 | "isLValue": false, 398 | "isPure": false, 399 | "lValueRequested": false, 400 | "memberName": "sender", 401 | "nodeType": "MemberAccess", 402 | "referencedDeclaration": null, 403 | "src": "822:10:2", 404 | "typeDescriptions": { 405 | "typeIdentifier": "t_address_payable", 406 | "typeString": "address payable" 407 | } 408 | }, 409 | "functionReturnParameters": 132, 410 | "id": 135, 411 | "nodeType": "Return", 412 | "src": "815:17:2" 413 | } 414 | ] 415 | }, 416 | "documentation": null, 417 | "id": 137, 418 | "implemented": true, 419 | "kind": "function", 420 | "modifiers": [], 421 | "name": "_msgSender", 422 | "nodeType": "FunctionDefinition", 423 | "overrides": null, 424 | "parameters": { 425 | "id": 129, 426 | "nodeType": "ParameterList", 427 | "parameters": [], 428 | "src": "754:2:2" 429 | }, 430 | "returnParameters": { 431 | "id": 132, 432 | "nodeType": "ParameterList", 433 | "parameters": [ 434 | { 435 | "constant": false, 436 | "id": 131, 437 | "name": "", 438 | "nodeType": "VariableDeclaration", 439 | "overrides": null, 440 | "scope": 137, 441 | "src": "788:15:2", 442 | "stateVariable": false, 443 | "storageLocation": "default", 444 | "typeDescriptions": { 445 | "typeIdentifier": "t_address_payable", 446 | "typeString": "address payable" 447 | }, 448 | "typeName": { 449 | "id": 130, 450 | "name": "address", 451 | "nodeType": "ElementaryTypeName", 452 | "src": "788:15:2", 453 | "stateMutability": "payable", 454 | "typeDescriptions": { 455 | "typeIdentifier": "t_address_payable", 456 | "typeString": "address payable" 457 | } 458 | }, 459 | "value": null, 460 | "visibility": "internal" 461 | } 462 | ], 463 | "src": "787:17:2" 464 | }, 465 | "scope": 149, 466 | "src": "735:104:2", 467 | "stateMutability": "view", 468 | "virtual": true, 469 | "visibility": "internal" 470 | }, 471 | { 472 | "body": { 473 | "id": 147, 474 | "nodeType": "Block", 475 | "src": "910:165:2", 476 | "statements": [ 477 | { 478 | "expression": { 479 | "argumentTypes": null, 480 | "id": 142, 481 | "name": "this", 482 | "nodeType": "Identifier", 483 | "overloadedDeclarations": [], 484 | "referencedDeclaration": -28, 485 | "src": "920:4:2", 486 | "typeDescriptions": { 487 | "typeIdentifier": "t_contract$_Context_$149", 488 | "typeString": "contract Context" 489 | } 490 | }, 491 | "id": 143, 492 | "nodeType": "ExpressionStatement", 493 | "src": "920:4:2" 494 | }, 495 | { 496 | "expression": { 497 | "argumentTypes": null, 498 | "expression": { 499 | "argumentTypes": null, 500 | "id": 144, 501 | "name": "msg", 502 | "nodeType": "Identifier", 503 | "overloadedDeclarations": [], 504 | "referencedDeclaration": -15, 505 | "src": "1060:3:2", 506 | "typeDescriptions": { 507 | "typeIdentifier": "t_magic_message", 508 | "typeString": "msg" 509 | } 510 | }, 511 | "id": 145, 512 | "isConstant": false, 513 | "isLValue": false, 514 | "isPure": false, 515 | "lValueRequested": false, 516 | "memberName": "data", 517 | "nodeType": "MemberAccess", 518 | "referencedDeclaration": null, 519 | "src": "1060:8:2", 520 | "typeDescriptions": { 521 | "typeIdentifier": "t_bytes_calldata_ptr", 522 | "typeString": "bytes calldata" 523 | } 524 | }, 525 | "functionReturnParameters": 141, 526 | "id": 146, 527 | "nodeType": "Return", 528 | "src": "1053:15:2" 529 | } 530 | ] 531 | }, 532 | "documentation": null, 533 | "id": 148, 534 | "implemented": true, 535 | "kind": "function", 536 | "modifiers": [], 537 | "name": "_msgData", 538 | "nodeType": "FunctionDefinition", 539 | "overrides": null, 540 | "parameters": { 541 | "id": 138, 542 | "nodeType": "ParameterList", 543 | "parameters": [], 544 | "src": "862:2:2" 545 | }, 546 | "returnParameters": { 547 | "id": 141, 548 | "nodeType": "ParameterList", 549 | "parameters": [ 550 | { 551 | "constant": false, 552 | "id": 140, 553 | "name": "", 554 | "nodeType": "VariableDeclaration", 555 | "overrides": null, 556 | "scope": 148, 557 | "src": "896:12:2", 558 | "stateVariable": false, 559 | "storageLocation": "memory", 560 | "typeDescriptions": { 561 | "typeIdentifier": "t_bytes_memory_ptr", 562 | "typeString": "bytes" 563 | }, 564 | "typeName": { 565 | "id": 139, 566 | "name": "bytes", 567 | "nodeType": "ElementaryTypeName", 568 | "src": "896:5:2", 569 | "typeDescriptions": { 570 | "typeIdentifier": "t_bytes_storage_ptr", 571 | "typeString": "bytes" 572 | } 573 | }, 574 | "value": null, 575 | "visibility": "internal" 576 | } 577 | ], 578 | "src": "895:14:2" 579 | }, 580 | "scope": 149, 581 | "src": "845:230:2", 582 | "stateMutability": "view", 583 | "virtual": true, 584 | "visibility": "internal" 585 | } 586 | ], 587 | "scope": 150, 588 | "src": "525:552:2" 589 | } 590 | ], 591 | "src": "0:1078:2" 592 | }, 593 | "compiler": { 594 | "name": "solc", 595 | "version": "0.6.2+commit.bacdbe57.Emscripten.clang" 596 | }, 597 | "networks": {}, 598 | "schemaVersion": "3.1.0", 599 | "updatedAt": "2020-05-16T12:08:04.814Z", 600 | "devdoc": { 601 | "methods": {} 602 | }, 603 | "userdoc": { 604 | "methods": {} 605 | } 606 | } -------------------------------------------------------------------------------- /app/src/contracts/Migrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "Migrations", 3 | "abi": [ 4 | { 5 | "inputs": [], 6 | "stateMutability": "nonpayable", 7 | "type": "constructor" 8 | }, 9 | { 10 | "inputs": [], 11 | "name": "last_completed_migration", 12 | "outputs": [ 13 | { 14 | "internalType": "uint256", 15 | "name": "", 16 | "type": "uint256" 17 | } 18 | ], 19 | "stateMutability": "view", 20 | "type": "function", 21 | "constant": true 22 | }, 23 | { 24 | "inputs": [], 25 | "name": "owner", 26 | "outputs": [ 27 | { 28 | "internalType": "address", 29 | "name": "", 30 | "type": "address" 31 | } 32 | ], 33 | "stateMutability": "view", 34 | "type": "function", 35 | "constant": true 36 | }, 37 | { 38 | "inputs": [ 39 | { 40 | "internalType": "uint256", 41 | "name": "completed", 42 | "type": "uint256" 43 | } 44 | ], 45 | "name": "setCompleted", 46 | "outputs": [], 47 | "stateMutability": "nonpayable", 48 | "type": "function" 49 | } 50 | ], 51 | "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/piraya/Desktop/repos/crypto-museum/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/piraya/Desktop/repos/crypto-museum/contracts/Migrations.sol\":{\"keccak256\":\"0x89d703433a6fc541d2928d68938a143985aa45f279f8de7b1dd439fa064555b0\",\"urls\":[\"bzz-raw://42ecb7972267dce0097f7f03543d530ba396d182033b4c09161c0d027b4e6cd8\",\"dweb:/ipfs/QmRTUvTgL3cCPVYYsLKrw5V9XPkgXyVHPCr52kqwSH7yQ2\"]}},\"version\":1}", 52 | "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061019d806100606000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063445df0ac146100465780638da5cb5b14610064578063fdacd576146100ae575b600080fd5b61004e6100dc565b6040518082815260200191505060405180910390f35b61006c6100e2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610107565b005b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561016457806001819055505b5056fea2646970667358221220a75ffc9aa8708868a1c70fb772f90451e8d695200efc506b49f8d44ddc73e1ae64736f6c63430006020033", 53 | "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063445df0ac146100465780638da5cb5b14610064578063fdacd576146100ae575b600080fd5b61004e6100dc565b6040518082815260200191505060405180910390f35b61006c6100e2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610107565b005b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561016457806001819055505b5056fea2646970667358221220a75ffc9aa8708868a1c70fb772f90451e8d695200efc506b49f8d44ddc73e1ae64736f6c63430006020033", 54 | "sourceMap": "34:339:1:-:0;;;129:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;129:56:1;168:10;160:5;;:18;;;;;;;;;;;;;;;;;;34:339;;;;;;", 55 | "deployedSourceMap": "34:339:1:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;34:339:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;86:36;;;:::i;:::-;;;;;;;;;;;;;;;;;;;60:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;262:109;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;262:109:1;;;;;;;;;;;;;;;;;:::i;:::-;;86:36;;;;:::o;60:20::-;;;;;;;;;;;;;:::o;262:109::-;241:5;;;;;;;;;;;227:19;;:10;:19;;;223:26;;;355:9:::1;328:24;:36;;;;223:26:::0;262:109;:::o", 56 | "source": "pragma solidity >=0.4.21 <0.7.0;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n}\n", 57 | "sourcePath": "/home/piraya/Desktop/repos/crypto-museum/contracts/Migrations.sol", 58 | "ast": { 59 | "absolutePath": "/home/piraya/Desktop/repos/crypto-museum/contracts/Migrations.sol", 60 | "exportedSymbols": { 61 | "Migrations": [ 62 | 122 63 | ] 64 | }, 65 | "id": 123, 66 | "nodeType": "SourceUnit", 67 | "nodes": [ 68 | { 69 | "id": 87, 70 | "literals": [ 71 | "solidity", 72 | ">=", 73 | "0.4", 74 | ".21", 75 | "<", 76 | "0.7", 77 | ".0" 78 | ], 79 | "nodeType": "PragmaDirective", 80 | "src": "0:32:1" 81 | }, 82 | { 83 | "abstract": false, 84 | "baseContracts": [], 85 | "contractDependencies": [], 86 | "contractKind": "contract", 87 | "documentation": null, 88 | "fullyImplemented": true, 89 | "id": 122, 90 | "linearizedBaseContracts": [ 91 | 122 92 | ], 93 | "name": "Migrations", 94 | "nodeType": "ContractDefinition", 95 | "nodes": [ 96 | { 97 | "constant": false, 98 | "functionSelector": "8da5cb5b", 99 | "id": 89, 100 | "name": "owner", 101 | "nodeType": "VariableDeclaration", 102 | "overrides": null, 103 | "scope": 122, 104 | "src": "60:20:1", 105 | "stateVariable": true, 106 | "storageLocation": "default", 107 | "typeDescriptions": { 108 | "typeIdentifier": "t_address", 109 | "typeString": "address" 110 | }, 111 | "typeName": { 112 | "id": 88, 113 | "name": "address", 114 | "nodeType": "ElementaryTypeName", 115 | "src": "60:7:1", 116 | "stateMutability": "nonpayable", 117 | "typeDescriptions": { 118 | "typeIdentifier": "t_address", 119 | "typeString": "address" 120 | } 121 | }, 122 | "value": null, 123 | "visibility": "public" 124 | }, 125 | { 126 | "constant": false, 127 | "functionSelector": "445df0ac", 128 | "id": 91, 129 | "name": "last_completed_migration", 130 | "nodeType": "VariableDeclaration", 131 | "overrides": null, 132 | "scope": 122, 133 | "src": "86:36:1", 134 | "stateVariable": true, 135 | "storageLocation": "default", 136 | "typeDescriptions": { 137 | "typeIdentifier": "t_uint256", 138 | "typeString": "uint256" 139 | }, 140 | "typeName": { 141 | "id": 90, 142 | "name": "uint", 143 | "nodeType": "ElementaryTypeName", 144 | "src": "86:4:1", 145 | "typeDescriptions": { 146 | "typeIdentifier": "t_uint256", 147 | "typeString": "uint256" 148 | } 149 | }, 150 | "value": null, 151 | "visibility": "public" 152 | }, 153 | { 154 | "body": { 155 | "id": 99, 156 | "nodeType": "Block", 157 | "src": "150:35:1", 158 | "statements": [ 159 | { 160 | "expression": { 161 | "argumentTypes": null, 162 | "id": 97, 163 | "isConstant": false, 164 | "isLValue": false, 165 | "isPure": false, 166 | "lValueRequested": false, 167 | "leftHandSide": { 168 | "argumentTypes": null, 169 | "id": 94, 170 | "name": "owner", 171 | "nodeType": "Identifier", 172 | "overloadedDeclarations": [], 173 | "referencedDeclaration": 89, 174 | "src": "160:5:1", 175 | "typeDescriptions": { 176 | "typeIdentifier": "t_address", 177 | "typeString": "address" 178 | } 179 | }, 180 | "nodeType": "Assignment", 181 | "operator": "=", 182 | "rightHandSide": { 183 | "argumentTypes": null, 184 | "expression": { 185 | "argumentTypes": null, 186 | "id": 95, 187 | "name": "msg", 188 | "nodeType": "Identifier", 189 | "overloadedDeclarations": [], 190 | "referencedDeclaration": -15, 191 | "src": "168:3:1", 192 | "typeDescriptions": { 193 | "typeIdentifier": "t_magic_message", 194 | "typeString": "msg" 195 | } 196 | }, 197 | "id": 96, 198 | "isConstant": false, 199 | "isLValue": false, 200 | "isPure": false, 201 | "lValueRequested": false, 202 | "memberName": "sender", 203 | "nodeType": "MemberAccess", 204 | "referencedDeclaration": null, 205 | "src": "168:10:1", 206 | "typeDescriptions": { 207 | "typeIdentifier": "t_address_payable", 208 | "typeString": "address payable" 209 | } 210 | }, 211 | "src": "160:18:1", 212 | "typeDescriptions": { 213 | "typeIdentifier": "t_address", 214 | "typeString": "address" 215 | } 216 | }, 217 | "id": 98, 218 | "nodeType": "ExpressionStatement", 219 | "src": "160:18:1" 220 | } 221 | ] 222 | }, 223 | "documentation": null, 224 | "id": 100, 225 | "implemented": true, 226 | "kind": "constructor", 227 | "modifiers": [], 228 | "name": "", 229 | "nodeType": "FunctionDefinition", 230 | "overrides": null, 231 | "parameters": { 232 | "id": 92, 233 | "nodeType": "ParameterList", 234 | "parameters": [], 235 | "src": "140:2:1" 236 | }, 237 | "returnParameters": { 238 | "id": 93, 239 | "nodeType": "ParameterList", 240 | "parameters": [], 241 | "src": "150:0:1" 242 | }, 243 | "scope": 122, 244 | "src": "129:56:1", 245 | "stateMutability": "nonpayable", 246 | "virtual": false, 247 | "visibility": "public" 248 | }, 249 | { 250 | "body": { 251 | "id": 108, 252 | "nodeType": "Block", 253 | "src": "213:43:1", 254 | "statements": [ 255 | { 256 | "condition": { 257 | "argumentTypes": null, 258 | "commonType": { 259 | "typeIdentifier": "t_address", 260 | "typeString": "address" 261 | }, 262 | "id": 105, 263 | "isConstant": false, 264 | "isLValue": false, 265 | "isPure": false, 266 | "lValueRequested": false, 267 | "leftExpression": { 268 | "argumentTypes": null, 269 | "expression": { 270 | "argumentTypes": null, 271 | "id": 102, 272 | "name": "msg", 273 | "nodeType": "Identifier", 274 | "overloadedDeclarations": [], 275 | "referencedDeclaration": -15, 276 | "src": "227:3:1", 277 | "typeDescriptions": { 278 | "typeIdentifier": "t_magic_message", 279 | "typeString": "msg" 280 | } 281 | }, 282 | "id": 103, 283 | "isConstant": false, 284 | "isLValue": false, 285 | "isPure": false, 286 | "lValueRequested": false, 287 | "memberName": "sender", 288 | "nodeType": "MemberAccess", 289 | "referencedDeclaration": null, 290 | "src": "227:10:1", 291 | "typeDescriptions": { 292 | "typeIdentifier": "t_address_payable", 293 | "typeString": "address payable" 294 | } 295 | }, 296 | "nodeType": "BinaryOperation", 297 | "operator": "==", 298 | "rightExpression": { 299 | "argumentTypes": null, 300 | "id": 104, 301 | "name": "owner", 302 | "nodeType": "Identifier", 303 | "overloadedDeclarations": [], 304 | "referencedDeclaration": 89, 305 | "src": "241:5:1", 306 | "typeDescriptions": { 307 | "typeIdentifier": "t_address", 308 | "typeString": "address" 309 | } 310 | }, 311 | "src": "227:19:1", 312 | "typeDescriptions": { 313 | "typeIdentifier": "t_bool", 314 | "typeString": "bool" 315 | } 316 | }, 317 | "falseBody": null, 318 | "id": 107, 319 | "nodeType": "IfStatement", 320 | "src": "223:26:1", 321 | "trueBody": { 322 | "id": 106, 323 | "nodeType": "PlaceholderStatement", 324 | "src": "248:1:1" 325 | } 326 | } 327 | ] 328 | }, 329 | "documentation": null, 330 | "id": 109, 331 | "name": "restricted", 332 | "nodeType": "ModifierDefinition", 333 | "overrides": null, 334 | "parameters": { 335 | "id": 101, 336 | "nodeType": "ParameterList", 337 | "parameters": [], 338 | "src": "210:2:1" 339 | }, 340 | "src": "191:65:1", 341 | "virtual": false, 342 | "visibility": "internal" 343 | }, 344 | { 345 | "body": { 346 | "id": 120, 347 | "nodeType": "Block", 348 | "src": "318:53:1", 349 | "statements": [ 350 | { 351 | "expression": { 352 | "argumentTypes": null, 353 | "id": 118, 354 | "isConstant": false, 355 | "isLValue": false, 356 | "isPure": false, 357 | "lValueRequested": false, 358 | "leftHandSide": { 359 | "argumentTypes": null, 360 | "id": 116, 361 | "name": "last_completed_migration", 362 | "nodeType": "Identifier", 363 | "overloadedDeclarations": [], 364 | "referencedDeclaration": 91, 365 | "src": "328:24:1", 366 | "typeDescriptions": { 367 | "typeIdentifier": "t_uint256", 368 | "typeString": "uint256" 369 | } 370 | }, 371 | "nodeType": "Assignment", 372 | "operator": "=", 373 | "rightHandSide": { 374 | "argumentTypes": null, 375 | "id": 117, 376 | "name": "completed", 377 | "nodeType": "Identifier", 378 | "overloadedDeclarations": [], 379 | "referencedDeclaration": 111, 380 | "src": "355:9:1", 381 | "typeDescriptions": { 382 | "typeIdentifier": "t_uint256", 383 | "typeString": "uint256" 384 | } 385 | }, 386 | "src": "328:36:1", 387 | "typeDescriptions": { 388 | "typeIdentifier": "t_uint256", 389 | "typeString": "uint256" 390 | } 391 | }, 392 | "id": 119, 393 | "nodeType": "ExpressionStatement", 394 | "src": "328:36:1" 395 | } 396 | ] 397 | }, 398 | "documentation": null, 399 | "functionSelector": "fdacd576", 400 | "id": 121, 401 | "implemented": true, 402 | "kind": "function", 403 | "modifiers": [ 404 | { 405 | "arguments": null, 406 | "id": 114, 407 | "modifierName": { 408 | "argumentTypes": null, 409 | "id": 113, 410 | "name": "restricted", 411 | "nodeType": "Identifier", 412 | "overloadedDeclarations": [], 413 | "referencedDeclaration": 109, 414 | "src": "307:10:1", 415 | "typeDescriptions": { 416 | "typeIdentifier": "t_modifier$__$", 417 | "typeString": "modifier ()" 418 | } 419 | }, 420 | "nodeType": "ModifierInvocation", 421 | "src": "307:10:1" 422 | } 423 | ], 424 | "name": "setCompleted", 425 | "nodeType": "FunctionDefinition", 426 | "overrides": null, 427 | "parameters": { 428 | "id": 112, 429 | "nodeType": "ParameterList", 430 | "parameters": [ 431 | { 432 | "constant": false, 433 | "id": 111, 434 | "name": "completed", 435 | "nodeType": "VariableDeclaration", 436 | "overrides": null, 437 | "scope": 121, 438 | "src": "284:14:1", 439 | "stateVariable": false, 440 | "storageLocation": "default", 441 | "typeDescriptions": { 442 | "typeIdentifier": "t_uint256", 443 | "typeString": "uint256" 444 | }, 445 | "typeName": { 446 | "id": 110, 447 | "name": "uint", 448 | "nodeType": "ElementaryTypeName", 449 | "src": "284:4:1", 450 | "typeDescriptions": { 451 | "typeIdentifier": "t_uint256", 452 | "typeString": "uint256" 453 | } 454 | }, 455 | "value": null, 456 | "visibility": "internal" 457 | } 458 | ], 459 | "src": "283:16:1" 460 | }, 461 | "returnParameters": { 462 | "id": 115, 463 | "nodeType": "ParameterList", 464 | "parameters": [], 465 | "src": "318:0:1" 466 | }, 467 | "scope": 122, 468 | "src": "262:109:1", 469 | "stateMutability": "nonpayable", 470 | "virtual": false, 471 | "visibility": "public" 472 | } 473 | ], 474 | "scope": 123, 475 | "src": "34:339:1" 476 | } 477 | ], 478 | "src": "0:374:1" 479 | }, 480 | "legacyAST": { 481 | "absolutePath": "/home/piraya/Desktop/repos/crypto-museum/contracts/Migrations.sol", 482 | "exportedSymbols": { 483 | "Migrations": [ 484 | 122 485 | ] 486 | }, 487 | "id": 123, 488 | "nodeType": "SourceUnit", 489 | "nodes": [ 490 | { 491 | "id": 87, 492 | "literals": [ 493 | "solidity", 494 | ">=", 495 | "0.4", 496 | ".21", 497 | "<", 498 | "0.7", 499 | ".0" 500 | ], 501 | "nodeType": "PragmaDirective", 502 | "src": "0:32:1" 503 | }, 504 | { 505 | "abstract": false, 506 | "baseContracts": [], 507 | "contractDependencies": [], 508 | "contractKind": "contract", 509 | "documentation": null, 510 | "fullyImplemented": true, 511 | "id": 122, 512 | "linearizedBaseContracts": [ 513 | 122 514 | ], 515 | "name": "Migrations", 516 | "nodeType": "ContractDefinition", 517 | "nodes": [ 518 | { 519 | "constant": false, 520 | "functionSelector": "8da5cb5b", 521 | "id": 89, 522 | "name": "owner", 523 | "nodeType": "VariableDeclaration", 524 | "overrides": null, 525 | "scope": 122, 526 | "src": "60:20:1", 527 | "stateVariable": true, 528 | "storageLocation": "default", 529 | "typeDescriptions": { 530 | "typeIdentifier": "t_address", 531 | "typeString": "address" 532 | }, 533 | "typeName": { 534 | "id": 88, 535 | "name": "address", 536 | "nodeType": "ElementaryTypeName", 537 | "src": "60:7:1", 538 | "stateMutability": "nonpayable", 539 | "typeDescriptions": { 540 | "typeIdentifier": "t_address", 541 | "typeString": "address" 542 | } 543 | }, 544 | "value": null, 545 | "visibility": "public" 546 | }, 547 | { 548 | "constant": false, 549 | "functionSelector": "445df0ac", 550 | "id": 91, 551 | "name": "last_completed_migration", 552 | "nodeType": "VariableDeclaration", 553 | "overrides": null, 554 | "scope": 122, 555 | "src": "86:36:1", 556 | "stateVariable": true, 557 | "storageLocation": "default", 558 | "typeDescriptions": { 559 | "typeIdentifier": "t_uint256", 560 | "typeString": "uint256" 561 | }, 562 | "typeName": { 563 | "id": 90, 564 | "name": "uint", 565 | "nodeType": "ElementaryTypeName", 566 | "src": "86:4:1", 567 | "typeDescriptions": { 568 | "typeIdentifier": "t_uint256", 569 | "typeString": "uint256" 570 | } 571 | }, 572 | "value": null, 573 | "visibility": "public" 574 | }, 575 | { 576 | "body": { 577 | "id": 99, 578 | "nodeType": "Block", 579 | "src": "150:35:1", 580 | "statements": [ 581 | { 582 | "expression": { 583 | "argumentTypes": null, 584 | "id": 97, 585 | "isConstant": false, 586 | "isLValue": false, 587 | "isPure": false, 588 | "lValueRequested": false, 589 | "leftHandSide": { 590 | "argumentTypes": null, 591 | "id": 94, 592 | "name": "owner", 593 | "nodeType": "Identifier", 594 | "overloadedDeclarations": [], 595 | "referencedDeclaration": 89, 596 | "src": "160:5:1", 597 | "typeDescriptions": { 598 | "typeIdentifier": "t_address", 599 | "typeString": "address" 600 | } 601 | }, 602 | "nodeType": "Assignment", 603 | "operator": "=", 604 | "rightHandSide": { 605 | "argumentTypes": null, 606 | "expression": { 607 | "argumentTypes": null, 608 | "id": 95, 609 | "name": "msg", 610 | "nodeType": "Identifier", 611 | "overloadedDeclarations": [], 612 | "referencedDeclaration": -15, 613 | "src": "168:3:1", 614 | "typeDescriptions": { 615 | "typeIdentifier": "t_magic_message", 616 | "typeString": "msg" 617 | } 618 | }, 619 | "id": 96, 620 | "isConstant": false, 621 | "isLValue": false, 622 | "isPure": false, 623 | "lValueRequested": false, 624 | "memberName": "sender", 625 | "nodeType": "MemberAccess", 626 | "referencedDeclaration": null, 627 | "src": "168:10:1", 628 | "typeDescriptions": { 629 | "typeIdentifier": "t_address_payable", 630 | "typeString": "address payable" 631 | } 632 | }, 633 | "src": "160:18:1", 634 | "typeDescriptions": { 635 | "typeIdentifier": "t_address", 636 | "typeString": "address" 637 | } 638 | }, 639 | "id": 98, 640 | "nodeType": "ExpressionStatement", 641 | "src": "160:18:1" 642 | } 643 | ] 644 | }, 645 | "documentation": null, 646 | "id": 100, 647 | "implemented": true, 648 | "kind": "constructor", 649 | "modifiers": [], 650 | "name": "", 651 | "nodeType": "FunctionDefinition", 652 | "overrides": null, 653 | "parameters": { 654 | "id": 92, 655 | "nodeType": "ParameterList", 656 | "parameters": [], 657 | "src": "140:2:1" 658 | }, 659 | "returnParameters": { 660 | "id": 93, 661 | "nodeType": "ParameterList", 662 | "parameters": [], 663 | "src": "150:0:1" 664 | }, 665 | "scope": 122, 666 | "src": "129:56:1", 667 | "stateMutability": "nonpayable", 668 | "virtual": false, 669 | "visibility": "public" 670 | }, 671 | { 672 | "body": { 673 | "id": 108, 674 | "nodeType": "Block", 675 | "src": "213:43:1", 676 | "statements": [ 677 | { 678 | "condition": { 679 | "argumentTypes": null, 680 | "commonType": { 681 | "typeIdentifier": "t_address", 682 | "typeString": "address" 683 | }, 684 | "id": 105, 685 | "isConstant": false, 686 | "isLValue": false, 687 | "isPure": false, 688 | "lValueRequested": false, 689 | "leftExpression": { 690 | "argumentTypes": null, 691 | "expression": { 692 | "argumentTypes": null, 693 | "id": 102, 694 | "name": "msg", 695 | "nodeType": "Identifier", 696 | "overloadedDeclarations": [], 697 | "referencedDeclaration": -15, 698 | "src": "227:3:1", 699 | "typeDescriptions": { 700 | "typeIdentifier": "t_magic_message", 701 | "typeString": "msg" 702 | } 703 | }, 704 | "id": 103, 705 | "isConstant": false, 706 | "isLValue": false, 707 | "isPure": false, 708 | "lValueRequested": false, 709 | "memberName": "sender", 710 | "nodeType": "MemberAccess", 711 | "referencedDeclaration": null, 712 | "src": "227:10:1", 713 | "typeDescriptions": { 714 | "typeIdentifier": "t_address_payable", 715 | "typeString": "address payable" 716 | } 717 | }, 718 | "nodeType": "BinaryOperation", 719 | "operator": "==", 720 | "rightExpression": { 721 | "argumentTypes": null, 722 | "id": 104, 723 | "name": "owner", 724 | "nodeType": "Identifier", 725 | "overloadedDeclarations": [], 726 | "referencedDeclaration": 89, 727 | "src": "241:5:1", 728 | "typeDescriptions": { 729 | "typeIdentifier": "t_address", 730 | "typeString": "address" 731 | } 732 | }, 733 | "src": "227:19:1", 734 | "typeDescriptions": { 735 | "typeIdentifier": "t_bool", 736 | "typeString": "bool" 737 | } 738 | }, 739 | "falseBody": null, 740 | "id": 107, 741 | "nodeType": "IfStatement", 742 | "src": "223:26:1", 743 | "trueBody": { 744 | "id": 106, 745 | "nodeType": "PlaceholderStatement", 746 | "src": "248:1:1" 747 | } 748 | } 749 | ] 750 | }, 751 | "documentation": null, 752 | "id": 109, 753 | "name": "restricted", 754 | "nodeType": "ModifierDefinition", 755 | "overrides": null, 756 | "parameters": { 757 | "id": 101, 758 | "nodeType": "ParameterList", 759 | "parameters": [], 760 | "src": "210:2:1" 761 | }, 762 | "src": "191:65:1", 763 | "virtual": false, 764 | "visibility": "internal" 765 | }, 766 | { 767 | "body": { 768 | "id": 120, 769 | "nodeType": "Block", 770 | "src": "318:53:1", 771 | "statements": [ 772 | { 773 | "expression": { 774 | "argumentTypes": null, 775 | "id": 118, 776 | "isConstant": false, 777 | "isLValue": false, 778 | "isPure": false, 779 | "lValueRequested": false, 780 | "leftHandSide": { 781 | "argumentTypes": null, 782 | "id": 116, 783 | "name": "last_completed_migration", 784 | "nodeType": "Identifier", 785 | "overloadedDeclarations": [], 786 | "referencedDeclaration": 91, 787 | "src": "328:24:1", 788 | "typeDescriptions": { 789 | "typeIdentifier": "t_uint256", 790 | "typeString": "uint256" 791 | } 792 | }, 793 | "nodeType": "Assignment", 794 | "operator": "=", 795 | "rightHandSide": { 796 | "argumentTypes": null, 797 | "id": 117, 798 | "name": "completed", 799 | "nodeType": "Identifier", 800 | "overloadedDeclarations": [], 801 | "referencedDeclaration": 111, 802 | "src": "355:9:1", 803 | "typeDescriptions": { 804 | "typeIdentifier": "t_uint256", 805 | "typeString": "uint256" 806 | } 807 | }, 808 | "src": "328:36:1", 809 | "typeDescriptions": { 810 | "typeIdentifier": "t_uint256", 811 | "typeString": "uint256" 812 | } 813 | }, 814 | "id": 119, 815 | "nodeType": "ExpressionStatement", 816 | "src": "328:36:1" 817 | } 818 | ] 819 | }, 820 | "documentation": null, 821 | "functionSelector": "fdacd576", 822 | "id": 121, 823 | "implemented": true, 824 | "kind": "function", 825 | "modifiers": [ 826 | { 827 | "arguments": null, 828 | "id": 114, 829 | "modifierName": { 830 | "argumentTypes": null, 831 | "id": 113, 832 | "name": "restricted", 833 | "nodeType": "Identifier", 834 | "overloadedDeclarations": [], 835 | "referencedDeclaration": 109, 836 | "src": "307:10:1", 837 | "typeDescriptions": { 838 | "typeIdentifier": "t_modifier$__$", 839 | "typeString": "modifier ()" 840 | } 841 | }, 842 | "nodeType": "ModifierInvocation", 843 | "src": "307:10:1" 844 | } 845 | ], 846 | "name": "setCompleted", 847 | "nodeType": "FunctionDefinition", 848 | "overrides": null, 849 | "parameters": { 850 | "id": 112, 851 | "nodeType": "ParameterList", 852 | "parameters": [ 853 | { 854 | "constant": false, 855 | "id": 111, 856 | "name": "completed", 857 | "nodeType": "VariableDeclaration", 858 | "overrides": null, 859 | "scope": 121, 860 | "src": "284:14:1", 861 | "stateVariable": false, 862 | "storageLocation": "default", 863 | "typeDescriptions": { 864 | "typeIdentifier": "t_uint256", 865 | "typeString": "uint256" 866 | }, 867 | "typeName": { 868 | "id": 110, 869 | "name": "uint", 870 | "nodeType": "ElementaryTypeName", 871 | "src": "284:4:1", 872 | "typeDescriptions": { 873 | "typeIdentifier": "t_uint256", 874 | "typeString": "uint256" 875 | } 876 | }, 877 | "value": null, 878 | "visibility": "internal" 879 | } 880 | ], 881 | "src": "283:16:1" 882 | }, 883 | "returnParameters": { 884 | "id": 115, 885 | "nodeType": "ParameterList", 886 | "parameters": [], 887 | "src": "318:0:1" 888 | }, 889 | "scope": 122, 890 | "src": "262:109:1", 891 | "stateMutability": "nonpayable", 892 | "virtual": false, 893 | "visibility": "public" 894 | } 895 | ], 896 | "scope": 123, 897 | "src": "34:339:1" 898 | } 899 | ], 900 | "src": "0:374:1" 901 | }, 902 | "compiler": { 903 | "name": "solc", 904 | "version": "0.6.2+commit.bacdbe57.Emscripten.clang" 905 | }, 906 | "networks": { 907 | "3": { 908 | "events": {}, 909 | "links": {}, 910 | "address": "0xB7aAf8e51103f3df21E987e4392905d89d5B81A1", 911 | "transactionHash": "0xb9ef418f761bc413c6b1be1e979df7f7042629352c35adf3df7cfeef761f8fc5" 912 | } 913 | }, 914 | "schemaVersion": "3.1.0", 915 | "updatedAt": "2020-05-16T12:09:57.152Z", 916 | "networkType": "ethereum", 917 | "devdoc": { 918 | "methods": {} 919 | }, 920 | "userdoc": { 921 | "methods": {} 922 | } 923 | } -------------------------------------------------------------------------------- /app/src/contracts/IERC721Metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "IERC721Metadata", 3 | "abi": [ 4 | { 5 | "anonymous": false, 6 | "inputs": [ 7 | { 8 | "indexed": true, 9 | "internalType": "address", 10 | "name": "owner", 11 | "type": "address" 12 | }, 13 | { 14 | "indexed": true, 15 | "internalType": "address", 16 | "name": "approved", 17 | "type": "address" 18 | }, 19 | { 20 | "indexed": true, 21 | "internalType": "uint256", 22 | "name": "tokenId", 23 | "type": "uint256" 24 | } 25 | ], 26 | "name": "Approval", 27 | "type": "event" 28 | }, 29 | { 30 | "anonymous": false, 31 | "inputs": [ 32 | { 33 | "indexed": true, 34 | "internalType": "address", 35 | "name": "owner", 36 | "type": "address" 37 | }, 38 | { 39 | "indexed": true, 40 | "internalType": "address", 41 | "name": "operator", 42 | "type": "address" 43 | }, 44 | { 45 | "indexed": false, 46 | "internalType": "bool", 47 | "name": "approved", 48 | "type": "bool" 49 | } 50 | ], 51 | "name": "ApprovalForAll", 52 | "type": "event" 53 | }, 54 | { 55 | "anonymous": false, 56 | "inputs": [ 57 | { 58 | "indexed": true, 59 | "internalType": "address", 60 | "name": "from", 61 | "type": "address" 62 | }, 63 | { 64 | "indexed": true, 65 | "internalType": "address", 66 | "name": "to", 67 | "type": "address" 68 | }, 69 | { 70 | "indexed": true, 71 | "internalType": "uint256", 72 | "name": "tokenId", 73 | "type": "uint256" 74 | } 75 | ], 76 | "name": "Transfer", 77 | "type": "event" 78 | }, 79 | { 80 | "inputs": [ 81 | { 82 | "internalType": "address", 83 | "name": "to", 84 | "type": "address" 85 | }, 86 | { 87 | "internalType": "uint256", 88 | "name": "tokenId", 89 | "type": "uint256" 90 | } 91 | ], 92 | "name": "approve", 93 | "outputs": [], 94 | "stateMutability": "nonpayable", 95 | "type": "function" 96 | }, 97 | { 98 | "inputs": [ 99 | { 100 | "internalType": "address", 101 | "name": "owner", 102 | "type": "address" 103 | } 104 | ], 105 | "name": "balanceOf", 106 | "outputs": [ 107 | { 108 | "internalType": "uint256", 109 | "name": "balance", 110 | "type": "uint256" 111 | } 112 | ], 113 | "stateMutability": "view", 114 | "type": "function" 115 | }, 116 | { 117 | "inputs": [ 118 | { 119 | "internalType": "uint256", 120 | "name": "tokenId", 121 | "type": "uint256" 122 | } 123 | ], 124 | "name": "getApproved", 125 | "outputs": [ 126 | { 127 | "internalType": "address", 128 | "name": "operator", 129 | "type": "address" 130 | } 131 | ], 132 | "stateMutability": "view", 133 | "type": "function" 134 | }, 135 | { 136 | "inputs": [ 137 | { 138 | "internalType": "address", 139 | "name": "owner", 140 | "type": "address" 141 | }, 142 | { 143 | "internalType": "address", 144 | "name": "operator", 145 | "type": "address" 146 | } 147 | ], 148 | "name": "isApprovedForAll", 149 | "outputs": [ 150 | { 151 | "internalType": "bool", 152 | "name": "", 153 | "type": "bool" 154 | } 155 | ], 156 | "stateMutability": "view", 157 | "type": "function" 158 | }, 159 | { 160 | "inputs": [ 161 | { 162 | "internalType": "uint256", 163 | "name": "tokenId", 164 | "type": "uint256" 165 | } 166 | ], 167 | "name": "ownerOf", 168 | "outputs": [ 169 | { 170 | "internalType": "address", 171 | "name": "owner", 172 | "type": "address" 173 | } 174 | ], 175 | "stateMutability": "view", 176 | "type": "function" 177 | }, 178 | { 179 | "inputs": [ 180 | { 181 | "internalType": "address", 182 | "name": "from", 183 | "type": "address" 184 | }, 185 | { 186 | "internalType": "address", 187 | "name": "to", 188 | "type": "address" 189 | }, 190 | { 191 | "internalType": "uint256", 192 | "name": "tokenId", 193 | "type": "uint256" 194 | } 195 | ], 196 | "name": "safeTransferFrom", 197 | "outputs": [], 198 | "stateMutability": "nonpayable", 199 | "type": "function" 200 | }, 201 | { 202 | "inputs": [ 203 | { 204 | "internalType": "address", 205 | "name": "from", 206 | "type": "address" 207 | }, 208 | { 209 | "internalType": "address", 210 | "name": "to", 211 | "type": "address" 212 | }, 213 | { 214 | "internalType": "uint256", 215 | "name": "tokenId", 216 | "type": "uint256" 217 | }, 218 | { 219 | "internalType": "bytes", 220 | "name": "data", 221 | "type": "bytes" 222 | } 223 | ], 224 | "name": "safeTransferFrom", 225 | "outputs": [], 226 | "stateMutability": "nonpayable", 227 | "type": "function" 228 | }, 229 | { 230 | "inputs": [ 231 | { 232 | "internalType": "address", 233 | "name": "operator", 234 | "type": "address" 235 | }, 236 | { 237 | "internalType": "bool", 238 | "name": "_approved", 239 | "type": "bool" 240 | } 241 | ], 242 | "name": "setApprovalForAll", 243 | "outputs": [], 244 | "stateMutability": "nonpayable", 245 | "type": "function" 246 | }, 247 | { 248 | "inputs": [ 249 | { 250 | "internalType": "bytes4", 251 | "name": "interfaceId", 252 | "type": "bytes4" 253 | } 254 | ], 255 | "name": "supportsInterface", 256 | "outputs": [ 257 | { 258 | "internalType": "bool", 259 | "name": "", 260 | "type": "bool" 261 | } 262 | ], 263 | "stateMutability": "view", 264 | "type": "function" 265 | }, 266 | { 267 | "inputs": [ 268 | { 269 | "internalType": "address", 270 | "name": "from", 271 | "type": "address" 272 | }, 273 | { 274 | "internalType": "address", 275 | "name": "to", 276 | "type": "address" 277 | }, 278 | { 279 | "internalType": "uint256", 280 | "name": "tokenId", 281 | "type": "uint256" 282 | } 283 | ], 284 | "name": "transferFrom", 285 | "outputs": [], 286 | "stateMutability": "nonpayable", 287 | "type": "function" 288 | }, 289 | { 290 | "inputs": [], 291 | "name": "name", 292 | "outputs": [ 293 | { 294 | "internalType": "string", 295 | "name": "", 296 | "type": "string" 297 | } 298 | ], 299 | "stateMutability": "view", 300 | "type": "function" 301 | }, 302 | { 303 | "inputs": [], 304 | "name": "symbol", 305 | "outputs": [ 306 | { 307 | "internalType": "string", 308 | "name": "", 309 | "type": "string" 310 | } 311 | ], 312 | "stateMutability": "view", 313 | "type": "function" 314 | }, 315 | { 316 | "inputs": [ 317 | { 318 | "internalType": "uint256", 319 | "name": "tokenId", 320 | "type": "uint256" 321 | } 322 | ], 323 | "name": "tokenURI", 324 | "outputs": [ 325 | { 326 | "internalType": "string", 327 | "name": "", 328 | "type": "string" 329 | } 330 | ], 331 | "stateMutability": "view", 332 | "type": "function" 333 | } 334 | ], 335 | "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"See https://eips.ethereum.org/EIPS/eip-721\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"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.\"},\"balanceOf(address)\":{\"details\":\"Returns the number of tokens in ``owner``'s account.\"},\"getApproved(uint256)\":{\"details\":\"Returns the account approved for `tokenId` token. * Requirements: * - `tokenId` must exist.\"},\"isApprovedForAll(address,address)\":{\"details\":\"Returns if the `operator` is allowed to manage all of the assets of `owner`. * See {setApprovalForAll}\"},\"name()\":{\"details\":\"Returns the token collection name.\"},\"ownerOf(uint256)\":{\"details\":\"Returns the owner of the `tokenId` token. * Requirements: * - `tokenId` must exist.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"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`, `to` cannot be zero. - `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.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"Safely transfers `tokenId` token from `from` to `to`. * Requirements: * - `from`, `to` cannot be zero. - `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.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"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.\"},\"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.\"},\"symbol()\":{\"details\":\"Returns the token collection symbol.\"},\"tokenURI(uint256)\":{\"details\":\"Returns the Uniform Resource Identifier (URI) for `tokenId` token.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Transfers `tokenId` token from `from` to `to`. * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * Requirements: * - `from`, `to` cannot be zero. - `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.\"}},\"title\":\"ERC-721 Non-Fungible Token Standard, optional metadata extension\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":\"IERC721Metadata\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0x9175561c374ec1fc33045e5dfdde2057e63e00debf432875f9e1e3395d99c149\",\"urls\":[\"bzz-raw://b0167043c1938b56904deaa481a73041aa4a9e054c60db0b0dfbebfe7869c06a\",\"dweb:/ipfs/QmUoYjhymBr6WUpExKgRvKxXD5fcdpQEe1o9ResKZu6CC5\"]},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x708f339ccc3e9d164ec61bb0db7d4c224161a3bca52413c8bbeddb114154e52b\",\"urls\":[\"bzz-raw://1462c089d30cd75f9ce18c39a26f41adcb74e4a14d2cb9f5c8bcb0a8631fa660\",\"dweb:/ipfs/QmP9hGNkYTpRazqXnQoSyiUiL8DJr3Y8nX9Wcg7SukNMUf\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"keccak256\":\"0x435bd9ac283c6678ac71c809bae5fb738ea2228b7cf8663ad111894d19f567cb\",\"urls\":[\"bzz-raw://01d79169830e56ab0980901b66d4b404db89acfafd5836903eadf0df22f8dcdd\",\"dweb:/ipfs/QmTTBj8GUZoMZ8EH7YyaV88QmD4QDg32vs2KNymdUKAoMd\"]}},\"version\":1}", 336 | "bytecode": "0x", 337 | "deployedBytecode": "0x", 338 | "sourceMap": "", 339 | "deployedSourceMap": "", 340 | "source": "pragma solidity ^0.6.2;\n\nimport \"./IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n", 341 | "sourcePath": "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol", 342 | "ast": { 343 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol", 344 | "exportedSymbols": { 345 | "IERC721Metadata": [ 346 | 1471 347 | ] 348 | }, 349 | "id": 1472, 350 | "nodeType": "SourceUnit", 351 | "nodes": [ 352 | { 353 | "id": 1450, 354 | "literals": [ 355 | "solidity", 356 | "^", 357 | "0.6", 358 | ".2" 359 | ], 360 | "nodeType": "PragmaDirective", 361 | "src": "0:23:9" 362 | }, 363 | { 364 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721.sol", 365 | "file": "./IERC721.sol", 366 | "id": 1451, 367 | "nodeType": "ImportDirective", 368 | "scope": 1472, 369 | "sourceUnit": 1422, 370 | "src": "25:23:9", 371 | "symbolAliases": [], 372 | "unitAlias": "" 373 | }, 374 | { 375 | "abstract": false, 376 | "baseContracts": [ 377 | { 378 | "arguments": null, 379 | "baseName": { 380 | "contractScope": null, 381 | "id": 1452, 382 | "name": "IERC721", 383 | "nodeType": "UserDefinedTypeName", 384 | "referencedDeclaration": 1421, 385 | "src": "213:7:9", 386 | "typeDescriptions": { 387 | "typeIdentifier": "t_contract$_IERC721_$1421", 388 | "typeString": "contract IERC721" 389 | } 390 | }, 391 | "id": 1453, 392 | "nodeType": "InheritanceSpecifier", 393 | "src": "213:7:9" 394 | } 395 | ], 396 | "contractDependencies": [ 397 | 212, 398 | 1421 399 | ], 400 | "contractKind": "interface", 401 | "documentation": "@title ERC-721 Non-Fungible Token Standard, optional metadata extension\n@dev See https://eips.ethereum.org/EIPS/eip-721", 402 | "fullyImplemented": false, 403 | "id": 1471, 404 | "linearizedBaseContracts": [ 405 | 1471, 406 | 1421, 407 | 212 408 | ], 409 | "name": "IERC721Metadata", 410 | "nodeType": "ContractDefinition", 411 | "nodes": [ 412 | { 413 | "body": null, 414 | "documentation": "@dev Returns the token collection name.", 415 | "functionSelector": "06fdde03", 416 | "id": 1458, 417 | "implemented": false, 418 | "kind": "function", 419 | "modifiers": [], 420 | "name": "name", 421 | "nodeType": "FunctionDefinition", 422 | "overrides": null, 423 | "parameters": { 424 | "id": 1454, 425 | "nodeType": "ParameterList", 426 | "parameters": [], 427 | "src": "304:2:9" 428 | }, 429 | "returnParameters": { 430 | "id": 1457, 431 | "nodeType": "ParameterList", 432 | "parameters": [ 433 | { 434 | "constant": false, 435 | "id": 1456, 436 | "name": "", 437 | "nodeType": "VariableDeclaration", 438 | "overrides": null, 439 | "scope": 1458, 440 | "src": "330:13:9", 441 | "stateVariable": false, 442 | "storageLocation": "memory", 443 | "typeDescriptions": { 444 | "typeIdentifier": "t_string_memory_ptr", 445 | "typeString": "string" 446 | }, 447 | "typeName": { 448 | "id": 1455, 449 | "name": "string", 450 | "nodeType": "ElementaryTypeName", 451 | "src": "330:6:9", 452 | "typeDescriptions": { 453 | "typeIdentifier": "t_string_storage_ptr", 454 | "typeString": "string" 455 | } 456 | }, 457 | "value": null, 458 | "visibility": "internal" 459 | } 460 | ], 461 | "src": "329:15:9" 462 | }, 463 | "scope": 1471, 464 | "src": "291:54:9", 465 | "stateMutability": "view", 466 | "virtual": false, 467 | "visibility": "external" 468 | }, 469 | { 470 | "body": null, 471 | "documentation": "@dev Returns the token collection symbol.", 472 | "functionSelector": "95d89b41", 473 | "id": 1463, 474 | "implemented": false, 475 | "kind": "function", 476 | "modifiers": [], 477 | "name": "symbol", 478 | "nodeType": "FunctionDefinition", 479 | "overrides": null, 480 | "parameters": { 481 | "id": 1459, 482 | "nodeType": "ParameterList", 483 | "parameters": [], 484 | "src": "431:2:9" 485 | }, 486 | "returnParameters": { 487 | "id": 1462, 488 | "nodeType": "ParameterList", 489 | "parameters": [ 490 | { 491 | "constant": false, 492 | "id": 1461, 493 | "name": "", 494 | "nodeType": "VariableDeclaration", 495 | "overrides": null, 496 | "scope": 1463, 497 | "src": "457:13:9", 498 | "stateVariable": false, 499 | "storageLocation": "memory", 500 | "typeDescriptions": { 501 | "typeIdentifier": "t_string_memory_ptr", 502 | "typeString": "string" 503 | }, 504 | "typeName": { 505 | "id": 1460, 506 | "name": "string", 507 | "nodeType": "ElementaryTypeName", 508 | "src": "457:6:9", 509 | "typeDescriptions": { 510 | "typeIdentifier": "t_string_storage_ptr", 511 | "typeString": "string" 512 | } 513 | }, 514 | "value": null, 515 | "visibility": "internal" 516 | } 517 | ], 518 | "src": "456:15:9" 519 | }, 520 | "scope": 1471, 521 | "src": "416:56:9", 522 | "stateMutability": "view", 523 | "virtual": false, 524 | "visibility": "external" 525 | }, 526 | { 527 | "body": null, 528 | "documentation": "@dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.", 529 | "functionSelector": "c87b56dd", 530 | "id": 1470, 531 | "implemented": false, 532 | "kind": "function", 533 | "modifiers": [], 534 | "name": "tokenURI", 535 | "nodeType": "FunctionDefinition", 536 | "overrides": null, 537 | "parameters": { 538 | "id": 1466, 539 | "nodeType": "ParameterList", 540 | "parameters": [ 541 | { 542 | "constant": false, 543 | "id": 1465, 544 | "name": "tokenId", 545 | "nodeType": "VariableDeclaration", 546 | "overrides": null, 547 | "scope": 1470, 548 | "src": "591:15:9", 549 | "stateVariable": false, 550 | "storageLocation": "default", 551 | "typeDescriptions": { 552 | "typeIdentifier": "t_uint256", 553 | "typeString": "uint256" 554 | }, 555 | "typeName": { 556 | "id": 1464, 557 | "name": "uint256", 558 | "nodeType": "ElementaryTypeName", 559 | "src": "591:7:9", 560 | "typeDescriptions": { 561 | "typeIdentifier": "t_uint256", 562 | "typeString": "uint256" 563 | } 564 | }, 565 | "value": null, 566 | "visibility": "internal" 567 | } 568 | ], 569 | "src": "590:17:9" 570 | }, 571 | "returnParameters": { 572 | "id": 1469, 573 | "nodeType": "ParameterList", 574 | "parameters": [ 575 | { 576 | "constant": false, 577 | "id": 1468, 578 | "name": "", 579 | "nodeType": "VariableDeclaration", 580 | "overrides": null, 581 | "scope": 1470, 582 | "src": "631:13:9", 583 | "stateVariable": false, 584 | "storageLocation": "memory", 585 | "typeDescriptions": { 586 | "typeIdentifier": "t_string_memory_ptr", 587 | "typeString": "string" 588 | }, 589 | "typeName": { 590 | "id": 1467, 591 | "name": "string", 592 | "nodeType": "ElementaryTypeName", 593 | "src": "631:6:9", 594 | "typeDescriptions": { 595 | "typeIdentifier": "t_string_storage_ptr", 596 | "typeString": "string" 597 | } 598 | }, 599 | "value": null, 600 | "visibility": "internal" 601 | } 602 | ], 603 | "src": "630:15:9" 604 | }, 605 | "scope": 1471, 606 | "src": "573:73:9", 607 | "stateMutability": "view", 608 | "virtual": false, 609 | "visibility": "external" 610 | } 611 | ], 612 | "scope": 1472, 613 | "src": "184:464:9" 614 | } 615 | ], 616 | "src": "0:649:9" 617 | }, 618 | "legacyAST": { 619 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol", 620 | "exportedSymbols": { 621 | "IERC721Metadata": [ 622 | 1471 623 | ] 624 | }, 625 | "id": 1472, 626 | "nodeType": "SourceUnit", 627 | "nodes": [ 628 | { 629 | "id": 1450, 630 | "literals": [ 631 | "solidity", 632 | "^", 633 | "0.6", 634 | ".2" 635 | ], 636 | "nodeType": "PragmaDirective", 637 | "src": "0:23:9" 638 | }, 639 | { 640 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721.sol", 641 | "file": "./IERC721.sol", 642 | "id": 1451, 643 | "nodeType": "ImportDirective", 644 | "scope": 1472, 645 | "sourceUnit": 1422, 646 | "src": "25:23:9", 647 | "symbolAliases": [], 648 | "unitAlias": "" 649 | }, 650 | { 651 | "abstract": false, 652 | "baseContracts": [ 653 | { 654 | "arguments": null, 655 | "baseName": { 656 | "contractScope": null, 657 | "id": 1452, 658 | "name": "IERC721", 659 | "nodeType": "UserDefinedTypeName", 660 | "referencedDeclaration": 1421, 661 | "src": "213:7:9", 662 | "typeDescriptions": { 663 | "typeIdentifier": "t_contract$_IERC721_$1421", 664 | "typeString": "contract IERC721" 665 | } 666 | }, 667 | "id": 1453, 668 | "nodeType": "InheritanceSpecifier", 669 | "src": "213:7:9" 670 | } 671 | ], 672 | "contractDependencies": [ 673 | 212, 674 | 1421 675 | ], 676 | "contractKind": "interface", 677 | "documentation": "@title ERC-721 Non-Fungible Token Standard, optional metadata extension\n@dev See https://eips.ethereum.org/EIPS/eip-721", 678 | "fullyImplemented": false, 679 | "id": 1471, 680 | "linearizedBaseContracts": [ 681 | 1471, 682 | 1421, 683 | 212 684 | ], 685 | "name": "IERC721Metadata", 686 | "nodeType": "ContractDefinition", 687 | "nodes": [ 688 | { 689 | "body": null, 690 | "documentation": "@dev Returns the token collection name.", 691 | "functionSelector": "06fdde03", 692 | "id": 1458, 693 | "implemented": false, 694 | "kind": "function", 695 | "modifiers": [], 696 | "name": "name", 697 | "nodeType": "FunctionDefinition", 698 | "overrides": null, 699 | "parameters": { 700 | "id": 1454, 701 | "nodeType": "ParameterList", 702 | "parameters": [], 703 | "src": "304:2:9" 704 | }, 705 | "returnParameters": { 706 | "id": 1457, 707 | "nodeType": "ParameterList", 708 | "parameters": [ 709 | { 710 | "constant": false, 711 | "id": 1456, 712 | "name": "", 713 | "nodeType": "VariableDeclaration", 714 | "overrides": null, 715 | "scope": 1458, 716 | "src": "330:13:9", 717 | "stateVariable": false, 718 | "storageLocation": "memory", 719 | "typeDescriptions": { 720 | "typeIdentifier": "t_string_memory_ptr", 721 | "typeString": "string" 722 | }, 723 | "typeName": { 724 | "id": 1455, 725 | "name": "string", 726 | "nodeType": "ElementaryTypeName", 727 | "src": "330:6:9", 728 | "typeDescriptions": { 729 | "typeIdentifier": "t_string_storage_ptr", 730 | "typeString": "string" 731 | } 732 | }, 733 | "value": null, 734 | "visibility": "internal" 735 | } 736 | ], 737 | "src": "329:15:9" 738 | }, 739 | "scope": 1471, 740 | "src": "291:54:9", 741 | "stateMutability": "view", 742 | "virtual": false, 743 | "visibility": "external" 744 | }, 745 | { 746 | "body": null, 747 | "documentation": "@dev Returns the token collection symbol.", 748 | "functionSelector": "95d89b41", 749 | "id": 1463, 750 | "implemented": false, 751 | "kind": "function", 752 | "modifiers": [], 753 | "name": "symbol", 754 | "nodeType": "FunctionDefinition", 755 | "overrides": null, 756 | "parameters": { 757 | "id": 1459, 758 | "nodeType": "ParameterList", 759 | "parameters": [], 760 | "src": "431:2:9" 761 | }, 762 | "returnParameters": { 763 | "id": 1462, 764 | "nodeType": "ParameterList", 765 | "parameters": [ 766 | { 767 | "constant": false, 768 | "id": 1461, 769 | "name": "", 770 | "nodeType": "VariableDeclaration", 771 | "overrides": null, 772 | "scope": 1463, 773 | "src": "457:13:9", 774 | "stateVariable": false, 775 | "storageLocation": "memory", 776 | "typeDescriptions": { 777 | "typeIdentifier": "t_string_memory_ptr", 778 | "typeString": "string" 779 | }, 780 | "typeName": { 781 | "id": 1460, 782 | "name": "string", 783 | "nodeType": "ElementaryTypeName", 784 | "src": "457:6:9", 785 | "typeDescriptions": { 786 | "typeIdentifier": "t_string_storage_ptr", 787 | "typeString": "string" 788 | } 789 | }, 790 | "value": null, 791 | "visibility": "internal" 792 | } 793 | ], 794 | "src": "456:15:9" 795 | }, 796 | "scope": 1471, 797 | "src": "416:56:9", 798 | "stateMutability": "view", 799 | "virtual": false, 800 | "visibility": "external" 801 | }, 802 | { 803 | "body": null, 804 | "documentation": "@dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.", 805 | "functionSelector": "c87b56dd", 806 | "id": 1470, 807 | "implemented": false, 808 | "kind": "function", 809 | "modifiers": [], 810 | "name": "tokenURI", 811 | "nodeType": "FunctionDefinition", 812 | "overrides": null, 813 | "parameters": { 814 | "id": 1466, 815 | "nodeType": "ParameterList", 816 | "parameters": [ 817 | { 818 | "constant": false, 819 | "id": 1465, 820 | "name": "tokenId", 821 | "nodeType": "VariableDeclaration", 822 | "overrides": null, 823 | "scope": 1470, 824 | "src": "591:15:9", 825 | "stateVariable": false, 826 | "storageLocation": "default", 827 | "typeDescriptions": { 828 | "typeIdentifier": "t_uint256", 829 | "typeString": "uint256" 830 | }, 831 | "typeName": { 832 | "id": 1464, 833 | "name": "uint256", 834 | "nodeType": "ElementaryTypeName", 835 | "src": "591:7:9", 836 | "typeDescriptions": { 837 | "typeIdentifier": "t_uint256", 838 | "typeString": "uint256" 839 | } 840 | }, 841 | "value": null, 842 | "visibility": "internal" 843 | } 844 | ], 845 | "src": "590:17:9" 846 | }, 847 | "returnParameters": { 848 | "id": 1469, 849 | "nodeType": "ParameterList", 850 | "parameters": [ 851 | { 852 | "constant": false, 853 | "id": 1468, 854 | "name": "", 855 | "nodeType": "VariableDeclaration", 856 | "overrides": null, 857 | "scope": 1470, 858 | "src": "631:13:9", 859 | "stateVariable": false, 860 | "storageLocation": "memory", 861 | "typeDescriptions": { 862 | "typeIdentifier": "t_string_memory_ptr", 863 | "typeString": "string" 864 | }, 865 | "typeName": { 866 | "id": 1467, 867 | "name": "string", 868 | "nodeType": "ElementaryTypeName", 869 | "src": "631:6:9", 870 | "typeDescriptions": { 871 | "typeIdentifier": "t_string_storage_ptr", 872 | "typeString": "string" 873 | } 874 | }, 875 | "value": null, 876 | "visibility": "internal" 877 | } 878 | ], 879 | "src": "630:15:9" 880 | }, 881 | "scope": 1471, 882 | "src": "573:73:9", 883 | "stateMutability": "view", 884 | "virtual": false, 885 | "visibility": "external" 886 | } 887 | ], 888 | "scope": 1472, 889 | "src": "184:464:9" 890 | } 891 | ], 892 | "src": "0:649:9" 893 | }, 894 | "compiler": { 895 | "name": "solc", 896 | "version": "0.6.2+commit.bacdbe57.Emscripten.clang" 897 | }, 898 | "networks": {}, 899 | "schemaVersion": "3.1.0", 900 | "updatedAt": "2020-05-16T12:08:04.858Z", 901 | "devdoc": { 902 | "details": "See https://eips.ethereum.org/EIPS/eip-721", 903 | "methods": { 904 | "approve(address,uint256)": { 905 | "details": "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." 906 | }, 907 | "balanceOf(address)": { 908 | "details": "Returns the number of tokens in ``owner``'s account." 909 | }, 910 | "getApproved(uint256)": { 911 | "details": "Returns the account approved for `tokenId` token. * Requirements: * - `tokenId` must exist." 912 | }, 913 | "isApprovedForAll(address,address)": { 914 | "details": "Returns if the `operator` is allowed to manage all of the assets of `owner`. * See {setApprovalForAll}" 915 | }, 916 | "name()": { 917 | "details": "Returns the token collection name." 918 | }, 919 | "ownerOf(uint256)": { 920 | "details": "Returns the owner of the `tokenId` token. * Requirements: * - `tokenId` must exist." 921 | }, 922 | "safeTransferFrom(address,address,uint256)": { 923 | "details": "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`, `to` cannot be zero. - `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." 924 | }, 925 | "safeTransferFrom(address,address,uint256,bytes)": { 926 | "details": "Safely transfers `tokenId` token from `from` to `to`. * Requirements: * - `from`, `to` cannot be zero. - `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." 927 | }, 928 | "setApprovalForAll(address,bool)": { 929 | "details": "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." 930 | }, 931 | "supportsInterface(bytes4)": { 932 | "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." 933 | }, 934 | "symbol()": { 935 | "details": "Returns the token collection symbol." 936 | }, 937 | "tokenURI(uint256)": { 938 | "details": "Returns the Uniform Resource Identifier (URI) for `tokenId` token." 939 | }, 940 | "transferFrom(address,address,uint256)": { 941 | "details": "Transfers `tokenId` token from `from` to `to`. * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * Requirements: * - `from`, `to` cannot be zero. - `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." 942 | } 943 | }, 944 | "title": "ERC-721 Non-Fungible Token Standard, optional metadata extension" 945 | }, 946 | "userdoc": { 947 | "methods": {} 948 | } 949 | } -------------------------------------------------------------------------------- /app/src/contracts/IERC721Enumerable.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "IERC721Enumerable", 3 | "abi": [ 4 | { 5 | "anonymous": false, 6 | "inputs": [ 7 | { 8 | "indexed": true, 9 | "internalType": "address", 10 | "name": "owner", 11 | "type": "address" 12 | }, 13 | { 14 | "indexed": true, 15 | "internalType": "address", 16 | "name": "approved", 17 | "type": "address" 18 | }, 19 | { 20 | "indexed": true, 21 | "internalType": "uint256", 22 | "name": "tokenId", 23 | "type": "uint256" 24 | } 25 | ], 26 | "name": "Approval", 27 | "type": "event" 28 | }, 29 | { 30 | "anonymous": false, 31 | "inputs": [ 32 | { 33 | "indexed": true, 34 | "internalType": "address", 35 | "name": "owner", 36 | "type": "address" 37 | }, 38 | { 39 | "indexed": true, 40 | "internalType": "address", 41 | "name": "operator", 42 | "type": "address" 43 | }, 44 | { 45 | "indexed": false, 46 | "internalType": "bool", 47 | "name": "approved", 48 | "type": "bool" 49 | } 50 | ], 51 | "name": "ApprovalForAll", 52 | "type": "event" 53 | }, 54 | { 55 | "anonymous": false, 56 | "inputs": [ 57 | { 58 | "indexed": true, 59 | "internalType": "address", 60 | "name": "from", 61 | "type": "address" 62 | }, 63 | { 64 | "indexed": true, 65 | "internalType": "address", 66 | "name": "to", 67 | "type": "address" 68 | }, 69 | { 70 | "indexed": true, 71 | "internalType": "uint256", 72 | "name": "tokenId", 73 | "type": "uint256" 74 | } 75 | ], 76 | "name": "Transfer", 77 | "type": "event" 78 | }, 79 | { 80 | "inputs": [ 81 | { 82 | "internalType": "address", 83 | "name": "to", 84 | "type": "address" 85 | }, 86 | { 87 | "internalType": "uint256", 88 | "name": "tokenId", 89 | "type": "uint256" 90 | } 91 | ], 92 | "name": "approve", 93 | "outputs": [], 94 | "stateMutability": "nonpayable", 95 | "type": "function" 96 | }, 97 | { 98 | "inputs": [ 99 | { 100 | "internalType": "address", 101 | "name": "owner", 102 | "type": "address" 103 | } 104 | ], 105 | "name": "balanceOf", 106 | "outputs": [ 107 | { 108 | "internalType": "uint256", 109 | "name": "balance", 110 | "type": "uint256" 111 | } 112 | ], 113 | "stateMutability": "view", 114 | "type": "function" 115 | }, 116 | { 117 | "inputs": [ 118 | { 119 | "internalType": "uint256", 120 | "name": "tokenId", 121 | "type": "uint256" 122 | } 123 | ], 124 | "name": "getApproved", 125 | "outputs": [ 126 | { 127 | "internalType": "address", 128 | "name": "operator", 129 | "type": "address" 130 | } 131 | ], 132 | "stateMutability": "view", 133 | "type": "function" 134 | }, 135 | { 136 | "inputs": [ 137 | { 138 | "internalType": "address", 139 | "name": "owner", 140 | "type": "address" 141 | }, 142 | { 143 | "internalType": "address", 144 | "name": "operator", 145 | "type": "address" 146 | } 147 | ], 148 | "name": "isApprovedForAll", 149 | "outputs": [ 150 | { 151 | "internalType": "bool", 152 | "name": "", 153 | "type": "bool" 154 | } 155 | ], 156 | "stateMutability": "view", 157 | "type": "function" 158 | }, 159 | { 160 | "inputs": [ 161 | { 162 | "internalType": "uint256", 163 | "name": "tokenId", 164 | "type": "uint256" 165 | } 166 | ], 167 | "name": "ownerOf", 168 | "outputs": [ 169 | { 170 | "internalType": "address", 171 | "name": "owner", 172 | "type": "address" 173 | } 174 | ], 175 | "stateMutability": "view", 176 | "type": "function" 177 | }, 178 | { 179 | "inputs": [ 180 | { 181 | "internalType": "address", 182 | "name": "from", 183 | "type": "address" 184 | }, 185 | { 186 | "internalType": "address", 187 | "name": "to", 188 | "type": "address" 189 | }, 190 | { 191 | "internalType": "uint256", 192 | "name": "tokenId", 193 | "type": "uint256" 194 | } 195 | ], 196 | "name": "safeTransferFrom", 197 | "outputs": [], 198 | "stateMutability": "nonpayable", 199 | "type": "function" 200 | }, 201 | { 202 | "inputs": [ 203 | { 204 | "internalType": "address", 205 | "name": "from", 206 | "type": "address" 207 | }, 208 | { 209 | "internalType": "address", 210 | "name": "to", 211 | "type": "address" 212 | }, 213 | { 214 | "internalType": "uint256", 215 | "name": "tokenId", 216 | "type": "uint256" 217 | }, 218 | { 219 | "internalType": "bytes", 220 | "name": "data", 221 | "type": "bytes" 222 | } 223 | ], 224 | "name": "safeTransferFrom", 225 | "outputs": [], 226 | "stateMutability": "nonpayable", 227 | "type": "function" 228 | }, 229 | { 230 | "inputs": [ 231 | { 232 | "internalType": "address", 233 | "name": "operator", 234 | "type": "address" 235 | }, 236 | { 237 | "internalType": "bool", 238 | "name": "_approved", 239 | "type": "bool" 240 | } 241 | ], 242 | "name": "setApprovalForAll", 243 | "outputs": [], 244 | "stateMutability": "nonpayable", 245 | "type": "function" 246 | }, 247 | { 248 | "inputs": [ 249 | { 250 | "internalType": "bytes4", 251 | "name": "interfaceId", 252 | "type": "bytes4" 253 | } 254 | ], 255 | "name": "supportsInterface", 256 | "outputs": [ 257 | { 258 | "internalType": "bool", 259 | "name": "", 260 | "type": "bool" 261 | } 262 | ], 263 | "stateMutability": "view", 264 | "type": "function" 265 | }, 266 | { 267 | "inputs": [ 268 | { 269 | "internalType": "address", 270 | "name": "from", 271 | "type": "address" 272 | }, 273 | { 274 | "internalType": "address", 275 | "name": "to", 276 | "type": "address" 277 | }, 278 | { 279 | "internalType": "uint256", 280 | "name": "tokenId", 281 | "type": "uint256" 282 | } 283 | ], 284 | "name": "transferFrom", 285 | "outputs": [], 286 | "stateMutability": "nonpayable", 287 | "type": "function" 288 | }, 289 | { 290 | "inputs": [], 291 | "name": "totalSupply", 292 | "outputs": [ 293 | { 294 | "internalType": "uint256", 295 | "name": "", 296 | "type": "uint256" 297 | } 298 | ], 299 | "stateMutability": "view", 300 | "type": "function" 301 | }, 302 | { 303 | "inputs": [ 304 | { 305 | "internalType": "address", 306 | "name": "owner", 307 | "type": "address" 308 | }, 309 | { 310 | "internalType": "uint256", 311 | "name": "index", 312 | "type": "uint256" 313 | } 314 | ], 315 | "name": "tokenOfOwnerByIndex", 316 | "outputs": [ 317 | { 318 | "internalType": "uint256", 319 | "name": "tokenId", 320 | "type": "uint256" 321 | } 322 | ], 323 | "stateMutability": "view", 324 | "type": "function" 325 | }, 326 | { 327 | "inputs": [ 328 | { 329 | "internalType": "uint256", 330 | "name": "index", 331 | "type": "uint256" 332 | } 333 | ], 334 | "name": "tokenByIndex", 335 | "outputs": [ 336 | { 337 | "internalType": "uint256", 338 | "name": "", 339 | "type": "uint256" 340 | } 341 | ], 342 | "stateMutability": "view", 343 | "type": "function" 344 | } 345 | ], 346 | "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"See https://eips.ethereum.org/EIPS/eip-721\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"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.\"},\"balanceOf(address)\":{\"details\":\"Returns the number of tokens in ``owner``'s account.\"},\"getApproved(uint256)\":{\"details\":\"Returns the account approved for `tokenId` token. * Requirements: * - `tokenId` must exist.\"},\"isApprovedForAll(address,address)\":{\"details\":\"Returns if the `operator` is allowed to manage all of the assets of `owner`. * See {setApprovalForAll}\"},\"ownerOf(uint256)\":{\"details\":\"Returns the owner of the `tokenId` token. * Requirements: * - `tokenId` must exist.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"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`, `to` cannot be zero. - `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.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"Safely transfers `tokenId` token from `from` to `to`. * Requirements: * - `from`, `to` cannot be zero. - `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.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"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.\"},\"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.\"},\"tokenByIndex(uint256)\":{\"details\":\"Returns a token ID at a given `index` of all the tokens stored by the contract. Use along with {totalSupply} to enumerate all tokens.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"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.\"},\"totalSupply()\":{\"details\":\"Returns the total amount of tokens stored by the contract.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Transfers `tokenId` token from `from` to `to`. * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * Requirements: * - `from`, `to` cannot be zero. - `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.\"}},\"title\":\"ERC-721 Non-Fungible Token Standard, optional enumeration extension\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":\"IERC721Enumerable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0x9175561c374ec1fc33045e5dfdde2057e63e00debf432875f9e1e3395d99c149\",\"urls\":[\"bzz-raw://b0167043c1938b56904deaa481a73041aa4a9e054c60db0b0dfbebfe7869c06a\",\"dweb:/ipfs/QmUoYjhymBr6WUpExKgRvKxXD5fcdpQEe1o9ResKZu6CC5\"]},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x708f339ccc3e9d164ec61bb0db7d4c224161a3bca52413c8bbeddb114154e52b\",\"urls\":[\"bzz-raw://1462c089d30cd75f9ce18c39a26f41adcb74e4a14d2cb9f5c8bcb0a8631fa660\",\"dweb:/ipfs/QmP9hGNkYTpRazqXnQoSyiUiL8DJr3Y8nX9Wcg7SukNMUf\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"keccak256\":\"0x09bbc2d7d73986e6e645d0dd65cd16f41248e5cc991f06d42db2946b5f2e3786\",\"urls\":[\"bzz-raw://4f5f3ca771fe28f1bd7de5521bb2ef23b7fadb681b0b0a7ed13d0e2772a1d945\",\"dweb:/ipfs/QmSbLtedzXRjruuhQjx7AXjpg5CGC98g1TBKaVUf1nU38a\"]}},\"version\":1}", 347 | "bytecode": "0x", 348 | "deployedBytecode": "0x", 349 | "sourceMap": "", 350 | "deployedSourceMap": "", 351 | "source": "pragma solidity ^0.6.2;\n\nimport \"./IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n", 352 | "sourcePath": "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol", 353 | "ast": { 354 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol", 355 | "exportedSymbols": { 356 | "IERC721Enumerable": [ 357 | 1448 358 | ] 359 | }, 360 | "id": 1449, 361 | "nodeType": "SourceUnit", 362 | "nodes": [ 363 | { 364 | "id": 1423, 365 | "literals": [ 366 | "solidity", 367 | "^", 368 | "0.6", 369 | ".2" 370 | ], 371 | "nodeType": "PragmaDirective", 372 | "src": "0:23:8" 373 | }, 374 | { 375 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721.sol", 376 | "file": "./IERC721.sol", 377 | "id": 1424, 378 | "nodeType": "ImportDirective", 379 | "scope": 1449, 380 | "sourceUnit": 1422, 381 | "src": "25:23:8", 382 | "symbolAliases": [], 383 | "unitAlias": "" 384 | }, 385 | { 386 | "abstract": false, 387 | "baseContracts": [ 388 | { 389 | "arguments": null, 390 | "baseName": { 391 | "contractScope": null, 392 | "id": 1425, 393 | "name": "IERC721", 394 | "nodeType": "UserDefinedTypeName", 395 | "referencedDeclaration": 1421, 396 | "src": "218:7:8", 397 | "typeDescriptions": { 398 | "typeIdentifier": "t_contract$_IERC721_$1421", 399 | "typeString": "contract IERC721" 400 | } 401 | }, 402 | "id": 1426, 403 | "nodeType": "InheritanceSpecifier", 404 | "src": "218:7:8" 405 | } 406 | ], 407 | "contractDependencies": [ 408 | 212, 409 | 1421 410 | ], 411 | "contractKind": "interface", 412 | "documentation": "@title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n@dev See https://eips.ethereum.org/EIPS/eip-721", 413 | "fullyImplemented": false, 414 | "id": 1448, 415 | "linearizedBaseContracts": [ 416 | 1448, 417 | 1421, 418 | 212 419 | ], 420 | "name": "IERC721Enumerable", 421 | "nodeType": "ContractDefinition", 422 | "nodes": [ 423 | { 424 | "body": null, 425 | "documentation": "@dev Returns the total amount of tokens stored by the contract.", 426 | "functionSelector": "18160ddd", 427 | "id": 1431, 428 | "implemented": false, 429 | "kind": "function", 430 | "modifiers": [], 431 | "name": "totalSupply", 432 | "nodeType": "FunctionDefinition", 433 | "overrides": null, 434 | "parameters": { 435 | "id": 1427, 436 | "nodeType": "ParameterList", 437 | "parameters": [], 438 | "src": "340:2:8" 439 | }, 440 | "returnParameters": { 441 | "id": 1430, 442 | "nodeType": "ParameterList", 443 | "parameters": [ 444 | { 445 | "constant": false, 446 | "id": 1429, 447 | "name": "", 448 | "nodeType": "VariableDeclaration", 449 | "overrides": null, 450 | "scope": 1431, 451 | "src": "366:7:8", 452 | "stateVariable": false, 453 | "storageLocation": "default", 454 | "typeDescriptions": { 455 | "typeIdentifier": "t_uint256", 456 | "typeString": "uint256" 457 | }, 458 | "typeName": { 459 | "id": 1428, 460 | "name": "uint256", 461 | "nodeType": "ElementaryTypeName", 462 | "src": "366:7:8", 463 | "typeDescriptions": { 464 | "typeIdentifier": "t_uint256", 465 | "typeString": "uint256" 466 | } 467 | }, 468 | "value": null, 469 | "visibility": "internal" 470 | } 471 | ], 472 | "src": "365:9:8" 473 | }, 474 | "scope": 1448, 475 | "src": "320:55:8", 476 | "stateMutability": "view", 477 | "virtual": false, 478 | "visibility": "external" 479 | }, 480 | { 481 | "body": null, 482 | "documentation": "@dev Returns a token ID owned by `owner` at a given `index` of its token list.\nUse along with {balanceOf} to enumerate all of ``owner``'s tokens.", 483 | "functionSelector": "2f745c59", 484 | "id": 1440, 485 | "implemented": false, 486 | "kind": "function", 487 | "modifiers": [], 488 | "name": "tokenOfOwnerByIndex", 489 | "nodeType": "FunctionDefinition", 490 | "overrides": null, 491 | "parameters": { 492 | "id": 1436, 493 | "nodeType": "ParameterList", 494 | "parameters": [ 495 | { 496 | "constant": false, 497 | "id": 1433, 498 | "name": "owner", 499 | "nodeType": "VariableDeclaration", 500 | "overrides": null, 501 | "scope": 1440, 502 | "src": "586:13:8", 503 | "stateVariable": false, 504 | "storageLocation": "default", 505 | "typeDescriptions": { 506 | "typeIdentifier": "t_address", 507 | "typeString": "address" 508 | }, 509 | "typeName": { 510 | "id": 1432, 511 | "name": "address", 512 | "nodeType": "ElementaryTypeName", 513 | "src": "586:7:8", 514 | "stateMutability": "nonpayable", 515 | "typeDescriptions": { 516 | "typeIdentifier": "t_address", 517 | "typeString": "address" 518 | } 519 | }, 520 | "value": null, 521 | "visibility": "internal" 522 | }, 523 | { 524 | "constant": false, 525 | "id": 1435, 526 | "name": "index", 527 | "nodeType": "VariableDeclaration", 528 | "overrides": null, 529 | "scope": 1440, 530 | "src": "601:13:8", 531 | "stateVariable": false, 532 | "storageLocation": "default", 533 | "typeDescriptions": { 534 | "typeIdentifier": "t_uint256", 535 | "typeString": "uint256" 536 | }, 537 | "typeName": { 538 | "id": 1434, 539 | "name": "uint256", 540 | "nodeType": "ElementaryTypeName", 541 | "src": "601:7:8", 542 | "typeDescriptions": { 543 | "typeIdentifier": "t_uint256", 544 | "typeString": "uint256" 545 | } 546 | }, 547 | "value": null, 548 | "visibility": "internal" 549 | } 550 | ], 551 | "src": "585:30:8" 552 | }, 553 | "returnParameters": { 554 | "id": 1439, 555 | "nodeType": "ParameterList", 556 | "parameters": [ 557 | { 558 | "constant": false, 559 | "id": 1438, 560 | "name": "tokenId", 561 | "nodeType": "VariableDeclaration", 562 | "overrides": null, 563 | "scope": 1440, 564 | "src": "639:15:8", 565 | "stateVariable": false, 566 | "storageLocation": "default", 567 | "typeDescriptions": { 568 | "typeIdentifier": "t_uint256", 569 | "typeString": "uint256" 570 | }, 571 | "typeName": { 572 | "id": 1437, 573 | "name": "uint256", 574 | "nodeType": "ElementaryTypeName", 575 | "src": "639:7:8", 576 | "typeDescriptions": { 577 | "typeIdentifier": "t_uint256", 578 | "typeString": "uint256" 579 | } 580 | }, 581 | "value": null, 582 | "visibility": "internal" 583 | } 584 | ], 585 | "src": "638:17:8" 586 | }, 587 | "scope": 1448, 588 | "src": "557:99:8", 589 | "stateMutability": "view", 590 | "virtual": false, 591 | "visibility": "external" 592 | }, 593 | { 594 | "body": null, 595 | "documentation": "@dev Returns a token ID at a given `index` of all the tokens stored by the contract.\nUse along with {totalSupply} to enumerate all tokens.", 596 | "functionSelector": "4f6ccce7", 597 | "id": 1447, 598 | "implemented": false, 599 | "kind": "function", 600 | "modifiers": [], 601 | "name": "tokenByIndex", 602 | "nodeType": "FunctionDefinition", 603 | "overrides": null, 604 | "parameters": { 605 | "id": 1443, 606 | "nodeType": "ParameterList", 607 | "parameters": [ 608 | { 609 | "constant": false, 610 | "id": 1442, 611 | "name": "index", 612 | "nodeType": "VariableDeclaration", 613 | "overrides": null, 614 | "scope": 1447, 615 | "src": "853:13:8", 616 | "stateVariable": false, 617 | "storageLocation": "default", 618 | "typeDescriptions": { 619 | "typeIdentifier": "t_uint256", 620 | "typeString": "uint256" 621 | }, 622 | "typeName": { 623 | "id": 1441, 624 | "name": "uint256", 625 | "nodeType": "ElementaryTypeName", 626 | "src": "853:7:8", 627 | "typeDescriptions": { 628 | "typeIdentifier": "t_uint256", 629 | "typeString": "uint256" 630 | } 631 | }, 632 | "value": null, 633 | "visibility": "internal" 634 | } 635 | ], 636 | "src": "852:15:8" 637 | }, 638 | "returnParameters": { 639 | "id": 1446, 640 | "nodeType": "ParameterList", 641 | "parameters": [ 642 | { 643 | "constant": false, 644 | "id": 1445, 645 | "name": "", 646 | "nodeType": "VariableDeclaration", 647 | "overrides": null, 648 | "scope": 1447, 649 | "src": "891:7:8", 650 | "stateVariable": false, 651 | "storageLocation": "default", 652 | "typeDescriptions": { 653 | "typeIdentifier": "t_uint256", 654 | "typeString": "uint256" 655 | }, 656 | "typeName": { 657 | "id": 1444, 658 | "name": "uint256", 659 | "nodeType": "ElementaryTypeName", 660 | "src": "891:7:8", 661 | "typeDescriptions": { 662 | "typeIdentifier": "t_uint256", 663 | "typeString": "uint256" 664 | } 665 | }, 666 | "value": null, 667 | "visibility": "internal" 668 | } 669 | ], 670 | "src": "890:9:8" 671 | }, 672 | "scope": 1448, 673 | "src": "831:69:8", 674 | "stateMutability": "view", 675 | "virtual": false, 676 | "visibility": "external" 677 | } 678 | ], 679 | "scope": 1449, 680 | "src": "187:715:8" 681 | } 682 | ], 683 | "src": "0:903:8" 684 | }, 685 | "legacyAST": { 686 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol", 687 | "exportedSymbols": { 688 | "IERC721Enumerable": [ 689 | 1448 690 | ] 691 | }, 692 | "id": 1449, 693 | "nodeType": "SourceUnit", 694 | "nodes": [ 695 | { 696 | "id": 1423, 697 | "literals": [ 698 | "solidity", 699 | "^", 700 | "0.6", 701 | ".2" 702 | ], 703 | "nodeType": "PragmaDirective", 704 | "src": "0:23:8" 705 | }, 706 | { 707 | "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721.sol", 708 | "file": "./IERC721.sol", 709 | "id": 1424, 710 | "nodeType": "ImportDirective", 711 | "scope": 1449, 712 | "sourceUnit": 1422, 713 | "src": "25:23:8", 714 | "symbolAliases": [], 715 | "unitAlias": "" 716 | }, 717 | { 718 | "abstract": false, 719 | "baseContracts": [ 720 | { 721 | "arguments": null, 722 | "baseName": { 723 | "contractScope": null, 724 | "id": 1425, 725 | "name": "IERC721", 726 | "nodeType": "UserDefinedTypeName", 727 | "referencedDeclaration": 1421, 728 | "src": "218:7:8", 729 | "typeDescriptions": { 730 | "typeIdentifier": "t_contract$_IERC721_$1421", 731 | "typeString": "contract IERC721" 732 | } 733 | }, 734 | "id": 1426, 735 | "nodeType": "InheritanceSpecifier", 736 | "src": "218:7:8" 737 | } 738 | ], 739 | "contractDependencies": [ 740 | 212, 741 | 1421 742 | ], 743 | "contractKind": "interface", 744 | "documentation": "@title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n@dev See https://eips.ethereum.org/EIPS/eip-721", 745 | "fullyImplemented": false, 746 | "id": 1448, 747 | "linearizedBaseContracts": [ 748 | 1448, 749 | 1421, 750 | 212 751 | ], 752 | "name": "IERC721Enumerable", 753 | "nodeType": "ContractDefinition", 754 | "nodes": [ 755 | { 756 | "body": null, 757 | "documentation": "@dev Returns the total amount of tokens stored by the contract.", 758 | "functionSelector": "18160ddd", 759 | "id": 1431, 760 | "implemented": false, 761 | "kind": "function", 762 | "modifiers": [], 763 | "name": "totalSupply", 764 | "nodeType": "FunctionDefinition", 765 | "overrides": null, 766 | "parameters": { 767 | "id": 1427, 768 | "nodeType": "ParameterList", 769 | "parameters": [], 770 | "src": "340:2:8" 771 | }, 772 | "returnParameters": { 773 | "id": 1430, 774 | "nodeType": "ParameterList", 775 | "parameters": [ 776 | { 777 | "constant": false, 778 | "id": 1429, 779 | "name": "", 780 | "nodeType": "VariableDeclaration", 781 | "overrides": null, 782 | "scope": 1431, 783 | "src": "366:7:8", 784 | "stateVariable": false, 785 | "storageLocation": "default", 786 | "typeDescriptions": { 787 | "typeIdentifier": "t_uint256", 788 | "typeString": "uint256" 789 | }, 790 | "typeName": { 791 | "id": 1428, 792 | "name": "uint256", 793 | "nodeType": "ElementaryTypeName", 794 | "src": "366:7:8", 795 | "typeDescriptions": { 796 | "typeIdentifier": "t_uint256", 797 | "typeString": "uint256" 798 | } 799 | }, 800 | "value": null, 801 | "visibility": "internal" 802 | } 803 | ], 804 | "src": "365:9:8" 805 | }, 806 | "scope": 1448, 807 | "src": "320:55:8", 808 | "stateMutability": "view", 809 | "virtual": false, 810 | "visibility": "external" 811 | }, 812 | { 813 | "body": null, 814 | "documentation": "@dev Returns a token ID owned by `owner` at a given `index` of its token list.\nUse along with {balanceOf} to enumerate all of ``owner``'s tokens.", 815 | "functionSelector": "2f745c59", 816 | "id": 1440, 817 | "implemented": false, 818 | "kind": "function", 819 | "modifiers": [], 820 | "name": "tokenOfOwnerByIndex", 821 | "nodeType": "FunctionDefinition", 822 | "overrides": null, 823 | "parameters": { 824 | "id": 1436, 825 | "nodeType": "ParameterList", 826 | "parameters": [ 827 | { 828 | "constant": false, 829 | "id": 1433, 830 | "name": "owner", 831 | "nodeType": "VariableDeclaration", 832 | "overrides": null, 833 | "scope": 1440, 834 | "src": "586:13:8", 835 | "stateVariable": false, 836 | "storageLocation": "default", 837 | "typeDescriptions": { 838 | "typeIdentifier": "t_address", 839 | "typeString": "address" 840 | }, 841 | "typeName": { 842 | "id": 1432, 843 | "name": "address", 844 | "nodeType": "ElementaryTypeName", 845 | "src": "586:7:8", 846 | "stateMutability": "nonpayable", 847 | "typeDescriptions": { 848 | "typeIdentifier": "t_address", 849 | "typeString": "address" 850 | } 851 | }, 852 | "value": null, 853 | "visibility": "internal" 854 | }, 855 | { 856 | "constant": false, 857 | "id": 1435, 858 | "name": "index", 859 | "nodeType": "VariableDeclaration", 860 | "overrides": null, 861 | "scope": 1440, 862 | "src": "601:13:8", 863 | "stateVariable": false, 864 | "storageLocation": "default", 865 | "typeDescriptions": { 866 | "typeIdentifier": "t_uint256", 867 | "typeString": "uint256" 868 | }, 869 | "typeName": { 870 | "id": 1434, 871 | "name": "uint256", 872 | "nodeType": "ElementaryTypeName", 873 | "src": "601:7:8", 874 | "typeDescriptions": { 875 | "typeIdentifier": "t_uint256", 876 | "typeString": "uint256" 877 | } 878 | }, 879 | "value": null, 880 | "visibility": "internal" 881 | } 882 | ], 883 | "src": "585:30:8" 884 | }, 885 | "returnParameters": { 886 | "id": 1439, 887 | "nodeType": "ParameterList", 888 | "parameters": [ 889 | { 890 | "constant": false, 891 | "id": 1438, 892 | "name": "tokenId", 893 | "nodeType": "VariableDeclaration", 894 | "overrides": null, 895 | "scope": 1440, 896 | "src": "639:15:8", 897 | "stateVariable": false, 898 | "storageLocation": "default", 899 | "typeDescriptions": { 900 | "typeIdentifier": "t_uint256", 901 | "typeString": "uint256" 902 | }, 903 | "typeName": { 904 | "id": 1437, 905 | "name": "uint256", 906 | "nodeType": "ElementaryTypeName", 907 | "src": "639:7:8", 908 | "typeDescriptions": { 909 | "typeIdentifier": "t_uint256", 910 | "typeString": "uint256" 911 | } 912 | }, 913 | "value": null, 914 | "visibility": "internal" 915 | } 916 | ], 917 | "src": "638:17:8" 918 | }, 919 | "scope": 1448, 920 | "src": "557:99:8", 921 | "stateMutability": "view", 922 | "virtual": false, 923 | "visibility": "external" 924 | }, 925 | { 926 | "body": null, 927 | "documentation": "@dev Returns a token ID at a given `index` of all the tokens stored by the contract.\nUse along with {totalSupply} to enumerate all tokens.", 928 | "functionSelector": "4f6ccce7", 929 | "id": 1447, 930 | "implemented": false, 931 | "kind": "function", 932 | "modifiers": [], 933 | "name": "tokenByIndex", 934 | "nodeType": "FunctionDefinition", 935 | "overrides": null, 936 | "parameters": { 937 | "id": 1443, 938 | "nodeType": "ParameterList", 939 | "parameters": [ 940 | { 941 | "constant": false, 942 | "id": 1442, 943 | "name": "index", 944 | "nodeType": "VariableDeclaration", 945 | "overrides": null, 946 | "scope": 1447, 947 | "src": "853:13:8", 948 | "stateVariable": false, 949 | "storageLocation": "default", 950 | "typeDescriptions": { 951 | "typeIdentifier": "t_uint256", 952 | "typeString": "uint256" 953 | }, 954 | "typeName": { 955 | "id": 1441, 956 | "name": "uint256", 957 | "nodeType": "ElementaryTypeName", 958 | "src": "853:7:8", 959 | "typeDescriptions": { 960 | "typeIdentifier": "t_uint256", 961 | "typeString": "uint256" 962 | } 963 | }, 964 | "value": null, 965 | "visibility": "internal" 966 | } 967 | ], 968 | "src": "852:15:8" 969 | }, 970 | "returnParameters": { 971 | "id": 1446, 972 | "nodeType": "ParameterList", 973 | "parameters": [ 974 | { 975 | "constant": false, 976 | "id": 1445, 977 | "name": "", 978 | "nodeType": "VariableDeclaration", 979 | "overrides": null, 980 | "scope": 1447, 981 | "src": "891:7:8", 982 | "stateVariable": false, 983 | "storageLocation": "default", 984 | "typeDescriptions": { 985 | "typeIdentifier": "t_uint256", 986 | "typeString": "uint256" 987 | }, 988 | "typeName": { 989 | "id": 1444, 990 | "name": "uint256", 991 | "nodeType": "ElementaryTypeName", 992 | "src": "891:7:8", 993 | "typeDescriptions": { 994 | "typeIdentifier": "t_uint256", 995 | "typeString": "uint256" 996 | } 997 | }, 998 | "value": null, 999 | "visibility": "internal" 1000 | } 1001 | ], 1002 | "src": "890:9:8" 1003 | }, 1004 | "scope": 1448, 1005 | "src": "831:69:8", 1006 | "stateMutability": "view", 1007 | "virtual": false, 1008 | "visibility": "external" 1009 | } 1010 | ], 1011 | "scope": 1449, 1012 | "src": "187:715:8" 1013 | } 1014 | ], 1015 | "src": "0:903:8" 1016 | }, 1017 | "compiler": { 1018 | "name": "solc", 1019 | "version": "0.6.2+commit.bacdbe57.Emscripten.clang" 1020 | }, 1021 | "networks": {}, 1022 | "schemaVersion": "3.1.0", 1023 | "updatedAt": "2020-05-16T12:08:04.856Z", 1024 | "devdoc": { 1025 | "details": "See https://eips.ethereum.org/EIPS/eip-721", 1026 | "methods": { 1027 | "approve(address,uint256)": { 1028 | "details": "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." 1029 | }, 1030 | "balanceOf(address)": { 1031 | "details": "Returns the number of tokens in ``owner``'s account." 1032 | }, 1033 | "getApproved(uint256)": { 1034 | "details": "Returns the account approved for `tokenId` token. * Requirements: * - `tokenId` must exist." 1035 | }, 1036 | "isApprovedForAll(address,address)": { 1037 | "details": "Returns if the `operator` is allowed to manage all of the assets of `owner`. * See {setApprovalForAll}" 1038 | }, 1039 | "ownerOf(uint256)": { 1040 | "details": "Returns the owner of the `tokenId` token. * Requirements: * - `tokenId` must exist." 1041 | }, 1042 | "safeTransferFrom(address,address,uint256)": { 1043 | "details": "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`, `to` cannot be zero. - `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." 1044 | }, 1045 | "safeTransferFrom(address,address,uint256,bytes)": { 1046 | "details": "Safely transfers `tokenId` token from `from` to `to`. * Requirements: * - `from`, `to` cannot be zero. - `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." 1047 | }, 1048 | "setApprovalForAll(address,bool)": { 1049 | "details": "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." 1050 | }, 1051 | "supportsInterface(bytes4)": { 1052 | "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." 1053 | }, 1054 | "tokenByIndex(uint256)": { 1055 | "details": "Returns a token ID at a given `index` of all the tokens stored by the contract. Use along with {totalSupply} to enumerate all tokens." 1056 | }, 1057 | "tokenOfOwnerByIndex(address,uint256)": { 1058 | "details": "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." 1059 | }, 1060 | "totalSupply()": { 1061 | "details": "Returns the total amount of tokens stored by the contract." 1062 | }, 1063 | "transferFrom(address,address,uint256)": { 1064 | "details": "Transfers `tokenId` token from `from` to `to`. * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * Requirements: * - `from`, `to` cannot be zero. - `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." 1065 | } 1066 | }, 1067 | "title": "ERC-721 Non-Fungible Token Standard, optional enumeration extension" 1068 | }, 1069 | "userdoc": { 1070 | "methods": {} 1071 | } 1072 | } --------------------------------------------------------------------------------