├── .vscode └── settings.json ├── public ├── favicon.ico ├── logo192.png ├── logo512.png ├── robots.txt ├── favicon-32x32.png ├── assets │ └── meta │ │ └── data.json ├── manifest.json └── index.html ├── src ├── assets │ ├── about.gif │ ├── logo.png │ ├── mint.gif │ ├── images │ │ ├── 1.gif │ │ ├── feefer.png │ │ ├── hidden.gif │ │ ├── logo.png │ │ ├── opper.png │ │ ├── peeper.png │ │ ├── tweeter.png │ │ ├── newbanner.png │ │ ├── sevenRight.gif │ │ ├── metaverseLeft.png │ │ └── logo.svg │ ├── roadmap.png │ ├── boys │ │ └── boy1.png │ ├── joinus-bg.jpeg │ ├── team │ │ ├── ceo.jpeg │ │ ├── cfo.jpeg │ │ ├── cmo.jpeg │ │ └── cto.jpeg │ ├── header-back.png │ ├── topitems │ │ ├── fire.png │ │ ├── item1.png │ │ ├── item2.png │ │ └── item3.png │ └── fonts │ │ ├── PressStart2P-Regular.woff │ │ └── OFL.txt ├── styles │ ├── courier.ttf │ ├── Courier New V1.woff │ ├── CourierNewPS-BoldMT.woff │ ├── RobotoCondensed-Bold.ttf │ ├── NanumPenScript-Regular.ttf │ ├── theme.css │ ├── globalStyles.js │ └── reset.css ├── setupTests.js ├── components │ ├── basic │ │ ├── YButton.js │ │ └── YButton.css │ ├── footer │ │ ├── footer.css │ │ └── footer.js │ ├── team │ │ ├── team.css │ │ ├── teammember.js │ │ ├── teammember.css │ │ └── team.js │ ├── top-items │ │ ├── top-items.css │ │ ├── top-item.js │ │ ├── top-item.css │ │ └── top-items.js │ ├── roadmap │ │ ├── roadmap.css │ │ ├── roadmapitem.css │ │ ├── roadmapitem.js │ │ └── roadmap.js │ ├── join-community │ │ ├── join-community.css │ │ └── join-community.js │ ├── about │ │ ├── about.css │ │ └── about.js │ ├── meet │ │ ├── meet.css │ │ └── meet.js │ ├── mint │ │ ├── mint.css │ │ └── mint.js │ └── header │ │ ├── header.css │ │ └── header.js ├── reportWebVitals.js ├── index.css ├── redux │ ├── store.js │ ├── data │ │ ├── dataReducer.js │ │ └── dataActions.js │ └── blockchain │ │ ├── blockchainReducer.js │ │ └── blockchainActions.js ├── index.js ├── App.css ├── App.js ├── test.js └── contracts │ └── Doodlenauts.json ├── migrations ├── 1_initial_migration.js └── 2_smart_contract_migration.js ├── .gitignore ├── contracts ├── Migrations.sol ├── SmartContract.sol ├── deploy.txt └── out │ └── SmartContract_flat.txt ├── test └── smartContract.test.js ├── package.json ├── truffle-config.js └── deploy files └── deploy.txt /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "liveServer.settings.port": 5501 3 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/public/logo512.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/assets/about.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/about.gif -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/mint.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/mint.gif -------------------------------------------------------------------------------- /src/assets/images/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/1.gif -------------------------------------------------------------------------------- /src/assets/roadmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/roadmap.png -------------------------------------------------------------------------------- /src/styles/courier.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/styles/courier.ttf -------------------------------------------------------------------------------- /public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/public/favicon-32x32.png -------------------------------------------------------------------------------- /src/assets/boys/boy1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/boys/boy1.png -------------------------------------------------------------------------------- /src/assets/joinus-bg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/joinus-bg.jpeg -------------------------------------------------------------------------------- /src/assets/team/ceo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/team/ceo.jpeg -------------------------------------------------------------------------------- /src/assets/team/cfo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/team/cfo.jpeg -------------------------------------------------------------------------------- /src/assets/team/cmo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/team/cmo.jpeg -------------------------------------------------------------------------------- /src/assets/team/cto.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/team/cto.jpeg -------------------------------------------------------------------------------- /src/assets/header-back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/header-back.png -------------------------------------------------------------------------------- /src/assets/images/feefer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/feefer.png -------------------------------------------------------------------------------- /src/assets/images/hidden.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/hidden.gif -------------------------------------------------------------------------------- /src/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/logo.png -------------------------------------------------------------------------------- /src/assets/images/opper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/opper.png -------------------------------------------------------------------------------- /src/assets/images/peeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/peeper.png -------------------------------------------------------------------------------- /src/assets/topitems/fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/topitems/fire.png -------------------------------------------------------------------------------- /src/assets/images/tweeter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/tweeter.png -------------------------------------------------------------------------------- /src/assets/topitems/item1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/topitems/item1.png -------------------------------------------------------------------------------- /src/assets/topitems/item2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/topitems/item2.png -------------------------------------------------------------------------------- /src/assets/topitems/item3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/topitems/item3.png -------------------------------------------------------------------------------- /src/styles/Courier New V1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/styles/Courier New V1.woff -------------------------------------------------------------------------------- /src/assets/images/newbanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/newbanner.png -------------------------------------------------------------------------------- /src/assets/images/sevenRight.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/sevenRight.gif -------------------------------------------------------------------------------- /src/assets/images/metaverseLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/images/metaverseLeft.png -------------------------------------------------------------------------------- /src/styles/CourierNewPS-BoldMT.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/styles/CourierNewPS-BoldMT.woff -------------------------------------------------------------------------------- /src/styles/RobotoCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/styles/RobotoCondensed-Bold.ttf -------------------------------------------------------------------------------- /src/styles/NanumPenScript-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/styles/NanumPenScript-Regular.ttf -------------------------------------------------------------------------------- /src/assets/fonts/PressStart2P-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HappyMicky0317/spooky/HEAD/src/assets/fonts/PressStart2P-Regular.woff -------------------------------------------------------------------------------- /public/assets/meta/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Boo Crew NFT", 3 | "description": "Check out Boo Crew NFT at https://boocrew.io!", 4 | "image": "" 5 | } 6 | -------------------------------------------------------------------------------- /migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | const Migrations = artifacts.require("Migrations"); 2 | 3 | module.exports = function (deployer) { 4 | deployer.deploy(Migrations); 5 | }; 6 | -------------------------------------------------------------------------------- /migrations/2_smart_contract_migration.js: -------------------------------------------------------------------------------- 1 | const SmartContract = artifacts.require("NerdyCoderClones"); 2 | 3 | module.exports = function (deployer) { 4 | deployer.deploy(SmartContract, "Name", "Symbol", "https://"); 5 | }; 6 | -------------------------------------------------------------------------------- /src/styles/theme.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --yellow: #fccd35; 3 | --pink: #ff19e9; 4 | --green: #00cc00; 5 | --white: #000000; 6 | --light-grey: #ffffff; 7 | --dark-grey: #ffffff; 8 | --black: #ffffff; 9 | } 10 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /src/components/basic/YButton.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | //import CSS 4 | import './YButton.css'; 5 | 6 | class YButton extends React.Component{ 7 | 8 | render() { 9 | return( 10 | 11 | ); 12 | } 13 | } 14 | 15 | export default YButton; -------------------------------------------------------------------------------- /src/components/basic/YButton.css: -------------------------------------------------------------------------------- 1 | .ybutton { 2 | background-color: #c8ff00; 3 | color: black; 4 | padding-left: 20px; 5 | padding-right: 20px; 6 | padding-top: 15px; 7 | padding-bottom: 15px; 8 | min-width: 80px; 9 | border: none; 10 | outline: none; 11 | cursor: pointer; 12 | border-radius: 4px; 13 | font-weight: 700; 14 | } 15 | 16 | .ybutton:hover{ 17 | transform: scale(1.1); 18 | } -------------------------------------------------------------------------------- /src/components/footer/footer.css: -------------------------------------------------------------------------------- 1 | .footer-control { 2 | background-color: black; 3 | color: white; 4 | 5 | } 6 | 7 | .footer { 8 | height: 75px; 9 | display: flex; 10 | align-items: center; 11 | justify-content: space-between; 12 | flex-direction: row; 13 | } 14 | 15 | .footer p { 16 | margin: 0px; 17 | letter-spacing: 3px; 18 | } 19 | 20 | .footer div svg { 21 | margin-left: 20px; 22 | } -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/components/team/team.css: -------------------------------------------------------------------------------- 1 | .team-control header { 2 | font-style: italic; 3 | font-size: 50px; 4 | font-weight: 700; 5 | color: white; 6 | margin-bottom: 20px; 7 | } 8 | 9 | .team-control { 10 | padding-bottom: 60px; 11 | padding-top: 60px; 12 | background-color: black; 13 | } 14 | 15 | .team-control header span { 16 | color: #c8ff00; 17 | text-shadow: 1px 0 20px rgb(200 255 0 / 31%) 18 | } 19 | 20 | -------------------------------------------------------------------------------- /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 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /.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 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | .idea/ 27 | 28 | # Local Netlify folder 29 | .netlify -------------------------------------------------------------------------------- /src/components/top-items/top-items.css: -------------------------------------------------------------------------------- 1 | .top-items-control { 2 | background-color: black; 3 | padding-top: 60px; 4 | padding-bottom: 60px; 5 | } 6 | 7 | .top-items-header { 8 | display: flex; 9 | flex-direction: row; 10 | align-items: center; 11 | justify-content: space-between; 12 | } 13 | 14 | .top-items-header header { 15 | font-size: 50px; 16 | color: white; 17 | font-weight: 700; 18 | } 19 | 20 | .top-items-header header span { 21 | color: #c8ff00; 22 | } -------------------------------------------------------------------------------- /contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.4.22 <0.9.0; 3 | 4 | contract Migrations { 5 | address public owner = msg.sender; 6 | uint public last_completed_migration; 7 | 8 | modifier restricted() { 9 | require( 10 | msg.sender == owner, 11 | "This function is restricted to the contract's owner" 12 | ); 13 | _; 14 | } 15 | 16 | function setCompleted(uint completed) public restricted { 17 | last_completed_migration = completed; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/components/roadmap/roadmap.css: -------------------------------------------------------------------------------- 1 | .roadmap-control header span { 2 | color: #c8ff00; 3 | text-shadow: 1px 0 20px rgb(200 255 0 / 31%) 4 | } 5 | 6 | .roadmap-control { 7 | padding-bottom: 60px; 8 | padding-top: 60px; 9 | background-color: black; 10 | } 11 | 12 | .roadmap-control header { 13 | font-style: italic; 14 | font-size: 50px; 15 | font-weight: 700; 16 | color: white; 17 | margin-bottom: 20px; 18 | } 19 | 20 | .roadmap-description { 21 | font-size: 15px; 22 | color: rgba(255,255,255,0.5); 23 | } 24 | 25 | .roadmap-control img { 26 | width: 100%; 27 | } -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /src/redux/store.js: -------------------------------------------------------------------------------- 1 | import { applyMiddleware, compose, createStore, combineReducers } from "redux"; 2 | import thunk from "redux-thunk"; 3 | import blockchainReducer from "./blockchain/blockchainReducer"; 4 | import dataReducer from "./data/dataReducer"; 5 | 6 | const rootReducer = combineReducers({ 7 | blockchain: blockchainReducer, 8 | data: dataReducer, 9 | }); 10 | 11 | const middleware = [thunk]; 12 | const composeEnhancers = compose(applyMiddleware(...middleware)); 13 | 14 | const configureStore = () => { 15 | return createStore(rootReducer, composeEnhancers); 16 | }; 17 | 18 | const store = configureStore(); 19 | 20 | export default store; 21 | -------------------------------------------------------------------------------- /src/components/team/teammember.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | //import CSS 4 | import './teammember.css'; 5 | 6 | class TeamMember extends React.Component { 7 | render() { 8 | return ( 9 |
10 | team member 11 |
12 |

@{this.props.name}

13 |

{this.props.title}

14 |
15 |
16 | ); 17 | } 18 | } 19 | 20 | export default TeamMember; -------------------------------------------------------------------------------- /src/components/team/teammember.css: -------------------------------------------------------------------------------- 1 | .teammember-control { 2 | width: 100%; 3 | } 4 | 5 | .teammember-control img { 6 | width: 100%; 7 | } 8 | 9 | .teammember-description { 10 | display: flex; 11 | flex-direction: row; 12 | align-items: center; 13 | justify-content: space-between; 14 | margin-top: 20px; 15 | } 16 | 17 | .teammember-name { 18 | font-size: 20px; 19 | line-height: 30px; 20 | font-style: italic; 21 | color: white; 22 | font-weight: 700; 23 | } 24 | 25 | .teammember-occupation { 26 | font-size: 15px; 27 | line-height: 20px; 28 | color: black; 29 | padding: 6px; 30 | border-radius: 4px; 31 | background-color: #c8ff00;; 32 | } -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | import 'bootstrap/dist/css/bootstrap.min.css'; 7 | import store from "./redux/store"; 8 | import { Provider } from "react-redux"; 9 | 10 | ReactDOM.render( 11 | 12 | 13 | , 14 | document.getElementById('root') 15 | ); 16 | 17 | // If you want to start measuring performance in your app, pass a function 18 | // to log results (for example: reportWebVitals(console.log)) 19 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 20 | reportWebVitals(); 21 | -------------------------------------------------------------------------------- /src/components/join-community/join-community.css: -------------------------------------------------------------------------------- 1 | .join-community-control { 2 | background-image: url('../../assets/joinus-bg.jpeg'); 3 | background-position: center; 4 | background-repeat: no-repeat; 5 | background-size: cover; 6 | height: 360px; 7 | display: flex; 8 | align-content: center; 9 | justify-content: center; 10 | flex-direction: column; 11 | } 12 | 13 | .join-community-control h1 { 14 | font-size: 50px; 15 | color: white; 16 | font-weight: 700; 17 | font-style: italic; 18 | } 19 | 20 | .join-community-control h1 span { 21 | color: #c8ff00; 22 | } 23 | 24 | .join-community-control p { 25 | font-size: 15px; 26 | color: rgba(255,255,255,0.5); 27 | } -------------------------------------------------------------------------------- /src/components/about/about.css: -------------------------------------------------------------------------------- 1 | .about-control { 2 | background-color: black; 3 | padding-top: 60px; 4 | padding-bottom: 60px; 5 | } 6 | 7 | .image-control img { 8 | width: 100%; 9 | } 10 | 11 | .about-description { 12 | display: flex; 13 | flex-direction: column; 14 | justify-content: center; 15 | } 16 | 17 | .about-description header { 18 | font-size: 50px; 19 | line-height: 50px; 20 | color: white; 21 | font-style: italic; 22 | font-weight: 900; 23 | } 24 | 25 | .about-description p { 26 | color: rgba(255, 255, 255, 0.5); 27 | } 28 | 29 | .about-description p span { 30 | color: #c8ff00; 31 | } 32 | 33 | .about-description header span { 34 | color: #c8ff00; 35 | } -------------------------------------------------------------------------------- /test/smartContract.test.js: -------------------------------------------------------------------------------- 1 | const SmartContract = artifacts.require("./SmartContract.sol"); 2 | 3 | require("chai").use(require("chai-as-promised")).should(); 4 | 5 | contract("SmartContract", (accounts) => { 6 | let smartContract; 7 | 8 | before(async () => { 9 | smartContract = await SmartContract.deployed(); 10 | }); 11 | 12 | describe("smartContract deployment", async () => { 13 | it("deploys successfully", async () => { 14 | const address = await smartContract.address; 15 | assert.notEqual(address, 0x0); 16 | assert.notEqual(address, ""); 17 | }); 18 | 19 | it("has correct name", async () => { 20 | const name = await smartContract.name(); 21 | assert.equal(name, "Smart Contract"); 22 | }); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | max-width: 1280px; 3 | margin: auto; 4 | background-color: black; 5 | } 6 | 7 | .App-logo { 8 | height: 40vmin; 9 | pointer-events: none; 10 | } 11 | 12 | @media (prefers-reduced-motion: no-preference) { 13 | .App-logo { 14 | animation: App-logo-spin infinite 20s linear; 15 | } 16 | } 17 | 18 | .App-header { 19 | background-color: #282c34; 20 | min-height: 100vh; 21 | display: flex; 22 | flex-direction: column; 23 | align-items: center; 24 | justify-content: center; 25 | font-size: calc(10px + 2vmin); 26 | color: white; 27 | background-color: black; 28 | } 29 | 30 | .App-link { 31 | color: #61dafb; 32 | } 33 | 34 | @keyframes App-logo-spin { 35 | from { 36 | transform: rotate(0deg); 37 | } 38 | to { 39 | transform: rotate(360deg); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/components/join-community/join-community.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Container } from "react-bootstrap"; 3 | 4 | //import Components 5 | import YButton from "../basic/YButton"; 6 | 7 | //import CSS 8 | import './join-community.css'; 9 | class JoinCommunity extends React.Component { 10 | render() { 11 | return ( 12 |
13 | 14 |

JOIN OUR COMMUNITY

15 |

Hole-y Sheet! The Spooky Boys Discord is live! Come join the community now to follow our latest announcements, and participate in spooktacular giveaways.

16 | 17 |
18 |
19 | ); 20 | } 21 | } 22 | 23 | export default JoinCommunity; -------------------------------------------------------------------------------- /src/components/footer/footer.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Container } from "react-bootstrap"; 3 | 4 | //import CSS 5 | import './footer.css'; 6 | 7 | //import social icons 8 | import { BsTwitter, 9 | BsDiscord, 10 | BsInstagram } from 'react-icons/bs'; 11 | class Footer extends React.Component { 12 | render() { 13 | return ( 14 |
15 | 16 |

©2021   SPOOKYBOYS COUNTRY CLUB

