├── .gitignore ├── smart-contract ├── .solhintignore ├── .npmignore ├── config │ ├── whitelist.json │ ├── ContractArguments.ts │ └── CollectionConfig.ts ├── .prettierignore ├── .gitignore ├── lib │ ├── MarketplaceConfigInterface.ts │ ├── NetworkConfigInterface.ts │ ├── Marketplaces.ts │ ├── CollectionConfigInterface.ts │ ├── NftContractProvider.ts │ └── Networks.ts ├── .solhint.json ├── tsconfig.json ├── scripts │ ├── 5_presale_close.ts │ ├── 7_public_sale_close.ts │ ├── 3_whitelist_close.ts │ ├── 1_deploy.ts │ ├── 8_reveal.ts │ ├── 4_presale_open.ts │ ├── 6_public_sale_open.ts │ └── 2_whitelist_open.ts ├── package.json ├── contracts │ └── SkullaPoly.sol ├── hardhat.config.ts └── test │ └── index.ts ├── minting-dapp ├── .gitignore ├── postcss.config.js ├── src │ ├── images │ │ ├── fav.png │ │ ├── skull.jpg │ │ ├── preview.png │ │ └── skulla.png │ ├── styles │ │ ├── main.scss │ │ └── style.scss │ └── scripts │ │ ├── lib │ │ ├── NftContractType.ts │ │ └── Whitelist.ts │ │ ├── react │ │ ├── components │ │ │ ├── Infobox.tsx │ │ │ ├── Support.tsx │ │ │ ├── FaqItem.tsx │ │ │ ├── How.tsx │ │ │ ├── Community.tsx │ │ │ ├── Footer.tsx │ │ │ ├── Achievement.tsx │ │ │ ├── Faq.tsx │ │ │ ├── Form.tsx │ │ │ ├── Navbar.tsx │ │ │ ├── Header.tsx │ │ │ └── Featbox.tsx │ │ ├── Dapp.tsx │ │ ├── Home.tsx │ │ ├── NoPage.tsx │ │ ├── CollectionStatus.tsx │ │ ├── MintWidget.tsx │ │ └── Mint.tsx │ │ └── main.tsx ├── public │ └── index.html ├── package.json ├── tailwind.config.js ├── webpack.config.js └── tsconfig.json ├── cover.jpg ├── yarn.lock ├── .prettierrc ├── .vscode └── settings.json ├── package.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | .env 4 | 5 | -------------------------------------------------------------------------------- /smart-contract/.solhintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /minting-dapp/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | public/build -------------------------------------------------------------------------------- /smart-contract/.npmignore: -------------------------------------------------------------------------------- 1 | hardhat.config.ts 2 | scripts 3 | test 4 | -------------------------------------------------------------------------------- /cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VsevolodKhokhlov/Spoly-nft-erc721-polygon/HEAD/cover.jpg -------------------------------------------------------------------------------- /smart-contract/config/whitelist.json: -------------------------------------------------------------------------------- 1 | [ 2 | "0x4e543157f347B93576A9344483bB87981f6A95b2" 3 | ] 4 | -------------------------------------------------------------------------------- /smart-contract/.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | artifacts 3 | cache 4 | coverage* 5 | gasReporterOutput.json 6 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "none", 3 | "semi": false, 4 | "singleQuote": true, 5 | "tabWidth": 2 6 | } 7 | -------------------------------------------------------------------------------- /minting-dapp/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {} 5 | } 6 | }; -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "solidity.packageDefaultDependenciesDirectory": "smart-contract/node_modules", 3 | "editor.tabSize": 2 4 | } -------------------------------------------------------------------------------- /minting-dapp/src/images/fav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VsevolodKhokhlov/Spoly-nft-erc721-polygon/HEAD/minting-dapp/src/images/fav.png -------------------------------------------------------------------------------- /minting-dapp/src/images/skull.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VsevolodKhokhlov/Spoly-nft-erc721-polygon/HEAD/minting-dapp/src/images/skull.jpg -------------------------------------------------------------------------------- /minting-dapp/src/images/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VsevolodKhokhlov/Spoly-nft-erc721-polygon/HEAD/minting-dapp/src/images/preview.png -------------------------------------------------------------------------------- /minting-dapp/src/images/skulla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VsevolodKhokhlov/Spoly-nft-erc721-polygon/HEAD/minting-dapp/src/images/skulla.png -------------------------------------------------------------------------------- /smart-contract/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | coverage 4 | coverage.json 5 | typechain 6 | 7 | #Hardhat files 8 | cache 9 | artifacts 10 | -------------------------------------------------------------------------------- /minting-dapp/src/styles/main.scss: -------------------------------------------------------------------------------- 1 | @import '~tailwindcss/base'; 2 | @import '~tailwindcss/components'; 3 | @import '~tailwindcss/utilities'; 4 | 5 | @import './style.scss'; 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /smart-contract/lib/MarketplaceConfigInterface.ts: -------------------------------------------------------------------------------- 1 | export default interface MarketplaceConfigInterface { 2 | name: string; 3 | generateCollectionUrl: (marketplaceIdentifier: any, isMainnet: boolean) => string; 4 | }; 5 | -------------------------------------------------------------------------------- /smart-contract/.solhint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "solhint:recommended", 3 | "rules": { 4 | "compiler-version": ["error", ">=0.8.9 <0.9.0"], 5 | "func-visibility": ["warn", { "ignoreConstructors": true }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /smart-contract/lib/NetworkConfigInterface.ts: -------------------------------------------------------------------------------- 1 | export default interface NetworkConfigInterface { 2 | chainId: number; 3 | symbol: string; 4 | blockExplorer: { 5 | name: string; 6 | generateContractUrl: (contractAddress: string) => string; 7 | }; 8 | }; 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "polygon", 3 | "description": "An all-in-one solution for ERC721 collections.", 4 | "author": "sam", 5 | "license": "MIT", 6 | "version": "2.3.0", 7 | "scripts": { 8 | "build-dapp": "cd smart-contract; yarn; yarn compile; cd ../minting-dapp; yarn; yarn build" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /smart-contract/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "commonjs", 5 | "strict": true, 6 | "esModuleInterop": true, 7 | "outDir": "dist", 8 | "declaration": true, 9 | "resolveJsonModule": true 10 | }, 11 | "include": ["./scripts", "./test", "./typechain"], 12 | "files": ["./hardhat.config.ts"] 13 | } 14 | -------------------------------------------------------------------------------- /minting-dapp/src/scripts/lib/NftContractType.ts: -------------------------------------------------------------------------------- 1 | // The name below ("SkullaPoly") should match the name of your Solidity contract. 2 | // It can be updated using the following command: 3 | // yarn rename-contract NEW_CONTRACT_NAME 4 | // Please DO NOT change it manually! 5 | import { SkullaPoly as NftContractType } from '../../../../smart-contract/typechain/index'; 6 | 7 | export default NftContractType; 8 | -------------------------------------------------------------------------------- /smart-contract/lib/Marketplaces.ts: -------------------------------------------------------------------------------- 1 | import MarketplaceConfigInterface from './MarketplaceConfigInterface' 2 | 3 | export const openSea: MarketplaceConfigInterface = { 4 | name: 'OpenSea', 5 | generateCollectionUrl: (marketplaceIdentifier: string, isMainnet: boolean) => 6 | 'https://' + 7 | (isMainnet ? 'www' : 'testnets') + 8 | '.opensea.io/collection/' + 9 | marketplaceIdentifier 10 | } 11 | -------------------------------------------------------------------------------- /minting-dapp/src/scripts/react/components/Infobox.tsx: -------------------------------------------------------------------------------- 1 | import React, { FC } from 'react' 2 | interface Props { 3 | number: String, 4 | text: String 5 | } 6 | const Infobox: React.FC = ({ number, text }) => { 7 | return ( 8 |
9 |
{number}
10 |

