WEBVTT

1
00:00:18.015 --> 00:00:18.805
<00:00:18.015>Hello <00:00:18.726>everyone.

2
00:00:18.925 --> 00:00:22.405
<00:00:18.925>Welcome <00:00:19.275>to, <00:00:19.625>uh, <00:00:19.975>2021, <00:00:20.325>uh,

3
00:00:22.715 --> 00:00:24.365
<00:00:22.715>bitcoin <00:00:23.181>SV <00:00:23.648>dev <00:00:24.115>com.

4
00:00:24.465 --> 00:00:28.965
<00:00:24.465>My <00:00:24.581>name <00:00:24.698>is <00:00:24.815>Lio, <00:00:24.931>I'm <00:00:25.048>a <00:00:25.165>founder <00:00:25.281>and, <00:00:25.398>uh, <00:00:25.515>creator <00:00:25.631>of <00:00:25.748>s <00:00:25.865>Script.

5
00:00:29.265 --> 00:00:31.365
<00:00:29.265>Uh, <00:00:29.465>today <00:00:29.665>I'm <00:00:29.865>going <00:00:30.065>to <00:00:30.265>talk <00:00:30.465>about, <00:00:30.665>uh,

6
00:00:31.645 --> 00:00:33.125
<00:00:31.645>technique <00:00:32.089>called <00:00:32.533>PU <00:00:32.977>transaction

7
00:00:33.545 --> 00:00:35.005
<00:00:33.545>and, <00:00:33.732>uh, <00:00:33.920>talk <00:00:34.108>about <00:00:34.295>what <00:00:34.483>kind <00:00:34.671>of, <00:00:34.859>uh,

8
00:00:35.575 --> 00:00:38.245
<00:00:35.575>smart <00:00:35.808>contracts <00:00:36.041>applications <00:00:36.275>can <00:00:36.508>be <00:00:36.741>built <00:00:36.975>upon.

9
00:00:39.065 --> 00:00:40.005
<00:00:39.065>So <00:00:39.347>let's <00:00:39.629>get <00:00:39.911>started.

10
00:00:45.135 --> 00:00:48.155
<00:00:45.135>So <00:00:45.335>I, <00:00:45.535>I'll <00:00:45.735>briefly <00:00:45.934>mention <00:00:46.135>about, <00:00:46.335>uh, <00:00:46.535>what,

11
00:00:48.185 --> 00:00:49.555
<00:00:48.185>what <00:00:48.596>this <00:00:49.007>technique <00:00:49.418>is.

12
00:00:50.295 --> 00:00:53.435
<00:00:50.295>And, <00:00:50.470>uh, <00:00:50.645>I <00:00:50.820>also <00:00:50.995>mentioned <00:00:51.170>about, <00:00:51.345>uh, <00:00:51.520>how <00:00:51.695>do,

13
00:00:53.435 --> 00:00:54.835
<00:00:53.435>how <00:00:53.750>this <00:00:54.065>is <00:00:54.380>implemented <00:00:54.695>internally.

14
00:00:55.295 --> 00:00:59.395
<00:00:55.295>And <00:00:55.422>then <00:00:55.549>I <00:00:55.676>will <00:00:55.804>show <00:00:55.931>what <00:00:56.058>we <00:00:56.185>can <00:00:56.313>do, <00:00:56.440>uh, <00:00:56.567>with <00:00:56.695>it.

15
00:00:59.815 --> 00:01:02.155
<00:00:59.815>And, <00:01:00.048>uh, <00:01:00.281>eventually <00:01:00.515>of <00:01:00.748>course, <00:01:00.981>I'm <00:01:01.214>going

16
00:01:02.155 --> 00:01:04.995
<00:01:02.155>to <00:01:02.310>show <00:01:02.466>some <00:01:02.621>working <00:01:02.777>demo, <00:01:02.932>which <00:01:03.088>I <00:01:03.243>show <00:01:03.399>you <00:01:03.555>a,

17
00:01:06.035 --> 00:01:09.875
<00:01:06.035>a <00:01:06.235>fully <00:01:06.435>owned <00:01:06.634>chain <00:01:06.835>Bitcoin <00:01:07.035>game <00:01:07.235>running <00:01:07.435>on

18
00:01:09.875 --> 00:01:11.115
<00:01:09.875>Bitcoin <00:01:10.991>today.

19
00:01:11.655 --> 00:01:15.875
<00:01:11.655>So <00:01:11.855>what <00:01:12.055>is, <00:01:12.255>uh, <00:01:12.455>out <00:01:12.655>push <00:01:12.855>transaction <00:01:13.055>then?

20
00:01:16.495 --> 00:01:19.275
<00:01:16.495>So <00:01:16.622>for <00:01:16.749>people <00:01:16.876>who <00:01:17.004>have <00:01:17.131>been <00:01:17.258>into <00:01:17.385>Bitcoin <00:01:17.513>space <00:01:17.640>for <00:01:17.767>a <00:01:17.895>while,

21
00:01:19.295 --> 00:01:21.875
<00:01:19.295>we <00:01:19.528>know <00:01:19.761>that <00:01:19.995>Bitcoin, <00:01:20.228>uh, <00:01:20.461>has <00:01:20.695>miners

22
00:01:22.095 --> 00:01:25.595
<00:01:22.095>and <00:01:22.375>miners <00:01:22.655>value, <00:01:22.935>uh, <00:01:23.215>verify <00:01:23.495>transactions

23
00:01:25.775 --> 00:01:29.955
<00:01:25.775>by <00:01:25.975>using <00:01:26.175>this, <00:01:26.375>uh, <00:01:26.575>native <00:01:26.775>Bitcoin <00:01:26.975>language <00:01:27.175>called,

24
00:01:29.975 --> 00:01:31.275
<00:01:29.975>um, <00:01:30.560>bitcoin <00:01:31.145>script.

25
00:01:31.375 --> 00:01:33.275
<00:01:31.375>So <00:01:31.575>based <00:01:31.775>in <00:01:31.975>the <00:01:32.175>Bitcoin <00:01:32.375>script <00:01:32.575>is <00:01:32.775>interpreted

26
00:01:33.275 --> 00:01:36.995
<00:01:33.275>by <00:01:33.430>all <00:01:33.586>the <00:01:33.741>miners <00:01:33.897>in <00:01:34.052>the <00:01:34.208>so-called <00:01:34.363>Bitcoin <00:01:34.519>virtual <00:01:34.675>machine.

27
00:01:37.375 --> 00:01:40.795
<00:01:37.375>So <00:01:37.550>Bitcoin <00:01:37.725>virtual <00:01:37.900>machine, <00:01:38.075>they <00:01:38.250>have <00:01:38.425>the <00:01:38.600>list <00:01:38.775>instructions,

28
00:01:41.125 --> 00:01:43.115
<00:01:41.125>which, <00:01:41.358>uh, <00:01:41.591>usually <00:01:41.825>we <00:01:42.058>call <00:01:42.291>op <00:01:42.525>code.

29
00:01:43.415 --> 00:01:45.755
<00:01:43.414>So <00:01:43.589>here, <00:01:43.764>uh, <00:01:43.940>we <00:01:44.115>show <00:01:44.289>a <00:01:44.464>few <00:01:44.639>example <00:01:44.815>here,

30
00:01:46.135 --> 00:01:47.275
<00:01:46.134>for <00:01:46.476>example, <00:01:46.819>OP <00:01:47.161>two.

31
00:01:47.415 --> 00:01:49.635
<00:01:47.414>So <00:01:47.648>basically <00:01:47.881>what <00:01:48.115>it <00:01:48.348>does <00:01:48.581>is, <00:01:48.815>uh,

32
00:01:49.635 --> 00:01:51.675
<00:01:49.634>because <00:01:49.835>of <00:01:50.035>the <00:01:50.234>virtual <00:01:50.434>machines <00:01:50.634>a <00:01:50.835>stack <00:01:51.035>based,

33
00:01:51.855 --> 00:01:55.755
<00:01:51.854>so <00:01:51.994>all <00:01:52.134>the <00:01:52.274>operations <00:01:52.414>are <00:01:52.554>going <00:01:52.695>to, <00:01:52.835>um, <00:01:52.975>be <00:01:53.115>on <00:01:53.255>stack.

34
00:01:55.855 --> 00:01:58.955
<00:01:55.854>So <00:01:55.994>OP <00:01:56.134>two, <00:01:56.274>I <00:01:56.414>just <00:01:56.554>pushing <00:01:56.695>the <00:01:56.835>number <00:01:56.975>onto <00:01:57.115>the <00:01:57.255>stack.

35
00:01:59.415 --> 00:02:00.555
<00:01:59.414>We <00:01:59.671>also <00:01:59.928>have <00:02:00.184>op <00:02:00.441>add.

36
00:02:00.625 --> 00:02:04.995
<00:02:00.625>Basically <00:02:00.825>it <00:02:01.025>pops <00:02:01.225>two <00:02:01.425>elements <00:02:01.625>of <00:02:01.825>the <00:02:02.025>stack

37
00:02:05.135 --> 00:02:07.475
<00:02:05.135>and <00:02:05.290>add <00:02:05.446>them <00:02:05.601>up <00:02:05.757>and, <00:02:05.912>uh, <00:02:06.068>push <00:02:06.223>the <00:02:06.379>sum <00:02:06.535>back.

38
00:02:09.805 --> 00:02:11.145
<00:02:09.805>And <00:02:10.046>we <00:02:10.287>also <00:02:10.528>have <00:02:10.769>op <00:02:11.011>equal.

39
00:02:11.205 --> 00:02:14.345
<00:02:11.205>So <00:02:11.345>basically <00:02:11.485>it <00:02:11.625>compares <00:02:11.765>two <00:02:11.905>elements <00:02:12.045>on <00:02:12.185>top <00:02:12.325>of <00:02:12.465>the <00:02:12.605>stack,

40
00:02:14.565 --> 00:02:17.345
<00:02:14.565>and, <00:02:14.704>uh, <00:02:14.845>if <00:02:14.984>it's <00:02:15.125>equal, <00:02:15.265>they <00:02:15.405>push <00:02:15.545>one <00:02:15.685>onto <00:02:15.825>the <00:02:15.965>stack,

41
00:02:17.345 --> 00:02:18.465
<00:02:17.345>otherwise <00:02:17.681>they <00:02:18.017>push <00:02:18.353>zero.

42
00:02:19.445 --> 00:02:23.185
<00:02:19.445>So, <00:02:19.584>uh, <00:02:19.725>all <00:02:19.864>push <00:02:20.005>transaction <00:02:20.144>you <00:02:20.285>can <00:02:20.424>think <00:02:20.565>of, <00:02:20.704>uh, <00:02:20.845>an

43
00:02:23.485 --> 00:02:26.465
<00:02:23.485>as <00:02:23.660>another <00:02:23.835>op <00:02:24.010>code <00:02:24.185>that <00:02:24.360>what <00:02:24.535>does <00:02:24.710>it <00:02:24.885>do?

44
00:02:26.615 --> 00:02:29.865
<00:02:26.615>They <00:02:26.790>just <00:02:26.965>push <00:02:27.140>the <00:02:27.315>current <00:02:27.490>transaction <00:02:27.665>onto <00:02:27.840>the <00:02:28.015>stack.

45
00:02:30.445 --> 00:02:31.665
<00:02:30.445>That's <00:02:30.810>it. <00:02:31.177>That's <00:02:31.543>it.

46
00:02:32.125 --> 00:02:34.305
<00:02:32.125>So <00:02:32.358>what <00:02:32.591>is <00:02:32.825>the <00:02:33.058>current <00:02:33.291>transaction <00:02:33.525>then?

47
00:02:34.765 --> 00:02:37.785
<00:02:34.765>So, <00:02:34.904>uh, <00:02:35.045>if <00:02:35.184>you <00:02:35.325>look <00:02:35.464>at <00:02:35.605>the <00:02:35.744>right <00:02:35.885>of <00:02:36.024>the <00:02:36.165>screen,

48
00:02:37.845 --> 00:02:39.225
<00:02:37.845>you <00:02:38.093>can <00:02:38.341>see <00:02:38.590>a <00:02:38.838>diagram <00:02:39.087>here.

49
00:02:39.285 --> 00:02:41.585
<00:02:39.285>So <00:02:39.565>basically <00:02:39.845>we <00:02:40.125>have <00:02:40.405>one <00:02:40.685>transaction

50
00:02:42.485 --> 00:02:44.105
<00:02:42.485>and, <00:02:42.951>uh, <00:02:43.418>another <00:02:43.885>transaction.

51
00:02:44.105 --> 00:02:45.865
<00:02:44.105>Then <00:02:44.454>spend <00:02:44.804>it <00:02:45.155>transaction <00:02:45.505>two.

52
00:02:46.895 --> 00:02:51.275
<00:02:46.895>So <00:02:47.050>when <00:02:47.206>the <00:02:47.361>contract <00:02:47.517>is <00:02:47.672>always <00:02:47.828>in <00:02:47.983>the <00:02:48.139>locking <00:02:48.295>script,

