-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsubtitles-en.srt
1531 lines (1149 loc) · 23.5 KB
/
subtitles-en.srt
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
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1
00:00:01,360 --> 00:00:04,080
hi everyone welcome to the second part
2
00:00:04,080 --> 00:00:06,399
of our Solana development walkthrough
3
00:00:06,399 --> 00:00:07,600
series
4
00:00:07,600 --> 00:00:10,240
in this video we'll be going over how to
5
00:00:10,240 --> 00:00:11,920
use the very powerful
6
00:00:11,920 --> 00:00:15,440
spl-token command line interface
7
00:00:15,440 --> 00:00:17,600
in order to do so and get the most out
8
00:00:17,600 --> 00:00:19,680
of it we'll first of all install the
9
00:00:19,680 --> 00:00:21,039
dependencies
10
00:00:21,039 --> 00:00:24,080
set up our Solana local environment then
11
00:00:24,080 --> 00:00:24,640
create
12
00:00:24,640 --> 00:00:28,880
tokens learn how to properly use them
13
00:00:28,880 --> 00:00:31,359
and finally create a digital
14
00:00:31,359 --> 00:00:32,960
non-fungible token
15
00:00:32,960 --> 00:00:36,079
and use them likewise
16
00:00:36,079 --> 00:00:38,480
this tutorial will require you to have a
17
00:00:38,480 --> 00:00:39,840
proper rustup
18
00:00:39,840 --> 00:00:42,399
rustc and cargo installation in your
19
00:00:42,399 --> 00:00:43,280
environment
20
00:00:43,280 --> 00:00:44,960
as well as the Solana command line
21
00:00:44,960 --> 00:00:46,320
interface and
22
00:00:46,320 --> 00:00:49,520
the spl-token package both of which
23
00:00:49,520 --> 00:00:51,360
we'll be going over on more details
24
00:00:51,360 --> 00:00:53,039
throughout this video
25
00:00:53,039 --> 00:00:55,600
as always if more resources are needed
26
00:00:55,600 --> 00:00:57,440
you can count on Solana's official
27
00:00:57,440 --> 00:00:58,960
documentation
28
00:00:58,960 --> 00:01:01,760
as well as the Github repositories which
29
00:01:01,760 --> 00:01:04,080
are well documented
30
00:01:04,080 --> 00:01:06,799
and for more personalized support don't
31
00:01:06,799 --> 00:01:08,960
hesitate to join the Solana official
32
00:01:08,960 --> 00:01:10,320
discord
33
00:01:10,320 --> 00:01:13,119
so fellow developer let's get to work
34
00:01:13,119 --> 00:01:14,400
the token subsection
35
00:01:14,400 --> 00:01:16,880
of the Solana program library already
36
00:01:16,880 --> 00:01:19,040
contains a very detailed walkthrough on
37
00:01:19,040 --> 00:01:20,320
what you need to set up
38
00:01:20,320 --> 00:01:22,799
and run in order to implement both
39
00:01:22,799 --> 00:01:23,520
fungible
40
00:01:23,520 --> 00:01:26,000
and non-vulnerable tokens this is made
41
00:01:26,000 --> 00:01:27,280
incredibly easy
42
00:01:27,280 --> 00:01:29,840
thanks to the Solana core developers
43
00:01:29,840 --> 00:01:30,960
they've already gone through
44
00:01:30,960 --> 00:01:33,439
all the trouble of writing program and
45
00:01:33,439 --> 00:01:35,200
also releasing other bindings
46
00:01:35,200 --> 00:01:37,200
in which you can use both for C and
47
00:01:37,200 --> 00:01:39,680
Cavascript but for this tutorial
48
00:01:39,680 --> 00:01:42,640
we're sticking with rust the first
49
00:01:42,640 --> 00:01:44,079
command we'll need to do
50
00:01:44,079 --> 00:01:47,040
is a simple cargo install spl-token-cli
51
00:01:47,040 --> 00:01:50,320
(command line interface)
52
00:01:51,280 --> 00:01:53,360
this command has a lot of dependencies
53
00:01:53,360 --> 00:01:55,040
so you can brace yourself for some
54
00:01:55,040 --> 00:01:57,520
waiting
55
00:02:00,799 --> 00:02:03,119
but cargo should be able to download and
56
00:02:03,119 --> 00:02:04,000
compile
57
00:02:04,000 --> 00:02:06,960
every single requirement if it doesn't
58
00:02:06,960 --> 00:02:08,000
please check both
59
00:02:08,000 --> 00:02:11,280
your cargo and rust installations or
60
00:02:11,280 --> 00:02:12,319
reach out to us
61
00:02:12,319 --> 00:02:15,840
on discord the spl-token package we just
62
00:02:15,840 --> 00:02:16,720
installed
63
00:02:16,720 --> 00:02:18,640
shares configurations with the Solana
64
00:02:18,640 --> 00:02:20,239
command line interface
65
00:02:20,239 --> 00:02:22,560
we can check that by running Solana
66
00:02:22,560 --> 00:02:23,599
config
67
00:02:23,599 --> 00:02:26,800
get to get an error message please check
68
00:02:26,800 --> 00:02:27,440
your salon
69
00:02:27,440 --> 00:02:30,239
installation or your environment
70
00:02:30,239 --> 00:02:31,360
configuration
71
00:02:31,360 --> 00:02:33,120
if you need to install the command line
72
00:02:33,120 --> 00:02:35,120
interface all you need to do
73
00:02:35,120 --> 00:02:38,319
is run this curl then shell
74
00:02:38,319 --> 00:02:40,959
installation
75
00:02:42,959 --> 00:02:45,280
this message right here should indicate
76
00:02:45,280 --> 00:02:46,000
to us
77
00:02:46,000 --> 00:02:48,800
that the installation went properly to
78
00:02:48,800 --> 00:02:50,400
add the salona binaries
79
00:02:50,400 --> 00:02:52,959
to your environment path you can just
80
00:02:52,959 --> 00:02:54,239
run this other
81
00:02:54,239 --> 00:02:56,640
export command after that we can check
82
00:02:56,640 --> 00:02:58,640
if our command line interface is working
83
00:02:58,640 --> 00:03:01,760
by running Solana --version so
84
00:03:01,760 --> 00:03:04,159
now we can proceed with the token
85
00:03:04,159 --> 00:03:06,239
going back to our token program we'll
86
00:03:06,239 --> 00:03:07,280
check the current
87
00:03:07,280 --> 00:03:10,239
configurations
88
00:03:11,840 --> 00:03:14,560
as you can see by default we're using
89
00:03:14,560 --> 00:03:16,159
the mainnet
90
00:03:16,159 --> 00:03:18,879
to change that we can just change our
91
00:03:18,879 --> 00:03:19,760
configuration
92
00:03:19,760 --> 00:03:23,440
by running Solana config
93
00:03:23,440 --> 00:03:26,959
set --url and
94
00:03:26,959 --> 00:03:30,239
pointing towards the devnet this will
95
00:03:30,239 --> 00:03:34,239
print out the updated configurations
96
00:03:34,239 --> 00:03:36,480
for our next step we'll need the Solana
97
00:03:36,480 --> 00:03:37,519
wallet
98
00:03:37,519 --> 00:03:39,200
there are many methods for you to do
99
00:03:39,200 --> 00:03:40,640
this either
100
00:03:40,640 --> 00:03:43,680
via hardware your wallet or paper wallet
101
00:03:43,680 --> 00:03:45,920
but in our case i'm going to show you
102
00:03:45,920 --> 00:03:48,319
how you can create a file system wallet
103
00:03:48,319 --> 00:03:50,080
associated with the local
104
00:03:50,080 --> 00:03:53,599
.json file so we'll run the following
105
00:03:53,599 --> 00:03:54,640
command
106
00:03:54,640 --> 00:03:58,080
which will output to this directory
107
00:03:58,080 --> 00:04:00,959
the my-keypair.json the command will
108
00:04:00,959 --> 00:04:02,720
prompt us a passphrase
109
00:04:02,720 --> 00:04:05,040
and this password is only applied to our
110
00:04:05,040 --> 00:04:06,560
recovered seed phrase
111
00:04:06,560 --> 00:04:09,439
so I'll choose anything and keep in mind
112
00:04:09,439 --> 00:04:10,480
that right now
113
00:04:10,480 --> 00:04:13,599
we have our key pair json and
114
00:04:13,599 --> 00:04:15,920
all info contained here is totally
115
00:04:15,920 --> 00:04:17,040
unencrypted
116
00:04:17,040 --> 00:04:20,079
so do not share this with anyone
117
00:04:20,079 --> 00:04:22,800
but what you can share with everyone is
118
00:04:22,800 --> 00:04:24,080
your public key and
119
00:04:24,080 --> 00:04:26,320
in order to get that we run the Solana
120
00:04:26,320 --> 00:04:28,479
keygen pub key command
121
00:04:28,479 --> 00:04:30,800
with our file system wallets in hand we
122
00:04:30,800 --> 00:04:33,199
can point the configuration key pair
123
00:04:33,199 --> 00:04:36,320
to the newly created my-keypair.json
124
00:04:36,320 --> 00:04:38,320
by running the config set command once
125
00:04:38,320 --> 00:04:41,440
again with the --keypair flag
126
00:04:41,440 --> 00:04:43,040
and this should do it for the initial
127
00:04:43,040 --> 00:04:44,800
setup simple as that
128
00:04:44,800 --> 00:04:47,680
right now we can use the cargo spl-token
129
00:04:47,680 --> 00:04:49,600
package we just installed
130
00:04:49,600 --> 00:04:52,000
and run the spl-token create token
131
00:04:52,000 --> 00:04:54,080
command
132
00:04:54,080 --> 00:04:57,840
if you get this message it means that we
133
00:04:57,840 --> 00:04:58,560
do not have
134
00:04:58,560 --> 00:05:01,120
enough funds in a wallet in order to
135
00:05:01,120 --> 00:05:01,840
create the
136
00:05:01,840 --> 00:05:05,039
token what's nice here is that our
137
00:05:05,039 --> 00:05:05,680
Solana
138
00:05:05,680 --> 00:05:07,919
common line interface already has an
139
00:05:07,919 --> 00:05:10,000
airdrop feature built into it
140
00:05:10,000 --> 00:05:13,280
so we can just write solana airdrop
141
00:05:13,280 --> 00:05:15,840
the amount of tokens we're requesting
142
00:05:15,840 --> 00:05:16,479
our
143
00:05:16,479 --> 00:05:21,440
public key address which is right here
144
00:05:23,520 --> 00:05:26,639
and then we need to point the url to our
145
00:05:26,639 --> 00:05:28,639
devnet
146
00:05:28,639 --> 00:05:31,759
endpoint and there we go we now have 10
147
00:05:31,759 --> 00:05:32,880
SOL tokens
148
00:05:32,880 --> 00:05:35,039
we can once again run the spl-token
149
00:05:35,039 --> 00:05:36,400
create command
150
00:05:36,400 --> 00:05:39,680
and it should succeed we can check our
151
00:05:39,680 --> 00:05:43,680
supply by running the command as spl-
152
00:05:43,680 --> 00:05:46,800
token supply
153
00:05:46,800 --> 00:05:49,919
and pointing it to our token address
154
00:05:49,919 --> 00:05:52,960
by default it's zero so we now
155
00:05:52,960 --> 00:05:56,479
will need to mint some tokens for that
156
00:05:56,479 --> 00:05:59,120
we'll create a new account associated
157
00:05:59,120 --> 00:06:00,000
with our
158
00:06:00,000 --> 00:06:03,120
main token by running the command
159
00:06:03,120 --> 00:06:07,520
spl-token create account
160
00:06:07,520 --> 00:06:10,880
and give it our address this account
161
00:06:10,880 --> 00:06:11,840
will hold
162
00:06:11,840 --> 00:06:15,600
the minted tokens as usual
163
00:06:15,600 --> 00:06:18,840
this account will have no balance by
164
00:06:18,840 --> 00:06:20,400
default
165
00:06:20,400 --> 00:06:24,000
but let's change that by running as spl-
166
00:06:24,000 --> 00:06:28,479
token mint the address of our original
167
00:06:28,479 --> 00:06:32,800
token and the amount that we want to
168
00:06:32,840 --> 00:06:35,840
mint
169
00:06:36,160 --> 00:06:39,440
so yeah it succeeded if we check
170
00:06:39,440 --> 00:06:43,840
the supply of our newly created token
171
00:06:43,840 --> 00:06:46,400
we can see that we now have a hundred
172
00:06:46,400 --> 00:06:48,000
new tokens created
173
00:06:48,000 --> 00:06:51,120
and likewise if we check the balance
174
00:06:51,120 --> 00:06:54,319
of our recipient address
175
00:06:54,319 --> 00:06:57,280
we'll see that
176
00:07:00,400 --> 00:07:03,759
it's received 100 tokens
177
00:07:03,759 --> 00:07:06,800
now if we want to expand our token into
178
00:07:06,800 --> 00:07:07,759
other accounts
179
00:07:07,759 --> 00:07:10,639
we'll of course need another Solana
180
00:07:10,639 --> 00:07:11,520
wallet
181
00:07:11,520 --> 00:07:14,840
and we can just generate another one by
182
00:07:14,840 --> 00:07:16,479
using
183
00:07:16,479 --> 00:07:19,039
the same command that we used before
184
00:07:19,039 --> 00:07:19,759
then
185
00:07:19,759 --> 00:07:22,800
we can just once again set
186
00:07:22,800 --> 00:07:26,240
our configuration here but point it to
187
00:07:26,240 --> 00:07:29,120
the other key pair that we have
188
00:07:29,120 --> 00:07:31,840
and run the same command to create an
189
00:07:31,840 --> 00:07:32,560
account
190
00:07:32,560 --> 00:07:35,120
with the original token address once
191
00:07:35,120 --> 00:07:36,000
again
192
00:07:36,000 --> 00:07:37,919
we'll need some funds in order to do
193
00:07:37,919 --> 00:07:39,680
that so
194
00:07:39,680 --> 00:07:42,560
there we go now we've created another
195
00:07:42,560 --> 00:07:44,000
account associated with
196
00:07:44,000 --> 00:07:47,360
our initial Solana token another really
197
00:07:47,360 --> 00:07:48,240
cool feature
198
00:07:48,240 --> 00:07:52,080
of the library is that we can use spl-
199
00:07:52,080 --> 00:07:54,639
token
200
00:07:55,599 --> 00:07:58,639
wrap and specify the amount
201
00:07:58,639 --> 00:08:02,240
of SOL tokens that we want to associate
202
00:08:02,240 --> 00:08:02,720
with
203
00:08:02,720 --> 00:08:05,759
our creative token and this basically
204
00:08:05,759 --> 00:08:07,199
allows us to expand
205
00:08:07,199 --> 00:08:09,919
the functionality and usability of the
206
00:08:09,919 --> 00:08:10,879
SOL token
207
00:08:10,879 --> 00:08:13,520
into the spl-token library so we can
208
00:08:13,520 --> 00:08:14,240
treat it
209
00:08:14,240 --> 00:08:17,520
as any other spl-token
210
00:08:17,520 --> 00:08:19,919
would be treated and this really helps
211
00:08:19,919 --> 00:08:20,639
you out
212
00:08:20,639 --> 00:08:23,360
after wrapping our token we can use once
213
00:08:23,360 --> 00:08:24,080
again
214
00:08:24,080 --> 00:08:27,759
the spl-token
215
00:08:27,759 --> 00:08:31,120
account command to check that
216
00:08:31,120 --> 00:08:34,240
we now have another account here that's
217
00:08:34,240 --> 00:08:37,519
running that has almost exactly one
218
00:08:37,519 --> 00:08:40,958
SOL token as a balance and if we want
219
00:08:40,958 --> 00:08:42,320
to change it back
220
00:08:42,320 --> 00:08:45,440
we just need to do the inverse process
221
00:08:45,440 --> 00:08:50,160
we'll need to copy the account address
222
00:08:50,160 --> 00:08:53,680
that we ended up creating
223
00:08:53,680 --> 00:08:57,040
with the wrap command and just use
224
00:08:57,040 --> 00:09:00,640
spl-token
225
00:09:00,640 --> 00:09:02,959
unwrap
226
00:09:06,320 --> 00:09:08,399
there we go if we check our accounts
227
00:09:08,399 --> 00:09:10,959
once again
228
00:09:15,600 --> 00:09:19,680
the former SOL wrapped token is gone
229
00:09:19,680 --> 00:09:21,839
now remember that other account that we
230
00:09:21,839 --> 00:09:22,880
created
231
00:09:22,880 --> 00:09:25,920
let's check it out once again by running
232
00:09:25,920 --> 00:09:30,560
Solana config set
233
00:09:30,560 --> 00:09:35,920
key pair and point it to the other
234
00:09:35,920 --> 00:09:36,880
keypair
235
00:09:36,880 --> 00:09:40,240
that we have as expected it doesn't have
236
00:09:40,240 --> 00:09:42,800
any of our created tokens let's change
237
00:09:42,800 --> 00:09:43,279
that
238
00:09:43,279 --> 00:09:46,800
let's use our minted account here that
239
00:09:46,800 --> 00:09:47,839
we have
240
00:09:47,839 --> 00:09:52,480
and run the new spl-token
241
00:09:52,480 --> 00:09:56,080
transfer command and also the first address
242
00:09:56,080 --> 00:09:58,160
that we pass on is not from the original
243
00:09:58,160 --> 00:09:58,880
token
244
00:09:58,880 --> 00:10:01,120
but from the account associated with the
245
00:10:01,120 --> 00:10:02,399
minting process
246
00:10:02,399 --> 00:10:05,920
so let's use the same command pass on
247
00:10:05,920 --> 00:10:08,000
our original account the amount of
248
00:10:08,000 --> 00:10:09,519
tokens that we need
249
00:10:09,519 --> 00:10:14,160
to transfer and the receiver
250
00:10:16,839 --> 00:10:19,680
address