├── src
├── react-app-env.d.ts
├── img
│ ├── back.png
│ ├── moon.png
│ ├── stars.png
│ ├── splash.jpg
│ ├── splash.png
│ ├── splash1.png
│ ├── treasure.png
│ ├── download.jpeg
│ └── mountain_front.png
├── App.css
├── components
│ ├── customButton
│ │ ├── CustomButton.js
│ │ └── Button.css
│ ├── PopUp
│ │ ├── PopUp.css
│ │ └── SellPopUp.js
│ ├── Header
│ │ ├── Header.js
│ │ └── Header.css
│ ├── Tag
│ │ ├── Tag.js
│ │ └── Tag.css
│ ├── ItemButton
│ │ ├── ItemButton.js
│ │ └── ItemButton.css
│ ├── Attributes
│ │ ├── Attributes.css
│ │ └── Attributes.js
│ ├── ArtCard
│ │ ├── ArtCard.css
│ │ └── ArtCard.js
│ ├── Wallet
│ │ └── wallet.js
│ ├── TextInput
│ │ ├── TextInput.js
│ │ └── TextInput.css
│ ├── Stepper
│ │ ├── Stepper.css
│ │ └── Stepper.js
│ └── navbar
│ │ ├── Navbar.css
│ │ └── Navbar.js
├── index.js
├── pages
│ ├── Explore
│ │ ├── Explore.css
│ │ └── Explore.js
│ ├── CreateNFT
│ │ ├── Progress.css
│ │ ├── Launch
│ │ │ ├── Launch.js
│ │ │ └── Launch.css
│ │ ├── Progress.js
│ │ ├── FileUpload
│ │ │ ├── FileUpload.js
│ │ │ └── FileUpload.css
│ │ ├── CreateNFT.css
│ │ ├── DetailsForm
│ │ │ ├── DetailsForm.css
│ │ │ └── DetailsForm.js
│ │ ├── CreateNFT.js
│ │ └── 1055-world-locations.json
│ └── Home
│ │ ├── Home.css
│ │ └── Home.js
├── utils
│ ├── customNFT
│ │ ├── vuex.js
│ │ ├── metaplex
│ │ │ ├── utils.js
│ │ │ ├── assets.js
│ │ │ ├── accounts.js
│ │ │ ├── ids.js
│ │ │ ├── connectionHelpers.js
│ │ │ └── metadata.js
│ │ ├── index.js
│ │ └── mintNFT.js
│ └── createSale.ts
└── App.js
├── public
├── favicon.ico
├── robots.txt
├── manifest.json
├── exploreNFTs.txt
└── index.html
├── .gitignore
├── rust-program
└── sell
│ ├── Cargo.toml
│ └── src
│ └── lib.rs
├── tsconfig.json
├── README.md
└── package.json
/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/src/img/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/src/img/back.png
--------------------------------------------------------------------------------
/src/img/moon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/src/img/moon.png
--------------------------------------------------------------------------------
/src/img/stars.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/src/img/stars.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/src/img/splash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/src/img/splash.jpg
--------------------------------------------------------------------------------
/src/img/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/src/img/splash.png
--------------------------------------------------------------------------------
/src/img/splash1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/src/img/splash1.png
--------------------------------------------------------------------------------
/src/img/treasure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/src/img/treasure.png
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: 'Roboto', sans-serif;
3 | background-color: #00002E;
4 | }
--------------------------------------------------------------------------------
/src/img/download.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/src/img/download.jpeg
--------------------------------------------------------------------------------
/src/img/mountain_front.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MayankMittal1/SilkRoad/HEAD/src/img/mountain_front.png
--------------------------------------------------------------------------------
/src/components/customButton/CustomButton.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./Button.css";
3 |
4 | const CustomButton = (props) => {
5 | return (
6 |
7 | );
8 | };
9 |
10 | export default CustomButton;
11 |
--------------------------------------------------------------------------------
/src/components/PopUp/PopUp.css:
--------------------------------------------------------------------------------
1 | .my-modal{
2 | color: #fff;
3 | background-color: rgba(10, 37, 94, 0.699);
4 | border: 1px solid rgba(1, 4, 20, 0.062);
5 | width: 100%;
6 | backdrop-filter: blur(10px);
7 | }
8 | .labels{
9 | color: rgb(201, 192, 192);
10 | letter-spacing: 2px;
11 | }
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import 'bootstrap/dist/css/bootstrap.min.css';
4 | import App from './App';
5 |
6 | ReactDOM.render(
7 |
8 |
9 | ,
10 | document.getElementById('root')
11 | );
12 |
13 |
--------------------------------------------------------------------------------
/src/components/Header/Header.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import './Header.css';
3 | // import back from './../../img/back.png';
4 | const Header =(props) => {
5 | return (
6 |
9 | Tags
10 |
11 | {tags.map((val)=>(
12 |
13 | ))}
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
setTags([...tags,{"trait_type":document.getElementById("trait-input").value,"value":document.getElementById("value-input").value}])}>Add
29 |
30 |
31 | )
32 |
33 | }
34 | export default Attribute
35 |
--------------------------------------------------------------------------------
/src/utils/customNFT/metaplex/assets.js:
--------------------------------------------------------------------------------
1 | export const LAMPORT_MULTIPLIER = 10 ** 9;
2 | const WINSTON_MULTIPLIER = 10 ** 12;
3 |
4 | export async function getAssetCostToStore(files) {
5 | // eslint-disable-next-line no-param-reassign
6 | const totalBytes = files.reduce((sum, f) => (sum += f.size), 0);
7 | const txnFeeInWinstons = parseInt(
8 | await (await fetch('https://arweave.net/price/0')).text(), 10,
9 | );
10 | const byteCostInWinstons = parseInt(
11 | await (
12 | await fetch(`https://arweave.net/price/${totalBytes.toString()}`)
13 | ).text(), 10,
14 | );
15 | const totalArCost = (txnFeeInWinstons * files.length + byteCostInWinstons) / WINSTON_MULTIPLIER;
16 |
17 | let conversionRates = JSON.parse(
18 | localStorage.getItem('conversionRates') || '{}',
19 | );
20 |
21 | if (
22 | !conversionRates
23 | || !conversionRates.expiry
24 | || conversionRates.expiry < Date.now()
25 | ) {
26 | conversionRates = {
27 | value: JSON.parse(
28 | await (
29 | await fetch(
30 | 'https://api.coingecko.com/api/v3/simple/price?ids=solana,arweave&vs_currencies=usd',
31 | )
32 | ).text(),
33 | ),
34 | expiry: Date.now() + 5 * 60 * 1000,
35 | };
36 | }
37 |
38 | // To figure out how many lamports are required, multiply ar byte cost by this number
39 | const arMultiplier = conversionRates.value.arweave.usd / conversionRates.value.solana.usd;
40 | // We also always make a manifest file, which, though tiny, needs payment.
41 | return LAMPORT_MULTIPLIER * totalArCost * arMultiplier * 1.1;
42 | }
43 |
--------------------------------------------------------------------------------
/src/components/ItemButton/ItemButton.css:
--------------------------------------------------------------------------------
1 | *,*:before, *:after{
2 | padding: 0;
3 | margin: 0;
4 | box-sizing: border-box;
5 | }
6 | .sub-head{
7 | color: rgb(185, 183, 183);
8 | font-family: 'Poppins', sans-serif;
9 | font-size: 15px;
10 | letter-spacing: 2px;
11 | }
12 | .item-button{
13 | width: 720px;
14 | height: 120px;
15 | position: relative;
16 | margin-left: 5%;
17 | margin-right: 5%;
18 | margin-top: 3%;
19 | margin-bottom: 3%;
20 | background-color: rgba(255, 255, 255,0.05);
21 | border: none;
22 | color: #fff;
23 | font-family: 'Poppins', sans-serif;
24 | font-size: 25px;
25 | letter-spacing: 4px;
26 | backdrop-filter: blur(8px);
27 | cursor: pointer;
28 | border-radius: 5px;
29 | transition: 0.5s;
30 | }
31 | .item-button:after{
32 | content: "";
33 | position: absolute;
34 | height: 100%;
35 | width: 100%;
36 | top: 0;
37 | bottom: 0;
38 | left: 0;
39 | right: 0;
40 | background: linear-gradient(
41 | 45deg,
42 | transparent 50%,
43 | rgba(255,255,255,0.03) 58%,rgba(255,255,255,0.16) 67%,
44 | transparent 68%
45 | );
46 | background-size: 200% 100%;
47 | background-position: 165% 0;
48 | transition: 0.7s;
49 | }
50 | .item-button:hover:after{
51 | background-position: -20% 0;
52 | }
53 | .item-button:hover{
54 | box-shadow: 15px 30px 32px rgba(0,0,0,0.25);
55 | transform: translateY(-10px);
56 | }
57 | @media (max-width:780px){
58 | .item-button{
59 | width: 90%;
60 | }
61 | }
--------------------------------------------------------------------------------
/src/pages/CreateNFT/Progress.js:
--------------------------------------------------------------------------------
1 | import "./Progress.css";
2 | import Stepper from "./../../components/Stepper/Stepper";
3 | import React, { Component } from "react";
4 |
5 | export default class Progress extends Component {
6 | constructor() {
7 | super();
8 | this.state = {
9 | currentStep: 1
10 | };
11 | }
12 |
13 | handleClick(clickType) {
14 | const { currentStep } = this.state;
15 | let newStep = currentStep;
16 | clickType === "next" ? newStep++ : newStep--;
17 |
18 | if (newStep > 0 && newStep <= 4) {
19 | this.setState({
20 | currentStep: newStep
21 | });
22 | }
23 | }
24 |
25 | render() {
26 | const { currentStep} = this.state;
27 | // const { width } = useWindowDimensions();
28 | // const {direction} = {width < 768 ? "horizontal" : "vertical"};
29 | return (
30 | <>
31 |
37 | {active &&
38 | value &&
39 | predicted &&
40 | predicted.includes(value) &&
{predicted}
}
41 |
!locked && this.setState({ active: true })}
49 | onBlur={() => !locked && this.setState({ active: false })}
50 | />
51 |
54 |
55 | );
56 | }
57 | }
58 |
59 | // render(
60 | //
95 |
101 | {step.completed ? ✓ : index + 1}
102 |
103 |
107 | {step.description}
108 |
109 | {index !== steps.length - 1 && (
110 |
111 | )}
112 |
113 | );
114 | });
115 |
116 | return
90 |
98 |
99 |
106 |
107 |
108 | {nfts.map((nft) => (
109 |
117 | ))}
118 |
119 |
120 |
121 | >
122 | );
123 | };
124 |
125 | export default Home;
126 |
--------------------------------------------------------------------------------
/src/pages/CreateNFT/Launch/Launch.css:
--------------------------------------------------------------------------------
1 | *{
2 | box-sizing: border-box;
3 | }
4 | .boxs {
5 | position: relative;
6 | padding: 50px;
7 | width: 660px;
8 | height: 1100px;
9 | max-height: fit-content;
10 | display: flex;
11 | flex-direction: column;
12 | justify-content: center;
13 | align-items: center;
14 | background: rgba(255, 255, 255, 0.1);
15 | border-radius: 8px;
16 | box-shadow: 0 5px 35px rgba(0, 0, 0, 0.5);
17 | }
18 |
19 | .box:after {
20 | content: "";
21 | position: absolute;
22 | top: 5px;
23 | left: 5px;
24 | right: 5px;
25 | bottom: 5px;
26 | border-radius: 5px;
27 | pointer-events: none;
28 | background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%,
29 | rgba(255, 255, 255, 0.1) 15%, transaparent 50%, transaparent 85%,rgba(255,255,255,0.1) 0%,rgba(255,255,255,0.3) 100%);
30 | }
31 |
32 |
33 | .box .text-field{
34 | position: relative ;
35 | width: 100%;
36 | margin-bottom: 20px;
37 | outline: none;
38 | border: 1px solid rgba(255,255,255,0.2);
39 | background: transparent;
40 | border-radius: 6px;
41 | padding: 8px;
42 | color: #fff;
43 | box-shadow: inset 0 0 25px rgba(0,0,0,0.2);
44 | font-size: 14px;
45 | font-weight: 300;
46 | }
47 | .llines{
48 | position: absolute;
49 | bottom: 0;
50 | left: 0;
51 | background-color: aqua;
52 | /* background: white; */
53 | width: 100%;
54 | border-radius: 50%;
55 | overflow: hidden;
56 | height: 2px;
57 | box-shadow: 0px 0px 12px aqua;
58 | background: linear-gradient(rgba(255, 255, 255, 0), rgb(16, 227, 255), rgba(255, 255, 255, 0));
59 | }
60 | .liness{
61 | position: absolute;
62 | top: 0;
63 | left: 0;
64 | background-color: aqua;
65 | /* background: white; */
66 | width: 100%;
67 | border-radius: 50%;
68 | overflow: hidden;
69 | height: 2px;
70 | box-shadow: 0px 0px 12px aqua;
71 | background: linear-gradient(rgba(255, 255, 255, 0), rgb(16, 227, 255), rgba(255, 255, 255, 0));
72 | }
73 | .imag-box{
74 | position: relative;
75 | width: 50%;
76 | height: 400px;
77 | overflow: hidden;
78 | transition: 0.5s;
79 | border-left: 2px solid white;
80 | border-right: 2px solid white;
81 | border-bottom: 2px solid white;
82 | /* margin-bottom: 20%; */
83 | box-shadow: 0px 0px 8px aqua;
84 | border-top-left-radius: 50% 30% !important;
85 | border-top-right-radius: 50% 30% !important;
86 | }
87 | .imag-box:hover{
88 | z-index: 1;
89 | transform: scale(1.25);
90 | /* border-left: 1px solid white; */
91 | border: 2px solid #00002e;
92 | filter: brightness(1.1);
93 | box-shadow: 0px 0px 35px #000;}
94 | /* .imgBx:before{
95 | content: '';
96 | position: absolute;
97 | width: 100%;
98 | height: 100%;
99 | z-index: 1;
100 | background: linear-gradient(180deg, rgb(0, 204, 255),rgba(8, 8, 8, 0.925));
101 | mix-blend-mode: multiply;
102 | opacity: 0;
103 | transition: 0.5s;
104 | } */
105 | .imag-box img{
106 | position: absolute;
107 | object-fit: cover;
108 | width: 100%;
109 | height: 100%;
110 |
111 | }
112 |
113 | .conta{
114 | width: 100%;
115 | height: 400px;
116 | display: flex;
117 | justify-content: center;
118 | align-items: center;
119 | margin-bottom: 10px;
120 | }
121 | .contents{
122 | position: relative;
123 | width: 100%;
124 | height: 100%;
125 | z-index: 1;
126 | display: flex;
127 | padding: 20px;
128 | align-items: flex-end;
129 | }
130 | .contents h2{
131 | color: rgb(4, 16, 54);
132 | transition: 0.5s;
133 | text-align: center;
134 | letter-spacing: 1px;
135 | font-family: 'Roboto', sans-serif;
136 | font-size: 18px;
137 | transform: translateY(150px);
138 | }
139 | .imag-box:hover h2{
140 |
141 | transform: translateY(0);
142 | transition-delay: 0.01s;
143 | }
144 | .conts{
145 | display: flex;
146 | flex-direction: column;
147 | margin-top: 15%;
148 | padding: 25px;
149 | width: 100%;
150 | height: 100%;
151 | backdrop-filter: blur(5px);
152 | background-color: rgba(58, 58, 59, 0.2);
153 | /* background-color: yellow; */
154 | font-size: 32px;
155 | font-size: 20px;
156 | color: rgb(180, 175, 175);
157 | font-family: "Pollins", sans-serif;
158 | position: relative;
159 | }
160 | .head-one{
161 | margin: 15px;
162 | letter-spacing: 2px;
163 | text-transform: capitalize;
164 | color: rgb(165, 163, 163);
165 | font-size: 22px;
166 | font-family:monospace;
167 | }
168 | .res-one{
169 | border-bottom: 1px solid cyan;
170 | width: 50%;
171 | margin-bottom: 35px;
172 | padding-left: 55px;
173 | color: rgb(250, 250, 250);
174 | font-size: 72px;
175 | font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
176 | }
--------------------------------------------------------------------------------
/src/utils/createSale.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Connection,
3 | TransactionInstruction,
4 | Transaction,
5 | sendAndConfirmTransaction,
6 | PublicKey,
7 | SystemProgram,
8 | Keypair,
9 | } from "@solana/web3.js";
10 |
11 | import * as borsh from 'borsh';
12 |
13 |
14 | async function establishConnection():Promise