53
00:02:51.455 --> 00:02:54.505
<00:02:51.454>so <00:02:51.688>when <00:02:51.921>we <00:02:52.154>are <00:02:52.388>calling <00:02:52.621>this, <00:02:52.855>uh,

54
00:02:54.595 --> 00:02:57.345
<00:02:54.595>smart <00:02:54.875>contracts <00:02:55.155>in <00:02:55.435>transaction <00:02:55.715>one, <00:02:55.995>actually

55
00:02:58.095 --> 00:03:00.755
<00:02:58.095>when <00:02:58.295>we <00:02:58.495>run <00:02:58.695>our <00:02:58.895>push <00:02:59.095>transaction, <00:02:59.295>it's <00:02:59.495>going

56
00:03:00.755 --> 00:03:02.875
<00:03:00.755>to <00:03:01.105>push <00:03:01.454>the <00:03:01.805>current <00:03:02.155>transaction,

57
00:03:02.875 --> 00:03:05.355
<00:03:02.875>which <00:03:03.108>is <00:03:03.341>transaction <00:03:03.575>two <00:03:03.808>onto <00:03:04.041>the <00:03:04.275>stack.

58
00:03:07.755 --> 00:03:10.235
<00:03:07.755>I <00:03:07.988>think, <00:03:08.221>uh, <00:03:08.454>briefly <00:03:08.688>we <00:03:08.921>mentioned, <00:03:09.155>uh,

59
00:03:11.395 --> 00:03:13.615
<00:03:11.395>it <00:03:11.570>will <00:03:11.745>push <00:03:11.920>the <00:03:12.095>current <00:03:12.270>transaction <00:03:12.445>onto <00:03:12.620>the <00:03:12.795>stack,

60
00:03:13.875 --> 00:03:16.735
<00:03:13.875>and <00:03:14.155>actually <00:03:14.435>that's <00:03:14.715>not, <00:03:14.995>uh, <00:03:15.275>precise.

61
00:03:16.995 --> 00:03:20.695
<00:03:16.995>So <00:03:17.111>if <00:03:17.228>you, <00:03:17.345>uh, <00:03:17.461>really <00:03:17.578>want <00:03:17.695>to <00:03:17.811>be <00:03:17.928>precise, <00:03:18.045>what <00:03:18.161>it <00:03:18.278>does <00:03:18.395>is,

62
00:03:20.695 --> 00:03:24.655
<00:03:20.695>uh, <00:03:20.850>call <00:03:21.006>is <00:03:21.161>just <00:03:21.317>push <00:03:21.472>the <00:03:21.628>current <00:03:21.783>current, <00:03:21.939>uh, <00:03:22.095>sick,

63
00:03:24.725 --> 00:03:27.295
<00:03:24.725>sick <00:03:24.924>hash <00:03:25.125>pre-image <00:03:25.325>on <00:03:25.525>top <00:03:25.725>of <00:03:25.924>the <00:03:26.125>stack.

64
00:03:27.675 --> 00:03:29.615
<00:03:27.675>So <00:03:27.908>what <00:03:28.141>is, <00:03:28.375>uh, <00:03:28.608>this, <00:03:28.841>uh, <00:03:29.075>pre-image?

65
00:03:30.155 --> 00:03:31.895
<00:03:30.155>So <00:03:30.435>if <00:03:30.715>you <00:03:30.995>know <00:03:31.275>about <00:03:31.555>Bitcoin,

66
00:03:31.965 --> 00:03:35.895
<00:03:31.965>when <00:03:32.140>we <00:03:32.315>just <00:03:32.490>send <00:03:32.665>normal <00:03:32.840>Bitcoin <00:03:33.015>transactions, <00:03:33.190>uh, <00:03:33.365>funds

67
00:03:36.075 --> 00:03:39.575
<00:03:36.075>to <00:03:36.230>each <00:03:36.386>other, <00:03:36.541>so <00:03:36.697>we <00:03:36.852>always <00:03:37.008>verify <00:03:37.163>the <00:03:37.319>signatures, <00:03:37.475>right?

68
00:03:39.575 --> 00:03:43.575
<00:03:39.575>Right. <00:03:39.714>So <00:03:39.855>what <00:03:39.994>does <00:03:40.135>the, <00:03:40.274>how <00:03:40.415>does <00:03:40.554>the <00:03:40.695>signature <00:03:40.834>come <00:03:40.975>from?

69
00:03:43.835 --> 00:03:48.095
<00:03:43.835>So <00:03:44.010>basically, <00:03:44.185>uh, <00:03:44.360>you <00:03:44.535>first <00:03:44.710>generate <00:03:44.885>this <00:03:45.060>pre <00:03:45.235>image,

70
00:03:49.275 --> 00:03:50.315
<00:03:49.275>a <00:03:49.509>c <00:03:49.743>hash <00:03:49.977>pre <00:03:50.211>image,

71
00:03:50.695 --> 00:03:54.795
<00:03:50.695>and <00:03:50.928>then <00:03:51.161>you, <00:03:51.394>you <00:03:51.628>sign <00:03:51.861>this <00:03:52.095>pre-image

72
00:03:55.665 --> 00:03:56.955
<00:03:55.665>with <00:03:56.052>your <00:03:56.439>private <00:03:56.826>key.

73
00:03:57.255 --> 00:03:58.835
<00:03:57.255>So <00:03:57.488>this <00:03:57.721>is <00:03:57.954>what <00:03:58.188>you <00:03:58.421>actually <00:03:58.655>sign.

74
00:03:59.135 --> 00:04:02.715
<00:03:59.135>It <00:03:59.310>includes <00:03:59.484>most <00:03:59.660>of <00:03:59.834>the <00:04:00.010>part <00:04:00.185>of <00:04:00.359>the <00:04:00.535>transaction.

75
00:04:03.295 --> 00:04:06.155
<00:04:03.295>So <00:04:03.450>we <00:04:03.606>can <00:04:03.761>here, <00:04:03.917>see <00:04:04.072>you <00:04:04.228>have <00:04:04.383>a <00:04:04.539>version <00:04:04.695>number,

76
00:04:06.655 --> 00:04:08.835
<00:04:06.655>you <00:04:06.855>have <00:04:07.055>a <00:04:07.255>input, <00:04:07.455>you <00:04:07.655>have <00:04:07.855>out <00:04:08.055>outputs,

77
00:04:08.835 --> 00:04:11.435
<00:04:08.835>you <00:04:09.010>also <00:04:09.185>have <00:04:09.360>a <00:04:09.535>sequence <00:04:09.710>and <00:04:09.885>log <00:04:10.060>time, <00:04:10.235>and

78
00:04:11.545 --> 00:04:13.955
<00:04:11.545>besides <00:04:11.825>that <00:04:12.105>we <00:04:12.385>pay <00:04:12.665>attention <00:04:12.945>here.

79
00:04:14.015 --> 00:04:17.195
<00:04:14.015>You <00:04:14.190>also <00:04:14.364>have, <00:04:14.540>uh, <00:04:14.714>information <00:04:14.890>about <00:04:15.065>the <00:04:15.239>UT <00:04:15.415>XO

80
00:04:17.295 --> 00:04:20.115
<00:04:17.295>that's <00:04:17.528>being <00:04:17.761>spent <00:04:17.995>where, <00:04:18.228>for <00:04:18.461>example, <00:04:18.695>four

81
00:04:20.655 --> 00:04:23.555
<00:04:20.654>and <00:04:20.829>five, <00:04:21.005>this <00:04:21.179>is <00:04:21.354>the, <00:04:21.529>the <00:04:21.704>UT <00:04:21.880>x, <00:04:22.054>O

82
00:04:23.655 --> 00:04:26.755
<00:04:23.655>and <00:04:23.854>six, <00:04:24.054>the <00:04:24.255>UT <00:04:24.455>XO, <00:04:24.655>uh, <00:04:24.854>SAT <00:04:25.054>amount.

83
00:04:29.255 --> 00:04:34.235
<00:04:29.255>So <00:04:29.395>I <00:04:29.534>think, <00:04:29.675>uh, <00:04:29.815>we <00:04:29.955>briefly <00:04:30.094>call <00:04:30.235>it, <00:04:30.375>uh, <00:04:30.515>op <00:04:30.655>code.

84
00:04:34.635 --> 00:04:36.755
<00:04:34.635>Actually <00:04:34.868>that's <00:04:35.101>not, <00:04:35.335>uh, <00:04:35.568>precise <00:04:35.801>to <00:04:36.034>be,

85
00:04:37.695 --> 00:04:40.915
<00:04:37.695>to <00:04:37.835>be <00:04:37.974>100% <00:04:38.115>precise <00:04:38.255>is <00:04:38.395>that's <00:04:38.534>if <00:04:38.675>you <00:04:38.815>check <00:04:38.955>the <00:04:39.094>list

86
00:04:40.915 --> 00:04:43.475
<00:04:40.915>of <00:04:41.070>all <00:04:41.226>the <00:04:41.381>op <00:04:41.537>codes <00:04:41.692>available <00:04:41.848>in <00:04:42.003>bitcoin <00:04:42.159>script <00:04:42.315>today,

87
00:04:43.865 --> 00:04:45.795
<00:04:43.865>even <00:04:44.145>we <00:04:44.425>reen <00:04:44.705>the <00:04:44.985>of <00:04:45.265>them,

88
00:04:46.455 --> 00:04:51.275
<00:04:46.455>you <00:04:46.630>cannot <00:04:46.805>find <00:04:46.979>the <00:04:47.155>op <00:04:47.330>code <00:04:47.505>called, <00:04:47.680>uh, <00:04:47.854>push

89
00:04:51.375 --> 00:04:52.435
<00:04:51.375>or <00:04:51.852>push <00:04:52.329>transaction.

90
00:04:53.015 --> 00:04:56.235
<00:04:53.015>So <00:04:53.365>in <00:04:53.715>reality <00:04:54.065>is <00:04:54.414>implemented

91
00:04:57.145 --> 00:04:59.475
<00:04:57.145>with <00:04:57.844>existing <00:04:58.544>opcos.

92
00:04:59.535 --> 00:05:02.355
<00:04:59.534>So <00:04:59.690>you <00:04:59.846>can <00:05:00.001>think <00:05:00.157>about <00:05:00.312>this <00:05:00.468>as <00:05:00.623>a <00:05:00.779>pseudo <00:05:00.934>opco,

93
00:05:02.525 --> 00:05:05.555
<00:05:02.525>which <00:05:02.700>is <00:05:02.875>built <00:05:03.049>upon <00:05:03.224>all <00:05:03.400>the <00:05:03.575>other <00:05:03.750>existing <00:05:03.924>opcos.

94
00:05:16.625 --> 00:05:21.345
<00:05:16.625>So <00:05:16.905>if <00:05:17.185>you <00:05:17.465>talk <00:05:17.745>about, <00:05:18.025>uh,

95
00:05:21.615 --> 00:05:24.505
<00:05:21.615>when, <00:05:21.790>when <00:05:21.965>we <00:05:22.140>talk <00:05:22.315>about <00:05:22.490>the <00:05:22.665>Bitcoin <00:05:22.840>transaction <00:05:23.015>script,

96
00:05:24.605 --> 00:05:27.385
<00:05:24.605>we <00:05:24.805>always <00:05:25.005>talk <00:05:25.205>about <00:05:25.405>the, <00:05:25.605>the <00:05:25.805>so-called, <00:05:26.005>uh,

97
00:05:27.465 --> 00:05:28.945
<00:05:27.465>E-C-D-S-S <00:05:28.131>signature <00:05:28.796>algorithm.

98
00:05:29.325 --> 00:05:33.225
<00:05:29.325>So <00:05:29.500>how <00:05:29.675>do <00:05:29.849>we <00:05:30.025>use <00:05:30.200>this, <00:05:30.375>uh, <00:05:30.550>algorithm <00:05:30.724>to

99
00:05:33.765 --> 00:05:35.585
<00:05:33.765>get <00:05:34.231>the <00:05:34.698>current <00:05:35.164>pre-image?

100
00:05:36.045 --> 00:05:38.425
<00:05:36.045>So <00:05:36.245>we <00:05:36.445>look, <00:05:36.645>look <00:05:36.845>at <00:05:37.045>the <00:05:37.245>diagram <00:05:37.445>here.

101
00:05:38.445 --> 00:05:39.545
<00:05:38.445>So <00:05:38.643>we <00:05:38.841>have <00:05:39.039>a <00:05:39.237>few <00:05:39.435>steps.

102
00:05:39.725 --> 00:05:43.665
<00:05:39.725>So <00:05:39.900>first, <00:05:40.075>after <00:05:40.250>we <00:05:40.425>have <00:05:40.600>the <00:05:40.775>pre-image, <00:05:40.950>we <00:05:41.125>sign

