-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
102 lines (83 loc) · 2.26 KB
/
test.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ride brush usage for SyntaxHighlighter.js</title>
</head>
<body>
<p>
JS:
<pre class="brush: js">
function test() {
let a = 5;
}
</pre>
</p>
<p>
Asset V3:
<pre class="brush: ride">
{-# STDLIB_VERSION 3 #-}
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ASSET #-}
let a = base58''
func asset() = Issue(...)
sigVerify(a, a, a) && a == (blake2b256(a) + keccak256(a) + sha256(a))
</pre>
</p>
<p>
DApp V3:
<pre class="brush: ride">
{-# STDLIB_VERSION 3 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}
@Callable(inv)
func foo(arg: Int) = {
ScriptResult(
TransferSet([
]),
WriteSet([
]),
)
}
@Verifier(txn)
func verify() = {
sigVerify(txn.bodyBytes, txn.proofs[0], txn.senderPublicKey)
}
</pre>
</p>
<p>
Asset V4:
<pre class="brush: ride">
{-# STDLIB_VERSION 4 #-}
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ASSET #-}
let a = base58''
func foldIter(acc: Int, item: Int) = acc + item
let fold = FOLD<10>([1, 2, 3, 4], 0, foldIter)
func asset() = Issue(...)
sigVerify_16Kb(a, a, a) && rsaVerify_32Kb(SHA3512, a, a, a) && a == (blake2b256_64Kb(a) + keccak256_128Kb(a) + sha256(a))
</pre>
</p>
<p>
DApp V5:
<pre class="brush: ride">
{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}
@Callable(inv)
func foo() = {
let dAppInner = Address(base58'3Pxxxx')
strict inner = invoke(dAppInner, "foonc", [], nil)
[]
}
</pre>
</p>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shCore.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shAutoloader.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushJScript.min.js"></script>
<script type="text/javascript" src="shBrushRide.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCore.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shThemeDefault.min.css" />
<script type="text/javascript">SyntaxHighlighter.all()</script>
</body>
</html>