17 |
18 | 19 | 20 | 21 |
22 |
23 |
24 | ); 25 | } 26 | } 27 | 28 | export default Footer; -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | // import logo from './logo.svg'; 2 | import './App.css'; 3 | 4 | //import components 5 | import Header from './components/header/header'; 6 | import Team from './components/team/team'; 7 | import JoinCommunity from './components/join-community/join-community'; 8 | import Footer from './components/footer/footer'; 9 | import RoadMap from './components/roadmap/roadmap'; 10 | import TopItems from './components/top-items/top-items'; 11 | import Mint from './components/mint/mint'; 12 | import About from './components/about/about'; 13 | import Meet from './components/meet/meet'; 14 | 15 | function App() { 16 | return ( 17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
28 | ); 29 | } 30 | 31 | export default App; 32 | -------------------------------------------------------------------------------- /src/components/roadmap/roadmapitem.css: -------------------------------------------------------------------------------- 1 | .collapse-header-control { 2 | display: flex; 3 | align-items: center; 4 | justify-content: space-between; 5 | cursor: pointer; 6 | padding-top: 10px; 7 | padding-bottom: 10px; 8 | border-bottom: 1px solid rgba(255,255,255,0.2); 9 | } 10 | 11 | .collapse-header { 12 | display: flex; 13 | flex-direction: row; 14 | align-items: center; 15 | justify-content: center; 16 | } 17 | 18 | .collapse-header h4 { 19 | color: black; 20 | padding-left: 20px; 21 | padding-right: 20px; 22 | background-color: #c8ff00; 23 | padding-top: 10px; 24 | padding-bottom: 10px; 25 | border-radius: 6px; 26 | font-size: 17px; 27 | } 28 | 29 | .collapse-header p { 30 | color: white; 31 | font-weight: 700; 32 | font-size: 17px; 33 | margin-left: 20px; 34 | } 35 | 36 | .collapse-content { 37 | font-size: 15px; 38 | color: rgba(255, 255, 255, 0.5); 39 | } -------------------------------------------------------------------------------- /src/redux/data/dataReducer.js: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | loading: false, 3 | name: "", 4 | totalSupply: 0, 5 | cost: 0, 6 | error: false, 7 | errorMsg: "", 8 | }; 9 | 10 | const dataReducer = (state = initialState, action) => { 11 | switch (action.type) { 12 | case "CHECK_DATA_REQUEST": 13 | return { 14 | ...state, 15 | loading: true, 16 | error: false, 17 | errorMsg: "", 18 | }; 19 | case "CHECK_DATA_SUCCESS": 20 | return { 21 | ...state, 22 | loading: false, 23 | name: action.payload.name, 24 | totalSupply: action.payload.totalSupply, 25 | cost: action.payload.cost, 26 | error: false, 27 | errorMsg: "", 28 | }; 29 | case "CHECK_DATA_FAILED": 30 | return { 31 | ...initialState, 32 | loading: false, 33 | error: true, 34 | errorMsg: action.payload, 35 | }; 36 | default: 37 | return state; 38 | } 39 | }; 40 | 41 | export default dataReducer; 42 | -------------------------------------------------------------------------------- /src/redux/blockchain/blockchainReducer.js: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | loading: false, 3 | account: null, 4 | smartContract: null, 5 | web3: null, 6 | errorMsg: "", 7 | }; 8 | 9 | const blockchainReducer = (state = initialState, action) => { 10 | switch (action.type) { 11 | case "CONNECTION_REQUEST": 12 | return { 13 | ...initialState, 14 | loading: true, 15 | }; 16 | case "CONNECTION_SUCCESS": 17 | return { 18 | ...state, 19 | loading: false, 20 | account: action.payload.account, 21 | smartContract: action.payload.smartContract, 22 | web3: action.payload.web3, 23 | }; 24 | case "CONNECTION_FAILED": 25 | return { 26 | ...initialState, 27 | loading: false, 28 | errorMsg: action.payload, 29 | }; 30 | case "UPDATE_ACCOUNT": 31 | return { 32 | ...state, 33 | account: action.payload.account, 34 | }; 35 | default: 36 | return state; 37 | } 38 | }; 39 | 40 | export default blockchainReducer; 41 | -------------------------------------------------------------------------------- /src/components/meet/meet.css: -------------------------------------------------------------------------------- 1 | .meet-control { 2 | padding-top: 60px; 3 | padding-bottom: 60px; 4 | background-color: black; 5 | } 6 | 7 | .meet-control header { 8 | font-size: 50px; 9 | line-height: 50px; 10 | color: white; 11 | font-style: italic; 12 | font-weight: 900; 13 | margin-bottom: 20px; 14 | } 15 | 16 | .meet-control header span { 17 | color: #c8ff00; 18 | } 19 | 20 | .remaining { 21 | display: flex; 22 | align-items: center; 23 | justify-content: center; 24 | flex-direction: column; 25 | font-size: 50px; 26 | color: white; 27 | font-style: italic; 28 | font-weight: 900; 29 | } 30 | 31 | .remaining span { 32 | color: #c8ff00; 33 | } 34 | 35 | .slide-arrows { 36 | margin-top: 30px; 37 | display: flex; 38 | align-items: center; 39 | justify-content: space-between; 40 | } 41 | 42 | .slide-arrows a{ 43 | cursor: pointer; 44 | background-color: #c8ff00; 45 | display: flex; 46 | align-items: center; 47 | justify-content: center; 48 | padding: 20px 49 | } -------------------------------------------------------------------------------- /src/components/top-items/top-item.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | //import CSS 4 | import './top-item.css'; 5 | 6 | import { BsSliders } from 'react-icons/bs'; 7 | import ImageFire from '../../assets/topitems/fire.png'; 8 | 9 | class TopItem extends React.Component { 10 | 11 | render() { 12 | return ( 13 |
14 | top item 15 |
16 |

{this.props.name}

17 |
{this.props.price}
18 |
19 |
20 |
21 | HighestBid {this.props.highestBid} 22 |
23 |

24 | New Bid   25 | new bid 26 |

27 |
28 |
29 | ); 30 | } 31 | } 32 | 33 | export default TopItem; -------------------------------------------------------------------------------- /src/components/top-items/top-item.css: -------------------------------------------------------------------------------- 1 | .top-item { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | .top-item > img { 7 | width: 100%; 8 | } 9 | 10 | .top-item-description { 11 | display: flex; 12 | flex-direction: row; 13 | align-items: center; 14 | justify-content: space-between; 15 | padding-top: 20px; 16 | padding-bottom: 20px; 17 | border-bottom: 1px solid rgba(255, 255, 255, 0.5); 18 | } 19 | 20 | .top-item-description p { 21 | font-size: 20px; 22 | font-style: italic; 23 | font-weight: 900; 24 | color: white; 25 | margin: 0px; 26 | } 27 | 28 | .top-item-description h6 { 29 | font-size: 20px; 30 | color: black; 31 | background-color: #c8ff00; 32 | padding-left: 10px; 33 | padding-right: 10px; 34 | padding-top: 5px; 35 | padding-bottom: 5px; 36 | border-radius: 4px; 37 | } 38 | 39 | .top-item-bid { 40 | display: flex; 41 | flex-direction: row; 42 | align-items: center; 43 | justify-content: space-between; 44 | padding-bottom: 20px; 45 | padding-top: 20px; 46 | } 47 | 48 | .top-item-bid p, 49 | .top-item-bid div { 50 | margin: 0px; 51 | color: #777e90; 52 | } 53 | 54 | .top-item-bid b { 55 | color: white; 56 | font-style: italic; 57 | } -------------------------------------------------------------------------------- /src/components/roadmap/roadmapitem.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Collapse } from "react-bootstrap"; 3 | import { BsPlusLg } from "react-icons/bs"; 4 | 5 | //import CSS 6 | import './roadmapitem.css'; 7 | class RoadMapItem extends React.Component { 8 | 9 | constructor(props) { 10 | super(props); 11 | this.state = { 12 | open: false 13 | } 14 | } 15 | 16 | render () { 17 | return ( 18 |
19 |
{this.setState({open: !this.state.open})}} 20 | aria-controls='example' 21 | aria-expanded={this.state.open} 22 | className='collapse-header-control' > 23 |
24 |

{this.props.tag}

25 |

{this.props.title}

26 |
27 | 28 |
29 | 30 |
31 | {this.props.content} 32 |
33 |
34 |
35 | ); 36 | } 37 | } 38 | 39 | export default RoadMapItem; -------------------------------------------------------------------------------- /src/redux/data/dataActions.js: -------------------------------------------------------------------------------- 1 | // log 2 | import store from "../store"; 3 | 4 | const fetchDataRequest = () => { 5 | return { 6 | type: "CHECK_DATA_REQUEST", 7 | }; 8 | }; 9 | 10 | const fetchDataSuccess = (payload) => { 11 | return { 12 | type: "CHECK_DATA_SUCCESS", 13 | payload: payload, 14 | }; 15 | }; 16 | 17 | const fetchDataFailed = (payload) => { 18 | return { 19 | type: "CHECK_DATA_FAILED", 20 | payload: payload, 21 | }; 22 | }; 23 | 24 | export const fetchData = (account) => { 25 | return async (dispatch) => { 26 | dispatch(fetchDataRequest()); 27 | try { 28 | let name = await store 29 | .getState() 30 | .blockchain.smartContract.methods.name() 31 | .call(); 32 | let totalSupply = await store 33 | .getState() 34 | .blockchain.smartContract.methods.totalSupply() 35 | .call(); 36 | let cost = await store 37 | .getState() 38 | .blockchain.smartContract.methods.cost() 39 | .call(); 40 | 41 | dispatch( 42 | fetchDataSuccess({ 43 | name, 44 | totalSupply, 45 | cost, 46 | }) 47 | ); 48 | } catch (err) { 49 | console.log(err); 50 | dispatch(fetchDataFailed("Could not load data from contract.")); 51 | } 52 | }; 53 | }; 54 | -------------------------------------------------------------------------------- /src/components/mint/mint.css: -------------------------------------------------------------------------------- 1 | .mint-image img { 2 | width: 100%; 3 | } 4 | 5 | .mint-control { 6 | background-color: black; 7 | padding-top: 60px; 8 | padding-bottom: 60px; 9 | } 10 | 11 | 12 | .mint-description { 13 | display: flex; 14 | flex-direction: column; 15 | align-items: center; 16 | justify-content: center; 17 | } 18 | 19 | .mint-description header { 20 | font-size: 50px; 21 | color: white; 22 | font-weight: 900; 23 | font-style: italic; 24 | line-height: 50px; 25 | } 26 | 27 | .mint-description header span { 28 | color: #c8ff00; 29 | } 30 | 31 | .mint-description p { 32 | color: rgba(255, 255, 255, 0.5); 33 | margin-top: 20px; 34 | margin-bottom: 20px; 35 | } 36 | 37 | .mint-description .number-control { 38 | cursor: pointer; 39 | margin-bottom: 20px; 40 | display: flex; 41 | flex-direction: row; 42 | gap: 30px; 43 | } 44 | .mint-description .number-control span{ 45 | font-size: 30px; 46 | color: white; 47 | font-weight: 900; 48 | } 49 | 50 | .ybutton { 51 | background-color: #c8ff00; 52 | color: black; 53 | padding-left: 20px; 54 | padding-right: 20px; 55 | padding-top: 15px; 56 | padding-bottom: 15px; 57 | min-width: 80px; 58 | border: none; 59 | outline: none; 60 | cursor: pointer; 61 | border-radius: 4px; 62 | font-weight: 700; 63 | } 64 | 65 | .ybutton:hover{ 66 | transform: scale(1.1); 67 | } 68 | 69 | .flex-column{ 70 | display: flex; 71 | flex-direction: column; 72 | } -------------------------------------------------------------------------------- /src/components/header/header.css: -------------------------------------------------------------------------------- 1 | .header-control { 2 | background-image: url('../../assets/header-back.png'); 3 | display: flex; 4 | flex-direction: column; 5 | align-items: center; 6 | justify-content: space-between; 7 | position: relative; 8 | padding-top: 20px; 9 | padding-bottom: 20px; 10 | height: 720px; 11 | background-repeat: no-repeat; 12 | background-size: cover; 13 | background-position: 50% 100%; 14 | } 15 | 16 | .header-control .navbar { 17 | width: 100%; 18 | } 19 | 20 | .navbar-nav { 21 | display: flex; 22 | align-items: center; 23 | } 24 | .navbar-nav .nav-link{ 25 | color: white!important; 26 | font-size: 13px; 27 | font-weight: 700; 28 | } 29 | 30 | .navbar-nav .nav-link:hover{ 31 | color: #c8ff00!important; 32 | } 33 | 34 | .header-content { 35 | display: flex; 36 | align-items: center; 37 | justify-content: center; 38 | flex-direction: column; 39 | } 40 | 41 | .header-content h1 { 42 | font-size: 51px; 43 | color: white; 44 | font-style: italic; 45 | margin-bottom: 30px; 46 | margin-top: 30px; 47 | font-weight: 900; 48 | } 49 | 50 | .header-nav { 51 | position: absolute; 52 | top: 20px; 53 | max-width: 1200px; 54 | width: 1200px; 55 | display: flex; 56 | align-items: center; 57 | justify-content: space-between; 58 | } 59 | 60 | .nav-item { 61 | margin-right: 20px; 62 | color: white; 63 | font-size: 13px; 64 | font-weight: 700; 65 | cursor: pointer; 66 | } 67 | .nav-item :hover { 68 | color: blue; 69 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend_base_dapp", 3 | "version": "0.1.0", 4 | "private": true, 5 | "homepage": "https://squid-games-nft.github.io/main/", 6 | "dependencies": { 7 | "@openzeppelin/contracts": "^4.2.0", 8 | "@testing-library/jest-dom": "^5.11.4", 9 | "@testing-library/react": "^11.1.0", 10 | "@testing-library/user-event": "^12.1.10", 11 | "all": "^0.0.0", 12 | "bootstrap": "^5.1.3", 13 | "chai": "^4.3.4", 14 | "chai-as-promised": "^7.1.1", 15 | "ipfs-http-client": "^52.0.0", 16 | "react": "^17.0.2", 17 | "react-bootstrap": "^2.0.2", 18 | "react-canvas-draw": "^1.1.1", 19 | "react-dom": "^17.0.2", 20 | "react-icons": "^4.3.1", 21 | "react-leaf-carousel": "^3.0.0", 22 | "react-multi-carousel": "^2.6.5", 23 | "react-redux": "^7.2.4", 24 | "react-responsive-carousel": "^3.2.22", 25 | "react-scripts": "4.0.3", 26 | "react-signature-canvas": "^1.0.3", 27 | "redux": "^4.1.1", 28 | "redux-thunk": "^2.3.0", 29 | "styled-components": "^5.3.0", 30 | "web-vitals": "^1.0.1", 31 | "web3": "^1.5.1", 32 | "web3-eth-contract": "^1.5.2" 33 | }, 34 | "scripts": { 35 | "start": "react-scripts start", 36 | "build": "react-scripts build", 37 | "test": "react-scripts test", 38 | "eject": "react-scripts eject" 39 | }, 40 | "eslintConfig": { 41 | "extends": [ 42 | "react-app", 43 | "react-app/jest" 44 | ] 45 | }, 46 | "browserslist": { 47 | "production": [ 48 | ">0.2%", 49 | "not dead", 50 | "not op_mini all" 51 | ], 52 | "development": [ 53 | "last 1 chrome version", 54 | "last 1 firefox version", 55 | "last 1 safari version" 56 | ] 57 | }, 58 | "devDependencies": { 59 | "truffle-plugin-verify": "^0.5.14" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | 14 | 18 | 19 | 28 | $quidGamesNFT Main Page 29 | 30 | 31 | 32 |
33 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/components/about/about.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Container, Row, Col } from "react-bootstrap"; 3 | 4 | import AboutGif from '../../assets/about.gif'; 5 | import YButton from "../basic/YButton"; 6 | 7 | //import CSS 8 | import './about.css'; 9 | class About extends React.Component { 10 | render() { 11 | return ( 12 |
13 | 14 | 15 | 16 |
13,000 UNIQUE
GHOSTS.
17 |

18 | n the depths of the Metaverse, nestled in the eloquent hills of the Ethereum blockchain lies a Country Club, defined by excellence, prestige, and respect. The Spooky Boys Country Club offers 13,000 unique, digital collectibles that represent community through ownership. 19 |

20 |

21 | The Spooky Boys Country Club members obtain safety, integrity, and metaversal recognition. This project blends hypebeast fashion, country club mannerisms, and spooky vibes to create unique collectibles. 22 |

23 |

24 | Spooky Boys Country Club was developed by an experienced team and is curated by none other than the most OG Ghost in the game, The “Ghost of the Gram”, @HOLYGHOST on Instagram. 25 |

26 |
27 | 28 | 29 | about gif 30 | 31 |
32 |
33 |
34 | ); 35 | } 36 | } 37 | 38 | export default About; -------------------------------------------------------------------------------- /src/styles/globalStyles.js: -------------------------------------------------------------------------------- 1 | import styled from "styled-components"; 2 | 3 | // Used for wrapping a page component 4 | export const Screen = styled.div` 5 | background-color: var(--dark-grey); 6 | background-image: ${({ image }) => (image ? `url(${image})` : "none")}; 7 | background-size: cover; 8 | background-position: center; 9 | width: 100%; 10 | min-height: 100vh; 11 | display: flex; 12 | flex-direction: column; 13 | `; 14 | 15 | // Used for providing space between components 16 | export const SpacerXSmall = styled.div` 17 | height: 8px; 18 | width: 8px; 19 | `; 20 | 21 | // Used for providing space between components 22 | export const SpacerSmall = styled.div` 23 | height: 16px; 24 | width: 16px; 25 | `; 26 | 27 | // Used for providing space between components 28 | export const SpacerMedium = styled.div` 29 | height: 24px; 30 | width: 24px; 31 | `; 32 | 33 | // Used for providing space between components 34 | export const SpacerLarge = styled.div` 35 | height: 32px; 36 | width: 32px; 37 | `; 38 | 39 | // Used for providing a wrapper around a component 40 | export const Container = styled.div` 41 | display: flex; 42 | flex: ${({ flex }) => (flex ? flex : 0)}; 43 | flex-direction: ${({ fd }) => (fd ? fd : "column")}; 44 | justify-content: ${({ jc }) => (jc ? jc : "flex-start")}; 45 | align-items: ${({ ai }) => (ai ? ai : "flex-start")}; 46 | background-color: ${({ test }) => (test ? "pink" : "none")}; 47 | width: 100%; 48 | background-image: ${({ image }) => (image ? `url(${image})` : "none")}; 49 | background-size: cover; 50 | background-position: center; 51 | `; 52 | 53 | export const TextTitle = styled.p` 54 | color: var(--white); 55 | font-size: 18px; 56 | font-weight: 500; 57 | line-height: 1.6; 58 | `; 59 | 60 | export const TextSubTitle = styled.p` 61 | color: var(--white); 62 | font-size: 14px; 63 | line-height: 1.6; 64 | `; 65 | 66 | export const TextDescription = styled.p` 67 | color: var(--white); 68 | font-size: 12px; 69 | line-height: 1.6; 70 | `; 71 | 72 | export const StyledClickable = styled.div` 73 | :active { 74 | opacity: 0.6; 75 | } 76 | `; 77 | -------------------------------------------------------------------------------- /src/components/header/header.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import Logo from '../../assets/logo.png' 4 | 5 | //import css 6 | import './header.css'; 7 | 8 | import { 9 | Container, 10 | Navbar, 11 | Nav, 12 | } from 'react-bootstrap'; 13 | 14 | //import components 15 | import YButton from "../basic/YButton"; 16 | class Header extends React.Component { 17 | render() { 18 | return( 19 | <> 20 | 21 |
22 | 23 | 24 | 25 | logo 26 | 27 | 28 | 29 | 31 | 42 | 43 | 44 | 45 |
46 |

SPOOKY BOYS
COUNTRY CLUB