103
00:05:43.665 --> 00:05:48.635
<00:05:43.665>with <00:05:43.820>a <00:05:43.976>public <00:05:44.131>key, <00:05:44.287>Then <00:05:44.442>we <00:05:44.598>get <00:05:44.753>A-E-C-D-C <00:05:44.909>signature, <00:05:45.065>right?

104
00:05:48.975 --> 00:05:53.115
<00:05:48.975>And <00:05:49.150>then <00:05:49.325>we <00:05:49.500>use, <00:05:49.675>uh, <00:05:49.850>the <00:05:50.025>another <00:05:50.200>code <00:05:50.375>called

105
00:05:53.985 --> 00:05:56.875
<00:05:53.985>basically <00:05:54.218>just <00:05:54.451>to <00:05:54.685>verify <00:05:54.918>the <00:05:55.151>signature <00:05:55.385>against

106
00:05:57.585 --> 00:05:59.925
<00:05:57.585>the <00:05:57.864>public <00:05:58.145>key, <00:05:58.424>which <00:05:58.705>is, <00:05:58.984>uh,

107
00:06:01.125 --> 00:06:02.685
<00:06:01.125>derived <00:06:01.405>from <00:06:01.685>the <00:06:01.965>PRI <00:06:02.245>private <00:06:02.525>key.

108
00:06:02.945 --> 00:06:07.645
<00:06:02.945>So <00:06:03.072>if <00:06:03.199>it <00:06:03.326>says <00:06:03.454>yes, <00:06:03.581>then <00:06:03.708>we <00:06:03.835>are <00:06:03.963>very <00:06:04.090>sure <00:06:04.217>this <00:06:04.344>pre-image

109
00:06:08.185 --> 00:06:10.685
<00:06:08.185>is <00:06:08.385>actually <00:06:08.585>the <00:06:08.785>pre-image <00:06:08.985>for <00:06:09.185>the <00:06:09.385>current <00:06:09.585>transaction.

110
00:06:11.105 --> 00:06:14.605
<00:06:11.105>Why? <00:06:11.385>Because <00:06:11.665>object, <00:06:11.945>it <00:06:12.225>just <00:06:12.505>cannot

111
00:06:15.375 --> 00:06:17.365
<00:06:15.375>check <00:06:15.655>signature <00:06:15.935>against <00:06:16.215>any <00:06:16.495>other <00:06:16.775>data.

112
00:06:17.705 --> 00:06:21.725
<00:06:17.705>It <00:06:17.832>can <00:06:17.959>only <00:06:18.086>work <00:06:18.214>if <00:06:18.341>the <00:06:18.468>current <00:06:18.595>data <00:06:18.723>being <00:06:18.850>signed <00:06:18.977>is <00:06:19.104>a

113
00:06:21.995 --> 00:06:23.725
<00:06:21.995>pre-image <00:06:22.345>for <00:06:22.695>the <00:06:23.045>current <00:06:23.395>transaction.

114
00:06:24.745 --> 00:06:27.245
<00:06:24.745>So <00:06:24.872>where <00:06:24.999>does <00:06:25.126>the <00:06:25.254>private <00:06:25.381>key <00:06:25.508>and <00:06:25.635>the <00:06:25.763>public <00:06:25.890>key <00:06:26.017>come <00:06:26.145>from?

115
00:06:27.585 --> 00:06:28.965
<00:06:27.585>So <00:06:27.895>this <00:06:28.205>actually <00:06:28.516>can <00:06:28.827>be

116
00:06:28.965 --> 00:06:32.125
<00:06:28.965>because <00:06:29.120>it <00:06:29.276>is <00:06:29.431>just <00:06:29.587>to <00:06:29.742>check <00:06:29.898>whether <00:06:30.053>the <00:06:30.209>C <00:06:30.364>cash

117
00:06:32.995 --> 00:06:35.045
<00:06:32.995>pre-image <00:06:33.275>is <00:06:33.555>from <00:06:33.835>the <00:06:34.115>current <00:06:34.395>transaction.

118
00:06:35.185 --> 00:06:37.285
<00:06:35.185>So <00:06:35.465>actually <00:06:35.745>it <00:06:36.025>can <00:06:36.305>be <00:06:36.585>arbitrary.

119
00:06:38.465 --> 00:06:40.245
<00:06:38.465>It, <00:06:38.665>it <00:06:38.865>doesn't <00:06:39.065>even <00:06:39.265>have <00:06:39.465>to <00:06:39.665>be <00:06:39.865>private.

120
00:06:41.745 --> 00:06:43.965
<00:06:41.745>So <00:06:41.920>this <00:06:42.095>is <00:06:42.270>how, <00:06:42.445>how <00:06:42.620>it <00:06:42.795>works, <00:06:42.970>uh, <00:06:43.145>internally,

121
00:06:44.145 --> 00:06:45.485
<00:06:44.145>how <00:06:44.546>it's <00:06:44.949>imp <00:06:45.351>implemented.

122
00:06:46.145 --> 00:06:50.245
<00:06:46.145>But <00:06:46.284>the <00:06:46.424>good <00:06:46.565>thing <00:06:46.705>about <00:06:46.844>it, <00:06:46.984>you <00:06:47.125>don't <00:06:47.265>have <00:06:47.405>to, <00:06:47.544>uh,

123
00:06:50.435 --> 00:06:51.605
<00:06:50.435>implement <00:06:51.488>yourself.

124
00:06:51.945 --> 00:06:54.325
<00:06:51.945>So <00:06:52.120>at <00:06:52.295>s <00:06:52.469>script, <00:06:52.645>we, <00:06:52.820>we <00:06:52.995>build <00:06:53.170>a <00:06:53.344>library

125
00:06:54.625 --> 00:06:57.405
<00:06:54.625>and <00:06:54.858>high <00:06:55.091>level <00:06:55.325>abstract <00:06:55.558>already <00:06:55.791>taking <00:06:56.025>care

126
00:06:57.405 --> 00:07:00.005
<00:06:57.405>of <00:06:57.684>all <00:06:57.965>the <00:06:58.244>low <00:06:58.525>level <00:06:58.804>details.

127
00:07:00.145 --> 00:07:03.805
<00:07:00.145>So <00:07:00.272>you <00:07:00.399>only <00:07:00.526>have <00:07:00.654>to <00:07:00.781>use <00:07:00.908>it <00:07:01.035>without, <00:07:01.163>uh, <00:07:01.290>you <00:07:01.417>don't <00:07:01.544>have

128
00:07:03.805 --> 00:07:06.005
<00:07:03.805>to <00:07:04.005>understand <00:07:04.205>how <00:07:04.405>it's <00:07:04.605>implement <00:07:04.805>to <00:07:05.005>use <00:07:05.205>it.

129
00:07:06.265 --> 00:07:07.325
<00:07:06.265>So <00:07:06.455>what <00:07:06.646>you <00:07:06.837>can <00:07:07.028>do <00:07:07.219>then,

130
00:07:07.895 --> 00:07:09.925
<00:07:07.895>after <00:07:08.245>we <00:07:08.594>talk <00:07:08.945>about, <00:07:09.294>uh,

131
00:07:10.385 --> 00:07:13.205
<00:07:10.385>it <00:07:10.618>seems <00:07:10.851>like <00:07:11.085>a <00:07:11.318>very <00:07:11.551>basic <00:07:11.784>primitive,

132
00:07:13.835 --> 00:07:15.485
<00:07:13.835>even <00:07:14.185>though <00:07:14.534>it <00:07:14.885>looks <00:07:15.234>simple,

133
00:07:15.665 --> 00:07:18.605
<00:07:15.665>but <00:07:15.792>actually <00:07:15.919>can <00:07:16.046>enable <00:07:16.174>us <00:07:16.301>to <00:07:16.428>do <00:07:16.555>a <00:07:16.683>lot <00:07:16.810>of, <00:07:16.937>uh, <00:07:17.065>things

134
00:07:19.145 --> 00:07:20.845
<00:07:19.145>that's, <00:07:19.611>uh, <00:07:20.078>deemed <00:07:20.544>impossible

135
00:07:20.845 --> 00:07:23.285
<00:07:20.845>before, <00:07:21.078>for <00:07:21.311>example, <00:07:21.545>you <00:07:21.778>can <00:07:22.011>control <00:07:22.245>spending.

136
00:07:23.825 --> 00:07:27.885
<00:07:23.825>So <00:07:23.980>what <00:07:24.136>does <00:07:24.291>it <00:07:24.447>mean? <00:07:24.602>So <00:07:24.758>when <00:07:24.913>Alice <00:07:25.069>sends, <00:07:25.224>uh,

137
00:07:27.985 --> 00:07:31.085
<00:07:27.985>Bob <00:07:28.185>some <00:07:28.385>Bitcoin, <00:07:28.585>usually <00:07:28.785>when <00:07:28.985>Bob <00:07:29.185>gets <00:07:29.385>it,

138
00:07:31.755 --> 00:07:33.375
<00:07:31.755>he <00:07:31.988>can <00:07:32.221>do <00:07:32.455>whatever <00:07:32.688>with <00:07:32.921>it, <00:07:33.155>right?

139
00:07:33.835 --> 00:07:38.015
<00:07:33.835>So <00:07:34.010>with <00:07:34.185>pu <00:07:34.359>transaction <00:07:34.534>technique, <00:07:34.710>you <00:07:34.885>can <00:07:35.060>actually <00:07:35.234>control,

140
00:07:38.555 --> 00:07:41.255
<00:07:38.555>uh, <00:07:38.710>how <00:07:38.866>the <00:07:39.021>receiver <00:07:39.177>is <00:07:39.332>going <00:07:39.488>to <00:07:39.643>spend <00:07:39.799>his <00:07:39.955>fund.

141
00:07:41.915 --> 00:07:44.855
<00:07:41.915>So <00:07:42.115>that's <00:07:42.315>something <00:07:42.515>that's <00:07:42.715>impossible <00:07:42.915>to <00:07:43.115>do <00:07:43.315>before.

142
00:07:45.235 --> 00:07:48.495
<00:07:45.235>And <00:07:45.390>also <00:07:45.546>we <00:07:45.701>have <00:07:45.857>another <00:07:46.012>big <00:07:46.168>category <00:07:46.323>of <00:07:46.479>a <00:07:46.635>contracts

143
00:07:48.695 --> 00:07:51.535
<00:07:48.695>that <00:07:48.928>it, <00:07:49.161>uh, <00:07:49.395>only <00:07:49.628>available <00:07:49.861>to <00:07:50.094>us

144
00:07:51.535 --> 00:07:52.575
<00:07:51.534>because <00:07:51.847>of <00:07:52.159>this, <00:07:52.471>uh,

145
00:07:53.175 --> 00:07:56.095
<00:07:53.175>technique <00:07:53.375>got <00:07:53.575>basically <00:07:53.775>you <00:07:53.975>can <00:07:54.175>maintain <00:07:54.375>state <00:07:54.575>within

146
00:07:56.095 --> 00:07:57.255
<00:07:56.095>Bitcoin <00:07:56.617>smart <00:07:57.139>contract.

147
00:07:57.795 --> 00:08:00.815
<00:07:57.795>So <00:07:57.922>a <00:07:58.049>very <00:07:58.176>nice <00:07:58.304>property <00:07:58.431>of <00:07:58.558>it <00:07:58.685>as, <00:07:58.813>uh, <00:07:58.940>I <00:07:59.067>just <00:07:59.195>happened

148
00:08:00.815 --> 00:08:03.895
<00:08:00.815>to <00:08:00.990>bring, <00:08:01.165>to <00:08:01.340>prove, <00:08:01.515>uh, <00:08:01.690>bitcoin's <00:08:01.865>actually <00:08:02.040>turn <00:08:02.215>complete.

149
00:08:04.355 --> 00:08:06.455
<00:08:04.355>So <00:08:04.588>let's <00:08:04.821>get <00:08:05.055>to <00:08:05.288>see <00:08:05.521>some <00:08:05.755>examples.

150
00:08:07.065 --> 00:08:10.215
<00:08:07.065>First <00:08:07.265>of <00:08:07.465>all, <00:08:07.665>let's <00:08:07.865>look <00:08:08.065>at <00:08:08.265>the <00:08:08.465>examples.

151
00:08:10.235 --> 00:08:11.575
<00:08:10.235>How <00:08:10.536>do <00:08:10.838>we <00:08:11.139>control <00:08:11.441>spending?

152
00:08:11.835 --> 00:08:13.455
<00:08:11.835>So <00:08:12.068>here <00:08:12.301>I <00:08:12.534>have, <00:08:12.768>uh, <00:08:13.001>two <00:08:13.234>examples.

153
00:08:13.915 --> 00:08:17.375
<00:08:13.915>The <00:08:14.070>first <00:08:14.226>one <00:08:14.381>is <00:08:14.537>called, <00:08:14.692>uh, <00:08:14.848>check <00:08:15.003>log <00:08:15.159>time <00:08:15.315>verify.

