tx · DRBLYCxLW4PHy7YBZhkUcrfmMcjeiCKHwNDpLzKY8fUw

3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER:  -0.01400000 Waves

2022.12.06 12:51 [2348324] smart account 3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER > SELF 0.00000000 Waves

{ "type": 13, "id": "DRBLYCxLW4PHy7YBZhkUcrfmMcjeiCKHwNDpLzKY8fUw", "fee": 1400000, "feeAssetId": null, "timestamp": 1670320194419, "version": 2, "chainId": 84, "sender": "3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER", "senderPublicKey": "6sxdMr2xYPPACEJccwmgS7nWC2ez1c38Y1kDX49ne42b", "proofs": [ "3Mkqh344sxnjPRaRaEHmpgY9EjYdPSRprDfZYAjTS7ZjarQV1LnaDSJsqUR3ZK3CYNErYZpeqyiAhTUQUjUYQ3ne" ], "script": "base64:BgIvCAISBgoECAgICBIAEgASABIECgIBARIAEgMKAQgSAwoBCBIECgIBARIFCgMICAgiAAlTRVBBUkFUT1ICAl9fAAVXQVZFUwIFV0FWRVMADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAOS0VZX0JBU0VfQVNTRVQCCkJBU0VfQVNTRVQACUtFWV9BU1NFVAIFQVNTRVQAE0tFWV9TVEFLSU5HX0FEQVBURVICD1NUQUtJTkdfQURBUFRFUgASS0VZX1NUQUtJTkdfQU1PVU5UAg5TVEFLSU5HX0FNT1VOVAANS0VZX0xBU1RfUkFURQIJTEFTVF9SQVRFABBLRVlfQ1VSUkVOVF9SQVRFAgxDVVJSRU5UX1JBVEUAD0tFWV9MQVNUX0hFSUdIVAILTEFTVF9IRUlHSFQAEUtFWV9UQVJHRVRfSEVJR0hUAg1UQVJHRVRfSEVJR0hUABdLRVlfU1BPTlNPUlNISVBfTUFOQUdFUgITU1BPTlNPUlNISVBfTUFOQUdFUgAKRlVOQ19TVEFLRQIFc3Rha2UADEZVTkNfVU5TVEFL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2348324, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EsKWbvZopS9vYW7hTSmuSK5Dm2YD4LEYD7qnrSLWTXW1 Next: 6aPd2miLEVUVkJQjPyGTXHfkgHfeMY1TyXVE4AJUdr8v Diff:
OldNewDifferences
2525
2626 let l = "TARGET_HEIGHT"
2727
28-let m = "stake"
28+let m = "SPONSORSHIP_MANAGER"
2929
30-let n = "unstake"
30+let n = "stake"
3131
32-let o = "claimReward"
32+let o = "unstake"
3333
34-let p = toBigInt(1000000000000)
34+let p = "claimReward"
3535
36-let q = toBigInt(0)
36+let q = toBigInt(1000000000000)
3737
38-let r = toBigInt(1)
38+let r = toBigInt(0)
3939
40-let s = 100000000
40+let s = toBigInt(1)
4141
42-func t (u) = {
43- let v = addressFromString(u)
44- if ($isInstanceOf(v, "Address"))
42+let t = 100000000
43+
44+func u (v) = {
45+ let w = addressFromString(v)
46+ if ($isInstanceOf(w, "Address"))
4547 then {
46- let w = v
48+ let x = w
4749 true
4850 }
4951 else false
5052 }
5153
5254
53-func x (y) = if ((y == b))
55+func y (z) = if ((z == b))
5456 then true
5557 else {
56- let v = assetInfo(fromBase58String(y))
57- if ($isInstanceOf(v, "Asset"))
58+ let w = assetInfo(fromBase58String(z))
59+ if ($isInstanceOf(w, "Asset"))
5860 then {
59- let w = v
61+ let x = w
6062 true
6163 }
6264 else false
6365 }
6466
6567
66-func z (y) = if ((y == b))
68+func A (z) = if ((z == b))
6769 then unit
68- else fromBase58String(y)
70+ else fromBase58String(z)
6971
7072
71-func A (y) = {
72- let v = y
73- if ($isInstanceOf(v, "ByteVector"))
73+func B (z) = {
74+ let w = z
75+ if ($isInstanceOf(w, "ByteVector"))
7476 then {
75- let w = v
76- let B = assetInfo(w)
77- if ($isInstanceOf(B, "Asset"))
77+ let x = w
78+ let C = assetInfo(x)
79+ if ($isInstanceOf(C, "Asset"))
7880 then {
79- let C = B
80- C.decimals
81+ let D = C
82+ D.decimals
8183 }
8284 else throw("_getAssetDecimals: no such asset")
8385 }
8587 }
8688
8789
88-func D (y) = {
89- let v = assetInfo(y)
90- if ($isInstanceOf(v, "Asset"))
90+func E (z) = {
91+ let w = assetInfo(z)
92+ if ($isInstanceOf(w, "Asset"))
9193 then {
92- let w = v
93- w.quantity
94+ let x = w
95+ x.quantity
9496 }
9597 else throw("_getAssetQuantity: no such asset")
9698 }
9799
98100
99-func E (y,F) = {
100- let v = y
101- if ($isInstanceOf(v, "ByteVector"))
101+func F (z,G) = {
102+ let w = z
103+ if ($isInstanceOf(w, "ByteVector"))
102104 then {
103- let w = v
104- assetBalance(F, w)
105+ let x = w
106+ assetBalance(G, x)
105107 }
106- else wavesBalance(F).regular
108+ else wavesBalance(G).regular
107109 }
108110
109111
110-func G () = {
111- let v = getString(e)
112- if ($isInstanceOf(v, "String"))
112+func H () = {
113+ let w = getString(e)
114+ if ($isInstanceOf(w, "String"))
113115 then {
114- let w = v
115- if ((w == b))
116+ let x = w
117+ if ((x == b))
116118 then unit
117- else fromBase58String(w)
119+ else fromBase58String(x)
118120 }
119121 else throw("_loadBaseAsset: no base asset")
120122 }
121123
122124
123-func H () = {
124- let v = getString(g)
125- if ($isInstanceOf(v, "String"))
125+func I () = {
126+ let w = getString(g)
127+ if ($isInstanceOf(w, "String"))
126128 then {
127- let w = v
128- addressFromStringValue(w)
129+ let x = w
130+ addressFromStringValue(x)
129131 }
130132 else throw("_loadStakingAdapter: no staking adapter")
131133 }
132134
133135
134-func I (J,K) = {
135- let v = getInteger(J)
136- if ($isInstanceOf(v, "Int"))
136+func J () = {
137+ let w = getString(m)
138+ if ($isInstanceOf(w, "String"))
137139 then {
138- let w = v
139- w
140+ let x = w
141+ addressFromStringValue(x)
140142 }
141- else K
143+ else throw("_loadSponsorshipManager: no sponsorship manager")
142144 }
143145
144146
145-func L (J,K) = {
146- let v = getBinary(J)
147- if ($isInstanceOf(v, "ByteVector"))
147+func K (L,M) = {
148+ let w = getInteger(L)
149+ if ($isInstanceOf(w, "Int"))
148150 then {
149- let w = v
150- toBigInt(w)
151+ let x = w
152+ x
151153 }
152- else K
154+ else M
153155 }
154156
155157
156-func M () = {
157- let v = getString(f)
158- if ($isInstanceOf(v, "String"))
158+func N (L,M) = {
159+ let w = getBinary(L)
160+ if ($isInstanceOf(w, "ByteVector"))
159161 then {
160- let w = v
161- fromBase58String(w)
162+ let x = w
163+ toBigInt(x)
164+ }
165+ else M
166+ }
167+
168+
169+func O () = {
170+ let w = getString(f)
171+ if ($isInstanceOf(w, "String"))
172+ then {
173+ let x = w
174+ fromBase58String(x)
162175 }
163176 else base58''
164177 }
165178
166179
167-func N (y,O,P) = {
168- let Q = I(h, 0)
169- let R = (Q + O)
170- let S = if ((O > 0))
171- then invoke(P, m, nil, [AttachedPayment(y, O)])
172- else invoke(P, n, [(-1 * O)], nil)
173- if ((S == S))
174- then [IntegerEntry(h, R)]
180+func P (z,Q,R) = {
181+ let S = K(h, 0)
182+ let T = (S + Q)
183+ let U = if ((Q > 0))
184+ then invoke(R, n, nil, [AttachedPayment(z, Q)])
185+ else invoke(R, o, [(-1 * Q)], nil)
186+ if ((U == U))
187+ then [IntegerEntry(h, T)]
175188 else throw("Strict value is not equal to itself.")
176189 }
177190
178191
179-func T (U) = {
180- let S = invoke(H(), o, nil, nil)
181- if ((S == S))
192+func V (W) = {
193+ let U = invoke(I(), p, nil, nil)
194+ if ((U == U))
182195 then {
183- let v = S
184- if ($isInstanceOf(v, "(Int, Int, Int)"))
196+ let w = U
197+ if ($isInstanceOf(w, "(Int, Int, Int)"))
185198 then {
186- let V = v
187- if (U)
199+ let X = w
200+ if (W)
188201 then {
189- let W = invoke(this, m, [V._1, V._3], nil)
190- if ((W == W))
191- then $Tuple2(true, V._2)
202+ let Y = invoke(this, n, [X._1, X._3], nil)
203+ if ((Y == Y))
204+ then $Tuple2(true, X._2)
192205 else throw("Strict value is not equal to itself.")
193206 }
194207 else {
195- let W = invoke(this, m, [(V._1 + V._2), V._3], nil)
196- if ((W == W))
208+ let Y = invoke(this, n, [(X._1 + X._2), X._3], nil)
209+ if ((Y == Y))
197210 then $Tuple2(true, 0)
198211 else throw("Strict value is not equal to itself.")
199212 }
204217 }
205218
206219
207-@Callable(X)
208-func init (Y,Z,aa,ab) = {
209- let ac = valueOrErrorMessage(getString(c), "init: no multisig set")
210- let C = M()
211- let ad = z(aa)
212- let ae = if ((X.caller != this))
220+@Callable(Z)
221+func init (aa,ab,ac,ad) = {
222+ let ae = valueOrErrorMessage(getString(c), "init: no multisig set")
223+ let D = O()
224+ let af = A(ac)
225+ let ag = if ((Z.caller != this))
213226 then throw("init: permission denied")
214- else if ((C != base58''))
227+ else if ((D != base58''))
215228 then throw("init: already initialized")
216- else if (if ((4 > size(Y)))
229+ else if (if ((4 > size(aa)))
217230 then true
218- else (size(Y) > 16))
231+ else (size(aa) > 16))
219232 then throw("init: invalid token name")
220- else if ((size(Z) > 1000))
233+ else if ((size(ab) > 1000))
221234 then throw("init: invalid token description")
222- else if (!(x(aa)))
235+ else if (!(y(ac)))
223236 then throw("init: invalid base asset")
224- else if (!(t(ab)))
237+ else if (!(u(ad)))
225238 then throw("init: invalid staking adapter")
226239 else unit
227- if ((ae == ae))
240+ if ((ag == ag))
228241 then {
229- let af = A(ad)
230- let ag = Issue(Y, Z, s, af, true)
231- let ah = calculateAssetId(ag)
232- let ai = N(ad, s, addressFromStringValue(ab))
233- $Tuple2(([StringEntry(e, aa), StringEntry(g, ab), StringEntry(f, toBase58String(ah)), ag] ++ ai), unit)
242+ let ah = B(af)
243+ let ai = Issue(aa, ab, t, ah, true)
244+ let aj = calculateAssetId(ai)
245+ let ak = P(af, t, addressFromStringValue(ad))
246+ $Tuple2(([StringEntry(e, ac), StringEntry(g, ad), StringEntry(f, toBase58String(aj)), ai] ++ ak), unit)
234247 }
235248 else throw("Strict value is not equal to itself.")
236249 }
237250
238251
239252
240-@Callable(X)
253+@Callable(Z)
241254 func getRate () = {
242- let aj = L(i, p)
243- let ak = L(j, q)
244- let al = I(k, 0)
245- let am = min([I(l, 0), height])
246- let an = (aj + (ak * toBigInt((am - al))))
247- $Tuple2(nil, toString(an))
255+ let al = N(i, q)
256+ let am = N(j, r)
257+ let an = K(k, 0)
258+ let ao = min([K(l, 0), height])
259+ let ap = (al + (am * toBigInt((ao - an))))
260+ $Tuple2(nil, toString(ap))
248261 }
249262
250263
251264
252-@Callable(X)
265+@Callable(Z)
253266 func checkpoint () = {
254- let ao = T(true)
255- if ((ao == ao))
256- then if (!(ao._1))
267+ let aq = V(true)
268+ if ((aq == aq))
269+ then if (!(aq._1))
257270 then throw("checkpoint: no reward")
258- else if ((ao._2 > 0))
259- then $Tuple2([ScriptTransfer(X.originCaller, ao._2, G())], unit)
271+ else if ((aq._2 > 0))
272+ then $Tuple2([ScriptTransfer(Z.originCaller, aq._2, H())], unit)
260273 else $Tuple2(nil, unit)
261274 else throw("Strict value is not equal to itself.")
262275 }
263276
264277
265278
266-@Callable(X)
279+@Callable(Z)
267280 func deposit () = {
268- let ap = toString(X.caller)
269- let ad = G()
270- let C = M()
271- let aq = toBigInt(D(C))
272- let ae = if ((size(X.payments) != 1))
281+ let ar = toString(Z.caller)
282+ let af = H()
283+ let D = O()
284+ let as = toBigInt(E(D))
285+ let ag = if ((size(Z.payments) != 1))
273286 then throw("deposit: no payments")
274- else if ((X.payments[0].assetId != ad))
287+ else if ((Z.payments[0].assetId != af))
275288 then throw("deposit: payment is not in base asset")
276- else if ((0 >= X.payments[0].amount))
289+ else if ((0 >= Z.payments[0].amount))
277290 then throw("deposit: invalid payment amount")
278291 else unit
279- if ((ae == ae))
292+ if ((ag == ag))
280293 then {
281- let ao = T(false)
282- if ((ao == ao))
294+ let aq = V(false)
295+ if ((aq == aq))
283296 then {
284- let aj = L(i, p)
285- let ak = L(j, q)
286- let al = I(k, 0)
287- let am = min([I(l, 0), height])
288- let ar = (aj + (ak * toBigInt((am - al))))
289- let as = toInt(fraction(toBigInt(X.payments[0].amount), p, ar, FLOOR))
290- let at = fraction(ak, aq, (aq + toBigInt(as)), FLOOR)
291- let au = am
292- let ai = N(ad, X.payments[0].amount, H())
293- $Tuple2(([Reissue(C, as, true), ScriptTransfer(X.caller, as, C), BinaryEntry(i, toBytes(ar)), BinaryEntry(j, toBytes(at)), IntegerEntry(k, au)] ++ ai), unit)
297+ let al = N(i, q)
298+ let am = N(j, r)
299+ let an = K(k, 0)
300+ let ao = min([K(l, 0), height])
301+ let at = (al + (am * toBigInt((ao - an))))
302+ let au = toInt(fraction(toBigInt(Z.payments[0].amount), q, at, FLOOR))
303+ let av = fraction(am, as, (as + toBigInt(au)), FLOOR)
304+ let aw = ao
305+ let ak = P(af, Z.payments[0].amount, I())
306+ $Tuple2(([Reissue(D, au, true), ScriptTransfer(Z.caller, au, D), BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw)] ++ ak), unit)
294307 }
295308 else throw("Strict value is not equal to itself.")
296309 }
299312
300313
301314
302-@Callable(X)
303-func stake (O,av) = {
304- let ap = toString(X.caller)
305- let ad = G()
306- let C = M()
307- let aq = toBigInt(D(C))
308- let ae = if ((X.caller != this))
315+@Callable(Z)
316+func stake (Q,ax) = {
317+ let ar = toString(Z.caller)
318+ let af = H()
319+ let D = O()
320+ let as = toBigInt(E(D))
321+ let ag = if ((Z.caller != this))
309322 then throw("stake: only this contract")
310- else if ((0 >= O))
323+ else if ((0 >= Q))
311324 then throw("stake: invalid stake amount")
312- else if ((O > E(ad, this)))
325+ else if ((Q > F(af, this)))
313326 then throw("stake: insufficient stake amount")
314- else if ((aq == q))
327+ else if ((as == r))
315328 then throw("stake: no deposits to stake for")
316329 else unit
317- if ((ae == ae))
330+ if ((ag == ag))
318331 then {
319- let aj = L(i, p)
320- let ak = L(j, q)
321- let al = I(k, 0)
322- let am = I(l, 0)
323- let aw = min([am, height])
324- let ax = if ((aw == height))
332+ let al = N(i, q)
333+ let am = N(j, r)
334+ let an = K(k, 0)
335+ let ao = K(l, 0)
336+ let ay = min([ao, height])
337+ let az = if ((ay == height))
325338 then {
326- let ar = (aj + (toBigInt((aw - al)) * ak))
327- let ay = (ak * toBigInt((am - aw)))
328- let at = fraction(((toBigInt(O) * p) + ay), r, (aq * toBigInt(av)))
329- let au = height
330- let az = (au + av)
331-[BinaryEntry(i, toBytes(ar)), BinaryEntry(j, toBytes(at)), IntegerEntry(k, au), IntegerEntry(l, az)]
339+ let at = (al + (toBigInt((ay - an)) * am))
340+ let aA = (am * toBigInt((ao - ay)))
341+ let av = fraction(((toBigInt(Q) * q) + aA), s, (as * toBigInt(ax)))
342+ let aw = height
343+ let aB = (aw + ax)
344+[BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)]
332345 }
333- else if ((am > al))
346+ else if ((ao > an))
334347 then {
335- let ar = (aj + (toBigInt((am - al)) * ak))
336- let at = fraction(toBigInt(O), p, (aq * toBigInt(av)))
337- let au = height
338- let az = (au + av)
339-[BinaryEntry(i, toBytes(ar)), BinaryEntry(j, toBytes(at)), IntegerEntry(k, au), IntegerEntry(l, az)]
348+ let at = (al + (toBigInt((ao - an)) * am))
349+ let av = fraction(toBigInt(Q), q, (as * toBigInt(ax)))
350+ let aw = height
351+ let aB = (aw + ax)
352+[BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)]
340353 }
341354 else {
342- let at = fraction(toBigInt(O), p, (aq * toBigInt(av)))
343- let au = height
344- let az = (au + av)
345-[BinaryEntry(j, toBytes(at)), IntegerEntry(k, au), IntegerEntry(l, az)]
355+ let av = fraction(toBigInt(Q), q, (as * toBigInt(ax)))
356+ let aw = height
357+ let aB = (aw + ax)
358+[BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)]
346359 }
347- let ai = N(ad, O, H())
348- $Tuple2((ax ++ ai), unit)
360+ let ak = P(af, Q, I())
361+ $Tuple2((az ++ ak), unit)
349362 }
350363 else throw("Strict value is not equal to itself.")
351364 }
352365
353366
354367
355-@Callable(X)
368+@Callable(Z)
356369 func withdraw () = {
357- let ap = toString(X.caller)
358- let ad = G()
359- let C = M()
360- let aq = toBigInt(D(C))
361- let ae = if ((1 > size(X.payments)))
370+ let ar = toString(Z.caller)
371+ let af = H()
372+ let D = O()
373+ let as = toBigInt(E(D))
374+ let ag = if ((1 > size(Z.payments)))
362375 then throw("withdraw: no payments")
363- else if ((X.payments[0].assetId != C))
376+ else if ((Z.payments[0].assetId != D))
364377 then throw("withdraw: payment is not in correct asset")
365- else if ((0 >= X.payments[0].amount))
378+ else if ((0 >= Z.payments[0].amount))
366379 then throw("withdraw: invalid payment amount")
367380 else unit
368- if ((ae == ae))
381+ if ((ag == ag))
369382 then {
370- let ao = T(false)
371- if ((ao == ao))
383+ let aq = V(false)
384+ if ((aq == aq))
372385 then {
373- let aj = L(i, p)
374- let ak = L(j, q)
375- let al = I(k, 0)
376- let am = min([I(l, 0), height])
377- let ar = (aj + (ak * toBigInt((am - al))))
378- let aA = toInt(fraction(toBigInt(X.payments[0].amount), ar, p, FLOOR))
379- let at = fraction(ak, aq, (aq - toBigInt(X.payments[0].amount)), FLOOR)
380- let au = am
381- let ai = N(ad, (-1 * aA), H())
382- $Tuple2((ai ++ [Burn(C, X.payments[0].amount), ScriptTransfer(X.caller, aA, unit), BinaryEntry(i, toBytes(ar)), BinaryEntry(j, toBytes(at)), IntegerEntry(k, au)]), unit)
386+ let al = N(i, q)
387+ let am = N(j, r)
388+ let an = K(k, 0)
389+ let ao = min([K(l, 0), height])
390+ let at = (al + (am * toBigInt((ao - an))))
391+ let aC = toInt(fraction(toBigInt(Z.payments[0].amount), at, q, FLOOR))
392+ let av = fraction(am, as, (as - toBigInt(Z.payments[0].amount)), FLOOR)
393+ let aw = ao
394+ let ak = P(af, (-1 * aC), I())
395+ $Tuple2((ak ++ [Burn(D, Z.payments[0].amount), ScriptTransfer(Z.caller, aC, unit), BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw)]), unit)
383396 }
384397 else throw("Strict value is not equal to itself.")
385398 }
388401
389402
390403
391-@Callable(X)
392-func setMultisig (aB) = {
393- let ae = if ((X.caller != this))
404+@Callable(Z)
405+func setMultisig (aD) = {
406+ let ag = if ((Z.caller != this))
394407 then throw("setMultisig: permission denied")
395- else if (!(t(aB)))
408+ else if (!(u(aD)))
396409 then throw("setMultisig: invalid multisig address")
397410 else unit
398- if ((ae == ae))
399- then $Tuple2([StringEntry(c, aB)], unit)
411+ if ((ag == ag))
412+ then $Tuple2([StringEntry(c, aD)], unit)
400413 else throw("Strict value is not equal to itself.")
401414 }
402415
403416
404-@Verifier(aC)
405-func aD () = {
406- let v = getString(c)
407- if ($isInstanceOf(v, "String"))
417+
418+@Callable(Z)
419+func setSponsorshipManager (aE) = {
420+ let ag = if ((Z.caller != this))
421+ then throw("setSponsorshipManager: permission denied")
422+ else if (!(u(aE)))
423+ then throw("setSponsorshipManager: invalid manager address")
424+ else unit
425+ if ((ag == ag))
426+ then $Tuple2([StringEntry(m, aE)], unit)
427+ else throw("Strict value is not equal to itself.")
428+ }
429+
430+
431+
432+@Callable(Z)
433+func updateSponsorship (aF,aG) = {
434+ let ag = if ((Z.caller != J()))
435+ then throw("updateSponsorship: permission denied")
436+ else if ((0 > aF))
437+ then throw("updateSponsorship: invalid sponsorship fee")
438+ else if ((0 > aG))
439+ then throw("updateSponsorship: invalid waves required amount")
440+ else unit
441+ if ((ag == ag))
408442 then {
409- let ac = v
410- valueOrElse(getBoolean(addressFromStringValue(ac), makeString([d, toString(this), toBase58String(aC.id)], a)), false)
443+ let aH = O()
444+ let aI = if ((aF == 0))
445+ then unit
446+ else aF
447+ let az = if ((wavesBalance(this).regular > aG))
448+ then [ScriptTransfer(Z.caller, (wavesBalance(this).regular - aG), unit)]
449+ else nil
450+ $Tuple2((az ++ [ScriptTransfer(Z.caller, assetBalance(this, aH), aH), SponsorFee(aH, aI)]), unit)
411451 }
412- else sigVerify(aC.bodyBytes, aC.proofs[0], aC.senderPublicKey)
452+ else throw("Strict value is not equal to itself.")
453+ }
454+
455+
456+
457+@Callable(Z)
458+func wxVotingSuggest (aJ,aK,aL) = {
459+ let aM = valueOrErrorMessage(addressFromString(aJ), "wxVotingSuggest: invalid voting address")
460+ let aN = valueOrErrorMessage(assetInfo(fromBase58String(aK)), "wxVotingSuggest: invalid wx asset")
461+ let U = invoke(aM, "suggest", [O(), aL], [AttachedPayment(fromBase58String(aK), (100 * aN.decimals))])
462+ if ((U == U))
463+ then $Tuple2(nil, unit)
464+ else throw("Strict value is not equal to itself.")
465+ }
466+
467+
468+@Verifier(aO)
469+func aP () = {
470+ let w = getString(c)
471+ if ($isInstanceOf(w, "String"))
472+ then {
473+ let ae = w
474+ valueOrElse(getBoolean(addressFromStringValue(ae), makeString([d, toString(this), toBase58String(aO.id)], a)), false)
475+ }
476+ else sigVerify(aO.bodyBytes, aO.proofs[0], aO.senderPublicKey)
413477 }
414478
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = "WAVES"
77
88 let c = "MULTISIG"
99
1010 let d = "STATUS"
1111
1212 let e = "BASE_ASSET"
1313
1414 let f = "ASSET"
1515
1616 let g = "STAKING_ADAPTER"
1717
1818 let h = "STAKING_AMOUNT"
1919
2020 let i = "LAST_RATE"
2121
2222 let j = "CURRENT_RATE"
2323
2424 let k = "LAST_HEIGHT"
2525
2626 let l = "TARGET_HEIGHT"
2727
28-let m = "stake"
28+let m = "SPONSORSHIP_MANAGER"
2929
30-let n = "unstake"
30+let n = "stake"
3131
32-let o = "claimReward"
32+let o = "unstake"
3333
34-let p = toBigInt(1000000000000)
34+let p = "claimReward"
3535
36-let q = toBigInt(0)
36+let q = toBigInt(1000000000000)
3737
38-let r = toBigInt(1)
38+let r = toBigInt(0)
3939
40-let s = 100000000
40+let s = toBigInt(1)
4141
42-func t (u) = {
43- let v = addressFromString(u)
44- if ($isInstanceOf(v, "Address"))
42+let t = 100000000
43+
44+func u (v) = {
45+ let w = addressFromString(v)
46+ if ($isInstanceOf(w, "Address"))
4547 then {
46- let w = v
48+ let x = w
4749 true
4850 }
4951 else false
5052 }
5153
5254
53-func x (y) = if ((y == b))
55+func y (z) = if ((z == b))
5456 then true
5557 else {
56- let v = assetInfo(fromBase58String(y))
57- if ($isInstanceOf(v, "Asset"))
58+ let w = assetInfo(fromBase58String(z))
59+ if ($isInstanceOf(w, "Asset"))
5860 then {
59- let w = v
61+ let x = w
6062 true
6163 }
6264 else false
6365 }
6466
6567
66-func z (y) = if ((y == b))
68+func A (z) = if ((z == b))
6769 then unit
68- else fromBase58String(y)
70+ else fromBase58String(z)
6971
7072
71-func A (y) = {
72- let v = y
73- if ($isInstanceOf(v, "ByteVector"))
73+func B (z) = {
74+ let w = z
75+ if ($isInstanceOf(w, "ByteVector"))
7476 then {
75- let w = v
76- let B = assetInfo(w)
77- if ($isInstanceOf(B, "Asset"))
77+ let x = w
78+ let C = assetInfo(x)
79+ if ($isInstanceOf(C, "Asset"))
7880 then {
79- let C = B
80- C.decimals
81+ let D = C
82+ D.decimals
8183 }
8284 else throw("_getAssetDecimals: no such asset")
8385 }
8486 else 8
8587 }
8688
8789
88-func D (y) = {
89- let v = assetInfo(y)
90- if ($isInstanceOf(v, "Asset"))
90+func E (z) = {
91+ let w = assetInfo(z)
92+ if ($isInstanceOf(w, "Asset"))
9193 then {
92- let w = v
93- w.quantity
94+ let x = w
95+ x.quantity
9496 }
9597 else throw("_getAssetQuantity: no such asset")
9698 }
9799
98100
99-func E (y,F) = {
100- let v = y
101- if ($isInstanceOf(v, "ByteVector"))
101+func F (z,G) = {
102+ let w = z
103+ if ($isInstanceOf(w, "ByteVector"))
102104 then {
103- let w = v
104- assetBalance(F, w)
105+ let x = w
106+ assetBalance(G, x)
105107 }
106- else wavesBalance(F).regular
108+ else wavesBalance(G).regular
107109 }
108110
109111
110-func G () = {
111- let v = getString(e)
112- if ($isInstanceOf(v, "String"))
112+func H () = {
113+ let w = getString(e)
114+ if ($isInstanceOf(w, "String"))
113115 then {
114- let w = v
115- if ((w == b))
116+ let x = w
117+ if ((x == b))
116118 then unit
117- else fromBase58String(w)
119+ else fromBase58String(x)
118120 }
119121 else throw("_loadBaseAsset: no base asset")
120122 }
121123
122124
123-func H () = {
124- let v = getString(g)
125- if ($isInstanceOf(v, "String"))
125+func I () = {
126+ let w = getString(g)
127+ if ($isInstanceOf(w, "String"))
126128 then {
127- let w = v
128- addressFromStringValue(w)
129+ let x = w
130+ addressFromStringValue(x)
129131 }
130132 else throw("_loadStakingAdapter: no staking adapter")
131133 }
132134
133135
134-func I (J,K) = {
135- let v = getInteger(J)
136- if ($isInstanceOf(v, "Int"))
136+func J () = {
137+ let w = getString(m)
138+ if ($isInstanceOf(w, "String"))
137139 then {
138- let w = v
139- w
140+ let x = w
141+ addressFromStringValue(x)
140142 }
141- else K
143+ else throw("_loadSponsorshipManager: no sponsorship manager")
142144 }
143145
144146
145-func L (J,K) = {
146- let v = getBinary(J)
147- if ($isInstanceOf(v, "ByteVector"))
147+func K (L,M) = {
148+ let w = getInteger(L)
149+ if ($isInstanceOf(w, "Int"))
148150 then {
149- let w = v
150- toBigInt(w)
151+ let x = w
152+ x
151153 }
152- else K
154+ else M
153155 }
154156
155157
156-func M () = {
157- let v = getString(f)
158- if ($isInstanceOf(v, "String"))
158+func N (L,M) = {
159+ let w = getBinary(L)
160+ if ($isInstanceOf(w, "ByteVector"))
159161 then {
160- let w = v
161- fromBase58String(w)
162+ let x = w
163+ toBigInt(x)
164+ }
165+ else M
166+ }
167+
168+
169+func O () = {
170+ let w = getString(f)
171+ if ($isInstanceOf(w, "String"))
172+ then {
173+ let x = w
174+ fromBase58String(x)
162175 }
163176 else base58''
164177 }
165178
166179
167-func N (y,O,P) = {
168- let Q = I(h, 0)
169- let R = (Q + O)
170- let S = if ((O > 0))
171- then invoke(P, m, nil, [AttachedPayment(y, O)])
172- else invoke(P, n, [(-1 * O)], nil)
173- if ((S == S))
174- then [IntegerEntry(h, R)]
180+func P (z,Q,R) = {
181+ let S = K(h, 0)
182+ let T = (S + Q)
183+ let U = if ((Q > 0))
184+ then invoke(R, n, nil, [AttachedPayment(z, Q)])
185+ else invoke(R, o, [(-1 * Q)], nil)
186+ if ((U == U))
187+ then [IntegerEntry(h, T)]
175188 else throw("Strict value is not equal to itself.")
176189 }
177190
178191
179-func T (U) = {
180- let S = invoke(H(), o, nil, nil)
181- if ((S == S))
192+func V (W) = {
193+ let U = invoke(I(), p, nil, nil)
194+ if ((U == U))
182195 then {
183- let v = S
184- if ($isInstanceOf(v, "(Int, Int, Int)"))
196+ let w = U
197+ if ($isInstanceOf(w, "(Int, Int, Int)"))
185198 then {
186- let V = v
187- if (U)
199+ let X = w
200+ if (W)
188201 then {
189- let W = invoke(this, m, [V._1, V._3], nil)
190- if ((W == W))
191- then $Tuple2(true, V._2)
202+ let Y = invoke(this, n, [X._1, X._3], nil)
203+ if ((Y == Y))
204+ then $Tuple2(true, X._2)
192205 else throw("Strict value is not equal to itself.")
193206 }
194207 else {
195- let W = invoke(this, m, [(V._1 + V._2), V._3], nil)
196- if ((W == W))
208+ let Y = invoke(this, n, [(X._1 + X._2), X._3], nil)
209+ if ((Y == Y))
197210 then $Tuple2(true, 0)
198211 else throw("Strict value is not equal to itself.")
199212 }
200213 }
201214 else $Tuple2(false, 0)
202215 }
203216 else throw("Strict value is not equal to itself.")
204217 }
205218
206219
207-@Callable(X)
208-func init (Y,Z,aa,ab) = {
209- let ac = valueOrErrorMessage(getString(c), "init: no multisig set")
210- let C = M()
211- let ad = z(aa)
212- let ae = if ((X.caller != this))
220+@Callable(Z)
221+func init (aa,ab,ac,ad) = {
222+ let ae = valueOrErrorMessage(getString(c), "init: no multisig set")
223+ let D = O()
224+ let af = A(ac)
225+ let ag = if ((Z.caller != this))
213226 then throw("init: permission denied")
214- else if ((C != base58''))
227+ else if ((D != base58''))
215228 then throw("init: already initialized")
216- else if (if ((4 > size(Y)))
229+ else if (if ((4 > size(aa)))
217230 then true
218- else (size(Y) > 16))
231+ else (size(aa) > 16))
219232 then throw("init: invalid token name")
220- else if ((size(Z) > 1000))
233+ else if ((size(ab) > 1000))
221234 then throw("init: invalid token description")
222- else if (!(x(aa)))
235+ else if (!(y(ac)))
223236 then throw("init: invalid base asset")
224- else if (!(t(ab)))
237+ else if (!(u(ad)))
225238 then throw("init: invalid staking adapter")
226239 else unit
227- if ((ae == ae))
240+ if ((ag == ag))
228241 then {
229- let af = A(ad)
230- let ag = Issue(Y, Z, s, af, true)
231- let ah = calculateAssetId(ag)
232- let ai = N(ad, s, addressFromStringValue(ab))
233- $Tuple2(([StringEntry(e, aa), StringEntry(g, ab), StringEntry(f, toBase58String(ah)), ag] ++ ai), unit)
242+ let ah = B(af)
243+ let ai = Issue(aa, ab, t, ah, true)
244+ let aj = calculateAssetId(ai)
245+ let ak = P(af, t, addressFromStringValue(ad))
246+ $Tuple2(([StringEntry(e, ac), StringEntry(g, ad), StringEntry(f, toBase58String(aj)), ai] ++ ak), unit)
234247 }
235248 else throw("Strict value is not equal to itself.")
236249 }
237250
238251
239252
240-@Callable(X)
253+@Callable(Z)
241254 func getRate () = {
242- let aj = L(i, p)
243- let ak = L(j, q)
244- let al = I(k, 0)
245- let am = min([I(l, 0), height])
246- let an = (aj + (ak * toBigInt((am - al))))
247- $Tuple2(nil, toString(an))
255+ let al = N(i, q)
256+ let am = N(j, r)
257+ let an = K(k, 0)
258+ let ao = min([K(l, 0), height])
259+ let ap = (al + (am * toBigInt((ao - an))))
260+ $Tuple2(nil, toString(ap))
248261 }
249262
250263
251264
252-@Callable(X)
265+@Callable(Z)
253266 func checkpoint () = {
254- let ao = T(true)
255- if ((ao == ao))
256- then if (!(ao._1))
267+ let aq = V(true)
268+ if ((aq == aq))
269+ then if (!(aq._1))
257270 then throw("checkpoint: no reward")
258- else if ((ao._2 > 0))
259- then $Tuple2([ScriptTransfer(X.originCaller, ao._2, G())], unit)
271+ else if ((aq._2 > 0))
272+ then $Tuple2([ScriptTransfer(Z.originCaller, aq._2, H())], unit)
260273 else $Tuple2(nil, unit)
261274 else throw("Strict value is not equal to itself.")
262275 }
263276
264277
265278
266-@Callable(X)
279+@Callable(Z)
267280 func deposit () = {
268- let ap = toString(X.caller)
269- let ad = G()
270- let C = M()
271- let aq = toBigInt(D(C))
272- let ae = if ((size(X.payments) != 1))
281+ let ar = toString(Z.caller)
282+ let af = H()
283+ let D = O()
284+ let as = toBigInt(E(D))
285+ let ag = if ((size(Z.payments) != 1))
273286 then throw("deposit: no payments")
274- else if ((X.payments[0].assetId != ad))
287+ else if ((Z.payments[0].assetId != af))
275288 then throw("deposit: payment is not in base asset")
276- else if ((0 >= X.payments[0].amount))
289+ else if ((0 >= Z.payments[0].amount))
277290 then throw("deposit: invalid payment amount")
278291 else unit
279- if ((ae == ae))
292+ if ((ag == ag))
280293 then {
281- let ao = T(false)
282- if ((ao == ao))
294+ let aq = V(false)
295+ if ((aq == aq))
283296 then {
284- let aj = L(i, p)
285- let ak = L(j, q)
286- let al = I(k, 0)
287- let am = min([I(l, 0), height])
288- let ar = (aj + (ak * toBigInt((am - al))))
289- let as = toInt(fraction(toBigInt(X.payments[0].amount), p, ar, FLOOR))
290- let at = fraction(ak, aq, (aq + toBigInt(as)), FLOOR)
291- let au = am
292- let ai = N(ad, X.payments[0].amount, H())
293- $Tuple2(([Reissue(C, as, true), ScriptTransfer(X.caller, as, C), BinaryEntry(i, toBytes(ar)), BinaryEntry(j, toBytes(at)), IntegerEntry(k, au)] ++ ai), unit)
297+ let al = N(i, q)
298+ let am = N(j, r)
299+ let an = K(k, 0)
300+ let ao = min([K(l, 0), height])
301+ let at = (al + (am * toBigInt((ao - an))))
302+ let au = toInt(fraction(toBigInt(Z.payments[0].amount), q, at, FLOOR))
303+ let av = fraction(am, as, (as + toBigInt(au)), FLOOR)
304+ let aw = ao
305+ let ak = P(af, Z.payments[0].amount, I())
306+ $Tuple2(([Reissue(D, au, true), ScriptTransfer(Z.caller, au, D), BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw)] ++ ak), unit)
294307 }
295308 else throw("Strict value is not equal to itself.")
296309 }
297310 else throw("Strict value is not equal to itself.")
298311 }
299312
300313
301314
302-@Callable(X)
303-func stake (O,av) = {
304- let ap = toString(X.caller)
305- let ad = G()
306- let C = M()
307- let aq = toBigInt(D(C))
308- let ae = if ((X.caller != this))
315+@Callable(Z)
316+func stake (Q,ax) = {
317+ let ar = toString(Z.caller)
318+ let af = H()
319+ let D = O()
320+ let as = toBigInt(E(D))
321+ let ag = if ((Z.caller != this))
309322 then throw("stake: only this contract")
310- else if ((0 >= O))
323+ else if ((0 >= Q))
311324 then throw("stake: invalid stake amount")
312- else if ((O > E(ad, this)))
325+ else if ((Q > F(af, this)))
313326 then throw("stake: insufficient stake amount")
314- else if ((aq == q))
327+ else if ((as == r))
315328 then throw("stake: no deposits to stake for")
316329 else unit
317- if ((ae == ae))
330+ if ((ag == ag))
318331 then {
319- let aj = L(i, p)
320- let ak = L(j, q)
321- let al = I(k, 0)
322- let am = I(l, 0)
323- let aw = min([am, height])
324- let ax = if ((aw == height))
332+ let al = N(i, q)
333+ let am = N(j, r)
334+ let an = K(k, 0)
335+ let ao = K(l, 0)
336+ let ay = min([ao, height])
337+ let az = if ((ay == height))
325338 then {
326- let ar = (aj + (toBigInt((aw - al)) * ak))
327- let ay = (ak * toBigInt((am - aw)))
328- let at = fraction(((toBigInt(O) * p) + ay), r, (aq * toBigInt(av)))
329- let au = height
330- let az = (au + av)
331-[BinaryEntry(i, toBytes(ar)), BinaryEntry(j, toBytes(at)), IntegerEntry(k, au), IntegerEntry(l, az)]
339+ let at = (al + (toBigInt((ay - an)) * am))
340+ let aA = (am * toBigInt((ao - ay)))
341+ let av = fraction(((toBigInt(Q) * q) + aA), s, (as * toBigInt(ax)))
342+ let aw = height
343+ let aB = (aw + ax)
344+[BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)]
332345 }
333- else if ((am > al))
346+ else if ((ao > an))
334347 then {
335- let ar = (aj + (toBigInt((am - al)) * ak))
336- let at = fraction(toBigInt(O), p, (aq * toBigInt(av)))
337- let au = height
338- let az = (au + av)
339-[BinaryEntry(i, toBytes(ar)), BinaryEntry(j, toBytes(at)), IntegerEntry(k, au), IntegerEntry(l, az)]
348+ let at = (al + (toBigInt((ao - an)) * am))
349+ let av = fraction(toBigInt(Q), q, (as * toBigInt(ax)))
350+ let aw = height
351+ let aB = (aw + ax)
352+[BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)]
340353 }
341354 else {
342- let at = fraction(toBigInt(O), p, (aq * toBigInt(av)))
343- let au = height
344- let az = (au + av)
345-[BinaryEntry(j, toBytes(at)), IntegerEntry(k, au), IntegerEntry(l, az)]
355+ let av = fraction(toBigInt(Q), q, (as * toBigInt(ax)))
356+ let aw = height
357+ let aB = (aw + ax)
358+[BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)]
346359 }
347- let ai = N(ad, O, H())
348- $Tuple2((ax ++ ai), unit)
360+ let ak = P(af, Q, I())
361+ $Tuple2((az ++ ak), unit)
349362 }
350363 else throw("Strict value is not equal to itself.")
351364 }
352365
353366
354367
355-@Callable(X)
368+@Callable(Z)
356369 func withdraw () = {
357- let ap = toString(X.caller)
358- let ad = G()
359- let C = M()
360- let aq = toBigInt(D(C))
361- let ae = if ((1 > size(X.payments)))
370+ let ar = toString(Z.caller)
371+ let af = H()
372+ let D = O()
373+ let as = toBigInt(E(D))
374+ let ag = if ((1 > size(Z.payments)))
362375 then throw("withdraw: no payments")
363- else if ((X.payments[0].assetId != C))
376+ else if ((Z.payments[0].assetId != D))
364377 then throw("withdraw: payment is not in correct asset")
365- else if ((0 >= X.payments[0].amount))
378+ else if ((0 >= Z.payments[0].amount))
366379 then throw("withdraw: invalid payment amount")
367380 else unit
368- if ((ae == ae))
381+ if ((ag == ag))
369382 then {
370- let ao = T(false)
371- if ((ao == ao))
383+ let aq = V(false)
384+ if ((aq == aq))
372385 then {
373- let aj = L(i, p)
374- let ak = L(j, q)
375- let al = I(k, 0)
376- let am = min([I(l, 0), height])
377- let ar = (aj + (ak * toBigInt((am - al))))
378- let aA = toInt(fraction(toBigInt(X.payments[0].amount), ar, p, FLOOR))
379- let at = fraction(ak, aq, (aq - toBigInt(X.payments[0].amount)), FLOOR)
380- let au = am
381- let ai = N(ad, (-1 * aA), H())
382- $Tuple2((ai ++ [Burn(C, X.payments[0].amount), ScriptTransfer(X.caller, aA, unit), BinaryEntry(i, toBytes(ar)), BinaryEntry(j, toBytes(at)), IntegerEntry(k, au)]), unit)
386+ let al = N(i, q)
387+ let am = N(j, r)
388+ let an = K(k, 0)
389+ let ao = min([K(l, 0), height])
390+ let at = (al + (am * toBigInt((ao - an))))
391+ let aC = toInt(fraction(toBigInt(Z.payments[0].amount), at, q, FLOOR))
392+ let av = fraction(am, as, (as - toBigInt(Z.payments[0].amount)), FLOOR)
393+ let aw = ao
394+ let ak = P(af, (-1 * aC), I())
395+ $Tuple2((ak ++ [Burn(D, Z.payments[0].amount), ScriptTransfer(Z.caller, aC, unit), BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw)]), unit)
383396 }
384397 else throw("Strict value is not equal to itself.")
385398 }
386399 else throw("Strict value is not equal to itself.")
387400 }
388401
389402
390403
391-@Callable(X)
392-func setMultisig (aB) = {
393- let ae = if ((X.caller != this))
404+@Callable(Z)
405+func setMultisig (aD) = {
406+ let ag = if ((Z.caller != this))
394407 then throw("setMultisig: permission denied")
395- else if (!(t(aB)))
408+ else if (!(u(aD)))
396409 then throw("setMultisig: invalid multisig address")
397410 else unit
398- if ((ae == ae))
399- then $Tuple2([StringEntry(c, aB)], unit)
411+ if ((ag == ag))
412+ then $Tuple2([StringEntry(c, aD)], unit)
400413 else throw("Strict value is not equal to itself.")
401414 }
402415
403416
404-@Verifier(aC)
405-func aD () = {
406- let v = getString(c)
407- if ($isInstanceOf(v, "String"))
417+
418+@Callable(Z)
419+func setSponsorshipManager (aE) = {
420+ let ag = if ((Z.caller != this))
421+ then throw("setSponsorshipManager: permission denied")
422+ else if (!(u(aE)))
423+ then throw("setSponsorshipManager: invalid manager address")
424+ else unit
425+ if ((ag == ag))
426+ then $Tuple2([StringEntry(m, aE)], unit)
427+ else throw("Strict value is not equal to itself.")
428+ }
429+
430+
431+
432+@Callable(Z)
433+func updateSponsorship (aF,aG) = {
434+ let ag = if ((Z.caller != J()))
435+ then throw("updateSponsorship: permission denied")
436+ else if ((0 > aF))
437+ then throw("updateSponsorship: invalid sponsorship fee")
438+ else if ((0 > aG))
439+ then throw("updateSponsorship: invalid waves required amount")
440+ else unit
441+ if ((ag == ag))
408442 then {
409- let ac = v
410- valueOrElse(getBoolean(addressFromStringValue(ac), makeString([d, toString(this), toBase58String(aC.id)], a)), false)
443+ let aH = O()
444+ let aI = if ((aF == 0))
445+ then unit
446+ else aF
447+ let az = if ((wavesBalance(this).regular > aG))
448+ then [ScriptTransfer(Z.caller, (wavesBalance(this).regular - aG), unit)]
449+ else nil
450+ $Tuple2((az ++ [ScriptTransfer(Z.caller, assetBalance(this, aH), aH), SponsorFee(aH, aI)]), unit)
411451 }
412- else sigVerify(aC.bodyBytes, aC.proofs[0], aC.senderPublicKey)
452+ else throw("Strict value is not equal to itself.")
453+ }
454+
455+
456+
457+@Callable(Z)
458+func wxVotingSuggest (aJ,aK,aL) = {
459+ let aM = valueOrErrorMessage(addressFromString(aJ), "wxVotingSuggest: invalid voting address")
460+ let aN = valueOrErrorMessage(assetInfo(fromBase58String(aK)), "wxVotingSuggest: invalid wx asset")
461+ let U = invoke(aM, "suggest", [O(), aL], [AttachedPayment(fromBase58String(aK), (100 * aN.decimals))])
462+ if ((U == U))
463+ then $Tuple2(nil, unit)
464+ else throw("Strict value is not equal to itself.")
465+ }
466+
467+
468+@Verifier(aO)
469+func aP () = {
470+ let w = getString(c)
471+ if ($isInstanceOf(w, "String"))
472+ then {
473+ let ae = w
474+ valueOrElse(getBoolean(addressFromStringValue(ae), makeString([d, toString(this), toBase58String(aO.id)], a)), false)
475+ }
476+ else sigVerify(aO.bodyBytes, aO.proofs[0], aO.senderPublicKey)
413477 }
414478

github/deemru/w8io/169f3d6 
128.47 ms