47 |
48 |   49 | 50 |
51 |
52 |
53 |
54 | 55 | ); 56 | } 57 | } 58 | 59 | export default Header; -------------------------------------------------------------------------------- /src/components/team/team.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Row, Col, Container } from "react-bootstrap"; 3 | 4 | //import CSS 5 | import './team.css'; 6 | 7 | //import image assets 8 | import CEOImage from '../../assets/team/ceo.jpeg'; 9 | import CTOImage from '../../assets/team/cto.jpeg'; 10 | import CMOImage from '../../assets/team/cmo.jpeg'; 11 | import CFOImage from '../../assets/team/cfo.jpeg' 12 | 13 | //import Component 14 | import TeamMember from "./teammember"; 15 | class Team extends React.Component { 16 | 17 | constructor(props) { 18 | super(props); 19 | this.state = { 20 | teams: [ 21 | { 22 | image: CEOImage, 23 | title: 'CEO', 24 | name: "HOLYGHOST" 25 | }, 26 | { 27 | image: CTOImage, 28 | title: 'CTO', 29 | name: "HOLYGHOST" 30 | }, 31 | { 32 | image: CMOImage, 33 | title: 'CMO', 34 | name: "HOLYGHOST" 35 | }, 36 | { 37 | image: CFOImage, 38 | title: 'CFO', 39 | name: "HOLYGHOST" 40 | } 41 | ] 42 | } 43 | } 44 | 45 | render() { 46 | return( 47 |
48 | 49 |
SPOOKY BOYS
TEAM.
50 | 51 | { 52 | this.state.teams.map((item, index) => { 53 | return ( 54 | 55 | 59 | 60 | ); 61 | }) 62 | } 63 | 64 |
65 |
66 | ); 67 | } 68 | } 69 | 70 | export default Team -------------------------------------------------------------------------------- /src/assets/images/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/top-items/top-items.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Col, Container, Row } from "react-bootstrap"; 3 | import YButton from "../basic/YButton"; 4 | 5 | //import CSS 6 | import './top-items.css'; 7 | 8 | //import Assets 9 | import Item1 from '../../assets/topitems/item1.png'; 10 | import Item2 from '../../assets/topitems/item2.png'; 11 | import Item3 from '../../assets/topitems/item3.png'; 12 | 13 | //import Component 14 | import TopItem from "./top-item"; 15 | 16 | class TopItems extends React.Component { 17 | 18 | constructor(props) { 19 | super(props); 20 | this.state = { 21 | topItems: [ 22 | { 23 | image: Item1, 24 | name: "COMING SOON", 25 | price: '130 ETH', 26 | highestBid: 'A LOT OF ETH' 27 | }, 28 | { 29 | image: Item2, 30 | name: "COMING SOON", 31 | price: '130 ETH', 32 | highestBid: 'A LOT OF ETH' 33 | }, 34 | { 35 | image: Item3, 36 | name: "COMING SOON", 37 | price: '130 ETH', 38 | highestBid: 'A LOT OF ETH' 39 | } 40 | ] 41 | } 42 | } 43 | 44 | render() { 45 | return ( 46 |
47 | 48 |
49 |
Top
SPOOKY BOYS
50 | 51 |
52 | 53 | { 54 | this.state.topItems.map((item, index) => { 55 | return ( 56 | 57 | 63 | 64 | ); 65 | }) 66 | } 67 | 68 |
69 |
70 | ); 71 | } 72 | } 73 | 74 | export default TopItems -------------------------------------------------------------------------------- /src/redux/blockchain/blockchainActions.js: -------------------------------------------------------------------------------- 1 | // constants 2 | import Web3EthContract from "web3-eth-contract"; 3 | import Web3 from "web3"; 4 | import SmartContract from "../../contracts/Doodlenauts.json"; 5 | // log 6 | import { fetchData } from "../data/dataActions"; 7 | 8 | const connectRequest = () => { 9 | return { 10 | type: "CONNECTION_REQUEST", 11 | }; 12 | }; 13 | 14 | const connectSuccess = (payload) => { 15 | return { 16 | type: "CONNECTION_SUCCESS", 17 | payload: payload, 18 | }; 19 | }; 20 | 21 | const connectFailed = (payload) => { 22 | return { 23 | type: "CONNECTION_FAILED", 24 | payload: payload, 25 | }; 26 | }; 27 | 28 | const updateAccountRequest = (payload) => { 29 | return { 30 | type: "UPDATE_ACCOUNT", 31 | payload: payload, 32 | }; 33 | }; 34 | 35 | export const connect = () => { 36 | console.log("--:") 37 | return async (dispatch) => { 38 | dispatch(connectRequest()); 39 | const { ethereum } = window; 40 | const metamaskIsInstalled = ethereum && ethereum.isMetaMask; 41 | if (metamaskIsInstalled) { 42 | Web3EthContract.setProvider(ethereum); 43 | let web3 = new Web3(ethereum); 44 | try { 45 | const accounts = await ethereum.request({ 46 | method: "eth_requestAccounts", 47 | }); 48 | const networkId = await ethereum.request({ 49 | method: "net_version", 50 | }); 51 | // const NetworkData = await SmartContract.networks[networkId]; 52 | if (networkId == 1) { // IMPORTANT. ONCE YOUR CONTRACT IS ON THE MAIN NET, SWITCH THIS NUMBER TO 1. 53 | const SmartContractObj = new Web3EthContract( 54 | SmartContract, 55 | "0xe9F8Ae2ddbe7b6ECc1e68699e2e9030278AeD2F0" // **IMPORTANT** PASTE CONTRACT ADDRESS HERE 56 | ); 57 | dispatch( 58 | connectSuccess({ 59 | account: accounts[0], 60 | smartContract: SmartContractObj, 61 | web3: web3, 62 | }) 63 | ); 64 | // Add listeners start 65 | ethereum.on("accountsChanged", (accounts) => { 66 | dispatch(updateAccount(accounts[0])); 67 | }); 68 | ethereum.on("chainChanged", () => { 69 | window.location.reload(); 70 | }); 71 | // Add listeners end 72 | } else { 73 | dispatch(connectFailed("Change network to Ethereum.")); 74 | } 75 | } catch (err) { 76 | dispatch(connectFailed("Something went wrong.")); 77 | } 78 | } else { 79 | dispatch(connectFailed("Please install Metamask.")); 80 | } 81 | }; 82 | }; 83 | 84 | export const updateAccount = (account) => { 85 | return async (dispatch) => { 86 | dispatch(updateAccountRequest({ account: account })); 87 | dispatch(fetchData(account)); 88 | }; 89 | }; 90 | -------------------------------------------------------------------------------- /src/styles/reset.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | div, 4 | span, 5 | applet, 6 | object, 7 | iframe, 8 | h1, 9 | h2, 10 | h3, 11 | h4, 12 | h5, 13 | h6, 14 | p, 15 | blockquote, 16 | pre, 17 | a, 18 | abbr, 19 | acronym, 20 | address, 21 | big, 22 | cite, 23 | code, 24 | del, 25 | dfn, 26 | em, 27 | img, 28 | ins, 29 | kbd, 30 | q, 31 | s, 32 | samp, 33 | small, 34 | strike, 35 | strong, 36 | sub, 37 | sup, 38 | tt, 39 | var, 40 | b, 41 | u, 42 | i, 43 | center, 44 | dl, 45 | dt, 46 | dd, 47 | ol, 48 | ul, 49 | li, 50 | fieldset, 51 | form, 52 | label, 53 | legend, 54 | table, 55 | caption, 56 | tbody, 57 | tfoot, 58 | thead, 59 | tr, 60 | th, 61 | td, 62 | article, 63 | aside, 64 | canvas, 65 | details, 66 | embed, 67 | figure, 68 | figcaption, 69 | footer, 70 | header, 71 | hgroup, 72 | menu, 73 | nav, 74 | output, 75 | ruby, 76 | section, 77 | summary, 78 | time, 79 | mark, 80 | audio, 81 | video { 82 | margin: 0; 83 | padding: 0; 84 | border: 0; 85 | font-size: 100%; 86 | font: inherit; 87 | vertical-align: baseline; 88 | color: "white"; 89 | } 90 | /* HTML5 display-role reset for older browsers */ 91 | article, 92 | aside, 93 | details, 94 | figcaption, 95 | figure, 96 | footer, 97 | header, 98 | hgroup, 99 | menu, 100 | nav, 101 | section { 102 | display: block; 103 | } 104 | body { 105 | line-height: 1; 106 | background-color: black; 107 | color: white; 108 | } 109 | ol, 110 | ul { 111 | list-style: none; 112 | } 113 | blockquote, 114 | q { 115 | quotes: none; 116 | } 117 | blockquote:before, 118 | blockquote:after, 119 | q:before, 120 | q:after { 121 | content: ""; 122 | content: none; 123 | } 124 | table { 125 | border-collapse: collapse; 126 | border-spacing: 0; 127 | } 128 | 129 | @font-face { 130 | font-family: "coder"; 131 | font-weight: bold; 132 | src: local("coder"), 133 | url(../styles/RobotoCondensed-Bold.ttf); 134 | } 135 | 136 | body { 137 | margin: 0; 138 | font-family: "coder", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", 139 | "Droid Sans", "Helvetica Neue", sans-serif; 140 | /* font-size: 40; */ 141 | -webkit-font-smoothing: antialiased; 142 | -moz-osx-font-smoothing: grayscale; 143 | } 144 | 145 | * { 146 | margin: 0; 147 | padding: 0; 148 | box-sizing: border-box; 149 | } 150 | 151 | code { 152 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 153 | monospace; 154 | } 155 | 156 | body::-webkit-scrollbar { 157 | display: none; 158 | } 159 | 160 | /* Hide scrollbar for IE, Edge and Firefox */ 161 | body { 162 | -ms-overflow-style: none; /* IE and Edge */ 163 | scrollbar-width: none; /* Firefox */ 164 | overflow-x: hidden; 165 | } 166 | 167 | html { 168 | background-color: "#4C4C4C"; 169 | } 170 | 171 | div { 172 | -moz-user-select: none; 173 | -webkit-user-select: none; 174 | -ms-user-select: none; 175 | user-select: none; 176 | -o-user-select: none; 177 | } 178 | -------------------------------------------------------------------------------- /src/components/roadmap/roadmap.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Col, Container, Row } from "react-bootstrap"; 3 | 4 | //import CSS 5 | import './roadmap.css'; 6 | 7 | //import Assets 8 | import roadmap from '../../assets/roadmap.png'; 9 | 10 | //import Component 11 | import RoadMapItem from "./roadmapitem"; 12 | class RoadMap extends React.Component { 13 | constructor(props) { 14 | super(props); 15 | this.state = { 16 | roadmaps: [ 17 | { 18 | tag: 'HOLE1', 19 | title: 'Welcome', 20 | content: 'Welcome to the Club! Spooky Boys official public mint is revealed. The presale dates will be announced as soon as the technical aspects of our project are brought to completion.' 21 | }, 22 | { 23 | tag: 'HOLE2', 24 | title: 'Spoo-keys airdrop', 25 | content: 'All project holders will get airdropped a set of Spoo-keys. Also hire slayer' 26 | }, 27 | { 28 | tag: 'HOLE3', 29 | title: 'Unlock a mystery', 30 | content: 'Use your Spoo-keys to unlock a mystery.' 31 | }, 32 | { 33 | tag: 'HOLE4', 34 | title: 'Token launch', 35 | content: 'Spooky boys token launch.' 36 | }, 37 | { 38 | tag: 'HOLE5', 39 | title: 'Staking Launch', 40 | content: 'Staking will begin Q2 of 2022 to add increased value to all loyal Country Club members who HODL and accumulate tokens.' 41 | }, 42 | { 43 | tag: 'HOLE6', 44 | title: 'Spooky Boys Survival Game - Beta Version Release', 45 | content: 'This game is currently being developed and will create more benefits to Country Club members through in-game contests and token accumulation.' 46 | }, 47 | { 48 | tag: 'HOLE7', 49 | title: 'Spooky Boys Survival Game Launch', 50 | content: 'Spooky Szn will be in full swing upon release of one of the best metaversal games!' 51 | } 52 | ] 53 | } 54 | } 55 | 56 | render() { 57 | return ( 58 |
59 | 60 |
SPOOKY BOYS
ROADMAP.
61 |

62 | Our Roadmap outlines some of the future perks Spooky Boys Country Club members will be able to enjoy. Scroll through the course map and look over some of the ideas and concepts we wish to grow and deliver. We are constantly developing here at SBCC, so this map will also develop and evolve as more ideas are created to make our Country Club the top rated club of the Metaverse! 63 |

64 | 65 | 66 | roadmap 67 | 68 | 69 | { 70 | this.state.roadmaps.map((item, index) => { 71 | return( 72 | 76 | ); 77 | }) 78 | } 79 | 80 | 81 |
82 |
83 | 84 | ); 85 | } 86 | } 87 | 88 | export default RoadMap; -------------------------------------------------------------------------------- /src/components/meet/meet.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Container } from "react-bootstrap"; 3 | 4 | import InfiniteCarousel from 'react-leaf-carousel'; 5 | 6 | //import Assets 7 | import ImageBoy1 from '../../assets/boys/boy1.png'; 8 | 9 | //import CSS 10 | import './meet.css'; 11 | 12 | import { BsArrowLeftShort, 13 | BsArrowRightShort } from 'react-icons/bs'; 14 | class Meet extends React.Component { 15 | render() { 16 | 17 | return ( 18 |
19 | 20 |
21 | MEET THE
SPOOKY BOYS 22 |
23 |
24 | 57 |
58 | boy1 59 |
60 |
61 | boy2 62 |
63 |
64 | boy3 65 |
66 |
67 | boy4 68 |
69 |
70 | boy5 71 |
72 |
73 | boy6 74 |
75 |
76 | 77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 |
86 |
87 | 88 |
89 | 0 90 |

SPOOKIES REMAINING