154
00:08:17.635 --> 00:08:20.695
<00:08:17.635>So <00:08:17.790>for <00:08:17.946>people <00:08:18.101>who <00:08:18.257>have <00:08:18.412>been, <00:08:18.568>uh, <00:08:18.723>familiar <00:08:18.879>with <00:08:19.034>script,

155
00:08:20.695 --> 00:08:24.215
<00:08:20.695>there's <00:08:20.895>another <00:08:21.094>op <00:08:21.295>code <00:08:21.495>called, <00:08:21.695>uh, <00:08:21.895>check, <00:08:22.094>uh,

156
00:08:24.685 --> 00:08:29.575
<00:08:24.685>exactly <00:08:24.825>the <00:08:24.965>same <00:08:25.105>name <00:08:25.245>of <00:08:25.385>check <00:08:25.525>time, <00:08:25.665>uh, <00:08:25.805>long <00:08:25.945>time <00:08:26.085>verify,

157
00:08:30.015 --> 00:08:31.775
<00:08:30.015>CRTV <00:08:30.365>in <00:08:30.715>BT <00:08:31.065>C <00:08:31.414>chain.

158
00:08:32.355 --> 00:08:36.695
<00:08:32.355>So <00:08:32.530>what <00:08:32.705>it <00:08:32.880>does <00:08:33.055>is, <00:08:33.230>so <00:08:33.405>for <00:08:33.580>uh, <00:08:33.755>UTXO

159
00:08:36.715 --> 00:08:40.135
<00:08:36.715>for <00:08:36.831>some <00:08:36.948>coins, <00:08:37.065>you <00:08:37.181>can, <00:08:37.298>you <00:08:37.415>can <00:08:37.531>lock <00:08:37.648>up <00:08:37.765>the <00:08:37.881>font <00:08:37.998>such <00:08:38.115>that

160
00:08:41.135 --> 00:08:45.105
<00:08:41.135>only <00:08:41.290>after <00:08:41.446>certain <00:08:41.601>deadline <00:08:41.757>you <00:08:41.912>can <00:08:42.068>spend <00:08:42.223>the <00:08:42.379>coins <00:08:42.534>again.

161
00:08:45.605 --> 00:08:47.505
<00:08:45.605>So <00:08:45.955>the <00:08:46.305>difference <00:08:46.655>between <00:08:47.005>this

162
00:08:47.645 --> 00:08:51.305
<00:08:47.645>and, <00:08:47.800>uh, <00:08:47.956>the <00:08:48.111>so-called <00:08:48.267>analog <00:08:48.422>time <00:08:48.578>is <00:08:48.733>analog <00:08:48.889>time <00:08:49.045>is

163
00:08:52.045 --> 00:08:54.945
<00:08:52.045>is <00:08:52.219>in <00:08:52.395>terms <00:08:52.569>of <00:08:52.745>the <00:08:52.920>works <00:08:53.094>on <00:08:53.270>the <00:08:53.444>level

164
00:08:55.045 --> 00:08:58.925
<00:08:55.045>of <00:08:55.219>transaction <00:08:55.395>versus <00:08:55.569>this <00:08:55.745>works <00:08:55.920>on <00:08:56.094>the <00:08:56.270>level, <00:08:56.444>uh,

165
00:08:59.245 --> 00:09:01.645
<00:08:59.245>granularity <00:08:59.525>of, <00:08:59.805>uh, <00:09:00.085>coins <00:09:00.365>ut <00:09:00.645>XOs.

166
00:09:01.985 --> 00:09:03.445
<00:09:01.985>So <00:09:02.313>how <00:09:02.642>is <00:09:02.970>this <00:09:03.299>implemented?

167
00:09:04.825 --> 00:09:09.565
<00:09:04.825>So <00:09:04.941>if <00:09:05.058>you <00:09:05.175>look <00:09:05.291>at <00:09:05.408>the, <00:09:05.525>if <00:09:05.641>you <00:09:05.758>know <00:09:05.875>about <00:09:05.991>the <00:09:06.108>s <00:09:06.225>script,

168
00:09:09.585 --> 00:09:11.765
<00:09:09.585>so <00:09:09.760>basically <00:09:09.935>this <00:09:10.110>is, <00:09:10.285>uh, <00:09:10.460>the <00:09:10.635>main <00:09:10.810>function <00:09:10.985>here,

169
00:09:11.765 --> 00:09:13.005
<00:09:11.765>public <00:09:12.137>function <00:09:12.509>called <00:09:12.881>spend,

170
00:09:13.665 --> 00:09:16.485
<00:09:13.665>and <00:09:13.865>we <00:09:14.064>pass <00:09:14.265>a <00:09:14.464>parameter <00:09:14.665>called, <00:09:14.865>uh, <00:09:15.064>uh,

171
00:09:16.595 --> 00:09:17.845
<00:09:16.595>transaction <00:09:17.720>pre-image.

172
00:09:18.385 --> 00:09:22.605
<00:09:18.385>So <00:09:18.585>in, <00:09:18.785>in <00:09:18.985>this <00:09:19.185>line, <00:09:19.385>we <00:09:19.585>require <00:09:19.785>the,

173
00:09:22.745 --> 00:09:25.085
<00:09:22.745>the <00:09:22.920>pre-image <00:09:23.095>has <00:09:23.270>to <00:09:23.445>be <00:09:23.620>for <00:09:23.795>the <00:09:23.970>current <00:09:24.145>one.

174
00:09:25.105 --> 00:09:29.165
<00:09:25.105>So <00:09:25.245>basically <00:09:25.385>this <00:09:25.525>line, <00:09:25.665>no, <00:09:25.805>this <00:09:25.945>one <00:09:26.085>single <00:09:26.225>line, <00:09:26.365>just <00:09:26.505>check

175
00:09:29.675 --> 00:09:32.565
<00:09:29.675>whether <00:09:29.830>this <00:09:29.986>is <00:09:30.141>pre <00:09:30.297>image <00:09:30.452>is <00:09:30.608>for <00:09:30.763>the <00:09:30.919>current <00:09:31.074>transaction,

176
00:09:32.575 --> 00:09:35.205
<00:09:32.575>using <00:09:33.041>the <00:09:33.508>output <00:09:33.975>transaction,

177
00:09:35.515 --> 00:09:37.285
<00:09:35.515>just <00:09:35.715>one <00:09:35.915>single <00:09:36.115>line, <00:09:36.314>and <00:09:36.515>we <00:09:36.715>are <00:09:36.915>done.

178
00:09:37.545 --> 00:09:41.885
<00:09:37.545>So <00:09:37.700>after <00:09:37.856>we, <00:09:38.011>we <00:09:38.167>get <00:09:38.322>this, <00:09:38.478>uh, <00:09:38.633>pre-image, <00:09:38.789>we <00:09:38.944>can,

179
00:09:42.065 --> 00:09:43.165
<00:09:42.065>we <00:09:42.312>can <00:09:42.560>pass <00:09:42.807>it, <00:09:43.055>right?

180
00:09:43.165 --> 00:09:45.165
<00:09:43.165>So <00:09:43.365>for <00:09:43.564>example, <00:09:43.765>here <00:09:43.964>we <00:09:44.165>have <00:09:44.365>a <00:09:44.564>wrapper,

181
00:09:45.165 --> 00:09:46.805
<00:09:45.165>basically <00:09:45.515>helper <00:09:45.865>just <00:09:46.214>can <00:09:46.564>get

182
00:09:46.805 --> 00:09:47.965
<00:09:46.805>the <00:09:46.978>end, <00:09:47.153>unlock <00:09:47.327>time <00:09:47.501>out <00:09:47.675>of <00:09:47.849>it.

183
00:09:48.385 --> 00:09:52.995
<00:09:48.385>So <00:09:48.560>we <00:09:48.735>demand, <00:09:48.910>you <00:09:49.085>can <00:09:49.260>only <00:09:49.435>spend <00:09:49.610>this <00:09:49.785>coin,

184
00:09:54.355 --> 00:09:58.935
<00:09:54.355>uh, <00:09:54.495>after <00:09:54.635>the <00:09:54.775>unlocked <00:09:54.915>time <00:09:55.055>if <00:09:55.195>the <00:09:55.335>unlocked <00:09:55.475>time <00:09:55.615>is <00:09:55.755>no

185
00:09:58.935 --> 00:10:00.975
<00:09:58.935>smaller <00:09:59.214>than <00:09:59.494>the <00:09:59.775>predefined <00:10:00.055>mature <00:10:00.334>time.

186
00:10:01.195 --> 00:10:03.295
<00:10:01.195>So <00:10:01.475>basically <00:10:01.755>this <00:10:02.035>basically <00:10:02.315>says, <00:10:02.595>uh,

187
00:10:03.295 --> 00:10:04.935
<00:10:03.295>you <00:10:03.645>can <00:10:03.995>not <00:10:04.344>spend <00:10:04.694>coins

188
00:10:04.935 --> 00:10:08.975
<00:10:04.935>before <00:10:05.135>the <00:10:05.334>mature <00:10:05.535>time <00:10:05.734>basically <00:10:05.935>implemented <00:10:06.135>of <00:10:06.334>CRTV,

189
00:10:09.235 --> 00:10:14.095
<00:10:09.235>but <00:10:09.410>with, <00:10:09.585>uh, <00:10:09.760>just <00:10:09.935>using <00:10:10.110>existing, <00:10:10.285>of <00:10:10.460>course, <00:10:10.635>thanks

190
00:10:14.115 --> 00:10:16.495
<00:10:14.115>to <00:10:14.395>the <00:10:14.675>technical <00:10:14.955>of <00:10:15.235>operat <00:10:15.515>transaction.

191
00:10:16.915 --> 00:10:20.055
<00:10:16.915>So <00:10:17.070>the <00:10:17.226>second <00:10:17.381>one <00:10:17.537>called, <00:10:17.692>uh, <00:10:17.848>page <00:10:18.003>to <00:10:18.159>script <00:10:18.314>hash.

192
00:10:20.315 --> 00:10:23.655
<00:10:20.315>So <00:10:20.470>for <00:10:20.626>people <00:10:20.781>who <00:10:20.937>have <00:10:21.092>been <00:10:21.248>familiar <00:10:21.403>with, <00:10:21.559>uh, <00:10:21.715>script,

193
00:10:24.075 --> 00:10:29.055
<00:10:24.075>you <00:10:24.250>know, <00:10:24.425>there's <00:10:24.600>on <00:10:24.775>B2C <00:10:24.950>chain, <00:10:25.125>that's <00:10:25.300>also <00:10:25.475>a,

194
00:10:30.795 --> 00:10:33.555
<00:10:30.795>a <00:10:30.935>way <00:10:31.074>to <00:10:31.214>unlock <00:10:31.354>funds <00:10:31.495>called, <00:10:31.635>uh, <00:10:31.775>pay <00:10:31.915>to <00:10:32.055>script <00:10:32.194>hash.

195
00:10:33.815 --> 00:10:36.155
<00:10:33.815>So <00:10:33.990>here <00:10:34.165>what <00:10:34.340>we <00:10:34.515>do <00:10:34.690>the <00:10:34.865>same <00:10:35.040>thing <00:10:35.215>here,

196
00:10:36.295 --> 00:10:40.435
<00:10:36.295>but, <00:10:36.495>uh, <00:10:36.694>just <00:10:36.895>using <00:10:37.094>that <00:10:37.295>with <00:10:37.495>without <00:10:37.694>explicit,

197
00:10:40.615 --> 00:10:41.955
<00:10:40.615>uh, <00:10:41.218>upcode <00:10:41.821>support.

198
00:10:42.095 --> 00:10:44.115
<00:10:42.095>So <00:10:42.295>how <00:10:42.495>do <00:10:42.695>we <00:10:42.895>do <00:10:43.095>that? <00:10:43.295>So <00:10:43.495>again,

199
00:10:44.495 --> 00:10:48.275
<00:10:44.495>we <00:10:44.650>passing <00:10:44.806>the <00:10:44.961>transaction <00:10:45.117>pre <00:10:45.272>image, <00:10:45.428>we <00:10:45.583>check <00:10:45.739>is <00:10:45.895>it

200
00:10:48.275 --> 00:10:50.895
<00:10:48.275>for <00:10:48.625>the <00:10:48.975>current <00:10:49.324>transaction, <00:10:49.675>and

201
00:10:51.065 --> 00:10:53.735
<00:10:51.065>after <00:10:51.240>we <00:10:51.415>have <00:10:51.590>the <00:10:51.765>pre-image, <00:10:51.940>what <00:10:52.115>do <00:10:52.290>we <00:10:52.465>do?

202
00:10:53.915 --> 00:10:58.355
<00:10:53.915>We <00:10:54.265>demand <00:10:54.615>the, <00:10:54.964>is, <00:10:55.314>uh,

203
00:10:58.745 --> 00:11:01.315
<00:10:58.745>this, <00:10:59.025>uh, <00:10:59.305>redeemed <00:10:59.585>script <00:10:59.865>is <00:11:00.145>hashes

