-
Notifications
You must be signed in to change notification settings - Fork 0
/
seed.ts
698 lines (686 loc) · 23 KB
/
seed.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
import { PrismaClient, Prisma } from "@prisma/client";
import { randomBytes } from "crypto";
import { ethers } from "ethers";
import {
uniqueNamesGenerator,
Config,
adjectives,
colors,
names,
} from "unique-names-generator";
function getRandomInt(max: number): number {
return Math.floor(Math.random() * max);
}
const prisma = new PrismaClient();
const BADGES: Prisma.BadgeCreateInput[] = [
{
name: "Olympus Badge",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmexSQtGfukH7tUBZdzUA9QEEJ3KnwbHKeWnWRkgLm1KfL",
},
{
name: "Intro to 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmejDiuvnvyE4jwUZiS5KSnZwomCQVBnf7JmiQa6FjmZKB",
},
{
name: "Intro to Popcorn",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qmf1FeuyfwgQvPRbqgaGaqcg5voEMzjNHHRMU8k6fWch9b",
},
{
name: "Investor Guide to $GRANT",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmRd1GjHNfTTDgp4ULYQzgvFSL6PoHZqMK1ykjhkqF2b9d",
},
{
name: "What is Web3?",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmeGjYMBgZTeGDUjChVhXhPSSYbyw1h6h4ufV2gHHksPBf",
},
{
name: "Introduction to NFTs",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmSd9M8kMz2BXuJTXbZ5CvbxRJtLTQrU9bCUmCo2S6NcpR",
},
{
name: "Intro to DeFi",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qmb68JKiKrkYXi1GzYRtXWWHKzvkUQNCTLRPgCKSxYbXwg",
},
{
name: "Intro to Web3",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWJYt2y5Ucu1p1zwFF1FiAt1e1BrjBAi2HqsZ9M9ZY5x4",
},
{
name: "Blockchain 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmcGdbh7nH7YLuiSG51BwdnxGVwqzcwW56Hc5TE3zeEojf",
},
{
name: "What is Beanstalk",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTUD8DRWuYA1okUVzFRjX22wc9XyKMmZsqnuKiGPxfyhN",
},
{
name: "What is Beanstalk",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTUD8DRWuYA1okUVzFRjX22wc9XyKMmZsqnuKiGPxfyhN",
},
{
name: "Blockchain Basics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmVbTG1FqdBbmgY5jmUGh8Vq93o1NVbsDEYyu7ukXtCmt7",
},
{
name: "Blockchain Basics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmVbTG1FqdBbmgY5jmUGh8Vq93o1NVbsDEYyu7ukXtCmt7",
},
{
name: "Blockchain Basics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmVbTG1FqdBbmgY5jmUGh8Vq93o1NVbsDEYyu7ukXtCmt7",
},
{
name: "What is Beanstalk",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTUD8DRWuYA1okUVzFRjX22wc9XyKMmZsqnuKiGPxfyhN",
},
{
name: "What is Beanstalk",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTUD8DRWuYA1okUVzFRjX22wc9XyKMmZsqnuKiGPxfyhN",
},
{
name: "Learn to Lucid Dream",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmbNrnVS1EzTykwFGQpa1PH3543qHhRgrJE79rSgoNZsH8",
},
{
name: "Intro to IDriss.xyz",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmPcDdjnDa5nkHT5q3LWW3UKF4SPecxkt9z2HCcpESZq39",
},
{
name: "Intro to IDriss.xyz",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmPcDdjnDa5nkHT5q3LWW3UKF4SPecxkt9z2HCcpESZq39",
},
{
name: "Como preparar sua carteira Metamask no seu celular",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmSPHeeDLYDEKq4C6C7oumA6awgjHx7MJt4EQKuMwUpuoZ",
},
{
name: "HoneyDAO Onboarding",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTHBXD7asJEzqQoK1sxjzzP6p6HTBPBQU6GxLkri565M2",
},
{
name: "Basic Discord Security",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmciLko8VWNUkbp6jLA33PbURKEFt8M4UPpFqYrFs5h1Z1",
},
{
name: "Basic Discord Security",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmciLko8VWNUkbp6jLA33PbURKEFt8M4UPpFqYrFs5h1Z1",
},
{
name: "Wallet Basics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmcxSnSVoUpSEWhGhgiGRUpVgBdFVySkFxLrWudmZ59oXL",
},
{
name: "Wallet Basics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmcxSnSVoUpSEWhGhgiGRUpVgBdFVySkFxLrWudmZ59oXL",
},
{
name: "Wallet Safety Essentials",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmY7H4yWsMTuHFvwbETxmXLagx3JezUupzK7h3zRQWz2Av",
},
{
name: "Ledger 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmUssLzaF7ZxHWDxnkFC8tf1LcGngkY3ELTKsoCMyYpaUr",
},
{
name: "Como preparar sua carteira Metamask no seu celular",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmSPHeeDLYDEKq4C6C7oumA6awgjHx7MJt4EQKuMwUpuoZ",
},
{
name: "Como preparar sua carteira Metamask no Google Chrome",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXu8sasugtf2qz81VKoufezcByLPzgdVK5p4j3XQ29nnu",
},
{
name: "Wallet Basics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmVsTQSLyu1oTRu17jFYPFZ1yXUm4sNEbYnsG15YfsecnF",
},
{
name: "Intro to Women in Web3",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTPB7eEz3CkwZBZyCm4iFVQ7CB6FhGaeScUuzUqU4rbU6",
},
{
name: "Intro to Women in Web3",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTPB7eEz3CkwZBZyCm4iFVQ7CB6FhGaeScUuzUqU4rbU6",
},
{
name: "Test course",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmY7H4yWsMTuHFvwbETxmXLagx3JezUupzK7h3zRQWz2Av",
},
{
name: "Ledger 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmUssLzaF7ZxHWDxnkFC8tf1LcGngkY3ELTKsoCMyYpaUr",
},
{
name: "Ledger 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmUssLzaF7ZxHWDxnkFC8tf1LcGngkY3ELTKsoCMyYpaUr",
},
{
name: "Building a Simple Ethereum Wallet from Scratch Quiz",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qmf6qbpYXLtR573JjymfzmaSoNN3pLe3NRjwKvReeo9arn",
},
{
name: "Basic Discord Security",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmciLko8VWNUkbp6jLA33PbURKEFt8M4UPpFqYrFs5h1Z1",
},
{
name: "Adicionando novas Redes, Tokens e NFTs no Metamask",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXu8sasugtf2qz81VKoufezcByLPzgdVK5p4j3XQ29nnu",
},
{
name: "Como preparar sua carteira Metamask no Google Chrome",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXu8sasugtf2qz81VKoufezcByLPzgdVK5p4j3XQ29nnu",
},
{
name: "Preparando sua Metamask no Google Chrome",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXu8sasugtf2qz81VKoufezcByLPzgdVK5p4j3XQ29nnu",
},
{
name: "Preparando sua Metamask no Google Chrome",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXu8sasugtf2qz81VKoufezcByLPzgdVK5p4j3XQ29nnu",
},
{
name: "A Origem da Tecnologia Blockchain",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXu8sasugtf2qz81VKoufezcByLPzgdVK5p4j3XQ29nnu",
},
{
name: "Como preparar sua carteira Metamask no seu celular?",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXu8sasugtf2qz81VKoufezcByLPzgdVK5p4j3XQ29nnu",
},
{
name: "Entendendo os elementos de uma rede blockchain",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXu8sasugtf2qz81VKoufezcByLPzgdVK5p4j3XQ29nnu",
},
{
name: "Como converter criptomoedas em Real?",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXu8sasugtf2qz81VKoufezcByLPzgdVK5p4j3XQ29nnu",
},
{
name: "How to Set Discord Default Server Permissions",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmYXSmdWWvTDJFQ3QkJBS1AoL7JABtmeF5D1trYKQFGZKx",
},
{
name: "101 to the Moon ???",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmRy6uBaZuCsydNoxBJaAjhRChrmTwYCCAB3oLMyviyaWy",
},
{
name: "Building a Simple Ethereum Wallet from Scratch Quiz",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qmd4zzdwHBv14jvDzGaCst7RBk4L4KudcoEzbjUFjnyNX4",
},
{
name: "Building a Simple Ethereum Wallet from Scratch Quiz",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qmd4zzdwHBv14jvDzGaCst7RBk4L4KudcoEzbjUFjnyNX4",
},
{
name: "Coinbase Wallet SDK",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmYUbMC5fTN2zKuyTCggszRxgvmTZ6JHDsVcHwuqp16MSw",
},
{
name: "The ReFi movement",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmNZxEUUUNZpot12XYVsyNsTXTpmU5GozZNM9cVsJsHEa2",
},
{
name: "Voting on a DAO",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmajBPcK2s84W75WeBqyDTsM2vpBQSWzsgbcTmuVoNaV2P",
},
{
name: "How to disable DMs on Discord",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmYXSmdWWvTDJFQ3QkJBS1AoL7JABtmeF5D1trYKQFGZKx",
},
{
name: "What is blockchain?",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmYbvfaZ41DRdubm589bMmmkZMDUNAG32MYXv6yP6xh4rQ",
},
{
name: "What is web3?",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmYbvfaZ41DRdubm589bMmmkZMDUNAG32MYXv6yP6xh4rQ",
},
{
name: "Intro to yield farming",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmeCXxozansHtyYmH3q59nsqFeH19DCNT2xusMKh5Uap44",
},
{
name: "HOW TO DISABLE DMS ON DISCORD",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmYXSmdWWvTDJFQ3QkJBS1AoL7JABtmeF5D1trYKQFGZKx",
},
{
name: "What is AMBCrypto?",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmRD3Jkh8M9zQEUMP39qRUePdYJtyQkKk8dj2oZEkDqnHX",
},
{
name: "Example Course",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWHK9Vr893mGjXbxR45AYrR5NNHeHsY6DqGX36QpqCvng",
},
{
name: "Example Course",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmPQjDcVTgf6AxcSmoJYVYroRfXa9u2mFtzXy6peZub9M6",
},
{
name: "Example Course",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWHK9Vr893mGjXbxR45AYrR5NNHeHsY6DqGX36QpqCvng",
},
{
name: "Example Course",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWHK9Vr893mGjXbxR45AYrR5NNHeHsY6DqGX36QpqCvng",
},
{
name: "Example Course",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWHK9Vr893mGjXbxR45AYrR5NNHeHsY6DqGX36QpqCvng",
},
{
name: "Smart Wallets",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWHK9Vr893mGjXbxR45AYrR5NNHeHsY6DqGX36QpqCvng",
},
{
name: "Intro to 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmeCXxozansHtyYmH3q59nsqFeH19DCNT2xusMKh5Uap44",
},
{
name: "Scarlet DAO Pass V1",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmfDnooGPE9W5espiLKiV2Q1f5b9ArN19SGyY7b4UsKnGT",
},
{
name: "Intro to 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmPQjDcVTgf6AxcSmoJYVYroRfXa9u2mFtzXy6peZub9M6",
},
{
name: "O que são NFTs?",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmZYFBSWT4eD1YcTdWgpAAUMsnFgrMq1nQwiPpfnenvxGm",
},
{
name: "NFT Launchpad 5 Days Workshop",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmesYEnicA5t8KsroskTQik1XZPwtmj51q6HhEZa35EJw2",
},
{
name: "First time on Celo",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmRy6uBaZuCsydNoxBJaAjhRChrmTwYCCAB3oLMyviyaWy",
},
{
name: "Celo Test Course",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWHK9Vr893mGjXbxR45AYrR5NNHeHsY6DqGX36QpqCvng",
},
{
name: "Celo Test Course 2",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWHK9Vr893mGjXbxR45AYrR5NNHeHsY6DqGX36QpqCvng",
},
{
name: "Intro to Voltz",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmUKqkRGbpNMn7M3ekvCsM8beXyk5vtbMCuodcxNJoLLaX",
},
{
name: "Intro to DeSo for Creators",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTKUPtmXJzPnTnvFcRb8YfTo9tYpNYgPwbLBzWuAXL9dL",
},
{
name: "Intro to 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmPNwNDMy341pgRsrWurGZXAAjLZMZ1LdB6xnu84fF3HHR",
},
{
name: "Intro to 101 ",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmYR4e9h2WBWg7E7ZyiAsBkqg25qWoMTvq7EsFXHDjsvyy",
},
{
name: "Intro to 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXdWimhBj8q2KxV3SCyAmviSDpZxE3XEqUr4ctgcMNgF1",
},
{
name: "Intro to 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXdWimhBj8q2KxV3SCyAmviSDpZxE3XEqUr4ctgcMNgF1",
},
{
name: "Intro to Idle protocol",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWHK9Vr893mGjXbxR45AYrR5NNHeHsY6DqGX36QpqCvng",
},
{
name: "Learn to Lucid Dream",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmPNFhK5DeYtP4MhtX2sCti88wxTrJU5m8pig7aX4CDVS9",
},
{
name: "Blockchain 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmP6nG6ESF9B5g2WPgQ1rD1FbeyRGkfqZZfq5Z6PAgnjH4",
},
{
name: "Intro to 40acres",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmZ1ubKvRMjH7ci2CJnwG51VyfgSozYynnFWGMe77hnNWo",
},
{
name: "TL:DR: NFTs",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWCnjUz7RYABdgsGLtmf45XSNos3pkChWWViJj2KheMRz",
},
{
name: "Test course with GIF",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmQTuvGabUbs2eVPcD2LTBW6fqgX6CdDx4s7yPvW9SWdGu",
},
{
name: "Test Course",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmPvMQrQBGa8cFnDGdtbemW1uPVj154XYTQtBZsPqhgnAa",
},
{
name: "Decent Survey Completion",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTfWN4h3kNduo1cSNg1SibjmT1SDgjN4q4ZFd5nRC7WAe",
},
{
name: "Voltz Protocol General Concepts",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmazrDEmj7hvi54qmTM26QXbL4D8Dv1BqtLzp4cFsHTRVe",
},
{
name: "Decent User Survey",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmcUp5FycKMWSPy5C84JWih6XBF7WYDrkMRWQJN8H4V6G5",
},
{
name: "Testeeeee",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qmf5o174vSVcVLgkXb9B9hvqpHzVSs48EHTfjQnFxCJmn8",
},
{
name: "Discord Moderation Basics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qmf7qqWnbnaXm1SMvmKfdDvsrw8wa8PapLitz2fjqUskUJ",
},
{
name: "Intro to Interest Compounding ETH",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmQsR28kHL7jc93fBGdYBy4XqQg8WiddMYVbYDqH4ef2oK",
},
{
name: "Introduction to Remix",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmQmPz3sTyXSTc28kRascXqAqYXm5LBw5RpGufdaJfibU4",
},
{
name: "Introduction to Remix",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmQmPz3sTyXSTc28kRascXqAqYXm5LBw5RpGufdaJfibU4",
},
{
name: "Introduction to Etherscan",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmNwhB2HNPbRXYYAXa4uvU6PXwzVDGSbgsxHKBkLFagaKg",
},
{
name: "Introduction to CryptoZombies ",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmZnXghQ9wrbgpTQy9Zf1F6akC1T4GzM4dYnYYnwSzXGRc",
},
{
name: "Blockchain 101",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmaUbdv4awirgiQpdTVfA7vSDKUWSQDtbfoJAUb4MoNAHa",
},
{
name: "Tracer Voyage - Phase 2",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmdFRVwkvA2jnZtLfaiieVrZt2WKvvU5xzMBXQBTjuJ5Jc",
},
{
name: "Intro to Etherscan",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmenvoL8BgVkh6KgoAp7V7bjPx8nGKic9cXeNJyFJtmLXj",
},
{
name: "The Hunt :: NFT NYC Token 2",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmZdJddGruLJN2AJo2hyotHHDhya5G7992x4pzEscPNkLf",
},
{
name: "Ed3 Podcast",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmSZLMbP5AZdyJxBcwPWReosEvPU6JoenNpn9Rwwph8EKY",
},
{
name: "How to create a crypto wallet",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmfD45x54xhhA1UwUb36HtVngMWFgdNZgvUS4iszeLXBzR",
},
{
name: "Create a Crypto Wallet",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmfD45x54xhhA1UwUb36HtVngMWFgdNZgvUS4iszeLXBzR",
},
{
name: "CDB Advanced Mathematics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmSsgXEew98rKPkNAVU4LubHnaV637wcjPSFHZNnwu6phk",
},
{
name: "Intro to Women in Web3",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmV3F2y25Jadx5kvKJ4sNCzEzKtKyyW9HimDGccXhFw1oa",
},
{
name: "CDB Advanced Mathematics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmcYk3tkcfy87xnhVr7bBQ2MwCyYotuRhcyfqo323QTEFG",
},
{
name: "CDB Advanced Mathematics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmbJn5RVJeskNZdpmbgu8noBkcjzrrTi8qCu17G47RrmcW",
},
{
name: "Metaleap University's NFT Workshop ",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmRsd2oB6bzWhna9bX5n1W4kbPykRiLizhdgADe5B9f4nS",
},
{
name: "Into to the Moonlab system",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmeRTak2Dd1512yVawRzY3UNMyUppwbxSV4uwahRwX2i38",
},
{
name: "Metaleap's MetaRobot NFTs",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmUhCA8Z9NkByo4RuWKzKDUHhhFDgcxU1xK716TEx8GhzW",
},
{
name: "Scarlet DAO: An Introduction",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qman2jvcfzYBY6ZR9Xh6CopFjH6NhANMJCgJhBLJ9F397p",
},
{
name: "Understanding Hop Protocol",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmTBfFYqNyBc8F8PMwVswGiUDkrnxSwk6otkFaLCJxCR4e",
},
{
name: "Thirdweb Deploy",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qma2tfK29uD7cyeaDo8vNVDLMgnrk9RpAREstw8xd2yQof",
},
{
name: "Intro to Lit Protocol",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmaDZvkWWCbAxczqd9h2t9ZhCdtoFf72NZn48qU1WVunAs",
},
{
name: "What is Lens?",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmaS562hZhbjv7QC92dNibVJjNeZHxVDrSuD5Jn7dJtKPJ",
},
{
name: "Intro to The Graph",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmYFGiTrAmEwXe4WpQZe7qK6Qag7KpgBB7BddhzaefyENd",
},
{
name: "Blockchain and Discord Security Information Session",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmQEXwRjXq7RdAxDwUbJsjgPC6J4mxqtpwEoSztPViBsKR",
},
{
name: "Intro to Tokenomics",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWnbv94PLBHywyYDrBvU9864QU5QScncbWYdstQNGrNZh",
},
{
name: "Intro to Pyth Network",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmZ5HiXGyNnXDmL6kNrfq9DRZGAxiEKefSuUgUZ7uYvgCm",
},
{
name: "Introduction to Forefront",
imageUrl: "https://cloudflare-ipfs.com/ipfs/Qma6hvwPizZMW9FH2VVoyfXLhVDD7sUdQFnMgQHBmWgShV",
},
{
name: "Introduction to TBA DAO",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmbGyqxXXLKQgzy3UTbgSTMUzRpStUVfQKYdzFvWyyraMR",
},
{
name: "Introduction to Verci",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmZXd4vh1f5oseUqSQkzJqAyXgHJNf9RqSQapNZMfzRDzw",
},
{
name: "Intro to Rutgers Blockchain Hub",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmSSgJEmtQQxuQKPtv16Lsr6WFVY6bqiM7ehM4UNaoRZkR",
},
{
name: "Testeeeee",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmfBq7YDN5pfmUEqd22Lf8NxyR3sQx5Ca3TCyBKSCGys1z",
},
{
name: "Testeeeee",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmfBq7YDN5pfmUEqd22Lf8NxyR3sQx5Ca3TCyBKSCGys1z",
},
{
name: "ArborDAO - Basic Operations",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmbBU5LByyDytTxsbxaK4Fbq3Jc7QKpqUDmPNcx5zyfYCw",
},
{
name: "Introduction to Verci ✌",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXXMdkymoJ7qfWNu4vZcUTwWMMoJH91vcWf2o9987MP5J",
},
{
name: "Intro to NFTs",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmPkgcZ9zYWo3q3FhsMKiiCcfxRUUxiTTJSxsy8NS3NMYW",
},
{
name: "Welcome to Blu3 DAO 🦋 (Test)",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmYxwRXt96YGp3d9W6531KpPCCV2XqWUAKrCQcE4ukzrYJ",
},
{
name: "Intro to DAOs",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmUEjXhSuZ9jStTzmbfgBUFvfmVzPNK4NydomBeAYLqmxn",
},
{
name: "Create a Trust Wallet",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmNsfYzrcRe2R8SBKaS1ziArKJF873St43HuFDH2krqCKG",
},
{
name: "Intro to Pinata",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmXabHcZmcneby4nh1tQDHvK3Hpm6Fo24LA9h578RYj6g4",
},
{
name: "Intro to Web3",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmbHLQnugUvWqccCbdsnyQAaHU18PiSo1Yf5jVURz5ZcuH",
},
{
name: "Intro to Blockchain",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmeDC9hUg6Ef8bhFiAPqDaqD2fFLAa9pnCD6hjCE8fA5rP",
},
{
name: "Welcome to Students DAO ",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmWBLqvK3m6fqmvTpWowpFc7pD9PThmctzGYxVYgY2Ks6K",
},
{
name: "Intro to Pinata",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmR7YhtmfQpyHcBNdDEnys7Zxa3BZpd7zC9AScstthVG6B",
},
{
name: "[testnet] Intro to 0x",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmexegxWiS82f9KxLxPALf9pn65yQcxxttfpfH41j6xFsx",
},
{
name: "MoonLab HQ's Tech Stack",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmcnM3ESkmqZfAsXFtB8R6WdXk7CqZRgoBQziPPpYgFF89",
},
{
name: "What is Quadratic Funding?",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmU5PYCsts4Ezg8dAa2pM3KJsTnYB1UaFzWLggBgWsdweW",
},
{
name: "How Harpie Stops Scams",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmVT5SKak9D63NGWQPdGqXkubDatPgDSP5j5Qb1aawkvVN",
},
{
name: "Get to know TBA DAO",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmbGyqxXXLKQgzy3UTbgSTMUzRpStUVfQKYdzFvWyyraMR",
},
{
name: "Using Frontrunners to Prevent Scams",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmVT5SKak9D63NGWQPdGqXkubDatPgDSP5j5Qb1aawkvVN",
},
{
name: "Understanding Swapped Finance",
imageUrl: "https://cloudflare-ipfs.com/ipfs/QmbGSULmWVCb3fZVi27WxHq2YhjxSkbRwejuiSUQdh3qDG",
},
{
name: "Intro to Guild",
imageUrl: "ipfs://QmSYhKfBTRS7wN6abX6sE2KD85Z1D1SbwadZTzt4GzchPc",
},
{
name: "Third Academy Test",
imageUrl: "ipfs://QmYNa2DTnPdwmeKD5yM1dr91FZ1Ba6kQqxC6NmMWQPV8qi",
},
{
name: "Intro to Protocol Labs",
imageUrl: "ipfs://QmXNhuBDuiVYbzGuS7pEpiRXHG9F1NJr9J4SxdaeseXzn5",
},
{
name: "SheFi Blockchain Baddie 101 ",
imageUrl: "ipfs://QmUiv9JUDyBribhfxahuswKotff9DBydtHEebGtbQrwARP",
},
{
name: "NFT's 101 ",
imageUrl: "ipfs://QmSCrEjxrWwCMeRXhjh2TuQBhnpmz4HSz3rUd2DfRSvXhm",
},
{
name: "Level 1 Coloneer",
imageUrl: "ipfs://QmXZ8nPBbtry9QsA9CUrqDRQ2CvcUpvbcmduwq1rzMagaz",
},
{
name: "Intro to Colony",
imageUrl: "ipfs://QmTp19TU59vNBZ7zp7TRrNWhM8WLuTAvCxnPC4fPpjUSqP",
},
{
name: "Get to know DAOwah ",
imageUrl: "ipfs://Qmc2VUyu8UFp4x8saeXYxJcfiFrDz7PZbx7Lt5kYYjqb73",
},
];
function randomDate(start: Date, end: Date): Date {
return new Date(
start.getTime() + Math.random() * (end.getTime() - start.getTime())
);
}
export async function main() {
try {
console.log(`Start seeding ...`);
const badges = await Promise.all(
BADGES.map((badge) => prisma.badge.create({ data: badge }))
);
const userData: Prisma.UserCreateInput[] = [
{
name: "tim connors",
wallet: "timc.eth",
badges: {
create: badges.map((badge) => ({
Badge: { connect: { id: badge.id } },
dateEarned: randomDate(new Date(2012, 0, 1), new Date()),
})),
},
},
{
name: "alec velikanov",
wallet: "alecv.eth",
badges: {
create: badges.slice(2, badges.length).map((badge) => ({
Badge: { connect: { id: badge.id } },
dateEarned: randomDate(new Date(2012, 0, 1), new Date()),
})),
},
},
];
while (userData.length < 100) {
const id = randomBytes(32).toString("hex");
const privateKey = "0x" + id;
const wallet = new ethers.Wallet(privateKey);
const n = getRandomInt(badges.length - 5);
const random = badges.sort(() => 0.5 - Math.random()).slice(0, n);
userData.push({
name: uniqueNamesGenerator({
dictionaries: [adjectives, names, colors],
separator: " ",
length: 2,
}),
wallet: wallet.address,
badges: {
create: random.map((badge) => ({
Badge: { connect: { id: badge.id } },
dateEarned: randomDate(new Date(2012, 0, 1), new Date()),
})),
},
});
}
console.log(userData);
for (const u of userData) {
const user = await prisma.user.create({
data: u,
});
console.log(`Created user with id: ${user.id}`);
}
console.log(`Seeding finished.`);
} catch (err) {
console.error(err);
process.exit(1);
} finally {
await prisma.$disconnect();
}
}
main().then(() => console.log("Done!"));