tx · BHEjHgmBh55akQ9VE6ibfAYhfiSwqmW8uNYMb2gh8n63 3Mvsbd5G4Xoyy4ib7gLCVSix21CyMr4K7jb: -0.01500000 Waves 2023.07.27 12:32 [2684077] smart account 3Mvsbd5G4Xoyy4ib7gLCVSix21CyMr4K7jb > SELF 0.00000000 Waves
{ "type": 13, "id": "BHEjHgmBh55akQ9VE6ibfAYhfiSwqmW8uNYMb2gh8n63", "fee": 1500000, "feeAssetId": null, "timestamp": 1690450378670, "version": 2, "chainId": 84, "sender": "3Mvsbd5G4Xoyy4ib7gLCVSix21CyMr4K7jb", "senderPublicKey": "8fnW16MobFGpeokNqZLUEqPaJUXn5zaSGf4ch9A3Ctk7", "proofs": [ "241ctTGE99zkczDrKeRS6fd8RJ9kbYhUF9NmuvceUFj6pK7F9LSJA5cSnfcXHNk2zKwvHHyYgNNEt3yLGCNv8Rke" ], "script": "base64:BgIfCAISAwoBARIAEgMKAQgSAwoBARIDCgEIEgASAwoBCDAADGNvbnRyYWN0RmlsZQIRbDJtcF9zdGFraW5nLnJpZGUAA1NFUAICX18ABnNjYWxlOACAwtcvAAdzY2FsZTE4AICAkLu61q3wDQANc2NhbGUxOEJpZ0ludAkAtgIBBQdzY2FsZTE4ABJBRERSRVNTX0JZVEVTX1NJWkUAGgANQkxPQ0tTX0lOX0RBWQCgCwEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAATa2V5RW1pc3Npb25QZXJCbG9jawkAuQkCCQDMCAICAiVzCQDMCAICEGVtaXNzaW9uUGVyQmxvY2sFA25pbAUDU0VQABlrZXlFbWlzc2lvblBlcmlvZEluQmxvY2tzCQC5CQIJAMwIAgICJXMJAMwIAgIWZW1pc3Npb25QZXJpb2RJbkJsb2NrcwUDbmlsBQNTRVAADWtleVN0YXJ0QmxvY2sJALkJAgkAz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ZVEVTX0xFTkdUSAYJAQh0aHJvd0VycgEJAKwCAgUEdHhJZAISIGlzIG5vdCB2YWxpZCB0eElkCQDMCAIDAwkAAAIFEWFsbG93ZWRUeElkT3B0aW9uBQR1bml0BgkBAiE9AgkBBXZhbHVlAQURYWxsb3dlZFR4SWRPcHRpb24FBHR4SWQGCQEIdGhyb3dFcnIBCQCsAgIFBHR4SWQCEyBpcyBhbHJlYWR5IGFsbG93ZWQFA25pbAMJAAACBQNlcnIFA2VycgkBDHZvdGVJTlRFUk5BTAQFE2NhbGxlckFkZHJlc3NTdHJpbmcFCWtleVByZWZpeAUGUVVPUlVNBQZyZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAhieUFkbWlucwkAAAIIBQJ0eAJpZAkA2QQBCQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMJAQ5rZXlBbGxvd2VkVHhJZAACAAQHYnlPd25lcgMJAGcCCQCQAwEJAQ1nZXRBZG1pbnNMaXN0AAUGUVVPUlVNBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQMFCGJ5QWRtaW5zBgUHYnlPd25lckhMyrM=", "height": 2684077, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ha51a6tmTwi8QBQAPQiLmMvVdmnNyQRYii4b7W4iV2Gp Next: none Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = 1000000000000000000 | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = toBigInt(d) | |
13 | 13 | ||
14 | - | func f (g) = throw(((a + ": ") + g)) | |
14 | + | let f = 26 | |
15 | + | ||
16 | + | let g = 1440 | |
17 | + | ||
18 | + | func h (i) = throw(((a + ": ") + i)) | |
15 | 19 | ||
16 | 20 | ||
17 | - | let | |
21 | + | let j = makeString(["%s", "assetId"], b) | |
18 | 22 | ||
19 | - | let | |
23 | + | let k = makeString(["%s", "emissionPerBlock"], b) | |
20 | 24 | ||
21 | - | let | |
25 | + | let l = makeString(["%s", "emissionPeriodInBlocks"], b) | |
22 | 26 | ||
23 | - | let | |
27 | + | let m = makeString(["%s", "startBlock"], b) | |
24 | 28 | ||
25 | - | let | |
29 | + | let n = makeString(["%s", "totalLpAmount"], b) | |
26 | 30 | ||
27 | - | let | |
31 | + | let o = makeString(["%s", "totalAssetAmount"], b) | |
28 | 32 | ||
29 | - | func | |
33 | + | func p (q) = makeString(["%s%s", "userLpAmount", q], b) | |
30 | 34 | ||
31 | 35 | ||
32 | - | func | |
36 | + | func r (q) = makeString(["%s%s", "totalAssetWithdrawn", q], b) | |
33 | 37 | ||
34 | 38 | ||
35 | - | func | |
39 | + | func s (q) = makeString(["%s%s", "totalAssetStaked", q], b) | |
36 | 40 | ||
37 | 41 | ||
38 | - | let | |
42 | + | let t = valueOrElse(getInteger(this, n), 0) | |
39 | 43 | ||
40 | - | let | |
44 | + | let u = valueOrElse(getInteger(this, o), 0) | |
41 | 45 | ||
42 | - | let | |
46 | + | let v = valueOrElse(getString(this, j), "WAVES") | |
43 | 47 | ||
44 | - | let | |
48 | + | let w = if ((v == "WAVES")) | |
45 | 49 | then unit | |
46 | - | else fromBase58String( | |
50 | + | else fromBase58String(v) | |
47 | 51 | ||
48 | - | let | |
52 | + | let x = valueOrElse(getInteger(this, l), g) | |
49 | 53 | ||
50 | - | let | |
54 | + | let y = (valueOrElse(getInteger(this, k), 0) * x) | |
51 | 55 | ||
52 | - | let | |
56 | + | let z = fraction(height, 1, x) | |
53 | 57 | ||
54 | - | let | |
58 | + | let A = 5 | |
55 | 59 | ||
56 | - | let | |
60 | + | let B = 3 | |
57 | 61 | ||
58 | - | let | |
62 | + | let C = 32 | |
59 | 63 | ||
60 | - | func | |
64 | + | func D (E) = makeString(["%s%s%s", "allowTxId", E], b) | |
61 | 65 | ||
62 | 66 | ||
63 | - | func | |
67 | + | func F (G,H) = makeString([G, H], b) | |
64 | 68 | ||
65 | 69 | ||
66 | - | func | |
70 | + | func I () = makeString(["%s", "adminAddressList"], b) | |
67 | 71 | ||
68 | 72 | ||
69 | - | func | |
73 | + | func J () = makeString(["%s", "txId"], b) | |
70 | 74 | ||
71 | 75 | ||
72 | - | func | |
73 | - | let | |
74 | - | valueOrElse(getInteger( | |
76 | + | func K (G,L) = { | |
77 | + | let M = F(G, L) | |
78 | + | valueOrElse(getInteger(M), 0) | |
75 | 79 | } | |
76 | 80 | ||
77 | 81 | ||
78 | - | func | |
79 | - | let | |
80 | - | if ($isInstanceOf( | |
82 | + | func N () = { | |
83 | + | let O = getString(this, I()) | |
84 | + | if ($isInstanceOf(O, "String")) | |
81 | 85 | then { | |
82 | - | let | |
83 | - | split( | |
86 | + | let P = O | |
87 | + | split(P, b) | |
84 | 88 | } | |
85 | 89 | else nil | |
86 | 90 | } | |
87 | 91 | ||
88 | 92 | ||
89 | - | func | |
93 | + | func Q (R) = containsElement(N(), R) | |
90 | 94 | ||
91 | 95 | ||
92 | - | func | |
93 | - | let | |
94 | - | let | |
95 | - | let | |
96 | - | $Tuple2(( | |
96 | + | func S (T,H) = { | |
97 | + | let U = T | |
98 | + | let V = U._1 | |
99 | + | let G = U._2 | |
100 | + | $Tuple2((V :+ F(G, H)), G) | |
97 | 101 | } | |
98 | 102 | ||
99 | 103 | ||
100 | - | func | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | func | |
107 | - | then | |
108 | - | else | |
104 | + | func W (X) = { | |
105 | + | let Y = I() | |
106 | + | let Z = { | |
107 | + | let aa = N() | |
108 | + | let ab = size(aa) | |
109 | + | let ac = $Tuple2(nil, X) | |
110 | + | func ad (ae,af) = if ((af >= ab)) | |
111 | + | then ae | |
112 | + | else S(ae, aa[af]) | |
109 | 113 | ||
110 | - | func | |
111 | - | then | |
114 | + | func ag (ae,af) = if ((af >= ab)) | |
115 | + | then ae | |
112 | 116 | else throw("List size exceeds 5") | |
113 | 117 | ||
114 | - | | |
118 | + | ag(ad(ad(ad(ad(ad(ac, 0), 1), 2), 3), 4), 5) | |
115 | 119 | } | |
116 | - | let | |
117 | - | let | |
118 | - | | |
120 | + | let V = Z._1 | |
121 | + | let G = Z._2 | |
122 | + | V | |
119 | 123 | } | |
120 | 124 | ||
121 | 125 | ||
122 | - | func | |
126 | + | func ah (V,M) = (V + valueOrElse(getInteger(M), 0)) | |
123 | 127 | ||
124 | 128 | ||
125 | - | func | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | func | |
131 | - | then | |
132 | - | else | |
129 | + | func ai (G) = { | |
130 | + | let aj = W(G) | |
131 | + | let aa = aj | |
132 | + | let ab = size(aa) | |
133 | + | let ac = 0 | |
134 | + | func ad (ae,af) = if ((af >= ab)) | |
135 | + | then ae | |
136 | + | else ah(ae, aa[af]) | |
133 | 137 | ||
134 | - | func | |
135 | - | then | |
138 | + | func ag (ae,af) = if ((af >= ab)) | |
139 | + | then ae | |
136 | 140 | else throw("List size exceeds 5") | |
137 | 141 | ||
138 | - | | |
142 | + | ag(ad(ad(ad(ad(ad(ac, 0), 1), 2), 3), 4), 5) | |
139 | 143 | } | |
140 | 144 | ||
141 | 145 | ||
142 | - | func | |
146 | + | func ak (V,al) = (V :+ DeleteEntry(al)) | |
143 | 147 | ||
144 | 148 | ||
145 | - | func | |
146 | - | let | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | func | |
151 | - | then | |
152 | - | else | |
149 | + | func am (G) = { | |
150 | + | let aj = W(G) | |
151 | + | let aa = aj | |
152 | + | let ab = size(aa) | |
153 | + | let ac = nil | |
154 | + | func ad (ae,af) = if ((af >= ab)) | |
155 | + | then ae | |
156 | + | else ak(ae, aa[af]) | |
153 | 157 | ||
154 | - | func | |
155 | - | then | |
158 | + | func ag (ae,af) = if ((af >= ab)) | |
159 | + | then ae | |
156 | 160 | else throw("List size exceeds 5") | |
157 | 161 | ||
158 | - | | |
162 | + | ag(ad(ad(ad(ad(ad(ac, 0), 1), 2), 3), 4), 5) | |
159 | 163 | } | |
160 | 164 | ||
161 | 165 | ||
162 | - | func | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
166 | - | then | |
167 | - | else if (( | |
168 | - | then | |
166 | + | func an (ao,X,ap,aq) = { | |
167 | + | let M = F(X, ao) | |
168 | + | let ar = K(X, ao) | |
169 | + | let as = if (!(Q(ao))) | |
170 | + | then h((("Address: " + ao) + " not in Admin list")) | |
171 | + | else if ((ar == 1)) | |
172 | + | then h((M + " you already voted")) | |
169 | 173 | else unit | |
170 | - | if (( | |
174 | + | if ((as == as)) | |
171 | 175 | then { | |
172 | - | let | |
173 | - | if ((( | |
176 | + | let aj = ai(X) | |
177 | + | if (((aj + 1) >= ap)) | |
174 | 178 | then { | |
175 | - | let | |
176 | - | ( | |
179 | + | let at = am(X) | |
180 | + | (at ++ aq) | |
177 | 181 | } | |
178 | - | else [IntegerEntry( | |
182 | + | else [IntegerEntry(M, 1)] | |
179 | 183 | } | |
180 | 184 | else throw("Strict value is not equal to itself.") | |
181 | 185 | } | |
182 | 186 | ||
183 | 187 | ||
184 | - | func | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | max([0, ( | |
188 | + | func au () = { | |
189 | + | let av = valueOrElse(getInteger(this, m), 0) | |
190 | + | let aw = fraction(av, 1, x) | |
191 | + | let ax = (z - aw) | |
192 | + | max([0, (y * ax)]) | |
189 | 193 | } | |
190 | 194 | ||
191 | 195 | ||
192 | - | func | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | if ($isInstanceOf( | |
196 | + | func ay () = { | |
197 | + | let az = (u + au()) | |
198 | + | let aA = { | |
199 | + | let O = w | |
200 | + | if ($isInstanceOf(O, "Unit")) | |
197 | 201 | then { | |
198 | - | let | |
199 | - | min([ | |
202 | + | let aB = O | |
203 | + | min([az, wavesBalance(this).available]) | |
200 | 204 | } | |
201 | - | else if ($isInstanceOf( | |
205 | + | else if ($isInstanceOf(O, "ByteVector")) | |
202 | 206 | then { | |
203 | - | let | |
204 | - | min([ | |
207 | + | let aC = O | |
208 | + | min([az, assetBalance(this, aC)]) | |
205 | 209 | } | |
206 | 210 | else throw("Match error") | |
207 | 211 | } | |
208 | - | if (( | |
212 | + | if ((t == 0)) | |
209 | 213 | then 0 | |
210 | - | else | |
214 | + | else aA | |
211 | 215 | } | |
212 | 216 | ||
213 | 217 | ||
214 | - | func | |
215 | - | then fraction( | |
216 | - | else | |
218 | + | func aD () = if ((t != 0)) | |
219 | + | then fraction(toBigInt(ay()), e, toBigInt(t)) | |
220 | + | else e | |
217 | 221 | ||
218 | 222 | ||
219 | - | func | |
223 | + | func aE (q) = valueOrElse(getInteger(this, p(q)), 0) | |
220 | 224 | ||
221 | 225 | ||
222 | - | func | |
223 | - | let | |
224 | - | let | |
225 | - | if ((0 > | |
226 | + | func aF (q) = { | |
227 | + | let aG = aE(q) | |
228 | + | let aH = toInt(fraction(toBigInt(aG), aD(), e)) | |
229 | + | if ((0 > aH)) | |
226 | 230 | then 0 | |
227 | - | else | |
231 | + | else aH | |
228 | 232 | } | |
229 | 233 | ||
230 | 234 | ||
231 | - | func | |
232 | - | let | |
235 | + | func aI (aJ,q) = { | |
236 | + | let aK = [if ((size(aJ.payments) == 1)) | |
233 | 237 | then true | |
234 | - | else | |
238 | + | else h("should include 1 payment"), if ((aJ.payments[0].assetId == w)) | |
235 | 239 | then true | |
236 | - | else | |
240 | + | else h(("payment should be in " + v)), if ((aJ.payments[0].amount > 0)) | |
237 | 241 | then true | |
238 | 242 | else "payment amount should be greater than 0"] | |
239 | - | if (( | |
243 | + | if ((aK == aK)) | |
240 | 244 | then { | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | then [IntegerEntry( | |
245 | + | let aL = aJ.payments[0].amount | |
246 | + | let aM = toInt(fraction(toBigInt(aL), e, aD())) | |
247 | + | let aG = aE(q) | |
248 | + | let aN = valueOrElse(getInteger(this, s(q)), 0) | |
249 | + | let aO = (t + aM) | |
250 | + | let aP = (u + aL) | |
251 | + | let aQ = (aG + aM) | |
252 | + | let aR = (aN + aL) | |
253 | + | let aS = if ((t == 0)) | |
254 | + | then [IntegerEntry(m, height)] | |
251 | 255 | else nil | |
252 | - | ([IntegerEntry( | |
256 | + | ([IntegerEntry(n, aO), IntegerEntry(o, aP), IntegerEntry(p(q), aQ), IntegerEntry(s(q), aR)] ++ aS) | |
253 | 257 | } | |
254 | 258 | else throw("Strict value is not equal to itself.") | |
255 | 259 | } | |
256 | 260 | ||
257 | 261 | ||
258 | - | func | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | + | func aT (aJ,aU) = { | |
263 | + | let q = toString(aJ.caller) | |
264 | + | let aG = aE(q) | |
265 | + | let aV = [if ((aU > 0)) | |
262 | 266 | then true | |
263 | - | else | |
267 | + | else h("LP amount should be more than 0"), if ((aG >= aU)) | |
264 | 268 | then true | |
265 | - | else | |
266 | - | if (( | |
269 | + | else h((("cannot withdraw more than available LP (" + toString(aG)) + ")"))] | |
270 | + | if ((aV == aV)) | |
267 | 271 | then { | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | [IntegerEntry( | |
272 | + | let aQ = (aG - aU) | |
273 | + | let aW = toInt(fraction(toBigInt(aU), aD(), e)) | |
274 | + | let aO = (t - aU) | |
275 | + | let aP = toInt(fraction(toBigInt(aO), aD(), e)) | |
276 | + | let aX = valueOrElse(getInteger(this, r(q)), 0) | |
277 | + | let aY = (aX + aW) | |
278 | + | [IntegerEntry(n, aO), IntegerEntry(o, aP), IntegerEntry(p(q), aQ), IntegerEntry(r(q), aY), IntegerEntry(m, height), ScriptTransfer(aJ.caller, aW, w)] | |
275 | 279 | } | |
276 | 280 | else throw("Strict value is not equal to itself.") | |
277 | 281 | } | |
278 | 282 | ||
279 | 283 | ||
280 | - | @Callable( | |
281 | - | func setEmissionPerBlock ( | |
282 | - | let | |
284 | + | @Callable(aJ) | |
285 | + | func setEmissionPerBlock (aZ) = { | |
286 | + | let aV = [if ((aJ.caller == this)) | |
283 | 287 | then true | |
284 | - | else | |
285 | - | if (( | |
286 | - | then [IntegerEntry(m, | |
288 | + | else h("permission denied")] | |
289 | + | if ((aV == aV)) | |
290 | + | then [IntegerEntry(o, ay()), IntegerEntry(m, height), IntegerEntry(k, max([0, aZ]))] | |
287 | 291 | else throw("Strict value is not equal to itself.") | |
288 | 292 | } | |
289 | 293 | ||
290 | 294 | ||
291 | 295 | ||
292 | - | @Callable( | |
293 | - | func stake () = | |
296 | + | @Callable(aJ) | |
297 | + | func stake () = aI(aJ, toString(aJ.caller)) | |
294 | 298 | ||
295 | 299 | ||
296 | 300 | ||
297 | - | @Callable( | |
298 | - | func stakeFor ( | |
299 | - | let | |
301 | + | @Callable(aJ) | |
302 | + | func stakeFor (q) = { | |
303 | + | let aV = [if ((size(fromBase58String(q)) == f)) | |
300 | 304 | then true | |
301 | - | else | |
302 | - | if (( | |
303 | - | then | |
305 | + | else h("address is not valid")] | |
306 | + | if ((aV == aV)) | |
307 | + | then aI(aJ, q) | |
304 | 308 | else throw("Strict value is not equal to itself.") | |
305 | 309 | } | |
306 | 310 | ||
307 | 311 | ||
308 | 312 | ||
309 | - | @Callable( | |
310 | - | func withdraw ( | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
313 | + | @Callable(aJ) | |
314 | + | func withdraw (aW) = { | |
315 | + | let q = toString(aJ.caller) | |
316 | + | let aG = aE(q) | |
317 | + | let ba = toInt(fraction(toBigInt(aW), e, aD())) | |
318 | + | let aH = aF(q) | |
319 | + | let bb = toInt(fraction(aD(), toBigInt(1), e, CEILING)) | |
320 | + | let aV = [if ((aW > 0)) | |
317 | 321 | then true | |
318 | - | else | |
322 | + | else h("withdraw amount should be more than 0"), if ((aH >= aW)) | |
319 | 323 | then true | |
320 | - | else | |
324 | + | else h((("cannot withdraw more than available (" + toString(aH)) + ")")), if ((aW >= bb)) | |
321 | 325 | then true | |
322 | - | else | |
323 | - | if (( | |
324 | - | then | |
326 | + | else h((("withdraw amount is too small. Min: (" + toString(bb)) + ")"))] | |
327 | + | if ((aV == aV)) | |
328 | + | then aT(aJ, ba) | |
325 | 329 | else throw("Strict value is not equal to itself.") | |
326 | 330 | } | |
327 | 331 | ||
328 | 332 | ||
329 | 333 | ||
330 | - | @Callable( | |
331 | - | func getUserAssetsREADONLY ( | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | $Tuple2(nil, $Tuple5( | |
334 | + | @Callable(aJ) | |
335 | + | func getUserAssetsREADONLY (q) = { | |
336 | + | let aG = aE(q) | |
337 | + | let aH = aF(q) | |
338 | + | let aN = valueOrElse(getInteger(this, s(q)), 0) | |
339 | + | let aX = valueOrElse(getInteger(this, r(q)), 0) | |
340 | + | $Tuple2(nil, $Tuple5(aG, aH, aD(), aN, aX)) | |
337 | 341 | } | |
338 | 342 | ||
339 | 343 | ||
340 | 344 | ||
341 | - | @Callable( | |
342 | - | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3( | |
345 | + | @Callable(aJ) | |
346 | + | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3(t, ay(), aD())) | |
343 | 347 | ||
344 | 348 | ||
345 | 349 | ||
346 | - | @Callable( | |
347 | - | func voteForTxId ( | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
350 | + | @Callable(aJ) | |
351 | + | func voteForTxId (E) = { | |
352 | + | let ao = toBase58String(aJ.caller.bytes) | |
353 | + | let X = D(E) | |
354 | + | let V = [StringEntry(J(), E)] | |
355 | + | let bc = getString(this, J()) | |
356 | + | let as = [if ((size(fromBase58String(E)) == C)) | |
353 | 357 | then true | |
354 | - | else | |
358 | + | else h((E + " is not valid txId")), if (if ((bc == unit)) | |
355 | 359 | then true | |
356 | - | else (value( | |
360 | + | else (value(bc) != E)) | |
357 | 361 | then true | |
358 | - | else | |
359 | - | if (( | |
360 | - | then | |
362 | + | else h((E + " is already allowed"))] | |
363 | + | if ((as == as)) | |
364 | + | then an(ao, X, B, V) | |
361 | 365 | else throw("Strict value is not equal to itself.") | |
362 | 366 | } | |
363 | 367 | ||
364 | 368 | ||
365 | - | @Verifier( | |
366 | - | func | |
367 | - | let | |
368 | - | let | |
369 | + | @Verifier(bd) | |
370 | + | func be () = { | |
371 | + | let bf = (bd.id == fromBase58String(valueOrElse(getString(this, J()), ""))) | |
372 | + | let bg = if ((size(N()) >= B)) | |
369 | 373 | then false | |
370 | - | else sigVerify( | |
371 | - | if ( | |
374 | + | else sigVerify(bd.bodyBytes, bd.proofs[0], bd.senderPublicKey) | |
375 | + | if (bf) | |
372 | 376 | then true | |
373 | - | else | |
377 | + | else bg | |
374 | 378 | } | |
375 | 379 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "l2mp_staking.ride" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = 1000000000000000000 | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = toBigInt(d) | |
13 | 13 | ||
14 | - | func f (g) = throw(((a + ": ") + g)) | |
14 | + | let f = 26 | |
15 | + | ||
16 | + | let g = 1440 | |
17 | + | ||
18 | + | func h (i) = throw(((a + ": ") + i)) | |
15 | 19 | ||
16 | 20 | ||
17 | - | let | |
21 | + | let j = makeString(["%s", "assetId"], b) | |
18 | 22 | ||
19 | - | let | |
23 | + | let k = makeString(["%s", "emissionPerBlock"], b) | |
20 | 24 | ||
21 | - | let | |
25 | + | let l = makeString(["%s", "emissionPeriodInBlocks"], b) | |
22 | 26 | ||
23 | - | let | |
27 | + | let m = makeString(["%s", "startBlock"], b) | |
24 | 28 | ||
25 | - | let | |
29 | + | let n = makeString(["%s", "totalLpAmount"], b) | |
26 | 30 | ||
27 | - | let | |
31 | + | let o = makeString(["%s", "totalAssetAmount"], b) | |
28 | 32 | ||
29 | - | func | |
33 | + | func p (q) = makeString(["%s%s", "userLpAmount", q], b) | |
30 | 34 | ||
31 | 35 | ||
32 | - | func | |
36 | + | func r (q) = makeString(["%s%s", "totalAssetWithdrawn", q], b) | |
33 | 37 | ||
34 | 38 | ||
35 | - | func | |
39 | + | func s (q) = makeString(["%s%s", "totalAssetStaked", q], b) | |
36 | 40 | ||
37 | 41 | ||
38 | - | let | |
42 | + | let t = valueOrElse(getInteger(this, n), 0) | |
39 | 43 | ||
40 | - | let | |
44 | + | let u = valueOrElse(getInteger(this, o), 0) | |
41 | 45 | ||
42 | - | let | |
46 | + | let v = valueOrElse(getString(this, j), "WAVES") | |
43 | 47 | ||
44 | - | let | |
48 | + | let w = if ((v == "WAVES")) | |
45 | 49 | then unit | |
46 | - | else fromBase58String( | |
50 | + | else fromBase58String(v) | |
47 | 51 | ||
48 | - | let | |
52 | + | let x = valueOrElse(getInteger(this, l), g) | |
49 | 53 | ||
50 | - | let | |
54 | + | let y = (valueOrElse(getInteger(this, k), 0) * x) | |
51 | 55 | ||
52 | - | let | |
56 | + | let z = fraction(height, 1, x) | |
53 | 57 | ||
54 | - | let | |
58 | + | let A = 5 | |
55 | 59 | ||
56 | - | let | |
60 | + | let B = 3 | |
57 | 61 | ||
58 | - | let | |
62 | + | let C = 32 | |
59 | 63 | ||
60 | - | func | |
64 | + | func D (E) = makeString(["%s%s%s", "allowTxId", E], b) | |
61 | 65 | ||
62 | 66 | ||
63 | - | func | |
67 | + | func F (G,H) = makeString([G, H], b) | |
64 | 68 | ||
65 | 69 | ||
66 | - | func | |
70 | + | func I () = makeString(["%s", "adminAddressList"], b) | |
67 | 71 | ||
68 | 72 | ||
69 | - | func | |
73 | + | func J () = makeString(["%s", "txId"], b) | |
70 | 74 | ||
71 | 75 | ||
72 | - | func | |
73 | - | let | |
74 | - | valueOrElse(getInteger( | |
76 | + | func K (G,L) = { | |
77 | + | let M = F(G, L) | |
78 | + | valueOrElse(getInteger(M), 0) | |
75 | 79 | } | |
76 | 80 | ||
77 | 81 | ||
78 | - | func | |
79 | - | let | |
80 | - | if ($isInstanceOf( | |
82 | + | func N () = { | |
83 | + | let O = getString(this, I()) | |
84 | + | if ($isInstanceOf(O, "String")) | |
81 | 85 | then { | |
82 | - | let | |
83 | - | split( | |
86 | + | let P = O | |
87 | + | split(P, b) | |
84 | 88 | } | |
85 | 89 | else nil | |
86 | 90 | } | |
87 | 91 | ||
88 | 92 | ||
89 | - | func | |
93 | + | func Q (R) = containsElement(N(), R) | |
90 | 94 | ||
91 | 95 | ||
92 | - | func | |
93 | - | let | |
94 | - | let | |
95 | - | let | |
96 | - | $Tuple2(( | |
96 | + | func S (T,H) = { | |
97 | + | let U = T | |
98 | + | let V = U._1 | |
99 | + | let G = U._2 | |
100 | + | $Tuple2((V :+ F(G, H)), G) | |
97 | 101 | } | |
98 | 102 | ||
99 | 103 | ||
100 | - | func | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | func | |
107 | - | then | |
108 | - | else | |
104 | + | func W (X) = { | |
105 | + | let Y = I() | |
106 | + | let Z = { | |
107 | + | let aa = N() | |
108 | + | let ab = size(aa) | |
109 | + | let ac = $Tuple2(nil, X) | |
110 | + | func ad (ae,af) = if ((af >= ab)) | |
111 | + | then ae | |
112 | + | else S(ae, aa[af]) | |
109 | 113 | ||
110 | - | func | |
111 | - | then | |
114 | + | func ag (ae,af) = if ((af >= ab)) | |
115 | + | then ae | |
112 | 116 | else throw("List size exceeds 5") | |
113 | 117 | ||
114 | - | | |
118 | + | ag(ad(ad(ad(ad(ad(ac, 0), 1), 2), 3), 4), 5) | |
115 | 119 | } | |
116 | - | let | |
117 | - | let | |
118 | - | | |
120 | + | let V = Z._1 | |
121 | + | let G = Z._2 | |
122 | + | V | |
119 | 123 | } | |
120 | 124 | ||
121 | 125 | ||
122 | - | func | |
126 | + | func ah (V,M) = (V + valueOrElse(getInteger(M), 0)) | |
123 | 127 | ||
124 | 128 | ||
125 | - | func | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | func | |
131 | - | then | |
132 | - | else | |
129 | + | func ai (G) = { | |
130 | + | let aj = W(G) | |
131 | + | let aa = aj | |
132 | + | let ab = size(aa) | |
133 | + | let ac = 0 | |
134 | + | func ad (ae,af) = if ((af >= ab)) | |
135 | + | then ae | |
136 | + | else ah(ae, aa[af]) | |
133 | 137 | ||
134 | - | func | |
135 | - | then | |
138 | + | func ag (ae,af) = if ((af >= ab)) | |
139 | + | then ae | |
136 | 140 | else throw("List size exceeds 5") | |
137 | 141 | ||
138 | - | | |
142 | + | ag(ad(ad(ad(ad(ad(ac, 0), 1), 2), 3), 4), 5) | |
139 | 143 | } | |
140 | 144 | ||
141 | 145 | ||
142 | - | func | |
146 | + | func ak (V,al) = (V :+ DeleteEntry(al)) | |
143 | 147 | ||
144 | 148 | ||
145 | - | func | |
146 | - | let | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | func | |
151 | - | then | |
152 | - | else | |
149 | + | func am (G) = { | |
150 | + | let aj = W(G) | |
151 | + | let aa = aj | |
152 | + | let ab = size(aa) | |
153 | + | let ac = nil | |
154 | + | func ad (ae,af) = if ((af >= ab)) | |
155 | + | then ae | |
156 | + | else ak(ae, aa[af]) | |
153 | 157 | ||
154 | - | func | |
155 | - | then | |
158 | + | func ag (ae,af) = if ((af >= ab)) | |
159 | + | then ae | |
156 | 160 | else throw("List size exceeds 5") | |
157 | 161 | ||
158 | - | | |
162 | + | ag(ad(ad(ad(ad(ad(ac, 0), 1), 2), 3), 4), 5) | |
159 | 163 | } | |
160 | 164 | ||
161 | 165 | ||
162 | - | func | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
166 | - | then | |
167 | - | else if (( | |
168 | - | then | |
166 | + | func an (ao,X,ap,aq) = { | |
167 | + | let M = F(X, ao) | |
168 | + | let ar = K(X, ao) | |
169 | + | let as = if (!(Q(ao))) | |
170 | + | then h((("Address: " + ao) + " not in Admin list")) | |
171 | + | else if ((ar == 1)) | |
172 | + | then h((M + " you already voted")) | |
169 | 173 | else unit | |
170 | - | if (( | |
174 | + | if ((as == as)) | |
171 | 175 | then { | |
172 | - | let | |
173 | - | if ((( | |
176 | + | let aj = ai(X) | |
177 | + | if (((aj + 1) >= ap)) | |
174 | 178 | then { | |
175 | - | let | |
176 | - | ( | |
179 | + | let at = am(X) | |
180 | + | (at ++ aq) | |
177 | 181 | } | |
178 | - | else [IntegerEntry( | |
182 | + | else [IntegerEntry(M, 1)] | |
179 | 183 | } | |
180 | 184 | else throw("Strict value is not equal to itself.") | |
181 | 185 | } | |
182 | 186 | ||
183 | 187 | ||
184 | - | func | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | max([0, ( | |
188 | + | func au () = { | |
189 | + | let av = valueOrElse(getInteger(this, m), 0) | |
190 | + | let aw = fraction(av, 1, x) | |
191 | + | let ax = (z - aw) | |
192 | + | max([0, (y * ax)]) | |
189 | 193 | } | |
190 | 194 | ||
191 | 195 | ||
192 | - | func | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | if ($isInstanceOf( | |
196 | + | func ay () = { | |
197 | + | let az = (u + au()) | |
198 | + | let aA = { | |
199 | + | let O = w | |
200 | + | if ($isInstanceOf(O, "Unit")) | |
197 | 201 | then { | |
198 | - | let | |
199 | - | min([ | |
202 | + | let aB = O | |
203 | + | min([az, wavesBalance(this).available]) | |
200 | 204 | } | |
201 | - | else if ($isInstanceOf( | |
205 | + | else if ($isInstanceOf(O, "ByteVector")) | |
202 | 206 | then { | |
203 | - | let | |
204 | - | min([ | |
207 | + | let aC = O | |
208 | + | min([az, assetBalance(this, aC)]) | |
205 | 209 | } | |
206 | 210 | else throw("Match error") | |
207 | 211 | } | |
208 | - | if (( | |
212 | + | if ((t == 0)) | |
209 | 213 | then 0 | |
210 | - | else | |
214 | + | else aA | |
211 | 215 | } | |
212 | 216 | ||
213 | 217 | ||
214 | - | func | |
215 | - | then fraction( | |
216 | - | else | |
218 | + | func aD () = if ((t != 0)) | |
219 | + | then fraction(toBigInt(ay()), e, toBigInt(t)) | |
220 | + | else e | |
217 | 221 | ||
218 | 222 | ||
219 | - | func | |
223 | + | func aE (q) = valueOrElse(getInteger(this, p(q)), 0) | |
220 | 224 | ||
221 | 225 | ||
222 | - | func | |
223 | - | let | |
224 | - | let | |
225 | - | if ((0 > | |
226 | + | func aF (q) = { | |
227 | + | let aG = aE(q) | |
228 | + | let aH = toInt(fraction(toBigInt(aG), aD(), e)) | |
229 | + | if ((0 > aH)) | |
226 | 230 | then 0 | |
227 | - | else | |
231 | + | else aH | |
228 | 232 | } | |
229 | 233 | ||
230 | 234 | ||
231 | - | func | |
232 | - | let | |
235 | + | func aI (aJ,q) = { | |
236 | + | let aK = [if ((size(aJ.payments) == 1)) | |
233 | 237 | then true | |
234 | - | else | |
238 | + | else h("should include 1 payment"), if ((aJ.payments[0].assetId == w)) | |
235 | 239 | then true | |
236 | - | else | |
240 | + | else h(("payment should be in " + v)), if ((aJ.payments[0].amount > 0)) | |
237 | 241 | then true | |
238 | 242 | else "payment amount should be greater than 0"] | |
239 | - | if (( | |
243 | + | if ((aK == aK)) | |
240 | 244 | then { | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | then [IntegerEntry( | |
245 | + | let aL = aJ.payments[0].amount | |
246 | + | let aM = toInt(fraction(toBigInt(aL), e, aD())) | |
247 | + | let aG = aE(q) | |
248 | + | let aN = valueOrElse(getInteger(this, s(q)), 0) | |
249 | + | let aO = (t + aM) | |
250 | + | let aP = (u + aL) | |
251 | + | let aQ = (aG + aM) | |
252 | + | let aR = (aN + aL) | |
253 | + | let aS = if ((t == 0)) | |
254 | + | then [IntegerEntry(m, height)] | |
251 | 255 | else nil | |
252 | - | ([IntegerEntry( | |
256 | + | ([IntegerEntry(n, aO), IntegerEntry(o, aP), IntegerEntry(p(q), aQ), IntegerEntry(s(q), aR)] ++ aS) | |
253 | 257 | } | |
254 | 258 | else throw("Strict value is not equal to itself.") | |
255 | 259 | } | |
256 | 260 | ||
257 | 261 | ||
258 | - | func | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | + | func aT (aJ,aU) = { | |
263 | + | let q = toString(aJ.caller) | |
264 | + | let aG = aE(q) | |
265 | + | let aV = [if ((aU > 0)) | |
262 | 266 | then true | |
263 | - | else | |
267 | + | else h("LP amount should be more than 0"), if ((aG >= aU)) | |
264 | 268 | then true | |
265 | - | else | |
266 | - | if (( | |
269 | + | else h((("cannot withdraw more than available LP (" + toString(aG)) + ")"))] | |
270 | + | if ((aV == aV)) | |
267 | 271 | then { | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | [IntegerEntry( | |
272 | + | let aQ = (aG - aU) | |
273 | + | let aW = toInt(fraction(toBigInt(aU), aD(), e)) | |
274 | + | let aO = (t - aU) | |
275 | + | let aP = toInt(fraction(toBigInt(aO), aD(), e)) | |
276 | + | let aX = valueOrElse(getInteger(this, r(q)), 0) | |
277 | + | let aY = (aX + aW) | |
278 | + | [IntegerEntry(n, aO), IntegerEntry(o, aP), IntegerEntry(p(q), aQ), IntegerEntry(r(q), aY), IntegerEntry(m, height), ScriptTransfer(aJ.caller, aW, w)] | |
275 | 279 | } | |
276 | 280 | else throw("Strict value is not equal to itself.") | |
277 | 281 | } | |
278 | 282 | ||
279 | 283 | ||
280 | - | @Callable( | |
281 | - | func setEmissionPerBlock ( | |
282 | - | let | |
284 | + | @Callable(aJ) | |
285 | + | func setEmissionPerBlock (aZ) = { | |
286 | + | let aV = [if ((aJ.caller == this)) | |
283 | 287 | then true | |
284 | - | else | |
285 | - | if (( | |
286 | - | then [IntegerEntry(m, | |
288 | + | else h("permission denied")] | |
289 | + | if ((aV == aV)) | |
290 | + | then [IntegerEntry(o, ay()), IntegerEntry(m, height), IntegerEntry(k, max([0, aZ]))] | |
287 | 291 | else throw("Strict value is not equal to itself.") | |
288 | 292 | } | |
289 | 293 | ||
290 | 294 | ||
291 | 295 | ||
292 | - | @Callable( | |
293 | - | func stake () = | |
296 | + | @Callable(aJ) | |
297 | + | func stake () = aI(aJ, toString(aJ.caller)) | |
294 | 298 | ||
295 | 299 | ||
296 | 300 | ||
297 | - | @Callable( | |
298 | - | func stakeFor ( | |
299 | - | let | |
301 | + | @Callable(aJ) | |
302 | + | func stakeFor (q) = { | |
303 | + | let aV = [if ((size(fromBase58String(q)) == f)) | |
300 | 304 | then true | |
301 | - | else | |
302 | - | if (( | |
303 | - | then | |
305 | + | else h("address is not valid")] | |
306 | + | if ((aV == aV)) | |
307 | + | then aI(aJ, q) | |
304 | 308 | else throw("Strict value is not equal to itself.") | |
305 | 309 | } | |
306 | 310 | ||
307 | 311 | ||
308 | 312 | ||
309 | - | @Callable( | |
310 | - | func withdraw ( | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
313 | + | @Callable(aJ) | |
314 | + | func withdraw (aW) = { | |
315 | + | let q = toString(aJ.caller) | |
316 | + | let aG = aE(q) | |
317 | + | let ba = toInt(fraction(toBigInt(aW), e, aD())) | |
318 | + | let aH = aF(q) | |
319 | + | let bb = toInt(fraction(aD(), toBigInt(1), e, CEILING)) | |
320 | + | let aV = [if ((aW > 0)) | |
317 | 321 | then true | |
318 | - | else | |
322 | + | else h("withdraw amount should be more than 0"), if ((aH >= aW)) | |
319 | 323 | then true | |
320 | - | else | |
324 | + | else h((("cannot withdraw more than available (" + toString(aH)) + ")")), if ((aW >= bb)) | |
321 | 325 | then true | |
322 | - | else | |
323 | - | if (( | |
324 | - | then | |
326 | + | else h((("withdraw amount is too small. Min: (" + toString(bb)) + ")"))] | |
327 | + | if ((aV == aV)) | |
328 | + | then aT(aJ, ba) | |
325 | 329 | else throw("Strict value is not equal to itself.") | |
326 | 330 | } | |
327 | 331 | ||
328 | 332 | ||
329 | 333 | ||
330 | - | @Callable( | |
331 | - | func getUserAssetsREADONLY ( | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | $Tuple2(nil, $Tuple5( | |
334 | + | @Callable(aJ) | |
335 | + | func getUserAssetsREADONLY (q) = { | |
336 | + | let aG = aE(q) | |
337 | + | let aH = aF(q) | |
338 | + | let aN = valueOrElse(getInteger(this, s(q)), 0) | |
339 | + | let aX = valueOrElse(getInteger(this, r(q)), 0) | |
340 | + | $Tuple2(nil, $Tuple5(aG, aH, aD(), aN, aX)) | |
337 | 341 | } | |
338 | 342 | ||
339 | 343 | ||
340 | 344 | ||
341 | - | @Callable( | |
342 | - | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3( | |
345 | + | @Callable(aJ) | |
346 | + | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3(t, ay(), aD())) | |
343 | 347 | ||
344 | 348 | ||
345 | 349 | ||
346 | - | @Callable( | |
347 | - | func voteForTxId ( | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
350 | + | @Callable(aJ) | |
351 | + | func voteForTxId (E) = { | |
352 | + | let ao = toBase58String(aJ.caller.bytes) | |
353 | + | let X = D(E) | |
354 | + | let V = [StringEntry(J(), E)] | |
355 | + | let bc = getString(this, J()) | |
356 | + | let as = [if ((size(fromBase58String(E)) == C)) | |
353 | 357 | then true | |
354 | - | else | |
358 | + | else h((E + " is not valid txId")), if (if ((bc == unit)) | |
355 | 359 | then true | |
356 | - | else (value( | |
360 | + | else (value(bc) != E)) | |
357 | 361 | then true | |
358 | - | else | |
359 | - | if (( | |
360 | - | then | |
362 | + | else h((E + " is already allowed"))] | |
363 | + | if ((as == as)) | |
364 | + | then an(ao, X, B, V) | |
361 | 365 | else throw("Strict value is not equal to itself.") | |
362 | 366 | } | |
363 | 367 | ||
364 | 368 | ||
365 | - | @Verifier( | |
366 | - | func | |
367 | - | let | |
368 | - | let | |
369 | + | @Verifier(bd) | |
370 | + | func be () = { | |
371 | + | let bf = (bd.id == fromBase58String(valueOrElse(getString(this, J()), ""))) | |
372 | + | let bg = if ((size(N()) >= B)) | |
369 | 373 | then false | |
370 | - | else sigVerify( | |
371 | - | if ( | |
374 | + | else sigVerify(bd.bodyBytes, bd.proofs[0], bd.senderPublicKey) | |
375 | + | if (bf) | |
372 | 376 | then true | |
373 | - | else | |
377 | + | else bg | |
374 | 378 | } | |
375 | 379 |
github/deemru/w8io/169f3d6 149.21 ms ◑