204
00:11:01.335 --> 00:11:03.675
<00:11:01.335>to <00:11:01.615>the <00:11:01.895>predefined, <00:11:02.175>uh, <00:11:02.455>script <00:11:02.735>hash.

205
00:11:03.825 --> 00:11:05.875
<00:11:03.825>Make <00:11:04.058>sure <00:11:04.291>this <00:11:04.525>redeemed <00:11:04.758>script <00:11:04.991>is <00:11:05.225>correct.

206
00:11:06.455 --> 00:11:07.555
<00:11:06.455>And <00:11:06.653>then <00:11:06.851>what <00:11:07.049>do <00:11:07.247>we <00:11:07.444>do?

207
00:11:08.015 --> 00:11:12.795
<00:11:08.015>We <00:11:08.170>require, <00:11:08.326>the <00:11:08.481>output <00:11:08.637>has <00:11:08.792>to <00:11:08.948>contain <00:11:09.103>this <00:11:09.259>redeemed <00:11:09.415>script.

208
00:11:13.875 --> 00:11:15.935
<00:11:13.875>So <00:11:14.075>basically <00:11:14.275>this <00:11:14.475>is <00:11:14.675>one <00:11:14.875>way <00:11:15.075>to <00:11:15.275>control

209
00:11:16.315 --> 00:11:19.175
<00:11:16.315>how <00:11:16.548>the <00:11:16.781>next <00:11:17.015>transaction <00:11:17.248>output <00:11:17.481>is <00:11:17.715>going

210
00:11:19.175 --> 00:11:20.775
<00:11:19.175>to <00:11:19.375>be <00:11:19.574>controlled, <00:11:19.775>how <00:11:19.974>it <00:11:20.175>can <00:11:20.375>be <00:11:20.574>spent.

211
00:11:20.995 --> 00:11:23.655
<00:11:20.995>It, <00:11:21.195>this <00:11:21.395>new <00:11:21.595>transaction <00:11:21.795>can <00:11:21.995>only <00:11:22.195>be <00:11:22.395>spent

212
00:11:24.235 --> 00:11:26.615
<00:11:24.235>if <00:11:24.435>you <00:11:24.635>can <00:11:24.835>unlock <00:11:25.035>the <00:11:25.235>new <00:11:25.435>redeem <00:11:25.635>script.

213
00:11:26.755 --> 00:11:30.375
<00:11:26.755>So <00:11:26.895>basically <00:11:27.035>you <00:11:27.175>can <00:11:27.314>achieve <00:11:27.455>the <00:11:27.595>page <00:11:27.735>to <00:11:27.875>script <00:11:28.015>hash, <00:11:28.155>uh,

214
00:11:30.375 --> 00:11:34.635
<00:11:30.375>with <00:11:30.530>two <00:11:30.686>transactions, <00:11:30.841>one, <00:11:30.997>and <00:11:31.152>once <00:11:31.308>when <00:11:31.463>you <00:11:31.619>spend <00:11:31.775>this.

215
00:11:34.705 --> 00:11:37.515
<00:11:34.705>Next <00:11:34.905>you <00:11:35.105>have <00:11:35.305>to <00:11:35.505>provide <00:11:35.705>the <00:11:35.905>redeem <00:11:36.105>script,

216
00:11:37.985 --> 00:11:40.915
<00:11:37.985>measure <00:11:38.185>the <00:11:38.385>hash, <00:11:38.585>and <00:11:38.785>then <00:11:38.985>the <00:11:39.185>new, <00:11:39.385>the,

217
00:11:41.615 --> 00:11:43.955
<00:11:41.615>in <00:11:41.895>the <00:11:42.175>new <00:11:42.455>transactions, <00:11:42.735>uh, <00:11:43.015>output,

218
00:11:44.215 --> 00:11:45.915
<00:11:44.215>you <00:11:44.495>will <00:11:44.775>contain <00:11:45.055>this <00:11:45.335>redeem <00:11:45.615>script.

219
00:11:46.175 --> 00:11:50.055
<00:11:46.175>And <00:11:46.349>then <00:11:46.525>you <00:11:46.699>have <00:11:46.875>a <00:11:47.050>follow <00:11:47.224>up <00:11:47.400>transaction, <00:11:47.574>which

220
00:11:50.675 --> 00:11:52.095
<00:11:50.675>can <00:11:50.994>unlock <00:11:51.314>the <00:11:51.633>redeem <00:11:51.953>script.

221
00:11:52.195 --> 00:11:53.565
<00:11:52.195>So <00:11:52.441>you <00:11:52.688>achieve <00:11:52.934>the <00:11:53.181>same <00:11:53.428>thing,

222
00:11:54.105 --> 00:11:57.925
<00:11:54.105>but <00:11:54.260>uh, <00:11:54.416>with <00:11:54.571>just, <00:11:54.727>uh, <00:11:54.882>existing <00:11:55.038>off <00:11:55.193>code, <00:11:55.349>no <00:11:55.505>change.

223
00:11:59.505 --> 00:12:01.515
<00:11:59.505>Okay, <00:11:59.738>so <00:11:59.971>now <00:12:00.205>let's <00:12:00.438>look <00:12:00.671>at <00:12:00.905>some

224
00:12:01.515 --> 00:12:04.645
<00:12:01.515>more <00:12:02.915>examples.

225
00:12:05.065 --> 00:12:06.685
<00:12:05.065>So <00:12:05.415>we <00:12:05.765>mentioned, <00:12:06.115>uh, <00:12:06.465>earlier,

226
00:12:06.905 --> 00:12:09.645
<00:12:06.905>so <00:12:07.105>we <00:12:07.305>can <00:12:07.505>actually <00:12:07.704>using <00:12:07.905>this <00:12:08.105>technique <00:12:08.305>to

227
00:12:11.195 --> 00:12:14.645
<00:12:11.195>implement <00:12:11.428>state <00:12:11.661>within <00:12:11.895>bitcoin <00:12:12.128>script, <00:12:12.361>which <00:12:12.595>is

228
00:12:15.665 --> 00:12:19.525
<00:12:15.665>deeply <00:12:15.865>impossible <00:12:16.064>before <00:12:16.265>this <00:12:16.464>introduction <00:12:16.665>of <00:12:16.865>this <00:12:17.064>scheme.

229
00:12:20.425 --> 00:12:21.765
<00:12:20.425>So <00:12:20.666>how, <00:12:20.907>how <00:12:21.148>does <00:12:21.389>this <00:12:21.631>work?

230
00:12:22.465 --> 00:12:24.925
<00:12:22.465>So <00:12:22.640>one <00:12:22.815>way <00:12:22.990>would <00:12:23.165>be <00:12:23.340>in <00:12:23.515>the <00:12:23.690>locking <00:12:23.865>script,

231
00:12:25.105 --> 00:12:26.645
<00:12:25.105>we <00:12:25.382>divide <00:12:25.659>it <00:12:25.936>into <00:12:26.213>two <00:12:26.491>parts.

232
00:12:27.345 --> 00:12:31.045
<00:12:27.345>So <00:12:27.472>we <00:12:27.599>call <00:12:27.726>this <00:12:27.854>code <00:12:27.981>part <00:12:28.108>and <00:12:28.235>the <00:12:28.363>database, <00:12:28.490>the <00:12:28.617>code <00:12:28.745>part.

233
00:12:31.345 --> 00:12:35.045
<00:12:31.345>So <00:12:31.461>think <00:12:31.578>about <00:12:31.695>here <00:12:31.811>with, <00:12:31.928>uh, <00:12:32.045>uh, <00:12:32.161>you <00:12:32.278>can <00:12:32.395>think <00:12:32.511>about <00:12:32.628>is <00:12:32.745>as,

234
00:12:35.105 --> 00:12:39.685
<00:12:35.105>uh, <00:12:35.280>analogous <00:12:35.455>to <00:12:35.630>object <00:12:35.805>in <00:12:35.980>object <00:12:36.155>oriented <00:12:36.330>data <00:12:36.505>programming.

235
00:12:39.865 --> 00:12:43.205
<00:12:39.865>So <00:12:40.040>code <00:12:40.215>part <00:12:40.390>is, <00:12:40.565>uh, <00:12:40.740>equal <00:12:40.915>to <00:12:41.090>the, <00:12:41.265>the,

236
00:12:44.065 --> 00:12:47.565
<00:12:44.065>the <00:12:44.192>lockin <00:12:44.319>script <00:12:44.446>is <00:12:44.574>a <00:12:44.701>whole <00:12:44.828>as <00:12:44.955>a <00:12:45.083>object <00:12:45.210>code <00:12:45.337>is <00:12:45.465>similar

237
00:12:47.585 --> 00:12:50.765
<00:12:47.585>to <00:12:47.865>methods <00:12:48.145>in <00:12:48.425>object <00:12:48.705>already <00:12:48.985>programming

238
00:12:51.025 --> 00:12:55.565
<00:12:51.025>and <00:12:51.199>data <00:12:51.375>is <00:12:51.550>just <00:12:51.725>a <00:12:51.900>state <00:12:52.074>of, <00:12:52.250>uh, <00:12:52.425>properties

239
00:12:55.665 --> 00:12:58.605
<00:12:55.665>and, <00:12:55.865>uh, <00:12:56.064>member <00:12:56.265>variables <00:12:56.464>in, <00:12:56.665>in <00:12:56.865>the <00:12:57.064>object.

240
00:12:59.625 --> 00:13:03.245
<00:12:59.625>So <00:12:59.825>code <00:13:00.025>part <00:13:00.225>we, <00:13:00.425>we <00:13:00.625>maintain <00:13:00.825>is <00:13:01.025>immutable.

241
00:13:03.425 --> 00:13:05.605
<00:13:03.425>So <00:13:03.599>you <00:13:03.775>cannot <00:13:03.949>change <00:13:04.125>it <00:13:04.300>when <00:13:04.474>you <00:13:04.650>spend <00:13:04.824>it.

242
00:13:06.185 --> 00:13:08.645
<00:13:06.185>And <00:13:06.418>data <00:13:06.651>parts <00:13:06.885>is <00:13:07.118>can <00:13:07.351>be <00:13:07.584>mutated.

243
00:13:09.885 --> 00:13:13.705
<00:13:09.885>So <00:13:10.060>I'm <00:13:10.235>showing <00:13:10.410>you <00:13:10.585>one <00:13:10.760>example, <00:13:10.935>the <00:13:11.110>simplest <00:13:11.285>example

244
00:13:13.705 --> 00:13:15.705
<00:13:13.705>of <00:13:13.905>a <00:13:14.105>maintain <00:13:14.305>a <00:13:14.505>state <00:13:14.705>called <00:13:14.905>a <00:13:15.105>counter.

245
00:13:16.005 --> 00:13:18.625
<00:13:16.005>So <00:13:16.238>basically <00:13:16.471>it <00:13:16.705>maintains <00:13:16.938>a <00:13:17.171>counter <00:13:17.405>every

246
00:13:18.625 --> 00:13:19.865
<00:13:18.625>time <00:13:18.997>you <00:13:19.369>spend <00:13:19.741>this.

247
00:13:20.445 --> 00:13:23.585
<00:13:20.445>You, <00:13:20.600>you <00:13:20.756>call <00:13:20.911>this <00:13:21.067>smart <00:13:21.222>counter, <00:13:21.378>you <00:13:21.533>spend <00:13:21.689>this <00:13:21.845>UDXO,

248
00:13:23.845 --> 00:13:27.745
<00:13:23.845>you <00:13:24.000>have <00:13:24.156>to <00:13:24.311>increment <00:13:24.467>the <00:13:24.622>counter <00:13:24.778>by <00:13:24.933>exactly <00:13:25.089>by <00:13:25.245>one.

249
00:13:28.685 --> 00:13:30.305
<00:13:28.685>So <00:13:28.918>let's <00:13:29.151>look <00:13:29.385>at <00:13:29.618>one <00:13:29.851>example <00:13:30.084>here.

250
00:13:30.685 --> 00:13:32.145
<00:13:30.685>So <00:13:30.947>here <00:13:31.210>we <00:13:31.473>have <00:13:31.736>transaction <00:13:31.999>one,

251
00:13:32.315 --> 00:13:33.825
<00:13:32.315>which <00:13:32.654>is <00:13:32.994>deployed <00:13:33.334>this <00:13:33.674>contract.

252
00:13:34.485 --> 00:13:38.615
<00:13:34.485>So <00:13:34.625>when <00:13:34.765>the <00:13:34.905>next <00:13:35.045>transaction <00:13:35.185>two <00:13:35.325>is <00:13:35.465>going <00:13:35.605>to <00:13:35.745>spend <00:13:35.885>it.

253
00:13:39.765 --> 00:13:41.785
<00:13:39.765>So <00:13:39.998>basically <00:13:40.231>this <00:13:40.465>contract <00:13:40.698>does <00:13:40.931>two <00:13:41.165>things.

254
00:13:41.835 --> 00:13:43.865
<00:13:41.835>First, <00:13:42.535>it <00:13:43.235>checks

