-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
631 lines (462 loc) Β· 9.79 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>RAEN in NEAR's desert: tooling for ambitious Open Web apps</title>
<link rel="icon" href="../favicon.svg" />
<link rel="stylesheet" href="../styles.css" />
</head>
<body>
<textarea id="source" style="display:none">
class: small, left
## π§ RAEN in NEAR's desert: tooling for ambitious Open Web apps
*How to use the slides*:
* <kbd>P</kbd> toggle presenter notes
* <kbd>?</kbd> help menu
* <kbd>→</kbd> next slide
Also, here's the [source](https://github.com/raendev/talks/tree/main/nf-pitch) and a [standalone version](../nf-pitch-standalone/)
---
class:small
# π§
# RAEN in NEAR's desert: *tooling for ambitious Open Web apps*
<small>@raendev</small>
---
???
We're gonna talk about two problems,
a big problem and a small problem.
---
# *1*
???
The big problem is ecosystem-wide,
blockchain-ecosystem-wide,
dapp/web3/Open Web/dweb-ecosystem-wide,
and that problem is this:
--
no one knows how to build dapps
???
No one knows how to build dapps!
Ok that's not strictly true,
some people have figured out some
useful patterns. But good luck
figuring out those patterns
if you're new.
Most people don't know,
most documentation doesn't go that far,
most tooling isn't that expansive.
---
# *2*
???
The small problem is with NEAR smart contracts.
--
black boxes
???
They're black boxes.
They don't play nicely with others.
Only the author of a contract
can really dig in
and figure out how to interact with that contract.
Everyone else needs to search for the source code,
or deconstruct web app workflows,
or give up.
---
???
And now I assert
--
## *2*
???
that solving the small problem
--
π
--
## *1*
???
is key to fixing the big one.
---
???
And if that's true, that's great!
Because we already solved the small problem.
The solution
--
# *RAEN*
???
is RAEN.
---
???
To understand RAEN,
let's see how other people solved this problem.
Ethereum solved it with
--
# *ABI*
???
an "ABI" system.
ABIs are JSON files,
generated from a smart contract,
that contract authors distribute off-chain,
using GitHub or some other system.
(Pagoda fka Near Inc are copying this system.)
---
class: small
*WebAssembly* aka *Wasm*
???
WebAssembly aka Wasm (NEAR's runtime VM),
are solving this same problem
---
# *WIT*
???
with Wit,
--
*WebAssembly*
???
WebAssembly
--
*Interface*
???
Interface
--
*Types*
???
Types.
More compact and readable
than the JSON of ABIs,
Wit fits easily into a Custom Section
of a deployed smart contract.
So that's exactly what RAEN does.
---
<svg viewBox="0 0 16 16" version="1.1" width="75vmin" height="75vmin" aria-hidden="true"><path fill="#3fb950" fill-rule="evenodd" d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"></path></svg>
???
This leapfrogs the ABI system.
RAEN inspects your Rust smart contract
and generates Wit from it;
compiles your contract,
injects the Wit,
and compresses the whole thing,
making the end result smaller
than if you built without RAEN.
Now anyone can generate
any tooling they need
for any given smart contract.
---
class: left
# *some-contract.near*
???
Just by knowing a contract's name,
You can generate
--
βͺ *some-contract.json*
???
an ABI.
---
class: left
# *some-contract.near*
βͺ *some-contract.ts*
???
Or Typescript.
---
class: left
# *some-contract.near*
βͺ *some-contract.rs*
???
Or cross-contract calls.
---
class: left
# *some-contract.near*
βͺ *some-contract.sh*
???
Or a CLI.
---
[![Inspect some-contract.near using a schema built with RAEN and stored on NEAR](img/raen-admin.png)](https://raen.dev/admin)
???
Or an admin panel web app.
This one already exists.
It's called RAEN Admin.
You can `raen build` your contracts
and enjoy it
teach with it
collaborate with it
---
# *raen.dev/admin*
???
today.
---
???
A RAEN-maximized version of NEAR
becomes a fully-typed smart contract ecosystem,
a development platform
where all developers
can learn about
and script against
and build on top of
any already-deployed program
with confidence.
Which circles us back to
---
# *1*
no one knows how to build dapps
???
the big problem.
"No one knows how to build dapps"
and what this really means
is that we're all still figuring it out
together.
New patterns are emerging,
new visions gaining salience.
---
???
One vision for the Open Web
---
![](img/arch/thin-app.svg)
???
is thin apps
---
![](img/arch/thin-app-open-data.svg)
???
that access open data.
Apps that read, write, interact
with data from many smart contracts,
---
![](img/arch/thin-app-own-data.svg)
???
some the app developers wrote themselves,
---
![](img/arch/thin-app-other-data.svg)
???
some that pre-existedβ
public infrastructure.
---
???
And if that's your vision
what a boon
is a fully-typed ecosystem
of public infrastructure.
We're going long on this vision.
---
![](img/framework/build.svg)
???
RAEN, born a build tool,
will grow into a framework,
helping ambitious developers
---
![](img/framework/create.svg)
???
compose secure, well-architected smart contracts,
yes, and more than that.
Because ambitious apps
need more than just smart contracts.
---
![](img/framework/frontend.svg)
???
They need frontends,
---
![](img/framework/indexing.svg)
???
indexing layers,
---
![](img/framework/complete.svg)
???
off-chain storage.
RAEN will pull these all together,
as well as yet-undiscovered architectural patterns,
and help devs keep apps fresh
with all these latest discoveries
as they emerge.
---
class:left
???
Here's what this will look like in practice.
Let's follow three builders,
--
# π
???
Ali,
--
π
???
Bob, and
--
π¨
???
Cal.
---
class:left
# π
???
Ali just switched to NEAR
from some other blockchain,
and wants to build new defi offerings.
She opens her command line,
--
`raen generate contract amm`
???
types "raen generate contract amm",
gets a new Automated Market Maker contract,
--
`raen generate contract ft`
???
types "raen generate contract ft",
gets a new Fungible Token contract,
---
class:left
# π
```
βββ Raenfile
βββ contracts/
β βββ amm/
β βββ ft/
βββ tests/
```
???
and starts hooking them together,
feels immediately productive
and useful
in her new ecosystem
with her new programming language.
---
class:left
# π
???
Bob is a business founder frontend dev
with a product remixing data from
three existing contracts.
In his command line, he types
--
`raen new project --use`
???
"raen new project --use" followed by the names
of those
--
`contract1.near`
???
three
--
`contract2.near`
???
smart
--
`contract3.near`
???
contracts.
---
class:left
# π
```
βββ Raenfile
βββ frontend/
```
???
Gets a project configured
with a fully-typed frontend app,
that even gives him some reasonable starting UI,
---
class:left
# π
```
βββ Raenfile
βββ frontend/
βββ subgraphs/
```
???
and some Subgraph code to index those three contracts,
---
class:left
# π
```
βββ Raenfile
βββ frontend/
βββ subgraphs/
βββ tests/
```
???
and tests to show how it's done.
he's already busy building business logic;
doesn't need to bother with boilerplate
or any reverse engineering.
---
class:left
# π¨
???
Cal is making the switch from web2 to web3,
participating in their first hackathon.
--
`raen new project`
???
They type "raen new project",
get a tutorial appβ
---
class:left
# π¨
```
βββ Raenfile
βββ contracts/
βββ frontend/
βββ subgraphs/
βββ tests/
```
???
contracts, frontend, subgraphs, storage,
all hooked together.
They learn the ropes and build an app,
are proud of what they build,
continue hacking with their team after the awards ceremony,
grow the codebase easily from
proof of concept to
full-scale public infrastructure.
---
???
That's where we're headed.
That's how easy we want NEAR to be.
We will get there in six months.
And who are "we"
anyway?
---
*@chadoh*
![](img/chad.jpeg)
???
Mostly just me and this guy,
---
*@willemneal*
![](img/willem.jpeg)
???
Willem,
after parting ways with Near Inc last fall,
We wanted to keep working on NEAR;
explored other options,
but we're literally vested in NEAR,
and NEAR has the best developer experience,
best Account Name system,
best scaling architecture.
So in January we formed Aha Labs,
built RAEN in just 4 months
---
*read:* AhaLabs.dev
![](img/ahalabs-recap.png)
???
while delivering on multiple other commitments,
including the most-used NFT code in NEAR, TENK.
---
*pixel8.io*
![](img/pixel8.png)
???
We also collaborated with the Pixel8 team
to make RAEN Admin look slick,
and we'll merge with their team for these next
---
# π§
???
Six months.
A small team.
(A small budget!)
Shipping well-loved tools
above our weight class.
You'll love what we pull off.
--
raen.dev
twitter.com/raendev
github.com/raendev
???
Thanks for listening.
See you at NEARCON.
</textarea>
<script src="../remark-latest.min.js"></script>
<script>var slideshow = remark.create()</script>
</body>
</html>