tx · 8bP92YyAG111dLAhgnToJPZjydh7iYjARKyp4D5U7JsK 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1: -0.01000000 Waves 2024.01.09 12:06 [2923745] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves
{ "type": 13, "id": "8bP92YyAG111dLAhgnToJPZjydh7iYjARKyp4D5U7JsK", "fee": 1000000, "feeAssetId": null, "timestamp": 1704791184205, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "yiFktKnahbL13SHdwUdAQ16VvFQLoURU3DyCMTvc7oNciswyysRSth7jcQBKFJ5pHmfKm7MDMs6UJZEHnRgFGxP" ], "script": "base64:BgIKCAISBgoECAEBARAADGNvbnRyYWN0RmlsZQIQdmVzdGluZ19uZW8ucmlkZQADU0VQAgJfXwARTUFYX1ZFU1RJTkdfQ09VTlQACgEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAANYXNzZXRJZFN0cmluZwkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQprZXlBc3NldElkAgVXQVZFUwAMYXNzZXRJZEJ5dGVzAwkAAAIFDWFzc2V0SWRTdHJpbmcCBVdBVkVTBQR1bml0CQDZBAEFDWFzc2V0SWRTdHJpbmcBFGlzVmFsaWRBZGRyZXNzU3RyaW5nAQ1hZGRyZXNzU3RyaW5nBAckbWF0Y2gwCQCmCAEFDWFkZHJlc3NTdHJpbmcDCQABAgUHJG1hdGNoMAIHQWRkcmVzcwQBYQUHJG1hdGNoMAYHAQ5rZXlVc2VyVmVzdGluZwILdXNlckFkZHJlc3MCaWQEBmNoZWNrcwkA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ucwEBaQEDZm9vBAt1c2VyQWRkcmVzcw12ZXN0aW5nQW1vdW50CnN0YXJ0QmxvY2sKbG9ja0xlbmd0aAkBFGdldE5ld1Zlc3RpbmdBY3Rpb25zBQULdXNlckFkZHJlc3MAAAUNdmVzdGluZ0Ftb3VudAUKc3RhcnRCbG9jawUKbG9ja0xlbmd0aAAeA+ni", "height": 2923745, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AkJqAGEiwucVRK15PBpN6JH2StKnrt4teCcLNTt6qVNF Next: 4K6cyaXp2pbGoWJ1rWXvfN1ipf3eoyL7zEkRGnBRrQoh Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | - | let c = | |
8 | + | let c = 10 | |
9 | 9 | ||
10 | 10 | func d (e) = throw(((a + ": ") + e)) | |
11 | 11 | ||
113 | 113 | func J (n,o,r,s,t) = [StringEntry(m(n, o), q(r, s, t))] | |
114 | 114 | ||
115 | 115 | ||
116 | - | @Callable(K) | |
116 | + | func K (n) = { | |
117 | + | func L (M,l) = { | |
118 | + | let N = M | |
119 | + | let O = N._1 | |
120 | + | let P = N._2 | |
121 | + | $Tuple2((O ++ F(n, P)), (P + 1)) | |
122 | + | } | |
123 | + | ||
124 | + | let Q = { | |
125 | + | let R = nil | |
126 | + | let S = size(R) | |
127 | + | let T = $Tuple2(nil, 0) | |
128 | + | func U (V,W) = if ((W >= S)) | |
129 | + | then V | |
130 | + | else L(V, R[W]) | |
131 | + | ||
132 | + | func X (V,W) = if ((W >= S)) | |
133 | + | then V | |
134 | + | else throw("List size exceeds 10") | |
135 | + | ||
136 | + | X(U(U(U(U(U(U(U(U(U(U(T, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
137 | + | } | |
138 | + | let O = Q._1 | |
139 | + | let Y = Q._2 | |
140 | + | O | |
141 | + | } | |
142 | + | ||
143 | + | ||
144 | + | @Callable(Z) | |
117 | 145 | func foo (n,r,s,t) = J(n, 0, r, s, t) | |
118 | 146 | ||
119 | 147 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "vesting_neo.ride" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | - | let c = | |
8 | + | let c = 10 | |
9 | 9 | ||
10 | 10 | func d (e) = throw(((a + ": ") + e)) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | let f = makeString(["%s", "assetId"], b) | |
14 | 14 | ||
15 | 15 | let g = valueOrElse(getString(this, f), "WAVES") | |
16 | 16 | ||
17 | 17 | let h = if ((g == "WAVES")) | |
18 | 18 | then unit | |
19 | 19 | else fromBase58String(g) | |
20 | 20 | ||
21 | 21 | func i (j) = { | |
22 | 22 | let k = addressFromString(j) | |
23 | 23 | if ($isInstanceOf(k, "Address")) | |
24 | 24 | then { | |
25 | 25 | let l = k | |
26 | 26 | true | |
27 | 27 | } | |
28 | 28 | else false | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func m (n,o) = { | |
33 | 33 | let p = [if (i(n)) | |
34 | 34 | then true | |
35 | 35 | else d(makeString(["address is not valid:", n], " ")), if (if ((o >= 0)) | |
36 | 36 | then (c > o) | |
37 | 37 | else false) | |
38 | 38 | then true | |
39 | 39 | else d(makeString(["id is invalid:", toString(o)], " "))] | |
40 | 40 | if ((p == p)) | |
41 | 41 | then makeString(["%s%d", n, toString(o)], b) | |
42 | 42 | else throw("Strict value is not equal to itself.") | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func q (r,s,t) = { | |
47 | 47 | let p = [if ((r >= 0)) | |
48 | 48 | then true | |
49 | 49 | else d("vesting amount cannot be negative"), if ((s >= 0)) | |
50 | 50 | then true | |
51 | 51 | else d("start block cannot be negative"), if ((t >= 0)) | |
52 | 52 | then true | |
53 | 53 | else d("lock length cannot be negative")] | |
54 | 54 | if ((p == p)) | |
55 | 55 | then makeString(["%d%d%d", toString(r), toString(s), toString(t)], b) | |
56 | 56 | else throw("Strict value is not equal to itself.") | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func u (n,o) = { | |
61 | 61 | let k = getString(this, m(n, o)) | |
62 | 62 | if ($isInstanceOf(k, "String")) | |
63 | 63 | then { | |
64 | 64 | let v = k | |
65 | 65 | let w = split(v, b) | |
66 | 66 | let r = parseIntValue(w[1]) | |
67 | 67 | let s = parseIntValue(w[2]) | |
68 | 68 | let t = parseIntValue(w[3]) | |
69 | 69 | $Tuple3(r, s, t) | |
70 | 70 | } | |
71 | 71 | else $Tuple3(0, 0, 0) | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func x (y,s,t) = { | |
76 | 76 | let z = (height - s) | |
77 | 77 | let A = if (if ((t != 0)) | |
78 | 78 | then (z > 0) | |
79 | 79 | else false) | |
80 | 80 | then min([fraction(y, z, t), y]) | |
81 | 81 | else 0 | |
82 | 82 | $Tuple2(A, (y - A)) | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func B (n,o) = { | |
87 | 87 | let C = u(n, o) | |
88 | 88 | let r = C._1 | |
89 | 89 | let s = C._2 | |
90 | 90 | let t = C._3 | |
91 | 91 | let D = x(r, s, t) | |
92 | 92 | let A = D._1 | |
93 | 93 | let E = D._2 | |
94 | 94 | $Tuple2(A, E) | |
95 | 95 | } | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func F (n,o) = { | |
99 | 99 | let G = u(n, o) | |
100 | 100 | let r = G._1 | |
101 | 101 | let s = G._2 | |
102 | 102 | let t = G._3 | |
103 | 103 | let H = B(n, o) | |
104 | 104 | let A = H._1 | |
105 | 105 | let E = H._2 | |
106 | 106 | let I = max([((s + t) - height), 0]) | |
107 | 107 | if ((A != 0)) | |
108 | 108 | then [ScriptTransfer(addressFromStringValue(n), A, h), StringEntry(m(n, o), q(E, height, I))] | |
109 | 109 | else nil | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func J (n,o,r,s,t) = [StringEntry(m(n, o), q(r, s, t))] | |
114 | 114 | ||
115 | 115 | ||
116 | - | @Callable(K) | |
116 | + | func K (n) = { | |
117 | + | func L (M,l) = { | |
118 | + | let N = M | |
119 | + | let O = N._1 | |
120 | + | let P = N._2 | |
121 | + | $Tuple2((O ++ F(n, P)), (P + 1)) | |
122 | + | } | |
123 | + | ||
124 | + | let Q = { | |
125 | + | let R = nil | |
126 | + | let S = size(R) | |
127 | + | let T = $Tuple2(nil, 0) | |
128 | + | func U (V,W) = if ((W >= S)) | |
129 | + | then V | |
130 | + | else L(V, R[W]) | |
131 | + | ||
132 | + | func X (V,W) = if ((W >= S)) | |
133 | + | then V | |
134 | + | else throw("List size exceeds 10") | |
135 | + | ||
136 | + | X(U(U(U(U(U(U(U(U(U(U(T, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
137 | + | } | |
138 | + | let O = Q._1 | |
139 | + | let Y = Q._2 | |
140 | + | O | |
141 | + | } | |
142 | + | ||
143 | + | ||
144 | + | @Callable(Z) | |
117 | 145 | func foo (n,r,s,t) = J(n, 0, r, s, t) | |
118 | 146 | ||
119 | 147 |
github/deemru/w8io/169f3d6 26.49 ms ◑