255
00:13:44.735 --> 00:13:48.065
<00:13:44.735>make <00:13:44.910>sure <00:13:45.085>the <00:13:45.260>code <00:13:45.435>part <00:13:45.610>does <00:13:45.785>not <00:13:45.960>change, <00:13:46.135>okay?

256
00:13:48.725 --> 00:13:50.265
<00:13:48.725>And <00:13:49.187>then <00:13:49.649>it, <00:13:50.111>uh,

257
00:13:50.395 --> 00:13:52.985
<00:13:50.395>makes <00:13:50.569>sure <00:13:50.745>this <00:13:50.920>data <00:13:51.095>part, <00:13:51.270>which <00:13:51.444>is <00:13:51.620>the <00:13:51.795>state.

258
00:13:53.405 --> 00:13:57.385
<00:13:53.405>And <00:13:53.532>here <00:13:53.659>for <00:13:53.786>us <00:13:53.914>in <00:13:54.041>this <00:13:54.168>simple <00:13:54.295>example <00:13:54.423>is <00:13:54.550>just <00:13:54.677>the <00:13:54.805>calendar

259
00:13:58.005 --> 00:14:00.545
<00:13:58.005>has <00:13:58.205>to <00:13:58.405>in <00:13:58.605>incre <00:13:58.805>increase <00:13:59.005>by <00:13:59.205>exactly <00:13:59.405>one.

260
00:14:01.005 --> 00:14:03.945
<00:14:01.005>So <00:14:01.205>you <00:14:01.405>can <00:14:01.605>see <00:14:01.805>now <00:14:02.005>every, <00:14:02.205>the <00:14:02.405>output,

261
00:14:04.525 --> 00:14:06.065
<00:14:04.525>the <00:14:04.871>code <00:14:05.218>part <00:14:05.564>doesn't <00:14:05.911>change,

262
00:14:06.325 --> 00:14:09.585
<00:14:06.325>but <00:14:06.480>only <00:14:06.636>the, <00:14:06.791>the <00:14:06.947>data <00:14:07.102>part <00:14:07.258>is <00:14:07.413>incremented <00:14:07.569>by <00:14:07.725>one.

263
00:14:10.325 --> 00:14:12.705
<00:14:10.325>So <00:14:10.525>if <00:14:10.725>somebody <00:14:10.925>wants <00:14:11.125>to <00:14:11.325>spend <00:14:11.525>this <00:14:11.725>into

264
00:14:13.295 --> 00:14:16.425
<00:14:13.295>another <00:14:13.495>regular <00:14:13.694>output, <00:14:13.895>P <00:14:14.094>two <00:14:14.295>PH <00:14:14.495>will <00:14:14.694>fail

265
00:14:16.425 --> 00:14:18.585
<00:14:16.425>because <00:14:17.125>the <00:14:17.824>code,

266
00:14:18.805 --> 00:14:22.265
<00:14:18.805>the <00:14:18.960>output <00:14:19.116>script <00:14:19.271>will <00:14:19.427>just <00:14:19.582>not <00:14:19.738>mesh <00:14:19.893>the <00:14:20.049>lock <00:14:20.204>script

267
00:14:22.765 --> 00:14:25.345
<00:14:22.765>as <00:14:22.998>we <00:14:23.231>demand <00:14:23.465>in <00:14:23.698>this <00:14:23.931>original <00:14:24.165>contract.

268
00:14:26.245 --> 00:14:30.425
<00:14:26.245>So <00:14:26.372>you <00:14:26.499>can <00:14:26.626>imagine <00:14:26.754>once <00:14:26.881>you <00:14:27.008>have <00:14:27.135>go <00:14:27.263>from <00:14:27.390>zero <00:14:27.517>to <00:14:27.645>one,

269
00:14:30.685 --> 00:14:35.085
<00:14:30.685>you <00:14:30.859>can, <00:14:31.035>if <00:14:31.209>you <00:14:31.385>pay, <00:14:31.560>uh, <00:14:31.734>enough <00:14:31.910>transaction <00:14:32.084>fee,

270
00:14:35.145 --> 00:14:38.165
<00:14:35.145>you <00:14:35.300>can <00:14:35.456>go <00:14:35.611>to <00:14:35.767>the <00:14:35.922>next <00:14:36.078>transaction, <00:14:36.233>which <00:14:36.389>transaction <00:14:36.545>three,

271
00:14:38.745 --> 00:14:41.805
<00:14:38.745>it <00:14:38.861>will <00:14:38.978>keep <00:14:39.095>going <00:14:39.211>just <00:14:39.328>every <00:14:39.445>time <00:14:39.561>you <00:14:39.678>call <00:14:39.795>it, <00:14:39.911>you <00:14:40.028>have <00:14:40.145>to

272
00:14:42.715 --> 00:14:46.325
<00:14:42.715>provide <00:14:42.915>a <00:14:43.115>counter <00:14:43.315>that's <00:14:43.515>exactly <00:14:43.715>bigger <00:14:43.915>than <00:14:44.115>one,

273
00:14:46.395 --> 00:14:47.605
<00:14:46.395>than <00:14:46.667>the <00:14:46.939>one <00:14:47.211>before <00:14:47.484>it.

274
00:14:48.025 --> 00:14:49.965
<00:14:48.025>So <00:14:48.258>for <00:14:48.491>example, <00:14:48.725>here, <00:14:48.958>if <00:14:49.191>you <00:14:49.425>want

275
00:14:49.965 --> 00:14:53.885
<00:14:49.965>to <00:14:50.140>using <00:14:50.315>transaction <00:14:50.490>three <00:14:50.665>prime, <00:14:50.840>so <00:14:51.015>if <00:14:51.190>you <00:14:51.365>happen

276
00:14:53.945 --> 00:14:57.205
<00:14:53.945>to <00:14:54.120>use <00:14:54.295>three <00:14:54.470>counter <00:14:54.645>three <00:14:54.820>here, <00:14:54.995>it <00:14:55.170>will <00:14:55.345>fail

277
00:14:57.205 --> 00:15:00.165
<00:14:57.205>because <00:14:57.380>three <00:14:57.555>is <00:14:57.730>not <00:14:57.905>equal <00:14:58.080>to <00:14:58.255>one <00:14:58.430>plus <00:14:58.605>one.

278
00:15:00.785 --> 00:15:05.085
<00:15:00.785>So <00:15:00.940>in <00:15:01.096>this <00:15:01.251>simple <00:15:01.407>example, <00:15:01.562>we, <00:15:01.718>we <00:15:01.873>see <00:15:02.029>how <00:15:02.185>state

279
00:15:05.625 --> 00:15:08.605
<00:15:05.625>can <00:15:05.905>be <00:15:06.185>propagated <00:15:06.465>using <00:15:06.745>push <00:15:07.025>transaction

280
00:15:10.965 --> 00:15:14.375
<00:15:10.965>technique <00:15:12.365>and

281
00:15:14.375 --> 00:15:17.655
<00:15:14.375>what <00:15:14.530>others <00:15:14.686>can <00:15:14.841>be <00:15:14.997>implemented <00:15:15.152>once <00:15:15.308>we <00:15:15.463>can <00:15:15.619>maintain <00:15:15.775>state.

282
00:15:18.045 --> 00:15:19.335
<00:15:18.045>Yeah, <00:15:18.432>actually <00:15:18.819>there's <00:15:19.206>a,

283
00:15:19.605 --> 00:15:22.255
<00:15:19.605>because <00:15:19.780>this, <00:15:19.955>uh, <00:15:20.130>state <00:15:20.305>is <00:15:20.480>just <00:15:20.655>a <00:15:20.830>arbitrary <00:15:21.005>data,

284
00:15:22.355 --> 00:15:25.775
<00:15:22.355>so <00:15:22.588>you <00:15:22.821>can <00:15:23.055>be <00:15:23.288>any <00:15:23.521>arbitrary, <00:15:23.755>um,

285
00:15:27.045 --> 00:15:31.375
<00:15:27.045>program <00:15:27.172>that, <00:15:27.299>uh, <00:15:27.426>you <00:15:27.554>need <00:15:27.681>to, <00:15:27.808>to <00:15:27.935>maintain <00:15:28.063>a <00:15:28.190>state, <00:15:28.317>any <00:15:28.444>app,

286
00:15:31.375 --> 00:15:33.175
<00:15:31.375>actual <00:15:31.608>state <00:15:31.841>you <00:15:32.075>can <00:15:32.308>do, <00:15:32.541>for <00:15:32.775>example,

287
00:15:33.655 --> 00:15:36.775
<00:15:33.655>a <00:15:33.795>big <00:15:33.935>category <00:15:34.074>will <00:15:34.214>be <00:15:34.355>fully <00:15:34.495>on <00:15:34.635>chain <00:15:34.775>peer <00:15:34.915>tope <00:15:35.055>games.

288
00:15:37.035 --> 00:15:39.855
<00:15:37.035>In <00:15:37.175>this <00:15:37.314>kind <00:15:37.454>of <00:15:37.594>game, <00:15:37.735>uh, <00:15:37.875>not <00:15:38.015>only <00:15:38.155>the <00:15:38.295>data <00:15:38.435>app,

289
00:15:39.995 --> 00:15:42.975
<00:15:39.995>but <00:15:40.150>also <00:15:40.306>the, <00:15:40.461>the <00:15:40.617>business <00:15:40.772>logic, <00:15:40.928>the <00:15:41.083>code <00:15:41.239>logic, <00:15:41.395>the,

290
00:15:43.195 --> 00:15:47.055
<00:15:43.195>the <00:15:43.370>game <00:15:43.545>rules <00:15:43.720>is <00:15:43.895>also <00:15:44.070>enforced <00:15:44.245>by <00:15:44.420>the <00:15:44.595>miners.

291
00:15:47.195 --> 00:15:49.815
<00:15:47.195>So <00:15:47.370>the <00:15:47.545>own <00:15:47.720>chain <00:15:47.895>games <00:15:48.070>you <00:15:48.245>can <00:15:48.420>have, <00:15:48.595>uh,

292
00:15:50.075 --> 00:15:51.615
<00:15:50.075>we <00:15:50.352>implement <00:15:50.629>quite <00:15:50.906>a <00:15:51.183>few <00:15:51.461>examples.

293
00:15:51.615 --> 00:15:53.575
<00:15:51.615>For <00:15:51.848>example, <00:15:52.081>the <00:15:52.315>Conway <00:15:52.548>Game <00:15:52.781>of <00:15:53.015>Life,

294
00:15:53.705 --> 00:15:55.335
<00:15:53.705>which <00:15:53.905>I <00:15:54.105>show <00:15:54.305>on <00:15:54.505>the <00:15:54.705>right <00:15:54.905>hand <00:15:55.105>side.

295
00:15:55.835 --> 00:16:00.335
<00:15:55.835>So <00:15:56.010>basically <00:15:56.185>this <00:15:56.360>is <00:15:56.535>the <00:15:56.710>two <00:15:56.885>dimensional <00:15:57.060>cellular <00:15:57.235>automata.

296
00:16:00.955 --> 00:16:03.095
<00:16:00.955>We <00:16:01.188>deploy <00:16:01.421>this <00:16:01.655>on <00:16:01.888>may <00:16:02.121>net <00:16:02.355>and

297
00:16:03.095 --> 00:16:06.815
<00:16:03.095>because, <00:16:03.235>uh, <00:16:03.375>the <00:16:03.515>game <00:16:03.655>of <00:16:03.795>life <00:16:03.935>itself <00:16:04.075>is, <00:16:04.215>uh, <00:16:04.355>turn <00:16:04.495>complete

298
00:16:06.815 --> 00:16:10.135
<00:16:06.815>by <00:16:07.095>implement <00:16:07.375>this <00:16:07.655>directly <00:16:07.935>on <00:16:08.215>chain,

299
00:16:10.435 --> 00:16:13.375
<00:16:10.435>we <00:16:10.635>actually <00:16:10.834>approved <00:16:11.035>Bitcoin <00:16:11.234>itself <00:16:11.435>is <00:16:11.635>churn <00:16:11.834>complete.

300
00:16:13.885 --> 00:16:15.425
<00:16:13.885>So <00:16:14.231>it's <00:16:14.578>very <00:16:14.924>powerful <00:16:15.271>technique.

301
00:16:15.695 --> 00:16:18.905
<00:16:15.695>Even <00:16:15.895>it's, <00:16:16.095>uh, <00:16:16.295>looks <00:16:16.495>simple <00:16:16.695>at <00:16:16.895>the <00:16:17.095>beginning,

302
00:16:19.085 --> 00:16:22.225
<00:16:19.085>at <00:16:19.225>the <00:16:19.365>first <00:16:19.505>class <00:16:19.645>is, <00:16:19.785>uh, <00:16:19.925>you <00:16:20.065>can <00:16:20.205>derive <00:16:20.345>a <00:16:20.485>lot

303
00:16:22.225 --> 00:16:25.785
<00:16:22.225>of <00:16:22.425>very <00:16:22.625>sophisticated, <00:16:22.825>uh, <00:16:23.025>contracts <00:16:23.225>out <00:16:23.425>of <00:16:23.625>it.