{text}

11 |
12 | ) 13 | } 14 | 15 | export default Infobox 16 | -------------------------------------------------------------------------------- /minting-dapp/src/scripts/react/Dapp.tsx: -------------------------------------------------------------------------------- 1 | import { Routes, Route } from 'react-router-dom' 2 | import Home from './Home' 3 | import NoPage from './NoPage' 4 | import Mint from './Mint' 5 | 6 | const Dapp = () => { 7 | return ( 8 | 9 | } /> 10 | } /> 11 | } /> 12 | 13 | ) 14 | } 15 | 16 | export default Dapp 17 | -------------------------------------------------------------------------------- /minting-dapp/src/scripts/react/components/Support.tsx: -------------------------------------------------------------------------------- 1 | import Community from "./Community" 2 | import Form from "./Form" 3 | 4 | const Support = () => { 5 | return ( 6 |
7 |
8 | 9 |
10 |
11 |
12 | ) 13 | } 14 | 15 | export default Support 16 | -------------------------------------------------------------------------------- /minting-dapp/src/scripts/main.tsx: -------------------------------------------------------------------------------- 1 | import '../styles/main.scss'; 2 | 3 | import ReactDOM from 'react-dom'; 4 | import { BrowserRouter } from 'react-router-dom' 5 | import Dapp from './react/Dapp'; 6 | import CollectionConfig from '../../../smart-contract/config/CollectionConfig'; 7 | 8 | if (document.title === '') { 9 | document.title = CollectionConfig.tokenName; 10 | } 11 | 12 | document.addEventListener('DOMContentLoaded', async () => { 13 | ReactDOM.render(, document.getElementById('minting-dapp')); 14 | }); 15 | -------------------------------------------------------------------------------- /smart-contract/config/ContractArguments.ts: -------------------------------------------------------------------------------- 1 | import { utils } from 'ethers'; 2 | import CollectionConfig from './CollectionConfig'; 3 | 4 | // Update the following array if you change the constructor arguments... 5 | const ContractArguments = [ 6 | CollectionConfig.tokenName, 7 | CollectionConfig.tokenSymbol, 8 | utils.parseEther(CollectionConfig.whitelistSale.price.toString()), 9 | CollectionConfig.maxSupply, 10 | CollectionConfig.whitelistSale.maxMintAmountPerTx, 11 | CollectionConfig.hiddenMetadataUri, 12 | ] as const; 13 | 14 | export default ContractArguments; -------------------------------------------------------------------------------- /minting-dapp/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | SPoly 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /smart-contract/scripts/5_presale_close.ts: -------------------------------------------------------------------------------- 1 | import NftContractProvider from '../lib/NftContractProvider'; 2 | 3 | async function main() { 4 | // Attach to deployed contract 5 | const contract = await NftContractProvider.getContract(); 6 | 7 | // Pause the contract (if needed) 8 | if (!await contract.paused()) { 9 | console.log('Pausing the contract...'); 10 | 11 | await (await contract.setPaused(true)).wait(); 12 | } 13 | 14 | console.log('Pre-sale is now closed!'); 15 | } 16 | 17 | // We recommend this pattern to be able to use async/await everywhere 18 | // and properly handle errors. 19 | main().catch((error) => { 20 | console.error(error); 21 | process.exitCode = 1; 22 | }); 23 | -------------------------------------------------------------------------------- /smart-contract/scripts/7_public_sale_close.ts: -------------------------------------------------------------------------------- 1 | import NftContractProvider from '../lib/NftContractProvider'; 2 | 3 | async function main() { 4 | // Attach to deployed contract 5 | const contract = await NftContractProvider.getContract(); 6 | 7 | // Pause the contract (if needed) 8 | if (!await contract.paused()) { 9 | console.log('Pausing the contract...'); 10 | 11 | await (await contract.setPaused(true)).wait(); 12 | } 13 | 14 | console.log('Public sale is now closed!'); 15 | } 16 | 17 | // We recommend this pattern to be able to use async/await everywhere 18 | // and properly handle errors. 19 | main().catch((error) => { 20 | console.error(error); 21 | process.exitCode = 1; 22 | }); 23 | -------------------------------------------------------------------------------- /smart-contract/scripts/3_whitelist_close.ts: -------------------------------------------------------------------------------- 1 | import NftContractProvider from '../lib/NftContractProvider' 2 | 3 | async function main() { 4 | // Attach to deployed contract 5 | const contract = await NftContractProvider.getContract() 6 | 7 | // Disable whitelist sale (if needed) 8 | if (await contract.whitelistMintEnabled()) { 9 | console.log('Disabling whitelist sale...') 10 | 11 | await (await contract.setWhitelistMintEnabled(false)).wait() 12 | } 13 | 14 | console.log('Whitelist sale has been disabled!') 15 | } 16 | 17 | // We recommend this pattern to be able to use async/await everywhere 18 | // and properly handle errors. 19 | main().catch((error) => { 20 | console.error(error) 21 | process.exitCode = 1 22 | }) 23 | -------------------------------------------------------------------------------- /minting-dapp/src/scripts/react/components/FaqItem.tsx: -------------------------------------------------------------------------------- 1 | import React, { FC } from 'react' 2 | interface Props { 3 | ques: String 4 | ans: String 5 | index: any 6 | } 7 | 8 | const FaqItem: React.FC = ({ ques, ans, index }) => { 9 | return ( 10 |
11 |
12 |
13 |
14 | 15 | 18 |
{ans}
19 |
20 |
21 |
22 |
23 | ) 24 | } 25 | 26 | export default FaqItem 27 | -------------------------------------------------------------------------------- /minting-dapp/src/scripts/react/Home.tsx: -------------------------------------------------------------------------------- 1 | import Header from "./components/Header" 2 | import Navbar from "./components/Navbar" 3 | import Featbox from './components/Featbox'; 4 | import How from "./components/How"; 5 | import Achievement from "./components/Achievement"; 6 | import Faq from "./components/Faq"; 7 | import Footer from "./components/Footer"; 8 | import Support from "./components/Support"; 9 | 10 | 11 | const Dapp = () => { 12 | return ( 13 | <> 14 |
15 | 16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 |