Skip to content

Commit 12c095b

Browse files
committed
testing
1 parent 9e33f52 commit 12c095b

27 files changed

+3124
-186
lines changed

backend/src/config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ const TREASURY_ADDRESS = '0xd8B808A887326F45B2D0cd999709Aa6264CeF919';
5959
const MAX_SUPPLY = 5000; // The maximum number of NFTs that can be minted. CANNOT BE UPDATED!
6060
const MINT_PRICE = .001; // Minting price per NFT. Rinkeby = ETH, Polygon = MATIC. CANNOT BE UPDATED!
6161
const TOKENS_PER_MINT = 10; // maximum number of NFTs a user can mint in a single transaction. CANNOT BE UPDATED!
62-
const PUBLIC_MINT_START_DATE = "2022-03-20T11:30:48+00:00"; // This is required. Eg: 2022-02-08T11:30:48+00:00
63-
const PRESALE_MINT_START_DATE = "2022-03-13T11:30:48+00:00"; // delete
62+
const PUBLIC_MINT_START_DATE = "2022-03-15T11:30:48+00:00"; // This is required. Eg: 2022-02-08T11:30:48+00:00
63+
const PRESALE_MINT_START_DATE = "2022-03-15T10:30:48+00:00"; // delete
6464
// const PRESALE_MINT_START_DATE = null; // Optional. Eg: 2022-02-08T11:30:48+00:00
6565
const ROYALTY_SHARE = 1000; // Percentage of the token price that goes to the royalty address. 100 bps = 1%
6666
const ROYALTY_ADDRESS = "0xd8B808A887326F45B2D0cd999709Aa6264CeF919"; // Address that will receive the royalty
6767
const BASE_URI = null; // only update if you want to manually set the base uri
6868
const PREREVEAL_TOKEN_URI = null; // only update if you want to manually set the prereveal token uri
69-
const PRESALE_WHITELISTED_ADDRESSES = []; // only update if you want to manually set the whitelisted addresses
69+
const PRESALE_WHITELISTED_ADDRESSES = ['0xB7422Da1890Ce24309b4670792a1D5E5A6D32F38',"0xd8B808A887326F45B2D0cd999709Aa6264CeF919"]; // only update if you want to manually set the whitelisted addresses
7070