304
00:16:25.965 --> 00:16:29.185
<00:16:25.965>We <00:16:26.120>also <00:16:26.276>have <00:16:26.431>a, <00:16:26.587>I <00:16:26.742>think <00:16:26.898>I'll <00:16:27.053>going <00:16:27.209>to <00:16:27.365>show

305
00:16:29.755 --> 00:16:31.385
<00:16:29.755>later <00:16:30.105>based <00:16:30.455>on <00:16:30.805>tic-tac <00:16:31.155>toe

306
00:16:31.385 --> 00:16:34.625
<00:16:31.385>and <00:16:31.585>Eric <00:16:31.785>also <00:16:31.985>implement, <00:16:32.185>uh, <00:16:32.385>rock <00:16:32.585>paper <00:16:32.785>scissors.

307
00:16:35.045 --> 00:16:38.065
<00:16:35.045>So <00:16:35.278>of <00:16:35.511>course <00:16:35.745>everyone <00:16:35.978>loves, <00:16:36.211>uh, <00:16:36.444>tokens.

308
00:16:38.805 --> 00:16:41.225
<00:16:38.805>So <00:16:39.005>we, <00:16:39.204>because <00:16:39.405>if <00:16:39.604>you <00:16:39.805>think <00:16:40.005>about <00:16:40.204>tokens,

309
00:16:41.225 --> 00:16:45.305
<00:16:41.225>if <00:16:41.365>it's <00:16:41.505>fungible <00:16:41.645>ones, <00:16:41.785>you, <00:16:41.925>the <00:16:42.065>state <00:16:42.205>is <00:16:42.345>just <00:16:42.485>one <00:16:42.625>big

310
00:16:45.915 --> 00:16:48.105
<00:16:45.915>giant <00:16:46.381>token <00:16:46.848>balance <00:16:47.314>table.

311
00:16:48.245 --> 00:16:51.345
<00:16:48.245>So <00:16:48.385>you <00:16:48.525>have, <00:16:48.665>uh, <00:16:48.805>one <00:16:48.945>column <00:16:49.085>says <00:16:49.225>who's <00:16:49.365>a <00:16:49.505>token <00:16:49.645>holder,

312
00:16:51.565 --> 00:16:53.265
<00:16:51.565>and <00:16:51.845>on <00:16:52.125>another <00:16:52.405>column <00:16:52.685>is, <00:16:52.965>uh,

313
00:16:53.285 --> 00:16:54.705
<00:16:53.285>the <00:16:53.540>balance <00:16:53.796>for <00:16:54.051>this, <00:16:54.307>uh, <00:16:54.563>owner.

314
00:16:55.285 --> 00:16:59.105
<00:16:55.285>So <00:16:55.412>if <00:16:55.539>you <00:16:55.666>can <00:16:55.794>invent <00:16:55.921>this <00:16:56.048>big <00:16:56.175>to <00:16:56.303>table <00:16:56.430>as <00:16:56.557>a <00:16:56.685>state

315
00:16:59.105 --> 00:17:02.505
<00:16:59.105>and <00:16:59.260>then <00:16:59.416>propagate, <00:16:59.571>uh, <00:16:59.727>you <00:16:59.882>get <00:17:00.038>tokens <00:17:00.193>also, <00:17:00.349>of <00:17:00.505>course,

316
00:17:02.505 --> 00:17:05.025
<00:17:02.505>similarly, <00:17:02.680>you <00:17:02.855>can <00:17:03.030>have <00:17:03.205>a <00:17:03.380>non-profitable <00:17:03.555>tokens <00:17:03.730>as <00:17:03.905>well.

317
00:17:06.005 --> 00:17:07.945
<00:17:06.005>And, <00:17:06.285>uh, <00:17:06.565>also <00:17:06.845>I <00:17:07.125>implement, <00:17:07.405>uh,

318
00:17:07.945 --> 00:17:11.105
<00:17:07.944>some <00:17:08.145>other <00:17:08.345>financial <00:17:08.544>contracts <00:17:08.744>like <00:17:08.944>auction, <00:17:09.145>uh, <00:17:09.345>options.

319
00:17:11.605 --> 00:17:14.465
<00:17:11.605>We <00:17:11.805>also <00:17:12.005>even <00:17:12.204>have <00:17:12.405>a <00:17:12.605>token <00:17:12.805>sale <00:17:13.005>contracts.

320
00:17:15.455 --> 00:17:17.345
<00:17:15.454>Also, <00:17:15.734>we <00:17:16.014>implement <00:17:16.294>a <00:17:16.574>checking <00:17:16.855>account.

321
00:17:17.485 --> 00:17:20.265
<00:17:17.484>So <00:17:17.685>basically <00:17:17.885>you <00:17:18.084>can <00:17:18.284>spend, <00:17:18.484>uh, <00:17:18.685>for <00:17:18.885>example,

322
00:17:20.325 --> 00:17:23.025
<00:17:20.325>you <00:17:20.465>can <00:17:20.605>set <00:17:20.745>a <00:17:20.885>daily <00:17:21.025>spending <00:17:21.165>limit <00:17:21.305>on <00:17:21.444>top <00:17:21.585>of <00:17:21.725>it,

323
00:17:23.285 --> 00:17:25.865
<00:17:23.285>so <00:17:23.518>you <00:17:23.751>can <00:17:23.985>never <00:17:24.218>get, <00:17:24.451>uh, <00:17:24.685>withdrawn

324
00:17:25.885 --> 00:17:28.425
<00:17:25.885>or <00:17:26.040>if <00:17:26.196>you <00:17:26.351>lose <00:17:26.507>your, <00:17:26.662>let's <00:17:26.818>say <00:17:26.973>your <00:17:27.129>private <00:17:27.285>key,

325
00:17:28.965 --> 00:17:31.745
<00:17:28.965>at <00:17:29.120>least <00:17:29.276>you <00:17:29.431>have <00:17:29.587>some <00:17:29.742>level <00:17:29.898>of <00:17:30.053>protection <00:17:30.209>is, <00:17:30.365>uh,

326
00:17:32.415 --> 00:17:35.825
<00:17:32.415>make <00:17:32.648>a <00:17:32.881>lot <00:17:33.115>of <00:17:33.348>the <00:17:33.581>practical <00:17:33.815>contracts.

327
00:17:36.805 --> 00:17:40.585
<00:17:36.805>So <00:17:36.932>enough <00:17:37.059>talk, <00:17:37.186>I <00:17:37.314>think, <00:17:37.441>uh, <00:17:37.568>we <00:17:37.695>talk <00:17:37.823>about <00:17:37.950>a <00:17:38.077>lot <00:17:38.205>of,

328
00:17:40.585 --> 00:17:42.065
<00:17:40.585>uh, <00:17:41.251>contract <00:17:41.917>examples.

329
00:17:42.405 --> 00:17:47.265
<00:17:42.405>So <00:17:42.532>I'm <00:17:42.659>going <00:17:42.786>to <00:17:42.914>show <00:17:43.041>you <00:17:43.168>one <00:17:43.295>that's <00:17:43.423>working <00:17:43.550>on <00:17:43.677>the <00:17:43.805>today.

330
00:17:48.085 --> 00:17:51.515
<00:17:48.085>So <00:17:48.260>it's, <00:17:48.435>uh, <00:17:48.610>it's <00:17:48.785>a <00:17:48.960>fully <00:17:49.135>owned <00:17:49.310>chain <00:17:49.485>TicTacToe.

331
00:17:51.895 --> 00:17:54.995
<00:17:51.895>So <00:17:52.070>basically <00:17:52.245>you <00:17:52.420>can <00:17:52.595>go <00:17:52.770>to <00:17:52.945>our <00:17:53.120>official <00:17:53.295>website,

332
00:17:55.135 --> 00:17:57.675
<00:17:55.135>got <00:17:55.415>s <00:17:55.695>script <00:17:55.975>io <00:17:56.254>slash <00:17:56.535>TicTacToe.

333
00:17:57.855 --> 00:17:59.195
<00:17:57.855>You <00:17:58.096>can <00:17:58.337>play <00:17:58.578>with <00:17:58.819>it <00:17:59.061>today.

334
00:18:00.055 --> 00:18:03.035
<00:18:00.055>So <00:18:00.230>let <00:18:00.405>me <00:18:00.580>actually <00:18:00.755>demonstrate, <00:18:00.930>uh, <00:18:01.105>how <00:18:01.280>this <00:18:01.455>works.

335
00:18:04.815 --> 00:18:08.115
<00:18:04.815>So <00:18:04.970>on <00:18:05.126>my <00:18:05.281>screen, <00:18:05.437>on <00:18:05.592>the, <00:18:05.748>I <00:18:05.903>have <00:18:06.059>two <00:18:06.215>opponent,

336
00:18:08.165 --> 00:18:10.875
<00:18:08.165>which <00:18:08.398>I <00:18:08.631>already <00:18:08.865>set <00:18:09.098>up <00:18:09.331>be <00:18:09.565>beforehand.

337
00:18:11.335 --> 00:18:12.915
<00:18:11.335>So <00:18:11.535>we <00:18:11.735>have, <00:18:11.935>uh, <00:18:12.135>on <00:18:12.335>the <00:18:12.535>left <00:18:12.735>Alice,

338
00:18:13.535 --> 00:18:14.915
<00:18:13.535>and <00:18:13.742>on <00:18:13.949>the <00:18:14.156>right <00:18:14.363>we <00:18:14.570>have <00:18:14.777>Bob.

339
00:18:15.415 --> 00:18:17.835
<00:18:15.415>So <00:18:15.881>Bob, <00:18:16.348>uh, <00:18:16.815>Alice,

340
00:18:18.815 --> 00:18:20.515
<00:18:18.815>uh, <00:18:19.165>makes <00:18:19.515>the <00:18:19.865>first <00:18:20.215>move.

341
00:18:20.815 --> 00:18:22.235
<00:18:20.815>So <00:18:21.070>now <00:18:21.326>he's, <00:18:21.581>uh, <00:18:21.837>Bob's <00:18:22.092>turn.

342
00:18:22.375 --> 00:18:25.475
<00:18:22.375>Bob <00:18:22.550>going <00:18:22.725>to, <00:18:22.900>let's <00:18:23.075>say, <00:18:23.250>uh, <00:18:23.425>make <00:18:23.600>another <00:18:23.775>move.

343
00:18:25.665 --> 00:18:29.755
<00:18:25.665>He's <00:18:25.820>press <00:18:25.976>a <00:18:26.131>big <00:18:26.287>O <00:18:26.442>here <00:18:26.598>and <00:18:26.753>now <00:18:26.909>it's <00:18:27.065>turn.

344
00:18:29.765 --> 00:18:33.475
<00:18:29.765>Alice <00:18:29.905>can <00:18:30.045>say, <00:18:30.185>oh, <00:18:30.325>let's, <00:18:30.465>uh, <00:18:30.605>place <00:18:30.745>it <00:18:30.885>in <00:18:31.025>the <00:18:31.165>center.

345
00:18:33.975 --> 00:18:38.795
<00:18:33.975>So <00:18:34.102>be <00:18:34.229>careful. <00:18:34.356>Uh, <00:18:34.484>the, <00:18:34.611>it <00:18:34.738>is <00:18:34.865>worth <00:18:34.993>noting <00:18:35.120>that <00:18:35.247>all <00:18:35.375>this

346
00:18:40.445 --> 00:18:43.155
<00:18:40.445>Moves, <00:18:40.645>each <00:18:40.845>move <00:18:41.044>is <00:18:41.245>actually <00:18:41.445>a <00:18:41.645>Bitcoin <00:18:41.845>transaction.

347
00:18:43.495 --> 00:18:47.035
<00:18:43.495>So <00:18:43.622>for <00:18:43.749>example, <00:18:43.876>if <00:18:44.004>you <00:18:44.131>click <00:18:44.258>here, <00:18:44.385>you <00:18:44.513>can <00:18:44.640>actually <00:18:44.767>take <00:18:44.895>you

348
00:18:47.095 --> 00:18:51.515
<00:18:47.095>to <00:18:47.270>the <00:18:47.445>block <00:18:47.620>experi, <00:18:47.795>which, <00:18:47.970>uh, <00:18:48.145>have <00:18:48.320>least <00:18:48.495>favorite.

349
00:18:51.655 --> 00:18:53.195
<00:18:51.655>Uh, <00:18:51.932>I <00:18:52.209>used <00:18:52.486>watch <00:18:52.763>chain <00:18:53.041>here.

350
00:18:53.195 --> 00:18:54.835
<00:18:53.195>So <00:18:53.395>basically <00:18:53.595>you <00:18:53.794>can <00:18:53.995>look <00:18:54.195>at <00:18:54.395>each <00:18:54.595>step.

351
00:18:55.255 --> 00:18:56.275
<00:18:55.255>If <00:18:55.561>you, <00:18:55.867>by <00:18:56.173>clicking,