91 |
92 |
93 |
94 | 95 | ); 96 | } 97 | } 98 | 99 | export default Meet; -------------------------------------------------------------------------------- /src/test.js: -------------------------------------------------------------------------------- 1 | tuple(string,string,uint256,uint256,uint32,uint32,uint32,uint8,uint8,uint8,bool,bool,bool)[]: NPSCZUSr,no swag,0,9252183311529579,1629107003,1629092916,72003,4,50,3,false,false,true,Ashley's 👻,safelips swag,1,1598124591541123,1629107617,1629021347,288006,9,93,3,false,false,true,agCHJbuD,,2,1315411858406600,1629065440,1629030863,36000,2,67,4,false,false,true,Ashley's 🍌,,3,1315411858406600,1629107329,1629100287,72000,4,19,4,false,false,true,GqbWg0hQ,,4,6489365713190396,1629047515,1629029475,72001,2,54,1,false,false,true,Ashley's 🔥,safelips swag,5,1456768224973861,1629107267,1629029837,147600,9,80,1,false,false,true,Ashley's 🌊,,6,1527446408257492,1629107301,1629100319,90001,4,18,2,false,false,true,9yV2D9RZ,,7,5403907985216001,1629050891,1629032859,18000,1,47,4,false,false,true,Unknown,,8,3430338105094931,1629051207,1629032929,3600,1,65,2,false,false,true,Unknown,,9,6341260708312255,1629051243,1629033223,3600,1,36,1,false,false,true,Unknown,,10,3828336283359427,1629051305,1629033269,18000,1,1,1,false,false,true,OY8fAwxm,,11,9174027147231267,1629051435,1629033379,3600,1,6,3,false,false,true,Unknown,,12,5350736777744379,1629116557,1629098419,72002,3,98,1,false,false,true,MwARw8YY,,13,9766186097671807,1629109223,1629091267,25202,3,42,3,false,false,true,QV11BhLs,,14,3214299699040058,1629063466,1629045448,3600,1,14,3,false,false,true,Unknown,,15,3322318902067494,1629063598,1629045480,3600,1,48,1,false,false,true,Unknown,,16,4905842307628945,1629063654,1629045616,36000,2,87,4,false,false,true,78vDmreE,,17,9117391593261885,1629065582,1629047486,3600,1,48,1,false,false,true,Unknown,,18,9145709370246576,1629065710,1629047624,3600,1,72,1,false,false,true,Unknown,,19,6288023737670753,1629065790,1629047748,3600,1,32,1,false,false,true,Unknown,,20,3801717798038676,1629065900,1629047856,18000,1,31,4,false,false,true,Unknown,,21,2629243011506268,1629121369,1629084465,54001,3,78,4,false,false,true,DKGO06LN,icecream swag,22,1447016370160939,1629116243,1629098519,90002,3,78,3,false,false,true,Unknown,,23,8127775905431101,1629109611,1629091633,25201,2,54,3,false,false,true,Unknown,,24,5378509458468684,1629084487,1629066429,3600,1,18,3,false,false,true,Unknown,,25,3412762914314811,1629121217,1629103285,36000,2,75,4,false,false,true,Unknown,,26,3421550509704871,1629121621,1629103589,21601,2,54,3,false,false,true,Unknown,,27,6283629939975723,1629121403,1629085271,54000,3,95,4,false,false,true,Unknown,,28,6739256341587740,1629109501,1629091541,39600,3,73,2,false,false,true,Unknown,,29,3989989894625323,1629121329,1629084763,90000,5,84,1,false,false,true,Unknown,,30,3799520899191161,1629121451,1629098603,36000,2,11,4,false,false,true,Unknown,,31,3506910299115609,1629103455,1629085411,3600,1,70,3,false,false,true,0R2vLSaS,,32,938408255393727,1629122485,1629085473,54000,3,89,2,false,false,true,Unknown,,33,4895270119545666,1629121853,1629098479,36000,2,63,4,false,false,true,Unknown,,34,4154016516930238,1629121705,1629085578,90000,5,72,1,false,false,true,Unknown,,35,6593868303688339,1629109929,1629091757,25200,3,1,1,false,false,true,Unknown,,36,4027334099997170,1629109733,1629091713,36000,2,71,4,false,false,true,Unknown,,37,4533092080412414,1629109695,1629091663,36000,2,53,2,false,false,true,Unknown,,38,6541617008439367,1629110147,1629091973,39600,3,32,1,false,false,true,Unknown,,39,7855629948475112,1629110003,1629091959,36001,2,98,3,false,false,true,Unknown,,40,7896900159984473,1629110227,1629092187,36000,2,95,4,false,false,true,I8QxfIZ4,,41,3334436577470117,1629117571,1629099383,36000,2,45,2,false,false,true,pVCdTV9y,,42,73293379797096,1629117567,1629099433,36000,2,7,4,false,false,true,94Q7ZVXZ,,43,7701286313960044,1629117663,1629099603,72001,2,2,3,false,false,true,VVQHSnMA,,44,5013426811166663,1629118007,1629099849,54001,2,66,3,false,false,true,Trxivut6,,45,6587457647305051,1629118333,1629100251,54000,3,28,1,false,false,true,ys8jZMep,,46,2511294338456091,1629118583,1629100391,54000,3,96,1,false,false,true,yd9C3lnY,,47,1053936099338045,1629118609,1629100453,72001,2,18,3,false,false,true,LpTIJfPH,,48,2202820867549863,1629118627,1629100525,36000,2,69,2,false,false,true,LC6IFjSb,,49,1063659986412318,1629118841,1629100705,36000,2,27,4,false,false,true,tMUASG1M,,50,2838937724278794,1629118853,1629100759,36000,2,59,4,false,false,true,nB0VLB1j,,51,6687202451293699,1629122677,1629101037,198000,11,99,1,false,false,true -------------------------------------------------------------------------------- /src/assets/fonts/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2012 The Press Start 2P Project Authors (cody@zone38.net), with Reserved Font Name "Press Start 2P". 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /truffle-config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Use this file to configure your truffle project. It's seeded with some 3 | * common settings for different networks and features like migrations, 4 | * compilation and testing. Uncomment the ones you need or modify 5 | * them to suit your project as necessary. 6 | * 7 | * More information about configuration can be found at: 8 | * 9 | * trufflesuite.com/docs/advanced/configuration 10 | * 11 | * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) 12 | * to sign your transactions before they're sent to a remote public node. Infura accounts 13 | * are available for free at: infura.io/register. 14 | * 15 | * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate 16 | * public/private key pairs. If you're publishing your code to GitHub make sure you load this 17 | * phrase from a file you've .gitignored so it doesn't accidentally become public. 18 | * 19 | */ 20 | 21 | // const HDWalletProvider = require('@truffle/hdwallet-provider'); 22 | // const infuraKey = "fj4jll3k....."; 23 | // 24 | // const fs = require('fs'); 25 | // const mnemonic = fs.readFileSync(".secret").toString().trim(); 26 | 27 | module.exports = { 28 | /** 29 | * Networks define how you connect to your ethereum client and let you set the 30 | * defaults web3 uses to send transactions. If you don't specify one truffle 31 | * will spin up a development blockchain for you on port 9545 when you 32 | * run `develop` or `test`. You can ask a truffle command to use a specific 33 | * network from the command line, e.g 34 | * 35 | * $ truffle test --network 36 | */ 37 | 38 | networks: { 39 | // Useful for testing. The `development` name is special - truffle uses it by default 40 | // if it's defined here and no other network is specified at the command line. 41 | // You should run a client (like ganache-cli, geth or parity) in a separate terminal 42 | // tab if you use this network and you must also set the `host`, `port` and `network_id` 43 | // options below to some value. 44 | // 45 | development: { 46 | host: "127.0.0.1", // Localhost (default: none) 47 | port: 8545, // Standard Ethereum port (default: none) 48 | network_id: "*", // Any network (default: none) 49 | }, 50 | // Another network with more advanced options... 51 | // advanced: { 52 | // port: 8777, // Custom port 53 | // network_id: 1342, // Custom network 54 | // gas: 8500000, // Gas sent with each transaction (default: ~6700000) 55 | // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) 56 | // from:
, // Account to send txs from (default: accounts[0]) 57 | // websocket: true // Enable EventEmitter interface for web3 (default: false) 58 | // }, 59 | // Useful for deploying to a public network. 60 | // NB: It's important to wrap the provider as a function. 61 | // ropsten: { 62 | // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), 63 | // network_id: 3, // Ropsten's id 64 | // gas: 5500000, // Ropsten has a lower block limit than mainnet 65 | // confirmations: 2, // # of confs to wait between deployments. (default: 0) 66 | // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) 67 | // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) 68 | // }, 69 | // Useful for private networks 70 | // private: { 71 | // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), 72 | // network_id: 2111, // This network is yours, in the cloud. 73 | // production: true // Treats this network as if it was a public net. (default: false) 74 | // } 75 | }, 76 | 77 | // Set default mocha options here, use special reporters etc. 78 | mocha: { 79 | // timeout: 100000 80 | }, 81 | 82 | // Configure your compilers 83 | contracts_build_directory: "./src/contracts/", 84 | compilers: { 85 | solc: { 86 | version: "0.8.4", // Fetch exact version from solc-bin (default: truffle's version) 87 | settings: { 88 | // See the solidity docs for advice about optimization and evmVersion 89 | optimizer: { 90 | enabled: true, 91 | runs: 200, 92 | }, 93 | }, 94 | }, 95 | }, 96 | 97 | // Truffle DB is currently disabled by default; to enable it, change enabled: false to enabled: true 98 | // 99 | // Note: if you migrated your contracts prior to enabling this field in your Truffle project and want 100 | // those previously migrated contracts available in the .db directory, you will need to run the following: 101 | // $ truffle migrate --reset --compile-all 102 | 103 | db: { 104 | enabled: false, 105 | }, 106 | }; 107 | -------------------------------------------------------------------------------- /src/components/mint/mint.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { Container, Row, Col } from "react-bootstrap"; 3 | 4 | //import Assets 5 | import MintGif from '../../assets/mint.gif'; 6 | import YButton from "../basic/YButton"; 7 | 8 | import { BsFileMinusFill, BsFilePlusFill } from 'react-icons/bs'; 9 | 10 | //import CSS 11 | import './mint.css'; 12 | import { useDispatch, useSelector } from "react-redux"; 13 | import { connect } from "../../redux/blockchain/blockchainActions"; 14 | import { fetchData } from "../../redux/data/dataActions"; 15 | function Mint(){ 16 | const dispatch = useDispatch(); 17 | const blockchain = useSelector((state) => state.blockchain); 18 | const data = useSelector((state) => state.data); 19 | const [feedback, setFeedback] = useState(""); 20 | const [claimingNft, setClaimingNft] = useState(false); 21 | const [mintNum, setMintNum] = useState(0) 22 | const claimNFTs = (_amount) => { 23 | _amount = document.getElementById("inputBox").textContent; 24 | if (_amount <= 0) { 25 | return; 26 | } 27 | setFeedback("Minting your Official BooCrew NFT..."); 28 | setClaimingNft(true); 29 | blockchain.smartContract.methods 30 | .mint(blockchain.account, _amount) 31 | // ******** 32 | // You can change the line above to 33 | // .whiteListMint(blockchain.account, _amount) if you want only whitelisted 34 | // users to be able to mint through your website! 35 | // And after you're done with whitelisted users buying from your website, 36 | // You can switch it back to .mint(blockchain.account, _amount). 37 | // ******** 38 | .send({ 39 | gasLimit: 285000 * _amount, 40 | to: "0x8815e06FC5b57Bd4d5590977a697582f19d2330e", // the address of your contract 41 | from: blockchain.account, 42 | value: blockchain.web3.utils.toWei((0.035 * _amount).toString(), "ether"), 43 | }) 44 | .once("error", (err) => { 45 | console.log(err); 46 | setFeedback("Sorry, something went wrong. Check your transaction on Etherscan to find out what happened!"); 47 | setClaimingNft(false); 48 | }) 49 | .then((receipt) => { 50 | setFeedback( 51 | "Your BooCrew NFT has been successfully minted!" 52 | ); 53 | setClaimingNft(false); 54 | dispatch(fetchData(blockchain.account)); 55 | }); 56 | }; 57 | 58 | const getData = () => { 59 | if (blockchain.account !== "" && blockchain.smartContract !== null) { 60 | dispatch(fetchData(blockchain.account)); 61 | } 62 | }; 63 | 64 | useEffect(() => { 65 | getData(); 66 | }, [blockchain.account]); 67 | 68 | const plus_num = () =>{ 69 | // const {mintNum} = this.state; 70 | setMintNum(mintNum +1); 71 | } 72 | const minus_num = () =>{ 73 | // const {mintNum} = this.state; 74 | if ( mintNum ==0)return; 75 | setMintNum(mintNum -1) 76 | } 77 | return ( 78 |
79 | 80 | 81 | 82 | mint gif 83 | 84 | 85 |
MINT YOUR
SPOOKY BOYS.
86 |

87 | The Spooky Boys Country Club is a collection of 13,000 unique ERC-721 tokens stored on the Ethereum Blockchain. Non-sequentially minted and provably unique, each NFT comes with a full membership including functioning utility and an ever-growing community. 88 |

89 |
90 | minus_num()}/> 91 | {mintNum} 92 | plus_num()}/> 93 |
94 | { 95 | blockchain.account === "" || blockchain.smartContract === null ? 96 |
97 | 104 | {blockchain.errorMsg !== "" ? ( 105 | 106 | {blockchain.errorMsg} 107 | 108 | 109 | ) : null} 110 |
111 | : 112 | 118 | } 119 | 120 |
121 |
122 |
123 | ); 124 | } 125 | 126 | export default Mint; -------------------------------------------------------------------------------- /contracts/SmartContract.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | 3 | // Created by Doodlenauts 4 | 5 | 6 | pragma solidity ^0.8.0; 7 | 8 | import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; 9 | import "@openzeppelin/contracts/access/Ownable.sol"; 10 | 11 | // Contract: Boo Crew NFT 12 | // Author: Sean Pentiboyina 13 | // ---- CONTRACT BEGINS HERE ---- 14 | 15 | pragma solidity ^0.8.0; 16 | 17 | contract BooCrewNFT is ERC721Enumerable, Ownable { 18 | using Strings for uint256; 19 | 20 | string public baseURI; 21 | string public baseExtension = ""; 22 | uint256 public cost = 0.05 ether; 23 | uint256 public maxSupply = 10000; 24 | uint256 public maxMintAmount = 100; 25 | bool public paused = false; 26 | uint256 public walletLimit = 100; 27 | mapping(address => bool) public whitelisted; 28 | 29 | constructor( 30 | string memory _name, 31 | string memory _symbol, 32 | string memory _initBaseURI 33 | ) ERC721(_name, _symbol) { 34 | setBaseURI(_initBaseURI); 35 | // To change the amount of Reserved Owner Tokens, 36 | // change the number in the mint(msg.sender, 100) method below 37 | // to any other number you want. The default is 38 | // 100 reserve tokens for the owner. 39 | mint(msg.sender, 100); 40 | maxMintAmount = 20; 41 | walletLimit = 3; 42 | } 43 | 44 | // internal 45 | function _baseURI() internal view virtual override returns (string memory) { 46 | return baseURI; 47 | } 48 | 49 | // public 50 | function mint(address _to, uint256 _mintAmount) public payable { 51 | uint256 supply = totalSupply(); 52 | require(!paused); 53 | require(_mintAmount > 0); 54 | require(_mintAmount <= maxMintAmount); 55 | require(supply + _mintAmount <= maxSupply); 56 | require((balanceOf(msg.sender) + _mintAmount) <= walletLimit, 'Wallet limit is reached.'); 57 | 58 | if (msg.sender != owner()) { 59 | if(whitelisted[msg.sender] != true) { 60 | require(msg.value >= cost * _mintAmount); 61 | } 62 | } 63 | 64 | for (uint256 i = 1; i <= _mintAmount; i++) { 65 | _safeMint(_to, supply + i); 66 | } 67 | } 68 | 69 | function whiteListMint(address _to, uint256 _mintAmount) public payable { 70 | uint256 supply = totalSupply(); 71 | require(_mintAmount > 0); 72 | require(_mintAmount <= maxMintAmount); 73 | require(supply + _mintAmount <= maxSupply); 74 | require(whitelisted[msg.sender] == true, 'Address is not whitelisted.'); 75 | require((balanceOf(msg.sender) + _mintAmount) <= walletLimit, 'Wallet limit is reached.'); 76 | 77 | for (uint256 i = 1; i <= _mintAmount; i++) { 78 | _safeMint(_to, supply + i); 79 | } 80 | } 81 | 82 | 83 | 84 | function walletOfOwner(address _owner) 85 | public 86 | view 87 | returns (uint256[] memory) 88 | { 89 | uint256 ownerTokenCount = balanceOf(_owner); 90 | uint256[] memory tokenIds = new uint256[](ownerTokenCount); 91 | for (uint256 i; i < ownerTokenCount; i++) { 92 | tokenIds[i] = tokenOfOwnerByIndex(_owner, i); 93 | } 94 | return tokenIds; 95 | } 96 | 97 | function tokenURI(uint256 tokenId) 98 | public 99 | view 100 | virtual 101 | override 102 | returns (string memory) 103 | { 104 | require( 105 | _exists(tokenId), 106 | "ERC721Metadata: URI query for nonexistent Boo Crew NFT" 107 | ); 108 | 109 | string memory currentBaseURI = _baseURI(); 110 | return bytes(currentBaseURI).length > 0 111 | ? string(abi.encodePacked(currentBaseURI, tokenId.toString(), baseExtension)) 112 | : ""; 113 | } 114 | 115 | // 116 | // ONLY THE OWNER CAN CALL THE FUNCTIONS BELOW. 117 | // 118 | 119 | // This sets the minting price of each NFT. 120 | // Example: If you pass in 0.1, then you will need to pay 0.1 ETH + gas to mint 1 NFT. 121 | function setCost(uint256 _newCost) public onlyOwner() { 122 | cost = _newCost; 123 | } 124 | 125 | // This sets the amount users can mint at once. 126 | // Example: If you want your users to be able to mint 20 NFTs at once, 127 | // then you can set the setMaxMintAmount to 20. 128 | // 129 | // *THIS IS NOT A WALLET LIMIT. THERE IS ANOTHER FUNCTION FOR THAT BELOW* 130 | function setMaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { 131 | maxMintAmount = _newmaxMintAmount; 132 | } 133 | 134 | // This sets the wallet limit. 135 | // Example: If you set the setWalletLimit function to 5, then users can have AT MOST 5 NFTs in their wallet. 136 | // You can change this to adjust the pre-mint wallet limit vs. the main minting phase's wallet limit. 137 | function setWalletLimit(uint256 _newWalletLimit) public onlyOwner() { 138 | walletLimit = _newWalletLimit; 139 | } 140 | 141 | // If you want to save gas by setting the maxMintAmount and walletLimit 142 | // at the same time, you can use this function. 143 | // Simply pass in the new maxMintAmount first, and the newWalletLimit second. 144 | // Example: 145 | // If you want to set a pre-mint phase where users can only mint 3 NFTs at a time, 146 | // and have a wallet limit of 9 NFTs, you can pass in the arguments 147 | // 3 and 9 respectively. 148 | // Then, to activate full minting for your official launch phase, 149 | // simply pass in new arguments to change the maxMintAmount and walletLimit. 150 | // Example: 151 | // Now that you're fully launching, you can pass in 10 to the newMaxMintAmount argument 152 | // which would allow users to mint up to 10 at a time, and pass in 20 to the 153 | // newWalletLimit argument which would create a wallet limit of 20 NFTs. 154 | function setMaxMintAmountAndWalletLimit(uint256 _newmaxMintAmount, uint256 _newWalletLimit) public onlyOwner() { 155 | maxMintAmount = _newmaxMintAmount; 156 | walletLimit = _newWalletLimit; 157 | } 158 | 159 | // This sets the max supply. This will be set to 10,000 by default, although it is changable. 160 | function setMaxSupply(uint256 _newSupply) public onlyOwner() { 161 | maxSupply = _newSupply; 162 | } 163 | 164 | // This changes the baseURI. 165 | // Example: If you pass in "https://google.com/", then every new NFT that is minted 166 | // will have a URI corresponding to the baseURI you passed in. 167 | // The first NFT you mint would have a URI of "https://google.com/1", 168 | // The second NFT you mint would have a URI of "https://google.com/2", etc. 169 | function setBaseURI(string memory _newBaseURI) public onlyOwner { 170 | baseURI = _newBaseURI; 171 | } 172 | 173 | // This sets the baseURI extension. 174 | // Example: If your database requires that the URI of each NFT 175 | // must have a .json at the end of the URI 176 | // (like https://google.com/1.json instead of just https://google.com/1) 177 | // then you can use this function to set the base extension. 178 | // For the above example, you would pass in ".json" to add the .json extension. 179 | function setBaseExtension(string memory _newBaseExtension) public onlyOwner { 180 | baseExtension = _newBaseExtension; 181 | } 182 | 183 | // This pauses or unpauses sales. 184 | function pause(bool _state) public onlyOwner { 185 | paused = _state; 186 | } 187 | 188 | // This whitelists users. 189 | // You MUST use an array for this function, and put quotes around the addresses you would like to whitelist. 190 | // Example: 191 | // If you want to whitelist 0x000000000000000000000000000000000000, 192 | // then pass in the argument: 193 | // ["0x000000000000000000000000000000000000"] 194 | // 195 | // If you want to whitelist multiple users, then pass in the argument with commas 196 | // seperating the user's addresses. 197 | // Example: 198 | // ["0x000000000000000000000000000000000000","0x111111111111111111111111111111111", "0x222222222222222222222222222222222"] 199 | function whitelistUser(address[] memory _user) public onlyOwner { 200 | uint256 x = 0; 201 | for (x = 0; x < _user.length; x++) { 202 | whitelisted[_user[x]] = true; 203 | } 204 | } 205 | 206 | // This removes whitelisted users. 207 | // It's arguments are the same as for whitelisting users. 208 | // You MUST use an array, and put quotes around the addresses you would like to remove from the whitelist. 209 | function removeWhitelistUser(address[] memory _user) public onlyOwner { 210 | uint256 x = 0; 211 | for (x = 0; x < _user.length; x++) { 212 | whitelisted[_user[x]] = false; 213 | } 214 | } 215 | 216 | // This withdraws the contract's balance of ETH to the Owner's (whoever launched the contract) address. 217 | function withdraw() public payable onlyOwner { 218 | require(payable(msg.sender).send(address(this).balance)); 219 | } 220 | 221 | 222 | } -------------------------------------------------------------------------------- /src/contracts/Doodlenauts.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "string", 6 | "name": "_name", 7 | "type": "string" 8 | }, 9 | { 10 | "internalType": "string", 11 | "name": "_symbol", 12 | "type": "string" 13 | }, 14 | { 15 | "internalType": "string", 16 | "name": "_initBaseURI", 17 | "type": "string" 18 | } 19 | ], 20 | "stateMutability": "nonpayable", 21 | "type": "constructor" 22 | }, 23 | { 24 | "anonymous": false, 25 | "inputs": [ 26 | { 27 | "indexed": true, 28 | "internalType": "address", 29 | "name": "owner", 30 | "type": "address" 31 | }, 32 | { 33 | "indexed": true, 34 | "internalType": "address", 35 | "name": "approved", 36 | "type": "address" 37 | }, 38 | { 39 | "indexed": true, 40 | "internalType": "uint256", 41 | "name": "tokenId", 42 | "type": "uint256" 43 | } 44 | ], 45 | "name": "Approval", 46 | "type": "event" 47 | }, 48 | { 49 | "anonymous": false, 50 | "inputs": [ 51 | { 52 | "indexed": true, 53 | "internalType": "address", 54 | "name": "owner", 55 | "type": "address" 56 | }, 57 | { 58 | "indexed": true, 59 | "internalType": "address", 60 | "name": "operator", 61 | "type": "address" 62 | }, 63 | { 64 | "indexed": false, 65 | "internalType": "bool", 66 | "name": "approved", 67 | "type": "bool" 68 | } 69 | ], 70 | "name": "ApprovalForAll", 71 | "type": "event" 72 | }, 73 | { 74 | "anonymous": false, 75 | "inputs": [ 76 | { 77 | "indexed": true, 78 | "internalType": "address", 79 | "name": "previousOwner", 80 | "type": "address" 81 | }, 82 | { 83 | "indexed": true, 84 | "internalType": "address", 85 | "name": "newOwner", 86 | "type": "address" 87 | } 88 | ], 89 | "name": "OwnershipTransferred", 90 | "type": "event" 91 | }, 92 | { 93 | "anonymous": false, 94 | "inputs": [ 95 | { 96 | "indexed": true, 97 | "internalType": "address", 98 | "name": "from", 99 | "type": "address" 100 | }, 101 | { 102 | "indexed": true, 103 | "internalType": "address", 104 | "name": "to", 105 | "type": "address" 106 | }, 107 | { 108 | "indexed": true, 109 | "internalType": "uint256", 110 | "name": "tokenId", 111 | "type": "uint256" 112 | } 113 | ], 114 | "name": "Transfer", 115 | "type": "event" 116 | }, 117 | { 118 | "inputs": [ 119 | { 120 | "internalType": "bool", 121 | "name": "_state", 122 | "type": "bool" 123 | } 124 | ], 125 | "name": "activateWhitelist", 126 | "outputs": [], 127 | "stateMutability": "nonpayable", 128 | "type": "function" 129 | }, 130 | { 131 | "inputs": [ 132 | { 133 | "internalType": "address", 134 | "name": "to", 135 | "type": "address" 136 | }, 137 | { 138 | "internalType": "uint256", 139 | "name": "tokenId", 140 | "type": "uint256" 141 | } 142 | ], 143 | "name": "approve", 144 | "outputs": [], 145 | "stateMutability": "nonpayable", 146 | "type": "function" 147 | }, 148 | { 149 | "inputs": [ 150 | { 151 | "internalType": "address", 152 | "name": "owner", 153 | "type": "address" 154 | } 155 | ], 156 | "name": "balanceOf", 157 | "outputs": [ 158 | { 159 | "internalType": "uint256", 160 | "name": "", 161 | "type": "uint256" 162 | } 163 | ], 164 | "stateMutability": "view", 165 | "type": "function" 166 | }, 167 | { 168 | "inputs": [], 169 | "name": "baseExtension", 170 | "outputs": [ 171 | { 172 | "internalType": "string", 173 | "name": "", 174 | "type": "string" 175 | } 176 | ], 177 | "stateMutability": "view", 178 | "type": "function" 179 | }, 180 | { 181 | "inputs": [], 182 | "name": "baseURI", 183 | "outputs": [ 184 | { 185 | "internalType": "string", 186 | "name": "", 187 | "type": "string" 188 | } 189 | ], 190 | "stateMutability": "view", 191 | "type": "function" 192 | }, 193 | { 194 | "inputs": [], 195 | "name": "cost", 196 | "outputs": [ 197 | { 198 | "internalType": "uint256", 199 | "name": "", 200 | "type": "uint256" 201 | } 202 | ], 203 | "stateMutability": "view", 204 | "type": "function" 205 | }, 206 | { 207 | "inputs": [ 208 | { 209 | "internalType": "uint256", 210 | "name": "tokenId", 211 | "type": "uint256" 212 | } 213 | ], 214 | "name": "getApproved", 215 | "outputs": [ 216 | { 217 | "internalType": "address", 218 | "name": "", 219 | "type": "address" 220 | } 221 | ], 222 | "stateMutability": "view", 223 | "type": "function" 224 | }, 225 | { 226 | "inputs": [ 227 | { 228 | "internalType": "address", 229 | "name": "owner", 230 | "type": "address" 231 | }, 232 | { 233 | "internalType": "address", 234 | "name": "operator", 235 | "type": "address" 236 | } 237 | ], 238 | "name": "isApprovedForAll", 239 | "outputs": [ 240 | { 241 | "internalType": "bool", 242 | "name": "", 243 | "type": "bool" 244 | } 245 | ], 246 | "stateMutability": "view", 247 | "type": "function" 248 | }, 249 | { 250 | "inputs": [], 251 | "name": "maxMintAmount", 252 | "outputs": [ 253 | { 254 | "internalType": "uint256", 255 | "name": "", 256 | "type": "uint256" 257 | } 258 | ], 259 | "stateMutability": "view", 260 | "type": "function" 261 | }, 262 | { 263 | "inputs": [], 264 | "name": "maxSupply", 265 | "outputs": [ 266 | { 267 | "internalType": "uint256", 268 | "name": "", 269 | "type": "uint256" 270 | } 271 | ], 272 | "stateMutability": "view", 273 | "type": "function" 274 | }, 275 | { 276 | "inputs": [ 277 | { 278 | "internalType": "address", 279 | "name": "_to", 280 | "type": "address" 281 | }, 282 | { 283 | "internalType": "uint256", 284 | "name": "_mintAmount", 285 | "type": "uint256" 286 | } 287 | ], 288 | "name": "mint", 289 | "outputs": [], 290 | "stateMutability": "payable", 291 | "type": "function" 292 | }, 293 | { 294 | "inputs": [], 295 | "name": "name", 296 | "outputs": [ 297 | { 298 | "internalType": "string", 299 | "name": "", 300 | "type": "string" 301 | } 302 | ], 303 | "stateMutability": "view", 304 | "type": "function" 305 | }, 306 | { 307 | "inputs": [], 308 | "name": "owner", 309 | "outputs": [ 310 | { 311 | "internalType": "address", 312 | "name": "", 313 | "type": "address" 314 | } 315 | ], 316 | "stateMutability": "view", 317 | "type": "function" 318 | }, 319 | { 320 | "inputs": [ 321 | { 322 | "internalType": "uint256", 323 | "name": "tokenId", 324 | "type": "uint256" 325 | } 326 | ], 327 | "name": "ownerOf", 328 | "outputs": [ 329 | { 330 | "internalType": "address", 331 | "name": "", 332 | "type": "address" 333 | } 334 | ], 335 | "stateMutability": "view", 336 | "type": "function" 337 | }, 338 | { 339 | "inputs": [ 340 | { 341 | "internalType": "bool", 342 | "name": "_state", 343 | "type": "bool" 344 | } 345 | ], 346 | "name": "pause", 347 | "outputs": [], 348 | "stateMutability": "nonpayable", 349 | "type": "function" 350 | }, 351 | { 352 | "inputs": [], 353 | "name": "paused", 354 | "outputs": [ 355 | { 356 | "internalType": "bool", 357 | "name": "", 358 | "type": "bool" 359 | } 360 | ], 361 | "stateMutability": "view", 362 | "type": "function" 363 | }, 364 | { 365 | "inputs": [ 366 | { 367 | "internalType": "address[]", 368 | "name": "_user", 369 | "type": "address[]" 370 | } 371 | ], 372 | "name": "removeWhitelistUser", 373 | "outputs": [], 374 | "stateMutability": "nonpayable", 375 | "type": "function" 376 | }, 377 | { 378 | "inputs": [], 379 | "name": "renounceOwnership", 380 | "outputs": [], 381 | "stateMutability": "nonpayable", 382 | "type": "function" 383 | }, 384 | { 385 | "inputs": [ 386 | { 387 | "internalType": "address", 388 | "name": "from", 389 | "type": "address" 390 | }, 391 | { 392 | "internalType": "address", 393 | "name": "to", 394 | "type": "address" 395 | }, 396 | { 397 | "internalType": "uint256", 398 | "name": "tokenId", 399 | "type": "uint256" 400 | } 401 | ], 402 | "name": "safeTransferFrom", 403 | "outputs": [], 404 | "stateMutability": "nonpayable", 405 | "type": "function" 406 | }, 407 | { 408 | "inputs": [ 409 | { 410 | "internalType": "address", 411 | "name": "from", 412 | "type": "address" 413 | }, 414 | { 415 | "internalType": "address", 416 | "name": "to", 417 | "type": "address" 418 | }, 419 | { 420 | "internalType": "uint256", 421 | "name": "tokenId", 422 | "type": "uint256" 423 | }, 424 | { 425 | "internalType": "bytes", 426 | "name": "_data", 427 | "type": "bytes" 428 | } 429 | ], 430 | "name": "safeTransferFrom", 431 | "outputs": [], 432 | "stateMutability": "nonpayable", 433 | "type": "function" 434 | }, 435 | { 436 | "inputs": [ 437 | { 438 | "internalType": "address", 439 | "name": "operator", 440 | "type": "address" 441 | }, 442 | { 443 | "internalType": "bool", 444 | "name": "approved", 445 | "type": "bool" 446 | } 447 | ], 448 | "name": "setApprovalForAll", 449 | "outputs": [], 450 | "stateMutability": "nonpayable", 451 | "type": "function" 452 | }, 453 | { 454 | "inputs": [ 455 | { 456 | "internalType": "string", 457 | "name": "_newBaseExtension", 458 | "type": "string" 459 | } 460 | ], 461 | "name": "setBaseExtension", 462 | "outputs": [], 463 | "stateMutability": "nonpayable", 464 | "type": "function" 465 | }, 466 | { 467 | "inputs": [ 468 | { 469 | "internalType": "string", 470 | "name": "_newBaseURI", 471 | "type": "string" 472 | } 473 | ], 474 | "name": "setBaseURI", 475 | "outputs": [], 476 | "stateMutability": "nonpayable", 477 | "type": "function" 478 | }, 479 | { 480 | "inputs": [ 481 | { 482 | "internalType": "uint256", 483 | "name": "_newCost", 484 | "type": "uint256" 485 | } 486 | ], 487 | "name": "setCost", 488 | "outputs": [], 489 | "stateMutability": "nonpayable", 490 | "type": "function" 491 | }, 492 | { 493 | "inputs": [ 494 | { 495 | "internalType": "uint256", 496 | "name": "_newmaxMintAmount", 497 | "type": "uint256" 498 | } 499 | ], 500 | "name": "setMaxMintAmount", 501 | "outputs": [], 502 | "stateMutability": "nonpayable", 503 | "type": "function" 504 | }, 505 | { 506 | "inputs": [ 507 | { 508 | "internalType": "uint256", 509 | "name": "_newmaxMintAmount", 510 | "type": "uint256" 511 | }, 512 | { 513 | "internalType": "uint256", 514 | "name": "_newWalletLimit", 515 | "type": "uint256" 516 | } 517 | ], 518 | "name": "setMaxMintAmountAndWalletLimit", 519 | "outputs": [], 520 | "stateMutability": "nonpayable", 521 | "type": "function" 522 | }, 523 | { 524 | "inputs": [ 525 | { 526 | "internalType": "uint256", 527 | "name": "_newSupply", 528 | "type": "uint256" 529 | } 530 | ], 531 | "name": "setMaxSupply", 532 | "outputs": [], 533 | "stateMutability": "nonpayable", 534 | "type": "function" 535 | }, 536 | { 537 | "inputs": [ 538 | { 539 | "internalType": "uint256", 540 | "name": "_newWalletLimit", 541 | "type": "uint256" 542 | } 543 | ], 544 | "name": "setWalletLimit", 545 | "outputs": [], 546 | "stateMutability": "nonpayable", 547 | "type": "function" 548 | }, 549 | { 550 | "inputs": [ 551 | { 552 | "internalType": "bytes4", 553 | "name": "interfaceId", 554 | "type": "bytes4" 555 | } 556 | ], 557 | "name": "supportsInterface", 558 | "outputs": [ 559 | { 560 | "internalType": "bool", 561 | "name": "", 562 | "type": "bool" 563 | } 564 | ], 565 | "stateMutability": "view", 566 | "type": "function" 567 | }, 568 | { 569 | "inputs": [], 570 | "name": "symbol", 571 | "outputs": [ 572 | { 573 | "internalType": "string", 574 | "name": "", 575 | "type": "string" 576 | } 577 | ], 578 | "stateMutability": "view", 579 | "type": "function" 580 | }, 581 | { 582 | "inputs": [ 583 | { 584 | "internalType": "uint256", 585 | "name": "index", 586 | "type": "uint256" 587 | } 588 | ], 589 | "name": "tokenByIndex", 590 | "outputs": [ 591 | { 592 | "internalType": "uint256", 593 | "name": "", 594 | "type": "uint256" 595 | } 596 | ], 597 | "stateMutability": "view", 598 | "type": "function" 599 | }, 600 | { 601 | "inputs": [ 602 | { 603 | "internalType": "address", 604 | "name": "owner", 605 | "type": "address" 606 | }, 607 | { 608 | "internalType": "uint256", 609 | "name": "index", 610 | "type": "uint256" 611 | } 612 | ], 613 | "name": "tokenOfOwnerByIndex", 614 | "outputs": [ 615 | { 616 | "internalType": "uint256", 617 | "name": "", 618 | "type": "uint256" 619 | } 620 | ], 621 | "stateMutability": "view", 622 | "type": "function" 623 | }, 624 | { 625 | "inputs": [ 626 | { 627 | "internalType": "uint256", 628 | "name": "tokenId", 629 | "type": "uint256" 630 | } 631 | ], 632 | "name": "tokenURI", 633 | "outputs": [ 634 | { 635 | "internalType": "string", 636 | "name": "", 637 | "type": "string" 638 | } 639 | ], 640 | "stateMutability": "view", 641 | "type": "function" 642 | }, 643 | { 644 | "inputs": [], 645 | "name": "totalSupply", 646 | "outputs": [ 647 | { 648 | "internalType": "uint256", 649 | "name": "", 650 | "type": "uint256" 651 | } 652 | ], 653 | "stateMutability": "view", 654 | "type": "function" 655 | }, 656 | { 657 | "inputs": [ 658 | { 659 | "internalType": "address", 660 | "name": "from", 661 | "type": "address" 662 | }, 663 | { 664 | "internalType": "address", 665 | "name": "to", 666 | "type": "address" 667 | }, 668 | { 669 | "internalType": "uint256", 670 | "name": "tokenId", 671 | "type": "uint256" 672 | } 673 | ], 674 | "name": "transferFrom", 675 | "outputs": [], 676 | "stateMutability": "nonpayable", 677 | "type": "function" 678 | }, 679 | { 680 | "inputs": [ 681 | { 682 | "internalType": "address", 683 | "name": "newOwner", 684 | "type": "address" 685 | } 686 | ], 687 | "name": "transferOwnership", 688 | "outputs": [], 689 | "stateMutability": "nonpayable", 690 | "type": "function" 691 | }, 692 | { 693 | "inputs": [], 694 | "name": "walletLimit", 695 | "outputs": [ 696 | { 697 | "internalType": "uint256", 698 | "name": "", 699 | "type": "uint256" 700 | } 701 | ], 702 | "stateMutability": "view", 703 | "type": "function" 704 | }, 705 | { 706 | "inputs": [ 707 | { 708 | "internalType": "address", 709 | "name": "_owner", 710 | "type": "address" 711 | } 712 | ], 713 | "name": "walletOfOwner", 714 | "outputs": [ 715 | { 716 | "internalType": "uint256[]", 717 | "name": "", 718 | "type": "uint256[]" 719 | } 720 | ], 721 | "stateMutability": "view", 722 | "type": "function" 723 | }, 724 | { 725 | "inputs": [], 726 | "name": "whitelistOnly", 727 | "outputs": [ 728 | { 729 | "internalType": "bool", 730 | "name": "", 731 | "type": "bool" 732 | } 733 | ], 734 | "stateMutability": "view", 735 | "type": "function" 736 | }, 737 | { 738 | "inputs": [ 739 | { 740 | "internalType": "address[]", 741 | "name": "_user", 742 | "type": "address[]" 743 | } 744 | ], 745 | "name": "whitelistUser", 746 | "outputs": [], 747 | "stateMutability": "nonpayable", 748 | "type": "function" 749 | }, 750 | { 751 | "inputs": [ 752 | { 753 | "internalType": "address", 754 | "name": "", 755 | "type": "address" 756 | } 757 | ], 758 | "name": "whitelisted", 759 | "outputs": [ 760 | { 761 | "internalType": "bool", 762 | "name": "", 763 | "type": "bool" 764 | } 765 | ], 766 | "stateMutability": "view", 767 | "type": "function" 768 | }, 769 | { 770 | "inputs": [], 771 | "name": "withdraw", 772 | "outputs": [], 773 | "stateMutability": "payable", 774 | "type": "function" 775 | } 776 | ] -------------------------------------------------------------------------------- /contracts/deploy.txt: -------------------------------------------------------------------------------- 1 | 0x60c06040526005608081905264173539b7b760d91b60a09081526200002891600c919062000914565b50662386f26fc10000600d556103e8600e556014600f556010805460ff191690553480156200005657600080fd5b506040516200304c3803806200304c833981016040819052620000799162000a7e565b8251839083906200009290600090602085019062000914565b508051620000a890600190602084019062000914565b505050620000c5620000bf620000e660201b60201c565b620000ea565b620000d0816200013c565b620000dd336014620001b5565b50505062000c9e565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a546001600160a01b031633146200019c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b8051620001b190600b90602084019062000914565b5050565b6000620001c160085490565b60105490915060ff1615620001d557600080fd5b60008211620001e357600080fd5b600f54821115620001f357600080fd5b600e5462000202838362000b65565b11156200020e57600080fd5b600a546001600160a01b031633146200025b573360009081526011602052604090205460ff1615156001146200025b5781600d546200024e919062000b80565b3410156200025b57600080fd5b60015b82811162000292576200027d8462000277838562000b65565b62000298565b80620002898162000c28565b9150506200025e565b50505050565b620001b1828260405180602001604052806000815250620002ba60201b60201c565b620002c6838362000332565b620002d5600084848462000488565b6200032d5760405162461bcd60e51b815260206004820152603260248201526000805160206200302c83398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840162000193565b505050565b6001600160a01b0382166200038a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000193565b6000818152600260205260409020546001600160a01b031615620003f15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000193565b620003ff60008383620005f1565b6001600160a01b03821660009081526003602052604081208054600192906200042a90849062000b65565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000620004a9846001600160a01b0316620006cd60201b6200123c1760201c565b15620005e557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290620004e390339089908890889060040162000b0f565b602060405180830381600087803b158015620004fe57600080fd5b505af192505050801562000531575060408051601f3d908101601f191682019092526200052e9181019062000a4b565b60015b620005ca573d80801562000562576040519150601f19603f3d011682016040523d82523d6000602084013e62000567565b606091505b508051620005c25760405162461bcd60e51b815260206004820152603260248201526000805160206200302c83398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840162000193565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050620005e9565b5060015b949350505050565b620006098383836200032d60201b620009401760201c565b6001600160a01b03831662000667576200066181600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6200068d565b816001600160a01b0316836001600160a01b0316146200068d576200068d8382620006d3565b6001600160a01b038216620006a7576200032d8162000780565b826001600160a01b0316826001600160a01b0316146200032d576200032d82826200083a565b3b151590565b60006001620006ed846200088b60201b62000e891760201c565b620006f9919062000ba2565b6000838152600760205260409020549091508082146200074d576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090620007949060019062000ba2565b60008381526009602052604081205460088054939450909284908110620007bf57620007bf62000c72565b906000526020600020015490508060088381548110620007e357620007e362000c72565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806200081e576200081e62000c5c565b6001900381819060005260206000200160009055905550505050565b600062000852836200088b60201b62000e891760201c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b038216620008f85760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840162000193565b506001600160a01b031660009081526003602052604090205490565b828054620009229062000beb565b90600052602060002090601f01602090048101928262000946576000855562000991565b82601f106200096157805160ff191683800117855562000991565b8280016001018555821562000991579182015b828111156200099157825182559160200191906001019062000974565b506200099f929150620009a3565b5090565b5b808211156200099f5760008155600101620009a4565b600082601f830112620009cc57600080fd5b81516001600160401b0380821115620009e957620009e962000c88565b604051601f8301601f19908116603f0116810190828211818310171562000a145762000a1462000c88565b8160405283815286602085880101111562000a2e57600080fd5b62000a4184602083016020890162000bbc565b9695505050505050565b60006020828403121562000a5e57600080fd5b81516001600160e01b03198116811462000a7757600080fd5b9392505050565b60008060006060848603121562000a9457600080fd5b83516001600160401b038082111562000aac57600080fd5b62000aba87838801620009ba565b9450602086015191508082111562000ad157600080fd5b62000adf87838801620009ba565b9350604086015191508082111562000af657600080fd5b5062000b0586828701620009ba565b9150509250925092565b600060018060a01b03808716835280861660208401525083604083015260806060830152825180608084015262000b4e8160a085016020870162000bbc565b601f01601f19169190910160a00195945050505050565b6000821982111562000b7b5762000b7b62000c46565b500190565b600081600019048311821515161562000b9d5762000b9d62000c46565b500290565b60008282101562000bb75762000bb762000c46565b500390565b60005b8381101562000bd957818101518382015260200162000bbf565b83811115620002925750506000910152565b600181811c9082168062000c0057607f821691505b6020821081141562000c2257634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000c3f5762000c3f62000c46565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b61237e8062000cae6000396000f3fe60806040526004361061020f5760003560e01c806355f804b311610118578063a22cb465116100a0578063d5abeb011161006f578063d5abeb01146105c8578063d936547e146105de578063da3ef23f1461060e578063e985e9c51461062e578063f2fde38b1461067757600080fd5b8063a22cb46514610553578063b88d4fde14610573578063c668286214610593578063c87b56dd146105a857600080fd5b806370a08231116100e757806370a08231146104cb578063715018a6146104eb5780637f00c7a6146105005780638da5cb5b1461052057806395d89b411461053e57600080fd5b806355f804b31461045c5780635c975abb1461047c5780636352211e146104965780636c0360eb146104b657600080fd5b80632f745c591161019b57806342842e0e1161016a57806342842e0e146103af578063438b6300146103cf57806344a0d68a146103fc5780634a4c560d1461041c5780634f6ccce71461043c57600080fd5b80632f745c591461035457806330cc7ae0146103745780633ccfd60b1461039457806340c10f191461039c57600080fd5b8063095ea7b3116101e2578063095ea7b3146102c557806313faede6146102e557806318160ddd14610309578063239c70ae1461031e57806323b872dd1461033457600080fd5b806301ffc9a71461021457806302329a291461024957806306fdde031461026b578063081812fc1461028d575b600080fd5b34801561022057600080fd5b5061023461022f366004611ed4565b610697565b60405190151581526020015b60405180910390f35b34801561025557600080fd5b50610269610264366004611eb9565b6106c2565b005b34801561027757600080fd5b50610280610708565b60405161024091906120e1565b34801561029957600080fd5b506102ad6102a8366004611f57565b61079a565b6040516001600160a01b039091168152602001610240565b3480156102d157600080fd5b506102696102e0366004611e8f565b61082f565b3480156102f157600080fd5b506102fb600d5481565b604051908152602001610240565b34801561031557600080fd5b506008546102fb565b34801561032a57600080fd5b506102fb600f5481565b34801561034057600080fd5b5061026961034f366004611dad565b610945565b34801561036057600080fd5b506102fb61036f366004611e8f565b610976565b34801561038057600080fd5b5061026961038f366004611d5f565b610a0c565b610269610a57565b6102696103aa366004611e8f565b610aa7565b3480156103bb57600080fd5b506102696103ca366004611dad565b610b76565b3480156103db57600080fd5b506103ef6103ea366004611d5f565b610b91565b604051610240919061209d565b34801561040857600080fd5b50610269610417366004611f57565b610c33565b34801561042857600080fd5b50610269610437366004611d5f565b610c62565b34801561044857600080fd5b506102fb610457366004611f57565b610cb0565b34801561046857600080fd5b50610269610477366004611f0e565b610d43565b34801561048857600080fd5b506010546102349060ff1681565b3480156104a257600080fd5b506102ad6104b1366004611f57565b610d84565b3480156104c257600080fd5b50610280610dfb565b3480156104d757600080fd5b506102fb6104e6366004611d5f565b610e89565b3480156104f757600080fd5b50610269610f10565b34801561050c57600080fd5b5061026961051b366004611f57565b610f44565b34801561052c57600080fd5b50600a546001600160a01b03166102ad565b34801561054a57600080fd5b50610280610f73565b34801561055f57600080fd5b5061026961056e366004611e65565b610f82565b34801561057f57600080fd5b5061026961058e366004611de9565b611047565b34801561059f57600080fd5b50610280611079565b3480156105b457600080fd5b506102806105c3366004611f57565b611086565b3480156105d457600080fd5b506102fb600e5481565b3480156105ea57600080fd5b506102346105f9366004611d5f565b60116020526000908152604090205460ff1681565b34801561061a57600080fd5b50610269610629366004611f0e565b611164565b34801561063a57600080fd5b50610234610649366004611d7a565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561068357600080fd5b50610269610692366004611d5f565b6111a1565b60006001600160e01b0319821663780e9d6360e01b14806106bc57506106bc82611242565b92915050565b600a546001600160a01b031633146106f55760405162461bcd60e51b81526004016106ec90612146565b60405180910390fd5b6010805460ff1916911515919091179055565b6060600080546107179061225a565b80601f01602080910402602001604051908101604052809291908181526020018280546107439061225a565b80156107905780601f1061076557610100808354040283529160200191610790565b820191906000526020600020905b81548152906001019060200180831161077357829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108135760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106ec565b506000908152600460205260409020546001600160a01b031690565b600061083a82610d84565b9050806001600160a01b0316836001600160a01b031614156108a85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106ec565b336001600160a01b03821614806108c457506108c48133610649565b6109365760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106ec565b6109408383611292565b505050565b61094f3382611300565b61096b5760405162461bcd60e51b81526004016106ec9061217b565b6109408383836113f7565b600061098183610e89565b82106109e35760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106ec565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610a365760405162461bcd60e51b81526004016106ec90612146565b6001600160a01b03166000908152601160205260409020805460ff19169055565b600a546001600160a01b03163314610a815760405162461bcd60e51b81526004016106ec90612146565b60405133904780156108fc02916000818181858888f19350505050610aa557600080fd5b565b6000610ab260085490565b60105490915060ff1615610ac557600080fd5b60008211610ad257600080fd5b600f54821115610ae157600080fd5b600e54610aee83836121cc565b1115610af957600080fd5b600a546001600160a01b03163314610b41573360009081526011602052604090205460ff161515600114610b415781600d54610b3591906121f8565b341015610b4157600080fd5b60015b828111610b7057610b5e84610b5983856121cc565b6115a2565b80610b6881612295565b915050610b44565b50505050565b61094083838360405180602001604052806000815250611047565b60606000610b9e83610e89565b905060008167ffffffffffffffff811115610bbb57610bbb61231c565b604051908082528060200260200182016040528015610be4578160200160208202803683370190505b50905060005b82811015610c2b57610bfc8582610976565b828281518110610c0e57610c0e612306565b602090810291909101015280610c2381612295565b915050610bea565b509392505050565b600a546001600160a01b03163314610c5d5760405162461bcd60e51b81526004016106ec90612146565b600d55565b600a546001600160a01b03163314610c8c5760405162461bcd60e51b81526004016106ec90612146565b6001600160a01b03166000908152601160205260409020805460ff19166001179055565b6000610cbb60085490565b8210610d1e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106ec565b60088281548110610d3157610d31612306565b90600052602060002001549050919050565b600a546001600160a01b03163314610d6d5760405162461bcd60e51b81526004016106ec90612146565b8051610d8090600b906020840190611c24565b5050565b6000818152600260205260408120546001600160a01b0316806106bc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106ec565b600b8054610e089061225a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e349061225a565b8015610e815780601f10610e5657610100808354040283529160200191610e81565b820191906000526020600020905b815481529060010190602001808311610e6457829003601f168201915b505050505081565b60006001600160a01b038216610ef45760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106ec565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610f3a5760405162461bcd60e51b81526004016106ec90612146565b610aa560006115bc565b600a546001600160a01b03163314610f6e5760405162461bcd60e51b81526004016106ec90612146565b600f55565b6060600180546107179061225a565b6001600160a01b038216331415610fdb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106ec565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6110513383611300565b61106d5760405162461bcd60e51b81526004016106ec9061217b565b610b708484848461160e565b600c8054610e089061225a565b6000818152600260205260409020546060906001600160a01b03166111055760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016106ec565b600061110f611641565b9050600081511161112f576040518060200160405280600081525061115d565b8061113984611650565b600c60405160200161114d93929190611f9c565b6040516020818303038152906040525b9392505050565b600a546001600160a01b0316331461118e5760405162461bcd60e51b81526004016106ec90612146565b8051610d8090600c906020840190611c24565b600a546001600160a01b031633146111cb5760405162461bcd60e51b81526004016106ec90612146565b6001600160a01b0381166112305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106ec565b611239816115bc565b50565b3b151590565b60006001600160e01b031982166380ac58cd60e01b148061127357506001600160e01b03198216635b5e139f60e01b145b806106bc57506301ffc9a760e01b6001600160e01b03198316146106bc565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906112c782610d84565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166113795760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106ec565b600061138483610d84565b9050806001600160a01b0316846001600160a01b031614806113bf5750836001600160a01b03166113b48461079a565b6001600160a01b0316145b806113ef57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661140a82610d84565b6001600160a01b0316146114725760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016106ec565b6001600160a01b0382166114d45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106ec565b6114df83838361174e565b6114ea600082611292565b6001600160a01b0383166000908152600360205260408120805460019290611513908490612217565b90915550506001600160a01b03821660009081526003602052604081208054600192906115419084906121cc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610d80828260405180602001604052806000815250611806565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6116198484846113f7565b61162584848484611839565b610b705760405162461bcd60e51b81526004016106ec906120f4565b6060600b80546107179061225a565b6060816116745750506040805180820190915260018152600360fc1b602082015290565b8160005b811561169e578061168881612295565b91506116979050600a836121e4565b9150611678565b60008167ffffffffffffffff8111156116b9576116b961231c565b6040519080825280601f01601f1916602001820160405280156116e3576020820181803683370190505b5090505b84156113ef576116f8600183612217565b9150611705600a866122b0565b6117109060306121cc565b60f81b81838151811061172557611725612306565b60200101906001600160f81b031916908160001a905350611747600a866121e4565b94506116e7565b6001600160a01b0383166117a9576117a481600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6117cc565b816001600160a01b0316836001600160a01b0316146117cc576117cc8382611946565b6001600160a01b0382166117e357610940816119e3565b826001600160a01b0316826001600160a01b031614610940576109408282611a92565b6118108383611ad6565b61181d6000848484611839565b6109405760405162461bcd60e51b81526004016106ec906120f4565b60006001600160a01b0384163b1561193b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061187d903390899088908890600401612060565b602060405180830381600087803b15801561189757600080fd5b505af19250505080156118c7575060408051601f3d908101601f191682019092526118c491810190611ef1565b60015b611921573d8080156118f5576040519150601f19603f3d011682016040523d82523d6000602084013e6118fa565b606091505b5080516119195760405162461bcd60e51b81526004016106ec906120f4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506113ef565b506001949350505050565b6000600161195384610e89565b61195d9190612217565b6000838152600760205260409020549091508082146119b0576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906119f590600190612217565b60008381526009602052604081205460088054939450909284908110611a1d57611a1d612306565b906000526020600020015490508060088381548110611a3e57611a3e612306565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480611a7657611a766122f0565b6001900381819060005260206000200160009055905550505050565b6000611a9d83610e89565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216611b2c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106ec565b6000818152600260205260409020546001600160a01b031615611b915760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106ec565b611b9d6000838361174e565b6001600160a01b0382166000908152600360205260408120805460019290611bc69084906121cc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054611c309061225a565b90600052602060002090601f016020900481019282611c525760008555611c98565b82601f10611c6b57805160ff1916838001178555611c98565b82800160010185558215611c98579182015b82811115611c98578251825591602001919060010190611c7d565b50611ca4929150611ca8565b5090565b5b80821115611ca45760008155600101611ca9565b600067ffffffffffffffff80841115611cd857611cd861231c565b604051601f8501601f19908116603f01168101908282118183101715611d0057611d0061231c565b81604052809350858152868686011115611d1957600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114611d4a57600080fd5b919050565b80358015158114611d4a57600080fd5b600060208284031215611d7157600080fd5b61115d82611d33565b60008060408385031215611d8d57600080fd5b611d9683611d33565b9150611da460208401611d33565b90509250929050565b600080600060608486031215611dc257600080fd5b611dcb84611d33565b9250611dd960208501611d33565b9150604084013590509250925092565b60008060008060808587031215611dff57600080fd5b611e0885611d33565b9350611e1660208601611d33565b925060408501359150606085013567ffffffffffffffff811115611e3957600080fd5b8501601f81018713611e4a57600080fd5b611e5987823560208401611cbd565b91505092959194509250565b60008060408385031215611e7857600080fd5b611e8183611d33565b9150611da460208401611d4f565b60008060408385031215611ea257600080fd5b611eab83611d33565b946020939093013593505050565b600060208284031215611ecb57600080fd5b61115d82611d4f565b600060208284031215611ee657600080fd5b813561115d81612332565b600060208284031215611f0357600080fd5b815161115d81612332565b600060208284031215611f2057600080fd5b813567ffffffffffffffff811115611f3757600080fd5b8201601f81018413611f4857600080fd5b6113ef84823560208401611cbd565b600060208284031215611f6957600080fd5b5035919050565b60008151808452611f8881602086016020860161222e565b601f01601f19169290920160200192915050565b600084516020611faf8285838a0161222e565b855191840191611fc28184848a0161222e565b8554920191600090600181811c9080831680611fdf57607f831692505b858310811415611ffd57634e487b7160e01b85526022600452602485fd5b80801561201157600181146120225761204f565b60ff1985168852838801955061204f565b60008b81526020902060005b858110156120475781548a82015290840190880161202e565b505083880195505b50939b9a5050505050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061209390830184611f70565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156120d5578351835292840192918401916001016120b9565b50909695505050505050565b60208152600061115d6020830184611f70565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600082198211156121df576121df6122c4565b500190565b6000826121f3576121f36122da565b500490565b6000816000190483118215151615612212576122126122c4565b500290565b600082821015612229576122296122c4565b500390565b60005b83811015612249578181015183820152602001612231565b83811115610b705750506000910152565b600181811c9082168061226e57607f821691505b6020821081141561228f57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156122a9576122a96122c4565b5060010190565b6000826122bf576122bf6122da565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461123957600080fdfea26469706673582212203b414458a29660b829ef086e202f25625a7e4db5692116f885035b4926d5b2b264736f6c634300080700334552433732313a207472616e7366657220746f206e6f6e204552433732315265000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000b446f6f646c656e617574730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005444f4f444c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001868747470733a2f2f7365616e70656e2e636f6d2f6e66742f0000000000000000 -------------------------------------------------------------------------------- /deploy files/deploy.txt: -------------------------------------------------------------------------------- 1 | 0x60c06040526005608081905264173539b7b760d91b60a09081526200002891600c91906200093a565b5068056bc75e2d63100000600d556103e8600e556014600f556010805460ff191690553480156200005857600080fd5b5060405162003071380380620030718339810160408190526200007b9162000aa0565b825183908390620000949060009060208501906200093a565b508051620000aa9060019060208401906200093a565b505050620000c7620000c1620000e860201b60201c565b620000ec565b620000d2816200013e565b620000df336014620001b7565b50505062000c90565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a546001600160a01b031633146200019e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b8051620001b390600b9060208401906200093a565b5050565b6000620001c360085490565b60105490915060ff1615620001d757600080fd5b60008211620001e557600080fd5b600f54821115620001f557600080fd5b600e5462000204838362000b83565b11156200021057600080fd5b600a546001600160a01b031633146200025d573360009081526011602052604090205460ff1615156001146200025d5781600d5462000250919062000b9e565b3410156200025d57600080fd5b60015b82811162000294576200027f8462000279838562000b83565b6200029a565b806200028b8162000c46565b91505062000260565b50505050565b620001b3828260405180602001604052806000815250620002bc60201b60201c565b620002c8838362000334565b620002d760008484846200048a565b6200032f5760405162461bcd60e51b815260206004820152603260248201526000805160206200305183398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840162000195565b505050565b6001600160a01b0382166200038c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000195565b6000818152600260205260409020546001600160a01b031615620003f35760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000195565b6200040160008383620005f3565b6001600160a01b03821660009081526003602052604081208054600192906200042c90849062000b83565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000620004ab846001600160a01b0316620006cf60201b620012661760201c565b15620005e757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290620004e590339089908890889060040162000b2d565b602060405180830381600087803b1580156200050057600080fd5b505af192505050801562000533575060408051601f3d908101601f19168201909252620005309181019062000a6f565b60015b620005cc573d80801562000564576040519150601f19603f3d011682016040523d82523d6000602084013e62000569565b606091505b508051620005c45760405162461bcd60e51b815260206004820152603260248201526000805160206200305183398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840162000195565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050620005eb565b5060015b949350505050565b6200060b8383836200032f60201b620009401760201c565b6001600160a01b03831662000669576200066381600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6200068f565b816001600160a01b0316836001600160a01b0316146200068f576200068f8382620006d5565b6001600160a01b038216620006a9576200032f8162000782565b826001600160a01b0316826001600160a01b0316146200032f576200032f828262000860565b3b151590565b60006001620006ef84620008b160201b62000eb31760201c565b620006fb919062000bc0565b6000838152600760205260409020549091508082146200074f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090620007969060019062000bc0565b60008381526009602052604081205460088054939450909284908110620007cd57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110620007fd57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806200084457634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006200087883620008b160201b62000eb31760201c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b0382166200091e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840162000195565b506001600160a01b031660009081526003602052604090205490565b828054620009489062000c09565b90600052602060002090601f0160209004810192826200096c5760008555620009b7565b82601f106200098757805160ff1916838001178555620009b7565b82800160010185558215620009b7579182015b82811115620009b75782518255916020019190600101906200099a565b50620009c5929150620009c9565b5090565b5b80821115620009c55760008155600101620009ca565b600082601f830112620009f1578081fd5b81516001600160401b038082111562000a0e5762000a0e62000c7a565b604051601f8301601f19908116603f0116810190828211818310171562000a395762000a3962000c7a565b8160405283815286602085880101111562000a52578485fd5b62000a6584602083016020890162000bda565b9695505050505050565b60006020828403121562000a81578081fd5b81516001600160e01b03198116811462000a99578182fd5b9392505050565b60008060006060848603121562000ab5578182fd5b83516001600160401b038082111562000acc578384fd5b62000ada87838801620009e0565b9450602086015191508082111562000af0578384fd5b62000afe87838801620009e0565b9350604086015191508082111562000b14578283fd5b5062000b2386828701620009e0565b9150509250925092565b600060018060a01b03808716835280861660208401525083604083015260806060830152825180608084015262000b6c8160a085016020870162000bda565b601f01601f19169190910160a00195945050505050565b6000821982111562000b995762000b9962000c64565b500190565b600081600019048311821515161562000bbb5762000bbb62000c64565b500290565b60008282101562000bd55762000bd562000c64565b500390565b60005b8381101562000bf757818101518382015260200162000bdd565b83811115620002945750506000910152565b600181811c9082168062000c1e57607f821691505b6020821081141562000c4057634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000c5d5762000c5d62000c64565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6123b18062000ca06000396000f3fe60806040526004361061020f5760003560e01c806355f804b311610118578063a22cb465116100a0578063d5abeb011161006f578063d5abeb01146105c8578063d936547e146105de578063da3ef23f1461060e578063e985e9c51461062e578063f2fde38b1461067757600080fd5b8063a22cb46514610553578063b88d4fde14610573578063c668286214610593578063c87b56dd146105a857600080fd5b806370a08231116100e757806370a08231146104cb578063715018a6146104eb5780637f00c7a6146105005780638da5cb5b1461052057806395d89b411461053e57600080fd5b806355f804b31461045c5780635c975abb1461047c5780636352211e146104965780636c0360eb146104b657600080fd5b80632f745c591161019b57806342842e0e1161016a57806342842e0e146103af578063438b6300146103cf57806344a0d68a146103fc5780634a4c560d1461041c5780634f6ccce71461043c57600080fd5b80632f745c591461035457806330cc7ae0146103745780633ccfd60b1461039457806340c10f191461039c57600080fd5b8063095ea7b3116101e2578063095ea7b3146102c557806313faede6146102e557806318160ddd14610309578063239c70ae1461031e57806323b872dd1461033457600080fd5b806301ffc9a71461021457806302329a291461024957806306fdde031461026b578063081812fc1461028d575b600080fd5b34801561022057600080fd5b5061023461022f366004611f3b565b610697565b60405190151581526020015b60405180910390f35b34801561025557600080fd5b50610269610264366004611f21565b6106c2565b005b34801561027757600080fd5b50610280610708565b6040516102409190612140565b34801561029957600080fd5b506102ad6102a8366004611fb9565b61079a565b6040516001600160a01b039091168152602001610240565b3480156102d157600080fd5b506102696102e0366004611ef8565b61082f565b3480156102f157600080fd5b506102fb600d5481565b604051908152602001610240565b34801561031557600080fd5b506008546102fb565b34801561032a57600080fd5b506102fb600f5481565b34801561034057600080fd5b5061026961034f366004611e1b565b610945565b34801561036057600080fd5b506102fb61036f366004611ef8565b610976565b34801561038057600080fd5b5061026961038f366004611dcf565b610a0c565b610269610a57565b6102696103aa366004611ef8565b610aa7565b3480156103bb57600080fd5b506102696103ca366004611e1b565b610b76565b3480156103db57600080fd5b506103ef6103ea366004611dcf565b610b91565b60405161024091906120fc565b34801561040857600080fd5b50610269610417366004611fb9565b610c4f565b34801561042857600080fd5b50610269610437366004611dcf565b610c7e565b34801561044857600080fd5b506102fb610457366004611fb9565b610ccc565b34801561046857600080fd5b50610269610477366004611f73565b610d6d565b34801561048857600080fd5b506010546102349060ff1681565b3480156104a257600080fd5b506102ad6104b1366004611fb9565b610dae565b3480156104c257600080fd5b50610280610e25565b3480156104d757600080fd5b506102fb6104e6366004611dcf565b610eb3565b3480156104f757600080fd5b50610269610f3a565b34801561050c57600080fd5b5061026961051b366004611fb9565b610f6e565b34801561052c57600080fd5b50600a546001600160a01b03166102ad565b34801561054a57600080fd5b50610280610f9d565b34801561055f57600080fd5b5061026961056e366004611ecf565b610fac565b34801561057f57600080fd5b5061026961058e366004611e56565b611071565b34801561059f57600080fd5b506102806110a3565b3480156105b457600080fd5b506102806105c3366004611fb9565b6110b0565b3480156105d457600080fd5b506102fb600e5481565b3480156105ea57600080fd5b506102346105f9366004611dcf565b60116020526000908152604090205460ff1681565b34801561061a57600080fd5b50610269610629366004611f73565b61118e565b34801561063a57600080fd5b50610234610649366004611de9565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561068357600080fd5b50610269610692366004611dcf565b6111cb565b60006001600160e01b0319821663780e9d6360e01b14806106bc57506106bc8261126c565b92915050565b600a546001600160a01b031633146106f55760405162461bcd60e51b81526004016106ec906121a5565b60405180910390fd5b6010805460ff1916911515919091179055565b606060008054610717906122b9565b80601f0160208091040260200160405190810160405280929190818152602001828054610743906122b9565b80156107905780601f1061076557610100808354040283529160200191610790565b820191906000526020600020905b81548152906001019060200180831161077357829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108135760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106ec565b506000908152600460205260409020546001600160a01b031690565b600061083a82610dae565b9050806001600160a01b0316836001600160a01b031614156108a85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106ec565b336001600160a01b03821614806108c457506108c48133610649565b6109365760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106ec565b61094083836112bc565b505050565b61094f338261132a565b61096b5760405162461bcd60e51b81526004016106ec906121da565b610940838383611421565b600061098183610eb3565b82106109e35760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106ec565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610a365760405162461bcd60e51b81526004016106ec906121a5565b6001600160a01b03166000908152601160205260409020805460ff19169055565b600a546001600160a01b03163314610a815760405162461bcd60e51b81526004016106ec906121a5565b60405133904780156108fc02916000818181858888f19350505050610aa557600080fd5b565b6000610ab260085490565b60105490915060ff1615610ac557600080fd5b60008211610ad257600080fd5b600f54821115610ae157600080fd5b600e54610aee838361222b565b1115610af957600080fd5b600a546001600160a01b03163314610b41573360009081526011602052604090205460ff161515600114610b415781600d54610b359190612257565b341015610b4157600080fd5b60015b828111610b7057610b5e84610b59838561222b565b6115cc565b80610b68816122f4565b915050610b44565b50505050565b61094083838360405180602001604052806000815250611071565b60606000610b9e83610eb3565b905060008167ffffffffffffffff811115610bc957634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610bf2578160200160208202803683370190505b50905060005b82811015610c4757610c0a8582610976565b828281518110610c2a57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610c3f816122f4565b915050610bf8565b509392505050565b600a546001600160a01b03163314610c795760405162461bcd60e51b81526004016106ec906121a5565b600d55565b600a546001600160a01b03163314610ca85760405162461bcd60e51b81526004016106ec906121a5565b6001600160a01b03166000908152601160205260409020805460ff19166001179055565b6000610cd760085490565b8210610d3a5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106ec565b60088281548110610d5b57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600a546001600160a01b03163314610d975760405162461bcd60e51b81526004016106ec906121a5565b8051610daa90600b906020840190611c94565b5050565b6000818152600260205260408120546001600160a01b0316806106bc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106ec565b600b8054610e32906122b9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e5e906122b9565b8015610eab5780601f10610e8057610100808354040283529160200191610eab565b820191906000526020600020905b815481529060010190602001808311610e8e57829003601f168201915b505050505081565b60006001600160a01b038216610f1e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106ec565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610f645760405162461bcd60e51b81526004016106ec906121a5565b610aa560006115e6565b600a546001600160a01b03163314610f985760405162461bcd60e51b81526004016106ec906121a5565b600f55565b606060018054610717906122b9565b6001600160a01b0382163314156110055760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106ec565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61107b338361132a565b6110975760405162461bcd60e51b81526004016106ec906121da565b610b7084848484611638565b600c8054610e32906122b9565b6000818152600260205260409020546060906001600160a01b031661112f5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016106ec565b600061113961166b565b905060008151116111595760405180602001604052806000815250611187565b806111638461167a565b600c60405160200161117793929190611ffd565b6040516020818303038152906040525b9392505050565b600a546001600160a01b031633146111b85760405162461bcd60e51b81526004016106ec906121a5565b8051610daa90600c906020840190611c94565b600a546001600160a01b031633146111f55760405162461bcd60e51b81526004016106ec906121a5565b6001600160a01b03811661125a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106ec565b611263816115e6565b50565b3b151590565b60006001600160e01b031982166380ac58cd60e01b148061129d57506001600160e01b03198216635b5e139f60e01b145b806106bc57506301ffc9a760e01b6001600160e01b03198316146106bc565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906112f182610dae565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166113a35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106ec565b60006113ae83610dae565b9050806001600160a01b0316846001600160a01b031614806113e95750836001600160a01b03166113de8461079a565b6001600160a01b0316145b8061141957506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661143482610dae565b6001600160a01b03161461149c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016106ec565b6001600160a01b0382166114fe5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106ec565b611509838383611794565b6115146000826112bc565b6001600160a01b038316600090815260036020526040812080546001929061153d908490612276565b90915550506001600160a01b038216600090815260036020526040812080546001929061156b90849061222b565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610daa82826040518060200160405280600081525061184c565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611643848484611421565b61164f8484848461187f565b610b705760405162461bcd60e51b81526004016106ec90612153565b6060600b8054610717906122b9565b60608161169e5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156116c857806116b2816122f4565b91506116c19050600a83612243565b91506116a2565b60008167ffffffffffffffff8111156116f157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561171b576020820181803683370190505b5090505b841561141957611730600183612276565b915061173d600a8661230f565b61174890603061222b565b60f81b81838151811061176b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535061178d600a86612243565b945061171f565b6001600160a01b0383166117ef576117ea81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611812565b816001600160a01b0316836001600160a01b03161461181257611812838261198c565b6001600160a01b0382166118295761094081611a29565b826001600160a01b0316826001600160a01b031614610940576109408282611b02565b6118568383611b46565b611863600084848461187f565b6109405760405162461bcd60e51b81526004016106ec90612153565b60006001600160a01b0384163b1561198157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906118c39033908990889088906004016120bf565b602060405180830381600087803b1580156118dd57600080fd5b505af192505050801561190d575060408051601f3d908101601f1916820190925261190a91810190611f57565b60015b611967573d80801561193b576040519150601f19603f3d011682016040523d82523d6000602084013e611940565b606091505b50805161195f5760405162461bcd60e51b81526004016106ec90612153565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611419565b506001949350505050565b6000600161199984610eb3565b6119a39190612276565b6000838152600760205260409020549091508082146119f6576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090611a3b90600190612276565b60008381526009602052604081205460088054939450909284908110611a7157634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110611aa057634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480611ae657634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000611b0d83610eb3565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216611b9c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106ec565b6000818152600260205260409020546001600160a01b031615611c015760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106ec565b611c0d60008383611794565b6001600160a01b0382166000908152600360205260408120805460019290611c3690849061222b565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054611ca0906122b9565b90600052602060002090601f016020900481019282611cc25760008555611d08565b82601f10611cdb57805160ff1916838001178555611d08565b82800160010185558215611d08579182015b82811115611d08578251825591602001919060010190611ced565b50611d14929150611d18565b5090565b5b80821115611d145760008155600101611d19565b600067ffffffffffffffff80841115611d4857611d4861234f565b604051601f8501601f19908116603f01168101908282118183101715611d7057611d7061234f565b81604052809350858152868686011115611d8957600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114611dba57600080fd5b919050565b80358015158114611dba57600080fd5b600060208284031215611de0578081fd5b61118782611da3565b60008060408385031215611dfb578081fd5b611e0483611da3565b9150611e1260208401611da3565b90509250929050565b600080600060608486031215611e2f578081fd5b611e3884611da3565b9250611e4660208501611da3565b9150604084013590509250925092565b60008060008060808587031215611e6b578081fd5b611e7485611da3565b9350611e8260208601611da3565b925060408501359150606085013567ffffffffffffffff811115611ea4578182fd5b8501601f81018713611eb4578182fd5b611ec387823560208401611d2d565b91505092959194509250565b60008060408385031215611ee1578182fd5b611eea83611da3565b9150611e1260208401611dbf565b60008060408385031215611f0a578182fd5b611f1383611da3565b946020939093013593505050565b600060208284031215611f32578081fd5b61118782611dbf565b600060208284031215611f4c578081fd5b813561118781612365565b600060208284031215611f68578081fd5b815161118781612365565b600060208284031215611f84578081fd5b813567ffffffffffffffff811115611f9a578182fd5b8201601f81018413611faa578182fd5b61141984823560208401611d2d565b600060208284031215611fca578081fd5b5035919050565b60008151808452611fe981602086016020860161228d565b601f01601f19169290920160200192915050565b6000845160206120108285838a0161228d565b8551918401916120238184848a0161228d565b85549201918390600181811c908083168061203f57607f831692505b85831081141561205d57634e487b7160e01b88526022600452602488fd5b8080156120715760018114612082576120ae565b60ff198516885283880195506120ae565b60008b815260209020895b858110156120a65781548a82015290840190880161208d565b505083880195505b50939b9a5050505050505050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906120f290830184611fd1565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561213457835183529284019291840191600101612118565b50909695505050505050565b6020815260006111876020830184611fd1565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000821982111561223e5761223e612323565b500190565b60008261225257612252612339565b500490565b600081600019048311821515161561227157612271612323565b500290565b60008282101561228857612288612323565b500390565b60005b838110156122a8578181015183820152602001612290565b83811115610b705750506000910152565b600181811c908216806122cd57607f821691505b602082108114156122ee57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561230857612308612323565b5060010190565b60008261231e5761231e612339565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461126357600080fdfea26469706673582212207377dc4abab0b3ea6a1420508e79a844b9d50f60c861df86bc20f93a2a273d0c64736f6c634300080400334552433732313a207472616e7366657220746f206e6f6e204552433732315265000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000124e6572647920436f64657220436c6f6e6573000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e43430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002968747470733a2f2f6e65726479636f646572636c6f6e65732e6f6e6c696e652f6d657465646174612f0000000000000000000000000000000000000000000000 -------------------------------------------------------------------------------- /contracts/out/SmartContract_flat.txt: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.0; 4 | 5 | /** 6 | * @dev Interface of the ERC165 standard, as defined in the 7 | * https://eips.ethereum.org/EIPS/eip-165[EIP]. 8 | * 9 | * Implementers can declare support of contract interfaces, which can then be 10 | * queried by others ({ERC165Checker}). 11 | * 12 | * For an implementation, see {ERC165}. 13 | */ 14 | interface IERC165 { 15 | /** 16 | * @dev Returns true if this contract implements the interface defined by 17 | * `interfaceId`. See the corresponding 18 | * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] 19 | * to learn more about how these ids are created. 20 | * 21 | * This function call must use less than 30 000 gas. 22 | */ 23 | function supportsInterface(bytes4 interfaceId) external view returns (bool); 24 | } 25 | 26 | 27 | 28 | 29 | 30 | 31 | /** 32 | * @dev Required interface of an ERC721 compliant contract. 33 | */ 34 | interface IERC721 is IERC165 { 35 | /** 36 | * @dev Emitted when `tokenId` token is transferred from `from` to `to`. 37 | */ 38 | event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); 39 | 40 | /** 41 | * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. 42 | */ 43 | event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); 44 | 45 | /** 46 | * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. 47 | */ 48 | event ApprovalForAll(address indexed owner, address indexed operator, bool approved); 49 | 50 | /** 51 | * @dev Returns the number of tokens in ``owner``'s account. 52 | */ 53 | function balanceOf(address owner) external view returns (uint256 balance); 54 | 55 | /** 56 | * @dev Returns the owner of the `tokenId` token. 57 | * 58 | * Requirements: 59 | * 60 | * - `tokenId` must exist. 61 | */ 62 | function ownerOf(uint256 tokenId) external view returns (address owner); 63 | 64 | /** 65 | * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients 66 | * are aware of the ERC721 protocol to prevent tokens from being forever locked. 67 | * 68 | * Requirements: 69 | * 70 | * - `from` cannot be the zero address. 71 | * - `to` cannot be the zero address. 72 | * - `tokenId` token must exist and be owned by `from`. 73 | * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. 74 | * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. 75 | * 76 | * Emits a {Transfer} event. 77 | */ 78 | function safeTransferFrom( 79 | address from, 80 | address to, 81 | uint256 tokenId 82 | ) external; 83 | 84 | /** 85 | * @dev Transfers `tokenId` token from `from` to `to`. 86 | * 87 | * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. 88 | * 89 | * Requirements: 90 | * 91 | * - `from` cannot be the zero address. 92 | * - `to` cannot be the zero address. 93 | * - `tokenId` token must be owned by `from`. 94 | * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. 95 | * 96 | * Emits a {Transfer} event. 97 | */ 98 | function transferFrom( 99 | address from, 100 | address to, 101 | uint256 tokenId 102 | ) external; 103 | 104 | /** 105 | * @dev Gives permission to `to` to transfer `tokenId` token to another account. 106 | * The approval is cleared when the token is transferred. 107 | * 108 | * Only a single account can be approved at a time, so approving the zero address clears previous approvals. 109 | * 110 | * Requirements: 111 | * 112 | * - The caller must own the token or be an approved operator. 113 | * - `tokenId` must exist. 114 | * 115 | * Emits an {Approval} event. 116 | */ 117 | function approve(address to, uint256 tokenId) external; 118 | 119 | /** 120 | * @dev Returns the account approved for `tokenId` token. 121 | * 122 | * Requirements: 123 | * 124 | * - `tokenId` must exist. 125 | */ 126 | function getApproved(uint256 tokenId) external view returns (address operator); 127 | 128 | /** 129 | * @dev Approve or remove `operator` as an operator for the caller. 130 | * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. 131 | * 132 | * Requirements: 133 | * 134 | * - The `operator` cannot be the caller. 135 | * 136 | * Emits an {ApprovalForAll} event. 137 | */ 138 | function setApprovalForAll(address operator, bool _approved) external; 139 | 140 | /** 141 | * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. 142 | * 143 | * See {setApprovalForAll} 144 | */ 145 | function isApprovedForAll(address owner, address operator) external view returns (bool); 146 | 147 | /** 148 | * @dev Safely transfers `tokenId` token from `from` to `to`. 149 | * 150 | * Requirements: 151 | * 152 | * - `from` cannot be the zero address. 153 | * - `to` cannot be the zero address. 154 | * - `tokenId` token must exist and be owned by `from`. 155 | * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. 156 | * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. 157 | * 158 | * Emits a {Transfer} event. 159 | */ 160 | function safeTransferFrom( 161 | address from, 162 | address to, 163 | uint256 tokenId, 164 | bytes calldata data 165 | ) external; 166 | } 167 | 168 | 169 | 170 | 171 | /** 172 | * @dev String operations. 173 | */ 174 | library Strings { 175 | bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; 176 | 177 | /** 178 | * @dev Converts a `uint256` to its ASCII `string` decimal representation. 179 | */ 180 | function toString(uint256 value) internal pure returns (string memory) { 181 | // Inspired by OraclizeAPI's implementation - MIT licence 182 | // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol 183 | 184 | if (value == 0) { 185 | return "0"; 186 | } 187 | uint256 temp = value; 188 | uint256 digits; 189 | while (temp != 0) { 190 | digits++; 191 | temp /= 10; 192 | } 193 | bytes memory buffer = new bytes(digits); 194 | while (value != 0) { 195 | digits -= 1; 196 | buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); 197 | value /= 10; 198 | } 199 | return string(buffer); 200 | } 201 | 202 | /** 203 | * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. 204 | */ 205 | function toHexString(uint256 value) internal pure returns (string memory) { 206 | if (value == 0) { 207 | return "0x00"; 208 | } 209 | uint256 temp = value; 210 | uint256 length = 0; 211 | while (temp != 0) { 212 | length++; 213 | temp >>= 8; 214 | } 215 | return toHexString(value, length); 216 | } 217 | 218 | /** 219 | * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. 220 | */ 221 | function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { 222 | bytes memory buffer = new bytes(2 * length + 2); 223 | buffer[0] = "0"; 224 | buffer[1] = "x"; 225 | for (uint256 i = 2 * length + 1; i > 1; --i) { 226 | buffer[i] = _HEX_SYMBOLS[value & 0xf]; 227 | value >>= 4; 228 | } 229 | require(value == 0, "Strings: hex length insufficient"); 230 | return string(buffer); 231 | } 232 | } 233 | 234 | 235 | 236 | 237 | /* 238 | * @dev Provides information about the current execution context, including the 239 | * sender of the transaction and its data. While these are generally available 240 | * via msg.sender and msg.data, they should not be accessed in such a direct 241 | * manner, since when dealing with meta-transactions the account sending and 242 | * paying for execution may not be the actual sender (as far as an application 243 | * is concerned). 244 | * 245 | * This contract is only required for intermediate, library-like contracts. 246 | */ 247 | abstract contract Context { 248 | function _msgSender() internal view virtual returns (address) { 249 | return msg.sender; 250 | } 251 | 252 | function _msgData() internal view virtual returns (bytes calldata) { 253 | return msg.data; 254 | } 255 | } 256 | 257 | 258 | /** 259 | 260 | *Luna Landers by LunaLand (LLN) 261 | * 262 | * 10,000 Lunalanders flying through the Metaverse. 263 | */ 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | /** 281 | * @title ERC721 token receiver interface 282 | * @dev Interface for any contract that wants to support safeTransfers 283 | * from ERC721 asset contracts. 284 | */ 285 | interface IERC721Receiver { 286 | /** 287 | * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} 288 | * by `operator` from `from`, this function is called. 289 | * 290 | * It must return its Solidity selector to confirm the token transfer. 291 | * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. 292 | * 293 | * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. 294 | */ 295 | function onERC721Received( 296 | address operator, 297 | address from, 298 | uint256 tokenId, 299 | bytes calldata data 300 | ) external returns (bytes4); 301 | } 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | /** 310 | * @title ERC-721 Non-Fungible Token Standard, optional metadata extension 311 | * @dev See https://eips.ethereum.org/EIPS/eip-721 312 | */ 313 | interface IERC721Metadata is IERC721 { 314 | /** 315 | * @dev Returns the token collection name. 316 | */ 317 | function name() external view returns (string memory); 318 | 319 | /** 320 | * @dev Returns the token collection symbol. 321 | */ 322 | function symbol() external view returns (string memory); 323 | 324 | /** 325 | * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. 326 | */ 327 | function tokenURI(uint256 tokenId) external view returns (string memory); 328 | } 329 | 330 | 331 | 332 | 333 | 334 | /** 335 | * @dev Collection of functions related to the address type 336 | */ 337 | library Address { 338 | /** 339 | * @dev Returns true if `account` is a contract. 340 | * 341 | * [IMPORTANT] 342 | * ==== 343 | * It is unsafe to assume that an address for which this function returns 344 | * false is an externally-owned account (EOA) and not a contract. 345 | * 346 | * Among others, `isContract` will return false for the following 347 | * types of addresses: 348 | * 349 | * - an externally-owned account 350 | * - a contract in construction 351 | * - an address where a contract will be created 352 | * - an address where a contract lived, but was destroyed 353 | * ==== 354 | */ 355 | function isContract(address account) internal view returns (bool) { 356 | // This method relies on extcodesize, which returns 0 for contracts in 357 | // construction, since the code is only stored at the end of the 358 | // constructor execution. 359 | 360 | uint256 size; 361 | assembly { 362 | size := extcodesize(account) 363 | } 364 | return size > 0; 365 | } 366 | 367 | /** 368 | * @dev Replacement for Solidity's `transfer`: sends `amount` wei to 369 | * `recipient`, forwarding all available gas and reverting on errors. 370 | * 371 | * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost 372 | * of certain opcodes, possibly making contracts go over the 2300 gas limit 373 | * imposed by `transfer`, making them unable to receive funds via 374 | * `transfer`. {sendValue} removes this limitation. 375 | * 376 | * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. 377 | * 378 | * IMPORTANT: because control is transferred to `recipient`, care must be 379 | * taken to not create reentrancy vulnerabilities. Consider using 380 | * {ReentrancyGuard} or the 381 | * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. 382 | */ 383 | function sendValue(address payable recipient, uint256 amount) internal { 384 | require(address(this).balance >= amount, "Address: insufficient balance"); 385 | 386 | (bool success, ) = recipient.call{value: amount}(""); 387 | require(success, "Address: unable to send value, recipient may have reverted"); 388 | } 389 | 390 | /** 391 | * @dev Performs a Solidity function call using a low level `call`. A 392 | * plain `call` is an unsafe replacement for a function call: use this 393 | * function instead. 394 | * 395 | * If `target` reverts with a revert reason, it is bubbled up by this 396 | * function (like regular Solidity function calls). 397 | * 398 | * Returns the raw returned data. To convert to the expected return value, 399 | * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. 400 | * 401 | * Requirements: 402 | * 403 | * - `target` must be a contract. 404 | * - calling `target` with `data` must not revert. 405 | * 406 | * _Available since v3.1._ 407 | */ 408 | function functionCall(address target, bytes memory data) internal returns (bytes memory) { 409 | return functionCall(target, data, "Address: low-level call failed"); 410 | } 411 | 412 | /** 413 | * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with 414 | * `errorMessage` as a fallback revert reason when `target` reverts. 415 | * 416 | * _Available since v3.1._ 417 | */ 418 | function functionCall( 419 | address target, 420 | bytes memory data, 421 | string memory errorMessage 422 | ) internal returns (bytes memory) { 423 | return functionCallWithValue(target, data, 0, errorMessage); 424 | } 425 | 426 | /** 427 | * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], 428 | * but also transferring `value` wei to `target`. 429 | * 430 | * Requirements: 431 | * 432 | * - the calling contract must have an ETH balance of at least `value`. 433 | * - the called Solidity function must be `payable`. 434 | * 435 | * _Available since v3.1._ 436 | */ 437 | function functionCallWithValue( 438 | address target, 439 | bytes memory data, 440 | uint256 value 441 | ) internal returns (bytes memory) { 442 | return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); 443 | } 444 | 445 | /** 446 | * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but 447 | * with `errorMessage` as a fallback revert reason when `target` reverts. 448 | * 449 | * _Available since v3.1._ 450 | */ 451 | function functionCallWithValue( 452 | address target, 453 | bytes memory data, 454 | uint256 value, 455 | string memory errorMessage 456 | ) internal returns (bytes memory) { 457 | require(address(this).balance >= value, "Address: insufficient balance for call"); 458 | require(isContract(target), "Address: call to non-contract"); 459 | 460 | (bool success, bytes memory returndata) = target.call{value: value}(data); 461 | return _verifyCallResult(success, returndata, errorMessage); 462 | } 463 | 464 | /** 465 | * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], 466 | * but performing a static call. 467 | * 468 | * _Available since v3.3._ 469 | */ 470 | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { 471 | return functionStaticCall(target, data, "Address: low-level static call failed"); 472 | } 473 | 474 | /** 475 | * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 476 | * but performing a static call. 477 | * 478 | * _Available since v3.3._ 479 | */ 480 | function functionStaticCall( 481 | address target, 482 | bytes memory data, 483 | string memory errorMessage 484 | ) internal view returns (bytes memory) { 485 | require(isContract(target), "Address: static call to non-contract"); 486 | 487 | (bool success, bytes memory returndata) = target.staticcall(data); 488 | return _verifyCallResult(success, returndata, errorMessage); 489 | } 490 | 491 | /** 492 | * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], 493 | * but performing a delegate call. 494 | * 495 | * _Available since v3.4._ 496 | */ 497 | function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { 498 | return functionDelegateCall(target, data, "Address: low-level delegate call failed"); 499 | } 500 | 501 | /** 502 | * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 503 | * but performing a delegate call. 504 | * 505 | * _Available since v3.4._ 506 | */ 507 | function functionDelegateCall( 508 | address target, 509 | bytes memory data, 510 | string memory errorMessage 511 | ) internal returns (bytes memory) { 512 | require(isContract(target), "Address: delegate call to non-contract"); 513 | 514 | (bool success, bytes memory returndata) = target.delegatecall(data); 515 | return _verifyCallResult(success, returndata, errorMessage); 516 | } 517 | 518 | function _verifyCallResult( 519 | bool success, 520 | bytes memory returndata, 521 | string memory errorMessage 522 | ) private pure returns (bytes memory) { 523 | if (success) { 524 | return returndata; 525 | } else { 526 | // Look for revert reason and bubble it up if present 527 | if (returndata.length > 0) { 528 | // The easiest way to bubble the revert reason is using memory via assembly 529 | 530 | assembly { 531 | let returndata_size := mload(returndata) 532 | revert(add(32, returndata), returndata_size) 533 | } 534 | } else { 535 | revert(errorMessage); 536 | } 537 | } 538 | } 539 | } 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | /** 550 | * @dev Implementation of the {IERC165} interface. 551 | * 552 | * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check 553 | * for the additional interface id that will be supported. For example: 554 | * 555 | * ```solidity 556 | * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { 557 | * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); 558 | * } 559 | * ``` 560 | * 561 | * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. 562 | */ 563 | abstract contract ERC165 is IERC165 { 564 | /** 565 | * @dev See {IERC165-supportsInterface}. 566 | */ 567 | function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { 568 | return interfaceId == type(IERC165).interfaceId; 569 | } 570 | } 571 | 572 | 573 | /** 574 | * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including 575 | * the Metadata extension, but not including the Enumerable extension, which is available separately as 576 | * {ERC721Enumerable}. 577 | */ 578 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { 579 | using Address for address; 580 | using Strings for uint256; 581 | 582 | // Token name 583 | string private _name; 584 | 585 | // Token symbol 586 | string private _symbol; 587 | 588 | // Mapping from token ID to owner address 589 | mapping(uint256 => address) private _owners; 590 | 591 | // Mapping owner address to token count 592 | mapping(address => uint256) private _balances; 593 | 594 | // Mapping from token ID to approved address 595 | mapping(uint256 => address) private _tokenApprovals; 596 | 597 | // Mapping from owner to operator approvals 598 | mapping(address => mapping(address => bool)) private _operatorApprovals; 599 | 600 | /** 601 | * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. 602 | */ 603 | constructor(string memory name_, string memory symbol_) { 604 | _name = name_; 605 | _symbol = symbol_; 606 | } 607 | 608 | /** 609 | * @dev See {IERC165-supportsInterface}. 610 | */ 611 | function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { 612 | return 613 | interfaceId == type(IERC721).interfaceId || 614 | interfaceId == type(IERC721Metadata).interfaceId || 615 | super.supportsInterface(interfaceId); 616 | } 617 | 618 | /** 619 | * @dev See {IERC721-balanceOf}. 620 | */ 621 | function balanceOf(address owner) public view virtual override returns (uint256) { 622 | require(owner != address(0), "ERC721: balance query for the zero address"); 623 | return _balances[owner]; 624 | } 625 | 626 | /** 627 | * @dev See {IERC721-ownerOf}. 628 | */ 629 | function ownerOf(uint256 tokenId) public view virtual override returns (address) { 630 | address owner = _owners[tokenId]; 631 | require(owner != address(0), "ERC721: owner query for nonexistent token"); 632 | return owner; 633 | } 634 | 635 | /** 636 | * @dev See {IERC721Metadata-name}. 637 | */ 638 | function name() public view virtual override returns (string memory) { 639 | return _name; 640 | } 641 | 642 | /** 643 | * @dev See {IERC721Metadata-symbol}. 644 | */ 645 | function symbol() public view virtual override returns (string memory) { 646 | return _symbol; 647 | } 648 | 649 | /** 650 | * @dev See {IERC721Metadata-tokenURI}. 651 | */ 652 | function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { 653 | require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); 654 | 655 | string memory baseURI = _baseURI(); 656 | return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; 657 | } 658 | 659 | /** 660 | * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each 661 | * token will be the concatenation of the `baseURI` and the `tokenId`. Empty 662 | * by default, can be overriden in child contracts. 663 | */ 664 | function _baseURI() internal view virtual returns (string memory) { 665 | return ""; 666 | } 667 | 668 | /** 669 | * @dev See {IERC721-approve}. 670 | */ 671 | function approve(address to, uint256 tokenId) public virtual override { 672 | address owner = ERC721.ownerOf(tokenId); 673 | require(to != owner, "ERC721: approval to current owner"); 674 | 675 | require( 676 | _msgSender() == owner || isApprovedForAll(owner, _msgSender()), 677 | "ERC721: approve caller is not owner nor approved for all" 678 | ); 679 | 680 | _approve(to, tokenId); 681 | } 682 | 683 | /** 684 | * @dev See {IERC721-getApproved}. 685 | */ 686 | function getApproved(uint256 tokenId) public view virtual override returns (address) { 687 | require(_exists(tokenId), "ERC721: approved query for nonexistent token"); 688 | 689 | return _tokenApprovals[tokenId]; 690 | } 691 | 692 | /** 693 | * @dev See {IERC721-setApprovalForAll}. 694 | */ 695 | function setApprovalForAll(address operator, bool approved) public virtual override { 696 | require(operator != _msgSender(), "ERC721: approve to caller"); 697 | 698 | _operatorApprovals[_msgSender()][operator] = approved; 699 | emit ApprovalForAll(_msgSender(), operator, approved); 700 | } 701 | 702 | /** 703 | * @dev See {IERC721-isApprovedForAll}. 704 | */ 705 | function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { 706 | return _operatorApprovals[owner][operator]; 707 | } 708 | 709 | /** 710 | * @dev See {IERC721-transferFrom}. 711 | */ 712 | function transferFrom( 713 | address from, 714 | address to, 715 | uint256 tokenId 716 | ) public virtual override { 717 | //solhint-disable-next-line max-line-length 718 | require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); 719 | 720 | _transfer(from, to, tokenId); 721 | } 722 | 723 | /** 724 | * @dev See {IERC721-safeTransferFrom}. 725 | */ 726 | function safeTransferFrom( 727 | address from, 728 | address to, 729 | uint256 tokenId 730 | ) public virtual override { 731 | safeTransferFrom(from, to, tokenId, ""); 732 | } 733 | 734 | /** 735 | * @dev See {IERC721-safeTransferFrom}. 736 | */ 737 | function safeTransferFrom( 738 | address from, 739 | address to, 740 | uint256 tokenId, 741 | bytes memory _data 742 | ) public virtual override { 743 | require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); 744 | _safeTransfer(from, to, tokenId, _data); 745 | } 746 | 747 | /** 748 | * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients 749 | * are aware of the ERC721 protocol to prevent tokens from being forever locked. 750 | * 751 | * `_data` is additional data, it has no specified format and it is sent in call to `to`. 752 | * 753 | * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. 754 | * implement alternative mechanisms to perform token transfer, such as signature-based. 755 | * 756 | * Requirements: 757 | * 758 | * - `from` cannot be the zero address. 759 | * - `to` cannot be the zero address. 760 | * - `tokenId` token must exist and be owned by `from`. 761 | * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. 762 | * 763 | * Emits a {Transfer} event. 764 | */ 765 | function _safeTransfer( 766 | address from, 767 | address to, 768 | uint256 tokenId, 769 | bytes memory _data 770 | ) internal virtual { 771 | _transfer(from, to, tokenId); 772 | require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); 773 | } 774 | 775 | /** 776 | * @dev Returns whether `tokenId` exists. 777 | * 778 | * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. 779 | * 780 | * Tokens start existing when they are minted (`_mint`), 781 | * and stop existing when they are burned (`_burn`). 782 | */ 783 | function _exists(uint256 tokenId) internal view virtual returns (bool) { 784 | return _owners[tokenId] != address(0); 785 | } 786 | 787 | /** 788 | * @dev Returns whether `spender` is allowed to manage `tokenId`. 789 | * 790 | * Requirements: 791 | * 792 | * - `tokenId` must exist. 793 | */ 794 | function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { 795 | require(_exists(tokenId), "ERC721: operator query for nonexistent token"); 796 | address owner = ERC721.ownerOf(tokenId); 797 | return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); 798 | } 799 | 800 | /** 801 | * @dev Safely mints `tokenId` and transfers it to `to`. 802 | * 803 | * Requirements: 804 | * 805 | * - `tokenId` must not exist. 806 | * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. 807 | * 808 | * Emits a {Transfer} event. 809 | */ 810 | function _safeMint(address to, uint256 tokenId) internal virtual { 811 | _safeMint(to, tokenId, ""); 812 | } 813 | 814 | /** 815 | * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is 816 | * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. 817 | */ 818 | function _safeMint( 819 | address to, 820 | uint256 tokenId, 821 | bytes memory _data 822 | ) internal virtual { 823 | _mint(to, tokenId); 824 | require( 825 | _checkOnERC721Received(address(0), to, tokenId, _data), 826 | "ERC721: transfer to non ERC721Receiver implementer" 827 | ); 828 | } 829 | 830 | /** 831 | * @dev Mints `tokenId` and transfers it to `to`. 832 | * 833 | * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible 834 | * 835 | * Requirements: 836 | * 837 | * - `tokenId` must not exist. 838 | * - `to` cannot be the zero address. 839 | * 840 | * Emits a {Transfer} event. 841 | */ 842 | function _mint(address to, uint256 tokenId) internal virtual { 843 | require(to != address(0), "ERC721: mint to the zero address"); 844 | require(!_exists(tokenId), "ERC721: token already minted"); 845 | 846 | _beforeTokenTransfer(address(0), to, tokenId); 847 | 848 | _balances[to] += 1; 849 | _owners[tokenId] = to; 850 | 851 | emit Transfer(address(0), to, tokenId); 852 | } 853 | 854 | /** 855 | * @dev Destroys `tokenId`. 856 | * The approval is cleared when the token is burned. 857 | * 858 | * Requirements: 859 | * 860 | * - `tokenId` must exist. 861 | * 862 | * Emits a {Transfer} event. 863 | */ 864 | function _burn(uint256 tokenId) internal virtual { 865 | address owner = ERC721.ownerOf(tokenId); 866 | 867 | _beforeTokenTransfer(owner, address(0), tokenId); 868 | 869 | // Clear approvals 870 | _approve(address(0), tokenId); 871 | 872 | _balances[owner] -= 1; 873 | delete _owners[tokenId]; 874 | 875 | emit Transfer(owner, address(0), tokenId); 876 | } 877 | 878 | /** 879 | * @dev Transfers `tokenId` from `from` to `to`. 880 | * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. 881 | * 882 | * Requirements: 883 | * 884 | * - `to` cannot be the zero address. 885 | * - `tokenId` token must be owned by `from`. 886 | * 887 | * Emits a {Transfer} event. 888 | */ 889 | function _transfer( 890 | address from, 891 | address to, 892 | uint256 tokenId 893 | ) internal virtual { 894 | require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); 895 | require(to != address(0), "ERC721: transfer to the zero address"); 896 | 897 | _beforeTokenTransfer(from, to, tokenId); 898 | 899 | // Clear approvals from the previous owner 900 | _approve(address(0), tokenId); 901 | 902 | _balances[from] -= 1; 903 | _balances[to] += 1; 904 | _owners[tokenId] = to; 905 | 906 | emit Transfer(from, to, tokenId); 907 | } 908 | 909 | /** 910 | * @dev Approve `to` to operate on `tokenId` 911 | * 912 | * Emits a {Approval} event. 913 | */ 914 | function _approve(address to, uint256 tokenId) internal virtual { 915 | _tokenApprovals[tokenId] = to; 916 | emit Approval(ERC721.ownerOf(tokenId), to, tokenId); 917 | } 918 | 919 | /** 920 | * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. 921 | * The call is not executed if the target address is not a contract. 922 | * 923 | * @param from address representing the previous owner of the given token ID 924 | * @param to target address that will receive the tokens 925 | * @param tokenId uint256 ID of the token to be transferred 926 | * @param _data bytes optional data to send along with the call 927 | * @return bool whether the call correctly returned the expected magic value 928 | */ 929 | function _checkOnERC721Received( 930 | address from, 931 | address to, 932 | uint256 tokenId, 933 | bytes memory _data 934 | ) private returns (bool) { 935 | if (to.isContract()) { 936 | try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { 937 | return retval == IERC721Receiver(to).onERC721Received.selector; 938 | } catch (bytes memory reason) { 939 | if (reason.length == 0) { 940 | revert("ERC721: transfer to non ERC721Receiver implementer"); 941 | } else { 942 | assembly { 943 | revert(add(32, reason), mload(reason)) 944 | } 945 | } 946 | } 947 | } else { 948 | return true; 949 | } 950 | } 951 | 952 | /** 953 | * @dev Hook that is called before any token transfer. This includes minting 954 | * and burning. 955 | * 956 | * Calling conditions: 957 | * 958 | * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be 959 | * transferred to `to`. 960 | * - When `from` is zero, `tokenId` will be minted for `to`. 961 | * - When `to` is zero, ``from``'s `tokenId` will be burned. 962 | * - `from` and `to` are never both zero. 963 | * 964 | * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. 965 | */ 966 | function _beforeTokenTransfer( 967 | address from, 968 | address to, 969 | uint256 tokenId 970 | ) internal virtual {} 971 | } 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | /** 980 | * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension 981 | * @dev See https://eips.ethereum.org/EIPS/eip-721 982 | */ 983 | interface IERC721Enumerable is IERC721 { 984 | /** 985 | * @dev Returns the total amount of tokens stored by the contract. 986 | */ 987 | function totalSupply() external view returns (uint256); 988 | 989 | /** 990 | * @dev Returns a token ID owned by `owner` at a given `index` of its token list. 991 | * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. 992 | */ 993 | function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); 994 | 995 | /** 996 | * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. 997 | * Use along with {totalSupply} to enumerate all tokens. 998 | */ 999 | function tokenByIndex(uint256 index) external view returns (uint256); 1000 | } 1001 | 1002 | 1003 | /** 1004 | * @dev This implements an optional extension of {ERC721} defined in the EIP that adds 1005 | * enumerability of all the token ids in the contract as well as all token ids owned by each 1006 | * account. 1007 | */ 1008 | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { 1009 | // Mapping from owner to list of owned token IDs 1010 | mapping(address => mapping(uint256 => uint256)) private _ownedTokens; 1011 | 1012 | // Mapping from token ID to index of the owner tokens list 1013 | mapping(uint256 => uint256) private _ownedTokensIndex; 1014 | 1015 | // Array with all token ids, used for enumeration 1016 | uint256[] private _allTokens; 1017 | 1018 | // Mapping from token id to position in the allTokens array 1019 | mapping(uint256 => uint256) private _allTokensIndex; 1020 | 1021 | /** 1022 | * @dev See {IERC165-supportsInterface}. 1023 | */ 1024 | function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { 1025 | return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); 1026 | } 1027 | 1028 | /** 1029 | * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. 1030 | */ 1031 | function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { 1032 | require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); 1033 | return _ownedTokens[owner][index]; 1034 | } 1035 | 1036 | /** 1037 | * @dev See {IERC721Enumerable-totalSupply}. 1038 | */ 1039 | function totalSupply() public view virtual override returns (uint256) { 1040 | return _allTokens.length; 1041 | } 1042 | 1043 | /** 1044 | * @dev See {IERC721Enumerable-tokenByIndex}. 1045 | */ 1046 | function tokenByIndex(uint256 index) public view virtual override returns (uint256) { 1047 | require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); 1048 | return _allTokens[index]; 1049 | } 1050 | 1051 | /** 1052 | * @dev Hook that is called before any token transfer. This includes minting 1053 | * and burning. 1054 | * 1055 | * Calling conditions: 1056 | * 1057 | * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be 1058 | * transferred to `to`. 1059 | * - When `from` is zero, `tokenId` will be minted for `to`. 1060 | * - When `to` is zero, ``from``'s `tokenId` will be burned. 1061 | * - `from` cannot be the zero address. 1062 | * - `to` cannot be the zero address. 1063 | * 1064 | * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. 1065 | */ 1066 | function _beforeTokenTransfer( 1067 | address from, 1068 | address to, 1069 | uint256 tokenId 1070 | ) internal virtual override { 1071 | super._beforeTokenTransfer(from, to, tokenId); 1072 | 1073 | if (from == address(0)) { 1074 | _addTokenToAllTokensEnumeration(tokenId); 1075 | } else if (from != to) { 1076 | _removeTokenFromOwnerEnumeration(from, tokenId); 1077 | } 1078 | if (to == address(0)) { 1079 | _removeTokenFromAllTokensEnumeration(tokenId); 1080 | } else if (to != from) { 1081 | _addTokenToOwnerEnumeration(to, tokenId); 1082 | } 1083 | } 1084 | 1085 | /** 1086 | * @dev Private function to add a token to this extension's ownership-tracking data structures. 1087 | * @param to address representing the new owner of the given token ID 1088 | * @param tokenId uint256 ID of the token to be added to the tokens list of the given address 1089 | */ 1090 | function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { 1091 | uint256 length = ERC721.balanceOf(to); 1092 | _ownedTokens[to][length] = tokenId; 1093 | _ownedTokensIndex[tokenId] = length; 1094 | } 1095 | 1096 | /** 1097 | * @dev Private function to add a token to this extension's token tracking data structures. 1098 | * @param tokenId uint256 ID of the token to be added to the tokens list 1099 | */ 1100 | function _addTokenToAllTokensEnumeration(uint256 tokenId) private { 1101 | _allTokensIndex[tokenId] = _allTokens.length; 1102 | _allTokens.push(tokenId); 1103 | } 1104 | 1105 | /** 1106 | * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that 1107 | * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for 1108 | * gas optimizations e.g. when performing a transfer operation (avoiding double writes). 1109 | * This has O(1) time complexity, but alters the order of the _ownedTokens array. 1110 | * @param from address representing the previous owner of the given token ID 1111 | * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address 1112 | */ 1113 | function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { 1114 | // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and 1115 | // then delete the last slot (swap and pop). 1116 | 1117 | uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; 1118 | uint256 tokenIndex = _ownedTokensIndex[tokenId]; 1119 | 1120 | // When the token to delete is the last token, the swap operation is unnecessary 1121 | if (tokenIndex != lastTokenIndex) { 1122 | uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; 1123 | 1124 | _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token 1125 | _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index 1126 | } 1127 | 1128 | // This also deletes the contents at the last position of the array 1129 | delete _ownedTokensIndex[tokenId]; 1130 | delete _ownedTokens[from][lastTokenIndex]; 1131 | } 1132 | 1133 | /** 1134 | * @dev Private function to remove a token from this extension's token tracking data structures. 1135 | * This has O(1) time complexity, but alters the order of the _allTokens array. 1136 | * @param tokenId uint256 ID of the token to be removed from the tokens list 1137 | */ 1138 | function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { 1139 | // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and 1140 | // then delete the last slot (swap and pop). 1141 | 1142 | uint256 lastTokenIndex = _allTokens.length - 1; 1143 | uint256 tokenIndex = _allTokensIndex[tokenId]; 1144 | 1145 | // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so 1146 | // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding 1147 | // an 'if' statement (like in _removeTokenFromOwnerEnumeration) 1148 | uint256 lastTokenId = _allTokens[lastTokenIndex]; 1149 | 1150 | _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token 1151 | _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index 1152 | 1153 | // This also deletes the contents at the last position of the array 1154 | delete _allTokensIndex[tokenId]; 1155 | _allTokens.pop(); 1156 | } 1157 | } 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | /** 1166 | * @dev Contract module which provides a basic access control mechanism, where 1167 | * there is an account (an owner) that can be granted exclusive access to 1168 | * specific functions. 1169 | * 1170 | * By default, the owner account will be the one that deploys the contract. This 1171 | * can later be changed with {transferOwnership}. 1172 | * 1173 | * This module is used through inheritance. It will make available the modifier 1174 | * `onlyOwner`, which can be applied to your functions to restrict their use to 1175 | * the owner. 1176 | */ 1177 | abstract contract Ownable is Context { 1178 | address private _owner; 1179 | 1180 | event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); 1181 | 1182 | /** 1183 | * @dev Initializes the contract setting the deployer as the initial owner. 1184 | */ 1185 | constructor() { 1186 | _setOwner(_msgSender()); 1187 | } 1188 | 1189 | /** 1190 | * @dev Returns the address of the current owner. 1191 | */ 1192 | function owner() public view virtual returns (address) { 1193 | return _owner; 1194 | } 1195 | 1196 | /** 1197 | * @dev Throws if called by any account other than the owner. 1198 | */ 1199 | modifier onlyOwner() { 1200 | require(owner() == _msgSender(), "Ownable: caller is not the owner"); 1201 | _; 1202 | } 1203 | 1204 | /** 1205 | * @dev Leaves the contract without owner. It will not be possible to call 1206 | * `onlyOwner` functions anymore. Can only be called by the current owner. 1207 | * 1208 | * NOTE: Renouncing ownership will leave the contract without an owner, 1209 | * thereby removing any functionality that is only available to the owner. 1210 | */ 1211 | function renounceOwnership() public virtual onlyOwner { 1212 | _setOwner(address(0)); 1213 | } 1214 | 1215 | /** 1216 | * @dev Transfers ownership of the contract to a new account (`newOwner`). 1217 | * Can only be called by the current owner. 1218 | */ 1219 | function transferOwnership(address newOwner) public virtual onlyOwner { 1220 | require(newOwner != address(0), "Ownable: new owner is the zero address"); 1221 | _setOwner(newOwner); 1222 | } 1223 | 1224 | function _setOwner(address newOwner) private { 1225 | address oldOwner = _owner; 1226 | _owner = newOwner; 1227 | emit OwnershipTransferred(oldOwner, newOwner); 1228 | } 1229 | } 1230 | 1231 | 1232 | contract LunaLanders is ERC721Enumerable, Ownable { 1233 | using Strings for uint256; 1234 | 1235 | string public baseURI; 1236 | string public baseExtension = ".json"; 1237 | uint256 public cost = 0.05 ether; 1238 | uint256 public maxSupply = 10000; 1239 | uint256 public maxMintAmount = 20; 1240 | bool public paused = false; 1241 | mapping(address => bool) public whitelisted; 1242 | 1243 | constructor( 1244 | string memory _name, 1245 | string memory _symbol, 1246 | string memory _initBaseURI 1247 | ) ERC721(_name, _symbol) { 1248 | 1249 | setBaseURI(_initBaseURI); 1250 | 1251 | mint(msg.sender, 3); 1252 | } 1253 | 1254 | // internal 1255 | function _baseURI() internal view virtual override returns (string memory) { 1256 | return baseURI; 1257 | } 1258 | 1259 | // public 1260 | function mint(address _to, uint256 _mintAmount) public payable { 1261 | uint256 supply = totalSupply(); 1262 | require(!paused); 1263 | require(_mintAmount > 0); 1264 | require(_mintAmount <= maxMintAmount); 1265 | require(supply + _mintAmount <= maxSupply); 1266 | 1267 | if (msg.sender != owner()) { 1268 | if(whitelisted[msg.sender] != true) { 1269 | require(msg.value >= cost * _mintAmount); 1270 | } 1271 | } 1272 | 1273 | for (uint256 i = 1; i <= _mintAmount; i++) { 1274 | _safeMint(_to, supply + i); 1275 | } 1276 | } 1277 | 1278 | function walletOfOwner(address _owner) 1279 | public 1280 | view 1281 | returns (uint256[] memory) 1282 | { 1283 | uint256 ownerTokenCount = balanceOf(_owner); 1284 | uint256[] memory tokenIds = new uint256[](ownerTokenCount); 1285 | for (uint256 i; i < ownerTokenCount; i++) { 1286 | tokenIds[i] = tokenOfOwnerByIndex(_owner, i); 1287 | } 1288 | return tokenIds; 1289 | } 1290 | 1291 | function tokenURI(uint256 tokenId) 1292 | public 1293 | view 1294 | virtual 1295 | override 1296 | returns (string memory) 1297 | { 1298 | require( 1299 | _exists(tokenId), 1300 | "ERC721Metadata: URI query for nonexistent token" 1301 | ); 1302 | 1303 | string memory currentBaseURI = _baseURI(); 1304 | return bytes(currentBaseURI).length > 0 1305 | ? string(abi.encodePacked(currentBaseURI, tokenId.toString(), baseExtension)) 1306 | : ""; 1307 | } 1308 | 1309 | //only owner 1310 | function setCost(uint256 _newCost) public onlyOwner() { 1311 | cost = _newCost; 1312 | } 1313 | 1314 | function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { 1315 | maxMintAmount = _newmaxMintAmount; 1316 | } 1317 | 1318 | function setBaseURI(string memory _newBaseURI) public onlyOwner { 1319 | baseURI = _newBaseURI; 1320 | } 1321 | 1322 | function setBaseExtension(string memory _newBaseExtension) public onlyOwner { 1323 | baseExtension = _newBaseExtension; 1324 | } 1325 | 1326 | function pause(bool _state) public onlyOwner { 1327 | paused = _state; 1328 | } 1329 | 1330 | function whitelistUser(address _user) public onlyOwner { 1331 | whitelisted[_user] = true; 1332 | } 1333 | 1334 | function removeWhitelistUser(address _user) public onlyOwner { 1335 | whitelisted[_user] = false; 1336 | } 1337 | 1338 | function withdraw() public payable onlyOwner { 1339 | require(payable(msg.sender).send(address(this).balance)); 1340 | } 1341 | } 1342 | 1343 | 1344 | --------------------------------------------------------------------------------