7171
// ** OPTIONAL **
7272
let CONTRACT_ADDRESS = "YOUR CONTRACT ADDRESS"; // If you want to manually include it
@@ -187,10 +187,8 @@ module.exports = {
187187
GENERIC_TITLE,
188188
GENERIC_DESCRIPTION,
189189
GENERIC_IMAGE,
190-
INTERVAL,
191190
CONTRACT_NAME,
192191
CONTRACT_SYMBOL,
193-
REVEAL_PROMPT,
194192
METADATA_UPDATABLE,
195193
ROYALTY_SHARE,
196194
ROYALTY_ADDRESS,

backend/utils/nftport/deployContract.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ let {
2222
PUBLIC_MINT_START_DATE,
2323
BASE_URI,
2424
PREREVEAL_TOKEN_URI,
25-
PRESALE_MINT_START_DATE
25+
PRESALE_MINT_START_DATE,
26+
PRESALE_WHITELISTED_ADDRESSES
2627
} = require(`${basePath}/src/config.js`);
2728

2829
const deployContract = async () => {
@@ -91,6 +92,7 @@ const deployContract = async () => {
9192
presale_mint_start_date: PRESALE_MINT_START_DATE,
9293
base_uri: BASE_URI,
9394
prereveal_token_uri: PREREVEAL_TOKEN_URI,
95+
presale_whitelisted_addresses: PRESALE_WHITELISTED_ADDRESSES
9496
};
9597
const options = {
9698
method: "POST",

backend/utils/nftport/updateContract.js

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const fs = require("fs");
12
const basePath = process.cwd();
23
const yesno = require('yesno');
34
let [UPDATE] = process.argv.slice(2);
@@ -33,7 +34,8 @@ switch (UPDATE) {
3334
updateValue = PRESALE_MINT_START_DATE;
3435
break;
3536
case "presale_whitelisted_addresses":
36-
contract.presale_whitelisted_addresses = PRESALE_WHITELISTED_ADDRESSES;
37+
const addresses = PRESALE_WHITELISTED_ADDRESSES.map(address => address.toLowerCase());
38+
contract.presale_whitelisted_addresses = addresses;
3739
updateValue = PRESALE_WHITELISTED_ADDRESSES;
3840
break;
3941
case "royalty_share":
@@ -49,10 +51,39 @@ switch (UPDATE) {
4951
updateValue = CONTRACT_ADDRESS;
5052
break;
5153
case "base_uri":
54+
if(!BASE_URI) {
55+
try {
56+
let jsonFile = fs.readFileSync(`${basePath}/build/ipfsMetas/_ipfsMetasResponse.json`);
57+
let metaData = JSON.parse(jsonFile);
58+
if(metaData.response === "OK" && metaData.error === null) {
59+
BASE_URI = metaData.metadata_directory_ipfs_uri;
60+
} else {
61+
console.log('There is an issue with the metadata upload. Please check the /build/_ipfsMetas/_ipfsMetasResponse.json file for more information. Running "npm run upload_metadata" may fix this issue.');
62+
}
63+
} catch (err) {
64+
console.log(`/build/_ipfsMetasGeneric/_ipfsMetasResponse.json file not found. Run "npm run upload_metadata" first.`);
65+
process.exit(0);
66+
}
67+
}
5268
contract.base_uri = BASE_URI;
5369
updateValue = BASE_URI;
5470
break;
5571
case "prereveal_token_uri":
72+
if(!PREREVEAL_TOKEN_URI) {
73+
try {
74+
let jsonFile = fs.readFileSync(`${basePath}/build/ipfsMetasGeneric/_ipfsMetasResponse.json`);
75+
let metaData = JSON.parse(jsonFile);
76+
if(metaData.response === "OK" && metaData.error === null) {
77+
PREREVEAL_TOKEN_URI = metaData.metadata_uri;
78+
} else {
79+
console.log('There is an issue with the metadata upload. Please check the /build/_ipfsMetasGeneric/_ipfsMetasResponse.json file for more information. Running "npm run upload_metadata" may fix this issue.');
80+
}
81+
} catch (err) {
82+
console.log(`/build/_ipfsMetasGeneric/_ipfsMetasResponse.json file not found. Run "npm run upload_metadata" first.`);
83+
console.log(`Catch: ${err}`);
84+
process.exit(0);
85+
}
86+
}
5687
contract.prereveal_token_uri = PREREVEAL_TOKEN_URI;
5788
updateValue = PREREVEAL_TOKEN_URI;
5889
break;

frontend/css/splide-core.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/css/splide.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/css/style.css

Lines changed: 176 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
/* GLOBAL STYLES */
66

77
:root {
8-
--font-primary: 'Poppins', sans-serif;
9-
--font-secondary: 'Arvo', serif;
10-
--font-code: 'Roboto', monospace;
8+
--font-primary: "Poppins", sans-serif;
9+
--font-secondary: "Arvo", serif;
10+
--font-code: "Roboto", monospace;
1111
--bg-color: #00163f;
1212
--font-color: #ffffff;
1313
--btn-bg-color: #ffffff;
1414
--accent-color: #be7efe;
15-
--header-shadow: #000 0px 0px 5px;
15+
--header-shadow: var(--accent-color) 0px 0px 5px;
16+
--card-shadow: var(--accent-color) 0px 0px 20px;
1617
}
1718

1819
* {
@@ -36,11 +37,14 @@ body {
3637
max-width: 960px;
3738
margin: 0 auto;
3839
padding: 1rem 2rem;
40+
justify-content: center;
41+
overflow: hidden;
3942
}
4043

4144
/* HEADER */
4245

4346
header {
47+
background-color: var(--bg-color);
4448
box-shadow: var(--header-shadow);
4549
}
4650

@@ -67,9 +71,10 @@ header .container {
6771
font-style: italic;
6872
font-weight: bold;
6973
font-size: 1rem;
74+
text-align: center;
7075
text-transform: capitalize;
7176
transition: all 0.3s ease;
72-
box-shadow: 4px 4px 0 0 var(--accent-color);
77+
box-shadow: var(--header-shadow);
7378
cursor: pointer;
7479
position: relative;
7580
text-decoration: none;
@@ -78,6 +83,9 @@ header .container {
7883
.btn:hover {
7984
box-shadow: none;
8085
}
86+
.btn:disabled {
87+
cursor: default;
88+
}
8189

8290
.wallet-btn {
8391
border-radius: 5rem;
@@ -91,23 +99,47 @@ header .container {
9199
padding: 1.5rem 3rem;
92100
}
93101

102+
/* CARD */
103+
104+
.card {
105+
position: relative;
106+
background-color: var(--bg-color);
107+
border-radius: 5px;
108+
border: 3px solid var(--accent-color);
109+
box-shadow: var(--card-shadow);
110+
padding: 5rem;
111+
margin-bottom: 2rem;
112+
opacity: 0;
113+
transform: translateX(100vw);
114+
transition: all 0.5s ease-in-out;
115+
}
116+
117+
.show-card {
118+
opacity: 1;
119+
transform: translateX(0);
120+
}
121+
94122
/* COUNTDOWN SECTION */
95123

96124
section {
97125
flex: 1 1 auto;
98126
}
99127

128+
#countdown {
129+
display: none;
130+
text-align: center;
131+
}
132+
100133
.countdown {
101134
display: flex;
102135
flex-direction: column;
103136
justify-content: center;
104137
align-items: center;
105-
height: 100%;
106138
}
107139

108140
.countdown ul {
109141
display: flex;
110-
gap: 2rem
142+
gap: 2rem;
111143
}
112144
.countdown .clock-item {
113145
list-style: none;
@@ -148,18 +180,120 @@ section {
148180
text-align: center;
149181
}
150182

151-
.countdown p {
183+
.countdown h2 {
184+
margin-top: 1rem;
185+
}
186+
187+
.countdown > p {
152188
font-size: 1.1rem;
153189
font-family: var(--font-secondary);
154190
margin-bottom: 2rem;
155191
text-align: center;
156192
}
157193

158-
/* OWNER STYLES */
194+
/* MINT CONTAINER */
159195

160-
.owner-status {
161-
font-size: 2rem;
196+
.mint-container {
197+
width: 100%;
198+
display: flex;
199+
flex-direction: column;
200+
justify-content: center;
201+
}
202+
203+
.info-container {
204+
display: flex;
205+
justify-content: space-between;
206+
width: 100%;
207+
text-align: center;
208+
margin-bottom: 2rem;
209+
}
210+
211+
.mint-qty {
212+
display: flex;
213+
justify-content: space-between;
214+
align-items: center;
215+
padding: 1rem;
216+
background-color: var(--accent-color);
217+
border-radius: 5px;
218+
}
219+
220+
.mint-qty > span {
221+
display: flex;
222+
}
223+
224+
.mint-btn {
225+
display: flex;
226+
align-items: center;
227+
gap: 3rem;
228+
margin: auto;
229+
}
230+
231+
.input-number {
232+
height: 100%;
233+
padding: 1rem;
234+
vertical-align: top;
162235
text-align: center;
236+
outline: none;
237+
}
238+
239+
.input-number,
240+
.input-number-decrement,
241+
.input-number-increment {
242+
user-select: none;
243+
}
244+
245+
.total-price-container {
246+
display: flex;
247+
justify-content: space-between;
248+
width: 100%;
249+
padding: 1rem 0 2rem;
250+
}
251+
252+
.total-price-container p {
253+
color: var(--accent-color);
254+
}
255+
256+
/* MINTED CONTAINER */
257+
258+
.minted-container {
259+
display: flex;
260+
flex-direction: column;
261+
justify-content: center;
262+
align-items: center;
263+
width: 100%;
264+
}
265+
266+
.minted-container h1 {
267+
font-size: 5rem;
268+
margin-bottom: 2rem;
269+
}
270+
271+
.minted-container h2 {
272+
font-size: 2rem;
273+
margin-bottom: 1rem;
274+
}
275+
276+
.minted-container p {
277+
margin: 1rem 0;
278+
}
279+
280+
/* SLIDDER */
281+
282+
.splide {
283+
position: absolute;
284+
top: 90px;
285+
left: 5rem;
286+
z-index: -1;
287+
opacity: 0.7;
288+
}
289+
290+
.splide__slide {
291+
border: var(--accent-color) solid;
292+
border-width: 5px 10px;
293+
}
294+
295+
.splide__slide img {
296+
width: 100%;
163297
}
164298

165299
/* MEDIA QUERIES */
@@ -170,14 +304,43 @@ section {
170304
}
171305
.wallet-btn {
172306
margin-left: 0;
173-
padding: 1rem;
307+
padding: 0.5rem 1rem;
174308
max-width: 8rem;
175309
}
310+
.countdown ul {
311+
display: grid;
312+
grid-template-columns: repeat(2, 1fr);
313+
}
314+
.countdown .clock-item {
315+
width: 100%;
316+
}
317+
.countdown .clock-item .count-number {
318+
font-size: 1.5rem;
319+
}
320+
.countdown .clock-item .count-text {
321+
font-size: 1rem;
322+
}
176323
.countdown h1 {
177324
font-size: 2rem;
325+
margin: 1rem 0;
326+
}
327+
.countdown h2 {
328+
padding-top: 0.5rem;
178329
}
179330
.countdown p {
180331
font-size: 1rem;
181332
}
333+
.card {
334+
padding: 1rem;
335+
}
336+
.mint-qty .btn {
337+
padding: 1rem;
338+
font-size: 13px;
339+
}
340+
}
341+
342+
/* UTILITIES */
343+
344+
.hidden {
345+
display: none;
182346
}
183-

0 commit comments

Comments
 (0)