352
00:18:56.615 --> 00:18:59.755
<00:18:56.615>you <00:18:56.770>can <00:18:56.926>see <00:18:57.081>all <00:18:57.237>this <00:18:57.392>is <00:18:57.548>actually <00:18:57.703>own <00:18:57.859>chain <00:18:58.015>transaction.

353
00:18:59.755 --> 00:19:01.955
<00:18:59.755>Each <00:19:00.035>of <00:19:00.315>them <00:19:00.595>is <00:19:00.875>one <00:19:01.155>transaction.

354
00:19:02.575 --> 00:19:05.155
<00:19:02.575>So <00:19:02.775>now <00:19:02.975>let's <00:19:03.175>keep <00:19:03.375>playing <00:19:03.575>the <00:19:03.775>Bob <00:19:03.975>Stern.

355
00:19:05.335 --> 00:19:09.705
<00:19:05.335>Bob, <00:19:05.535>lets <00:19:05.735>say <00:19:05.935>it's <00:19:06.135>not, <00:19:06.335>uh, <00:19:06.535>super <00:19:06.735>strategic.

356
00:19:09.805 --> 00:19:12.905
<00:19:09.805>So <00:19:10.038>he <00:19:10.271>makes <00:19:10.505>this, <00:19:10.738>uh, <00:19:10.971>fatal <00:19:11.205>mistake.

357
00:19:13.005 --> 00:19:15.785
<00:19:13.005>And, <00:19:13.205>uh, <00:19:13.405>if <00:19:13.605>you <00:19:13.805>like, <00:19:14.005>Alice <00:19:14.205>is <00:19:14.405>going

358
00:19:15.785 --> 00:19:17.185
<00:19:15.785>to <00:19:15.995>make <00:19:16.205>the <00:19:16.415>next <00:19:16.625>move, <00:19:16.835>okay, <00:19:17.045>boom.

359
00:19:17.925 --> 00:19:19.505
<00:19:17.925>She <00:19:18.274>just, <00:19:18.625>she <00:19:18.975>just <00:19:19.325>won.

360
00:19:19.845 --> 00:19:23.505
<00:19:19.845>So <00:19:20.078>now <00:19:20.311>all, <00:19:20.545>uh, <00:19:20.778>all <00:19:21.011>the <00:19:21.245>funds

361
00:19:23.605 --> 00:19:27.705
<00:19:23.605>that's <00:19:23.760>lock <00:19:23.916>up <00:19:24.071>in <00:19:24.227>the <00:19:24.382>original <00:19:24.538>betting <00:19:24.693>contract <00:19:24.849>is <00:19:25.005>going

362
00:19:27.705 --> 00:19:28.865
<00:19:27.705>to <00:19:27.913>be <00:19:28.122>sent <00:19:28.331>to <00:19:28.540>her <00:19:28.749>address.

363
00:19:29.445 --> 00:19:32.225
<00:19:29.445>And, <00:19:29.600>uh, <00:19:29.756>but <00:19:29.911>there's <00:19:30.067>no <00:19:30.222>way <00:19:30.378>for <00:19:30.533>Bob <00:19:30.689>to <00:19:30.845>cheat.

364
00:19:32.605 --> 00:19:37.595
<00:19:32.605>So <00:19:32.721>that's <00:19:32.838>why <00:19:32.955>the <00:19:33.071>benefit <00:19:33.188>of, <00:19:33.305>uh, <00:19:33.421>doing <00:19:33.538>a <00:19:33.655>lot <00:19:33.771>of, <00:19:33.888>uh, <00:19:34.005>um,

365
00:19:37.625 --> 00:19:42.035
<00:19:37.625>peer <00:19:37.780>to <00:19:37.936>peer <00:19:38.091>own <00:19:38.247>chain <00:19:38.402>games <00:19:38.558>because, <00:19:38.713>uh, <00:19:38.869>it's <00:19:39.025>transparent

366
00:19:42.575 --> 00:19:45.555
<00:19:42.575>and, <00:19:42.730>uh, <00:19:42.886>everybody <00:19:43.041>has <00:19:43.197>to <00:19:43.352>abide <00:19:43.508>by <00:19:43.663>the <00:19:43.819>gaming <00:19:43.975>rule.

367
00:19:45.555 --> 00:19:48.975
<00:19:45.555>There's <00:19:45.710>no <00:19:45.866>way <00:19:46.021>to <00:19:46.177>cheat. <00:19:46.332>So <00:19:46.488>let's, <00:19:46.643>uh, <00:19:46.799>coming <00:19:46.955>back,

368
00:19:59.905 --> 00:20:04.875
<00:19:59.905>Okay, <00:20:00.138>so <00:20:00.371>we <00:20:00.605>have, <00:20:00.838>uh, <00:20:01.071>demonstrated, <00:20:01.305>uh,

369
00:20:04.945 --> 00:20:07.915
<00:20:04.945>what, <00:20:05.225>uh, <00:20:05.504>the <00:20:05.784>transaction <00:20:06.064>technique <00:20:06.345>is.

370
00:20:08.095 --> 00:20:10.755
<00:20:08.095>It <00:20:08.270>looks <00:20:08.445>very <00:20:08.620>simple <00:20:08.795>at <00:20:08.970>the, <00:20:09.145>at <00:20:09.320>first <00:20:09.495>class,

371
00:20:11.095 --> 00:20:13.955
<00:20:11.095>but, <00:20:11.250>uh, <00:20:11.406>we <00:20:11.561>briefly <00:20:11.717>also <00:20:11.872>talk <00:20:12.028>about <00:20:12.183>how <00:20:12.339>is, <00:20:12.495>uh,

372
00:20:13.955 --> 00:20:17.395
<00:20:13.955>implemented <00:20:14.155>internally, <00:20:14.355>which, <00:20:14.554>uh, <00:20:14.754>you, <00:20:14.955>if <00:20:15.155>you <00:20:15.355>want

373
00:20:17.395 --> 00:20:19.195
<00:20:17.395>to <00:20:17.628>understand, <00:20:17.861>you <00:20:18.095>can <00:20:18.328>answer, <00:20:18.561>but <00:20:18.795>this,

374
00:20:19.225 --> 00:20:23.475
<00:20:19.225>because <00:20:19.341>at <00:20:19.458>as <00:20:19.574>script, <00:20:19.691>we <00:20:19.808>wrap <00:20:19.925>it <00:20:20.041>up <00:20:20.158>in <00:20:20.274>a <00:20:20.391>very <00:20:20.508>high, <00:20:20.625>uh,

375
00:20:23.545 --> 00:20:27.475
<00:20:23.545>high <00:20:23.700>level <00:20:23.856>language <00:20:24.011>and <00:20:24.167>also <00:20:24.322>in <00:20:24.478>a <00:20:24.633>very <00:20:24.789>simple <00:20:24.945>library.

376
00:20:28.015 --> 00:20:29.915
<00:20:28.015>You <00:20:28.215>can <00:20:28.415>just, <00:20:28.615>with <00:20:28.815>one <00:20:29.015>line, <00:20:29.215>you <00:20:29.415>can,

377
00:20:30.055 --> 00:20:31.315
<00:20:30.055>you <00:20:30.338>can <00:20:30.622>use <00:20:30.905>this <00:20:31.189>technique,

378
00:20:31.575 --> 00:20:33.075
<00:20:31.575>you <00:20:31.800>don't <00:20:32.025>have <00:20:32.250>to <00:20:32.475>code <00:20:32.700>up <00:20:32.925>anything.

379
00:20:33.455 --> 00:20:36.875
<00:20:33.455>So <00:20:33.655>once <00:20:33.855>you <00:20:34.054>have <00:20:34.254>this, <00:20:34.455>uh, <00:20:34.655>technique <00:20:34.855>building,

380
00:20:37.015 --> 00:20:41.875
<00:20:37.015>you <00:20:37.215>can <00:20:37.415>build <00:20:37.615>a <00:20:37.815>lot <00:20:38.015>of, <00:20:38.215>uh, <00:20:38.415>Contracts

381
00:20:42.025 --> 00:20:44.635
<00:20:42.025>that <00:20:42.258>which <00:20:42.491>was, <00:20:42.725>uh, <00:20:42.958>given <00:20:43.191>impossible <00:20:43.425>before.

382
00:20:44.695 --> 00:20:46.275
<00:20:44.695>So <00:20:44.928>I <00:20:45.161>showed, <00:20:45.395>uh, <00:20:45.628>quite <00:20:45.861>a <00:20:46.095>few.

383
00:20:46.375 --> 00:20:50.525
<00:20:46.375>For <00:20:46.502>example, <00:20:46.629>I <00:20:46.756>showed <00:20:46.884>you <00:20:47.011>how <00:20:47.138>to <00:20:47.265>do <00:20:47.393>control, <00:20:47.520>the, <00:20:47.647>the <00:20:47.775>output

384
00:20:50.525 --> 00:20:51.805
<00:20:50.525>of <00:20:50.909>the <00:20:51.293>spending <00:20:51.677>transaction,

385
00:20:52.225 --> 00:20:54.685
<00:20:52.225>and <00:20:52.425>also <00:20:52.625>I <00:20:52.824>show <00:20:53.024>you <00:20:53.225>how <00:20:53.425>to, <00:20:53.625>uh,

386
00:20:55.045 --> 00:20:59.205
<00:20:55.045>maintain <00:20:55.245>state <00:20:55.445>across <00:20:55.645>different, <00:20:55.845>uh, <00:20:56.045>smart <00:20:56.245>contract, <00:20:56.445>uh,

387
00:20:59.205 --> 00:21:01.525
<00:20:59.205>transactions <00:20:59.554>based <00:20:59.905>on <00:21:00.254>which <00:21:00.605>we

388
00:21:01.525 --> 00:21:02.645
<00:21:01.525>have <00:21:01.726>a <00:21:01.928>lot <00:21:02.129>of <00:21:02.331>other <00:21:02.533>contracts.

389
00:21:02.745 --> 00:21:05.885
<00:21:02.745>So <00:21:02.900>if <00:21:03.056>you <00:21:03.211>want <00:21:03.367>to <00:21:03.522>know <00:21:03.678>more, <00:21:03.833>just <00:21:03.989>go <00:21:04.145>to

390
00:21:06.985 --> 00:21:11.525
<00:21:06.985>our <00:21:07.185>homepage@sscript.io, <00:21:07.385>which, <00:21:07.584>uh, <00:21:07.784>we <00:21:07.985>can, <00:21:08.185>we, <00:21:08.385>we,

391
00:21:11.705 --> 00:21:13.925
<00:21:11.705>we <00:21:11.938>release <00:21:12.171>all <00:21:12.405>the <00:21:12.638>code, <00:21:12.871>open <00:21:13.105>source,

392
00:21:14.145 --> 00:21:17.365
<00:21:14.145>we <00:21:14.320>just <00:21:14.495>mentioned <00:21:14.670>all <00:21:14.845>the <00:21:15.020>contract <00:21:15.195>examples <00:21:15.370>like <00:21:15.545>Tacto

393
00:21:17.365 --> 00:21:20.085
<00:21:17.365>or <00:21:17.598>Game <00:21:17.831>Live <00:21:18.065>or <00:21:18.298>even, <00:21:18.531>uh, <00:21:18.765>auction.

394
00:21:20.355 --> 00:21:23.685
<00:21:20.355>It's <00:21:20.482>all <00:21:20.609>open <00:21:20.736>source. <00:21:20.864>If <00:21:20.991>from <00:21:21.118>the <00:21:21.245>homepage <00:21:21.373>you <00:21:21.500>can <00:21:21.627>click <00:21:21.755>go

395
00:21:23.765 --> 00:21:25.125
<00:21:23.765>to <00:21:24.173>our <00:21:24.581>GitHub <00:21:24.989>page.

396
00:21:25.305 --> 00:21:28.725
<00:21:25.305>You <00:21:25.460>are <00:21:25.616>also <00:21:25.771>very <00:21:25.927>welcome <00:21:26.082>to <00:21:26.238>join <00:21:26.393>our <00:21:26.549>Slack <00:21:26.705>channel.

397
00:21:29.465 --> 00:21:32.485
<00:21:29.465>So, <00:21:29.665>and, <00:21:29.865>uh, <00:21:30.064>we <00:21:30.264>discuss <00:21:30.465>all, <00:21:30.665>all <00:21:30.865>kinds

398
00:21:32.485 --> 00:21:35.325
<00:21:32.485>of <00:21:32.718>smart <00:21:32.951>counter <00:21:33.185>ideas <00:21:33.418>day, <00:21:33.651>almost <00:21:33.885>daily.

399
00:21:35.825 --> 00:21:40.525
<00:21:35.825>So <00:21:35.952>it <00:21:36.079>is <00:21:36.206>a <00:21:36.334>very <00:21:36.461>good <00:21:36.588>time <00:21:36.715>to <00:21:36.843>start <00:21:36.970>building. <00:21:37.097>Thank <00:21:37.225>you.