tx · BPbGKRJCsMb33aWkhW6arytEBw6MyfygwetTKwCJ2ccu

3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4:  -0.01500000 Waves

2023.11.07 15:26 [2832926] smart account 3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4 > SELF 0.00000000 Waves

{ "type": 13, "id": "BPbGKRJCsMb33aWkhW6arytEBw6MyfygwetTKwCJ2ccu", "fee": 1500000, "feeAssetId": null, "timestamp": 1699360054626, "version": 2, "chainId": 84, "sender": "3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4", "senderPublicKey": "DU1U4j8FqHUMRr9WgfF3yo67ULEFkjp7dtMWMpjBK1ar", "proofs": [ "DSCFsBnb8vQySRDUwVyPggKZbzb9kVu2kWFzcXVoGa6bUuMmiL7cdG4d9GJgjskifuz3ZDxAB2eLF7z21cXH1fs", "48UtMFCPH3HBVfMFYBY8xrf1AXkJLiW3P5D5cZFNyopD8QKV92doPJfFW4yjPqhsHttf5oJhCo6PArWF6mgWA6HZ" ], "script": "base64:BgIuCAISABIDCgEIEgYKBAgICAgSABIDCgEBEgASABIDCgEIEgUKAwgICBIAEgASACAABlNDQUxFOACAwtcvAA1QRVJDRU5UX1NDQUxFAJBOAAlTRVBBUkFUT1ICAl9fAAlrSW50ZXJlc3QCCGludGVyZXN0AA1rVXNlckludGVyZXN0Ag1fdXNlckludGVyZXN0AA5rVXNlckF2YWlsYWJsZQITX3VzZXJBdmFpbGFibGVDbGFpbQAQa1VzZXJUb2tlblN0YWtlZAIQX3VzZXJUb2tlblN0YWtlZAARa1RvdGFsVG9rZW5TdGFrZWQCEHRvdGFsVG9rZW5TdGFrZWQADGtORlRJbnRlcmVzdAILTkZUSW50ZXJlc3QAEGtORlRVc2VySW50ZXJlc3QCEF9ORlRVc2VySW50ZXJlc3QAFmtORlRVc2VyQXZhaWxhYmxlQ2xhaW0CFl9ORlRVc2VyQXZhaWxhYmxlQ2xhaW0AD2tORlRUb3RhbFN0YWtlZAIOTkZU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bGVhbkVudHJ5AgUHa0FjdGl2ZQcFA25pbAECdHgBBnZlcmlmeQAEE211bHRpU2lnbmVkQnlBZG1pbnMEEmFkbWluUHViS2V5MVNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCGFkbWluMVBLAAEAAAQSYWRtaW5QdWJLZXkyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQUIYWRtaW4yUEsAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQhhZG1pbjNQSwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAgQHJG1hdGNoMAUCdHgDCQABAgUHJG1hdGNoMAIXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EA2ludgUHJG1hdGNoMAQGaXNTZWxmCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5BAppc1JpZ2h0RmVlAwkAAAIIBQNpbnYDZmVlAKD3NgkAAAIIBQNpbnYKZmVlQXNzZXRJZAUEdW5pdAcECmlzSW5pdENhbGwJAAACCAUDaW52CGZ1bmN0aW9uAgRpbml0BAxpc25vUGF5bWVudHMJAAACCQCQAwEIBQNpbnYIcGF5bWVudHMAAAMDAwMFCmlzUmlnaHRGZWUFCmlzSW5pdENhbGwHBQZpc1NlbGYHBQxpc25vUGF5bWVudHMHBgUTbXVsdGlTaWduZWRCeUFkbWlucwUTbXVsdGlTaWduZWRCeUFkbWluc3PXXsY=", "height": 2832926, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HEQiLGTf1dhgxCqdktd982YwvXjNLQWVu114VGtQ7pxD Next: none Diff:
OldNewDifferences
3535
3636 let q = "tokenId"
3737
38-let r = "percentForNFT"
38+let r = "active"
3939
40-let s = "nftCreatedList"
40+let s = "admin_pub_1"
4141
42-let t = "active"
42+let t = "admin_pub_2"
4343
44-let u = "admin_pub_1"
44+let u = "admin_pub_3"
4545
46-let v = "admin_pub_2"
46+let v = fromBase58String(valueOrErrorMessage(getString(this, s), "Can't get admin1PK"))
4747
48-let w = "admin_pub_3"
48+let w = fromBase58String(valueOrErrorMessage(getString(this, t), "Can't get admin2PK"))
4949
50-let x = fromBase58String(valueOrErrorMessage(getString(this, u), "Can't get admin1PK"))
50+let x = fromBase58String(valueOrErrorMessage(getString(this, u), "Can't get operatorPK"))
5151
52-let y = fromBase58String(valueOrErrorMessage(getString(this, v), "Can't get admin2PK"))
52+let y = valueOrErrorMessage(getString(this, q), "Can't get staking token")
5353
54-let z = fromBase58String(valueOrErrorMessage(getString(this, w), "Can't get operatorPK"))
55-
56-let A = valueOrErrorMessage(getString(this, q), "Can't get staking token")
57-
58-func B (C) = if (containsElement([x, y, z], C.callerPublicKey))
54+func z (A) = if (containsElement([v, w, x], A.callerPublicKey))
5955 then unit
6056 else throw("Only admin can call this function")
6157
6258
63-func D (C) = if ((C.caller == this))
59+func B (A) = if ((A.caller == this))
6460 then unit
6561 else throw("Only contract itself can call this function")
6662
6763
68-func E () = if (valueOrElse(getBoolean(this, t), true))
64+func C () = if (valueOrElse(getBoolean(this, r), true))
6965 then unit
7066 else throw("DApp is inactive at this moment")
7167
7268
73-func F (G) = {
74- let H = G
75- if ($isInstanceOf(H, "ByteVector"))
69+func D (E) = {
70+ let F = E
71+ if ($isInstanceOf(F, "ByteVector"))
7672 then {
77- let I = H
78- toBase58String(I)
73+ let G = F
74+ toBase58String(G)
7975 }
80- else if ($isInstanceOf(H, "Unit"))
76+ else if ($isInstanceOf(F, "Unit"))
8177 then {
82- let J = H
78+ let H = F
8379 "WAVES"
8480 }
8581 else throw("Not Asset id")
8682 }
8783
8884
89-func K (L) = {
90- let M = valueOrElse(getInteger(this, h), 0)
91- let N = valueOrElse(getInteger(this, d), 0)
92- let O = valueOrElse(getInteger(this, (L + f)), 0)
93- let P = valueOrElse(getInteger(this, (L + e)), N)
94- let Q = valueOrElse(getInteger(this, (L + g)), 0)
95- let R = fraction(Q, (N - P), a)
96- $Tuple4(N, (R + O), Q, M)
85+func I (J) = {
86+ let K = valueOrElse(getInteger(this, h), 0)
87+ let L = valueOrElse(getInteger(this, d), 0)
88+ let M = valueOrElse(getInteger(this, (J + f)), 0)
89+ let N = valueOrElse(getInteger(this, (J + e)), L)
90+ let O = valueOrElse(getInteger(this, (J + g)), 0)
91+ let P = fraction(O, (L - N), a)
92+ $Tuple4(L, (P + M), O, K)
9793 }
9894
9995
100-func S (L) = {
101- let T = valueOrElse(getInteger(this, l), 0)
102- let N = valueOrElse(getInteger(this, i), 0)
103- let O = valueOrElse(getInteger(this, (L + k)), 0)
104- let P = valueOrElse(getInteger(this, (L + j)), N)
105- let U = valueOrElse(getInteger(this, (L + m)), 0)
106- let R = (U * (N - P))
107- $Tuple4(N, (R + O), U, T)
96+func Q (J) = {
97+ let R = valueOrElse(getInteger(this, l), 0)
98+ let L = valueOrElse(getInteger(this, i), 0)
99+ let M = valueOrElse(getInteger(this, (J + k)), 0)
100+ let N = valueOrElse(getInteger(this, (J + j)), L)
101+ let S = valueOrElse(getInteger(this, (J + m)), 0)
102+ let P = (S * (L - N))
103+ $Tuple4(L, (P + M), S, R)
108104 }
109105
110106
111-func V () = {
112- let W = valueOrElse(getInteger(this, p), 0)
113- let M = valueOrElse(getInteger(this, h), 0)
114- let X = valueOrElse(getInteger(this, l), 0)
115- let Y = getIntegerValue(this, r)
116- let Z = if ((X == 0))
117- then W
118- else fraction(W, (100 - min([Y, (X * 10)])), 100)
119- (fraction(Z, b, M) * 52)
107+func T () = {
108+ let U = valueOrElse(getInteger(this, p), 0)
109+ let K = valueOrElse(getInteger(this, h), 0)
110+ let V = valueOrElse(getInteger(this, l), 0)
111+ let W = if ((V == 0))
112+ then U
113+ else fraction(U, (100 - V), 100)
114+ (fraction(W, b, K) * 52)
120115 }
121116
122117
123-func aa (L) = {
124- func ab (ac,ad) = if (isDefined(getBoolean(this, (((L + "_") + ad) + n))))
125- then (ac :+ ad)
126- else ac
127-
128- let ae = valueOrElse(getString(this, s), "")
129- let af = if ((ae == ""))
130- then nil
131- else split(ae, c)
132- let ag = {
133- let ah = af
134- let ai = size(ah)
135- let aj = nil
136- func ak (al,am) = if ((am >= ai))
137- then al
138- else ab(al, ah[am])
139-
140- func an (al,am) = if ((am >= ai))
141- then al
142- else throw("List size exceeds 5")
143-
144- an(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5)
145- }
146- makeString(ag, ",")
147- }
148-
149-
150-@Callable(C)
118+@Callable(A)
151119 func getStatsREADONLY () = {
152- let ao = V()
153- let M = valueOrElse(getInteger(this, h), 0)
154- let T = valueOrElse(getInteger(this, l), 0)
155- $Tuple2(nil, makeString(["%d%d%d", toString(ao), toString(M), toString(T)], c))
120+ let X = T()
121+ let K = valueOrElse(getInteger(this, h), 0)
122+ let R = valueOrElse(getInteger(this, l), 0)
123+ $Tuple2(nil, makeString(["%d%d%d", toString(X), toString(K), toString(R)], c))
156124 }
157125
158126
159127
160-@Callable(C)
161-func getStatsByUserREADONLY (L) = {
162- let ap = valueOrErrorMessage(addressFromString(L), "Wrong user address")
163- let aq = K(L)
164- let ar = aq._1
165- let as = aq._2
166- let Q = aq._3
167- let M = aq._4
168- let at = S(L)
169- let au = at._1
170- let av = at._2
171- let aw = at._3
172- let X = at._4
173- let ax = assetBalance(ap, fromBase58String(A))
174- let ag = aa(L)
175- $Tuple2(nil, makeString(["%d%d%d%d%s", toString(ax), toString(Q), toString(as), toString(av), ag], c))
128+@Callable(A)
129+func getStatsByUserREADONLY (J) = {
130+ let Y = valueOrErrorMessage(addressFromString(J), "Wrong user address")
131+ let Z = I(J)
132+ let aa = Z._1
133+ let ab = Z._2
134+ let O = Z._3
135+ let K = Z._4
136+ let ac = Q(J)
137+ let ad = ac._1
138+ let ae = ac._2
139+ let af = ac._3
140+ let V = ac._4
141+ let ag = assetBalance(Y, fromBase58String(y))
142+ $Tuple2(nil, makeString(["%d%d%d%d%s", toString(ag), toString(O), toString(ab), toString(ae)], c))
176143 }
177144
178145
179146
180-@Callable(C)
181-func getUserStatsREADONLY (L) = {
182- let ao = V()
183- let ay = if ((L == ""))
184- then $Tuple4(0, 0, 0, 0)
185- else {
186- let ap = valueOrErrorMessage(addressFromString(L), "Wrong user address")
187- let az = K(L)
188- let ar = az._1
189- let as = az._2
190- let Q = az._3
191- let M = az._4
192- let aA = S(L)
193- let au = aA._1
194- let av = aA._2
195- let aw = aA._3
196- let X = aA._4
197- let aB = assetBalance(ap, fromBase58String(A))
198- $Tuple4(aB, Q, as, av)
199- }
200- let ax = ay._1
201- let Q = ay._2
202- let as = ay._3
203- let av = ay._4
204- $Tuple2(nil, makeString(["%d%d%d%d%d", toString(ao), toString(ax), toString(Q), toString(as), toString(av)], c))
205- }
147+@Callable(A)
148+func init (y,ah,ai,aj) = valueOrElse(B(A), if (isDefined(getString(this, q)))
149+ then throw("DApp already inited")
150+ else if (!(isDefined(assetInfo(fromBase58String(y)))))
151+ then throw("asset id is not correct asset id")
152+ else if ((size(fromBase58String(ah)) != 32))
153+ then throw("group1Admin1PubKey is not correct")
154+ else if ((size(fromBase58String(ai)) != 32))
155+ then throw("group1Admin1PubKey is not correct")
156+ else if ((size(fromBase58String(aj)) != 32))
157+ then throw("group1Admin1PubKey is not correct")
158+ else [StringEntry(q, y), StringEntry(s, ah), StringEntry(t, ai), StringEntry(u, aj)])
206159
207160
208161
209-@Callable(C)
210-func init (A,aC,aD,aE,aF) = valueOrElse(D(C), if (isDefined(getString(this, q)))
211- then throw("DApp already inited")
212- else if (!(isDefined(assetInfo(fromBase58String(A)))))
213- then throw("asset id is not correct asset id")
214- else if ((size(fromBase58String(aC)) != 32))
215- then throw("group1Admin1PubKey is not correct")
216- else if ((size(fromBase58String(aD)) != 32))
217- then throw("group1Admin1PubKey is not correct")
218- else if ((size(fromBase58String(aE)) != 32))
219- then throw("group1Admin1PubKey is not correct")
220- else [StringEntry(q, A), StringEntry(u, aC), StringEntry(v, aD), StringEntry(w, aE), IntegerEntry(r, aF)])
221-
222-
223-
224-@Callable(C)
225-func stake () = valueOrElse(E(), if ((size(C.payments) != 1))
162+@Callable(A)
163+func stake () = valueOrElse(C(), if ((size(A.payments) != 1))
226164 then throw("One payment expected")
227165 else {
228- let aG = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
229- let aH = aG._1
230- let aI = aG._2
231- if ((aI != fromBase58String(A)))
166+ let ak = $Tuple2(A.payments[0].amount, A.payments[0].assetId)
167+ let al = ak._1
168+ let am = ak._2
169+ if ((am != fromBase58String(y)))
232170 then throw("Wrong payment asset")
233171 else {
234- let L = toString(C.caller)
235- let aJ = K(L)
236- let ar = aJ._1
237- let as = aJ._2
238- let Q = aJ._3
239- let M = aJ._4
240-[IntegerEntry((L + e), ar), IntegerEntry((L + f), as), IntegerEntry((L + g), (Q + aH)), IntegerEntry(h, (M + aH))]
172+ let J = toString(A.caller)
173+ let an = I(J)
174+ let aa = an._1
175+ let ab = an._2
176+ let O = an._3
177+ let K = an._4
178+[IntegerEntry((J + e), aa), IntegerEntry((J + f), ab), IntegerEntry((J + g), (O + al)), IntegerEntry(h, (K + al))]
241179 }
242180 })
243181
244182
245183
246-@Callable(C)
247-func unstake (aK) = valueOrElse(E(), {
248- let L = toString(C.caller)
249- if ((0 >= aK))
184+@Callable(A)
185+func unstake (ao) = valueOrElse(C(), {
186+ let J = toString(A.caller)
187+ if ((0 >= ao))
250188 then throw("Amount must be greater than 0")
251189 else {
252- let aL = K(L)
253- let ar = aL._1
254- let as = aL._2
255- let Q = aL._3
256- let M = aL._4
257- if ((aK > Q))
190+ let ap = I(J)
191+ let aa = ap._1
192+ let ab = ap._2
193+ let O = ap._3
194+ let K = ap._4
195+ if ((ao > O))
258196 then throw("You can't unstake more than staked")
259- else [IntegerEntry((L + e), ar), IntegerEntry((L + f), as), IntegerEntry((L + g), (Q - aK)), IntegerEntry(h, (M - aK)), ScriptTransfer(C.caller, aK, fromBase58String(A))]
197+ else [IntegerEntry((J + e), aa), IntegerEntry((J + f), ab), IntegerEntry((J + g), (O - ao)), IntegerEntry(h, (K - ao)), ScriptTransfer(A.caller, ao, fromBase58String(y))]
260198 }
261199 })
262200
263201
264202
265-@Callable(C)
266-func claim () = valueOrElse(E(), {
267- let L = toString(C.caller)
268- let aM = K(L)
269- let ar = aM._1
270- let as = aM._2
271- let Q = aM._3
272- let M = aM._4
273- let aN = S(L)
274- let au = aN._1
275- let av = aN._2
276- let aw = aN._3
277- let X = aN._4
278- if (((as + av) == 0))
203+@Callable(A)
204+func claim () = valueOrElse(C(), {
205+ let J = toString(A.caller)
206+ let aq = I(J)
207+ let aa = aq._1
208+ let ab = aq._2
209+ let O = aq._3
210+ let K = aq._4
211+ let ar = Q(J)
212+ let ad = ar._1
213+ let ae = ar._2
214+ let af = ar._3
215+ let V = ar._4
216+ if (((ab + ae) == 0))
279217 then throw("Nothing to claim")
280- else [IntegerEntry((L + e), ar), IntegerEntry((L + f), 0), IntegerEntry((L + j), au), IntegerEntry((L + k), 0), ScriptTransfer(C.caller, (as + av), fromBase58String(A))]
218+ else [IntegerEntry((J + e), aa), IntegerEntry((J + f), 0), IntegerEntry((J + j), ad), IntegerEntry((J + k), 0), ScriptTransfer(A.caller, (ab + ae), fromBase58String(y))]
281219 })
282220
283221
284222
285-@Callable(C)
286-func stakeNFT () = valueOrElse(E(), if ((size(C.payments) != 1))
223+@Callable(A)
224+func stakeNFT () = valueOrElse(C(), if ((size(A.payments) != 1))
287225 then throw("One payment expected")
288226 else {
289- let aO = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
290- let aH = aO._1
291- let aI = aO._2
292- let aP = F(aI)
293- if (!(isDefined(getString(this, (aP + o)))))
227+ let as = $Tuple2(A.payments[0].amount, A.payments[0].assetId)
228+ let al = as._1
229+ let am = as._2
230+ let at = D(am)
231+ if (!(isDefined(getString(this, (at + o)))))
294232 then throw("Wrong nft asset")
295233 else {
296- let L = toString(C.caller)
297- let aQ = S(L)
298- let ar = aQ._1
299- let as = aQ._2
300- let aw = aQ._3
301- let X = aQ._4
302-[IntegerEntry((L + j), ar), IntegerEntry((L + k), as), IntegerEntry((L + m), (aw + 1)), IntegerEntry(l, (X + 1)), BooleanEntry((((L + "_") + aP) + n), true)]
234+ let J = toString(A.caller)
235+ let au = Q(J)
236+ let aa = au._1
237+ let ab = au._2
238+ let af = au._3
239+ let V = au._4
240+[IntegerEntry((J + j), aa), IntegerEntry((J + k), ab), IntegerEntry((J + m), (af + 1)), IntegerEntry(l, (V + 1)), BooleanEntry((((J + "_") + at) + n), true)]
303241 }
304242 })
305243
306244
307245
308-@Callable(C)
309-func unstakeNFT (I) = valueOrElse(E(), {
310- let L = toString(C.caller)
311- if (!(isDefined(getBoolean(this, (((L + "_") + I) + n)))))
246+@Callable(A)
247+func unstakeNFT (G) = valueOrElse(C(), {
248+ let J = toString(A.caller)
249+ if (!(isDefined(getBoolean(this, (((J + "_") + G) + n)))))
312250 then throw("You didn't staked")
313251 else {
314- let aR = S(L)
315- let ar = aR._1
316- let as = aR._2
317- let aw = aR._3
318- let X = aR._4
319-[IntegerEntry((L + j), ar), IntegerEntry((L + k), as), IntegerEntry((L + m), (aw - 1)), IntegerEntry(l, (X - 1)), DeleteEntry((((L + "_") + I) + n)), ScriptTransfer(C.caller, 1, fromBase58String(I))]
252+ let av = Q(J)
253+ let aa = av._1
254+ let ab = av._2
255+ let af = av._3
256+ let V = av._4
257+[IntegerEntry((J + j), aa), IntegerEntry((J + k), ab), IntegerEntry((J + m), (af - 1)), IntegerEntry(l, (V - 1)), DeleteEntry((((J + "_") + G) + n)), ScriptTransfer(A.caller, 1, fromBase58String(G))]
320258 }
321259 })
322260
323261
324262
325-@Callable(C)
326-func issueNFT (ap,aS,aT) = valueOrElse(E(), valueOrElse(B(C), {
327- let aU = valueOrErrorMessage(addressFromString(ap), "Wrong user address")
328- let aV = Issue(aS, aT, 1, 0, false)
329- let ad = calculateAssetId(aV)
330- let af = valueOrElse(getString(this, s), "")
331- let aW = (af + (if ((af != ""))
332- then (c + toBase58String(ad))
333- else ("" + toBase58String(ad))))
334-[aV, StringEntry((toBase58String(ad) + o), ap), StringEntry(s, aW), ScriptTransfer(aU, 1, ad)]
263+@Callable(A)
264+func issueNFT (Y,aw,ax) = valueOrElse(C(), valueOrElse(z(A), {
265+ let ay = valueOrErrorMessage(addressFromString(Y), "Wrong user address")
266+ let az = Issue(aw, ax, 1, 0, false)
267+ let aA = calculateAssetId(az)
268+[az, StringEntry((toBase58String(aA) + o), Y), ScriptTransfer(ay, 1, aA)]
335269 }))
336270
337271
338272
339-@Callable(C)
340-func airdrop () = valueOrElse(E(), valueOrElse(B(C), if ((size(C.payments) != 1))
273+@Callable(A)
274+func airdrop () = valueOrElse(C(), valueOrElse(z(A), if ((size(A.payments) != 1))
341275 then throw("One payment expected")
342276 else {
343- let aX = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
344- let aH = aX._1
345- let aI = aX._2
346- if ((aI != fromBase58String(A)))
277+ let aB = $Tuple2(A.payments[0].amount, A.payments[0].assetId)
278+ let al = aB._1
279+ let am = aB._2
280+ if ((am != fromBase58String(y)))
347281 then throw("Wrong payment asset")
348282 else {
349- let Y = getIntegerValue(this, r)
350- let M = valueOrElse(getInteger(this, h), 0)
351- let X = valueOrElse(getInteger(this, l), 0)
352- let N = valueOrElse(getInteger(this, d), 0)
353- let aY = valueOrElse(getInteger(this, i), 0)
354- let aZ = if ((X == 0))
355- then $Tuple2(0, aH)
283+ let K = valueOrElse(getInteger(this, h), 0)
284+ let V = valueOrElse(getInteger(this, l), 0)
285+ let L = valueOrElse(getInteger(this, d), 0)
286+ let aC = valueOrElse(getInteger(this, i), 0)
287+ let aD = if ((V == 0))
288+ then $Tuple2(0, al)
356289 else {
357- let ba = fraction(aH, min([Y, (X * 10)]), 100)
358- $Tuple2(ba, (aH - ba))
290+ let aE = fraction(al, V, 100)
291+ $Tuple2(aE, (al - aE))
359292 }
360- let bb = aZ._1
361- let bc = aZ._2
362- let bd = if ((M > 0))
363- then (N + fraction(bc, a, M))
364- else N
365- let be = if ((X > 0))
366- then (aY + (bb / X))
367- else aY
368-[IntegerEntry(d, bd), IntegerEntry(i, be), IntegerEntry(p, aH)]
293+ let aF = aD._1
294+ let aG = aD._2
295+ let aH = if ((K > 0))
296+ then (L + fraction(aG, a, K))
297+ else L
298+ let aI = if ((V > 0))
299+ then (aC + (aF / V))
300+ else aC
301+[IntegerEntry(d, aH), IntegerEntry(i, aI), IntegerEntry(p, al)]
369302 }
370303 }))
371304
372305
373306
374-@Callable(C)
375-func activate () = valueOrElse(B(C), if (valueOrElse(getBoolean(this, t), true))
307+@Callable(A)
308+func activate () = valueOrElse(z(A), if (valueOrElse(getBoolean(this, r), true))
376309 then throw("dApp already active")
377- else [BooleanEntry(t, true)])
310+ else [BooleanEntry(r, true)])
378311
379312
380313
381-@Callable(C)
382-func shutdown () = valueOrElse(B(C), if (!(valueOrElse(getBoolean(this, t), true)))
314+@Callable(A)
315+func shutdown () = valueOrElse(z(A), if (!(valueOrElse(getBoolean(this, r), true)))
383316 then throw("dApp already shutdown")
384- else [BooleanEntry(t, false)])
317+ else [BooleanEntry(r, false)])
385318
386319
387-@Verifier(bf)
388-func bg () = {
389- let bh = {
390- let bi = if (sigVerify(bf.bodyBytes, bf.proofs[0], x))
320+@Verifier(aJ)
321+func aK () = {
322+ let aL = {
323+ let aM = if (sigVerify(aJ.bodyBytes, aJ.proofs[0], v))
391324 then 1
392325 else 0
393- let bj = if (sigVerify(bf.bodyBytes, bf.proofs[1], y))
326+ let aN = if (sigVerify(aJ.bodyBytes, aJ.proofs[1], w))
394327 then 1
395328 else 0
396- let bk = if (sigVerify(bf.bodyBytes, bf.proofs[2], z))
329+ let aO = if (sigVerify(aJ.bodyBytes, aJ.proofs[2], x))
397330 then 1
398331 else 0
399- (((bi + bj) + bk) >= 2)
332+ (((aM + aN) + aO) >= 2)
400333 }
401- let H = bf
402- if ($isInstanceOf(H, "InvokeScriptTransaction"))
334+ let F = aJ
335+ if ($isInstanceOf(F, "InvokeScriptTransaction"))
403336 then {
404- let bl = H
405- let bm = sigVerify(bf.bodyBytes, bf.proofs[0], bf.senderPublicKey)
406- let bn = if ((bl.fee == 900000))
407- then (bl.feeAssetId == unit)
337+ let aP = F
338+ let aQ = sigVerify(aJ.bodyBytes, aJ.proofs[0], aJ.senderPublicKey)
339+ let aR = if ((aP.fee == 900000))
340+ then (aP.feeAssetId == unit)
408341 else false
409- let bo = (bl.function == "init")
410- let bp = (size(bl.payments) == 0)
411- if (if (if (if (bn)
412- then bo
342+ let aS = (aP.function == "init")
343+ let aT = (size(aP.payments) == 0)
344+ if (if (if (if (aR)
345+ then aS
413346 else false)
414- then bm
347+ then aQ
415348 else false)
416- then bp
349+ then aT
417350 else false)
418351 then true
419- else bh
352+ else aL
420353 }
421- else bh
354+ else aL
422355 }
423356
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = 10000
77
88 let c = "__"
99
1010 let d = "interest"
1111
1212 let e = "_userInterest"
1313
1414 let f = "_userAvailableClaim"
1515
1616 let g = "_userTokenStaked"
1717
1818 let h = "totalTokenStaked"
1919
2020 let i = "NFTInterest"
2121
2222 let j = "_NFTUserInterest"
2323
2424 let k = "_NFTUserAvailableClaim"
2525
2626 let l = "NFTTotalStaked"
2727
2828 let m = "_userNFTStaked"
2929
3030 let n = "_userNFTStakedId"
3131
3232 let o = "_NFTCreated"
3333
3434 let p = "_lastAirdrop"
3535
3636 let q = "tokenId"
3737
38-let r = "percentForNFT"
38+let r = "active"
3939
40-let s = "nftCreatedList"
40+let s = "admin_pub_1"
4141
42-let t = "active"
42+let t = "admin_pub_2"
4343
44-let u = "admin_pub_1"
44+let u = "admin_pub_3"
4545
46-let v = "admin_pub_2"
46+let v = fromBase58String(valueOrErrorMessage(getString(this, s), "Can't get admin1PK"))
4747
48-let w = "admin_pub_3"
48+let w = fromBase58String(valueOrErrorMessage(getString(this, t), "Can't get admin2PK"))
4949
50-let x = fromBase58String(valueOrErrorMessage(getString(this, u), "Can't get admin1PK"))
50+let x = fromBase58String(valueOrErrorMessage(getString(this, u), "Can't get operatorPK"))
5151
52-let y = fromBase58String(valueOrErrorMessage(getString(this, v), "Can't get admin2PK"))
52+let y = valueOrErrorMessage(getString(this, q), "Can't get staking token")
5353
54-let z = fromBase58String(valueOrErrorMessage(getString(this, w), "Can't get operatorPK"))
55-
56-let A = valueOrErrorMessage(getString(this, q), "Can't get staking token")
57-
58-func B (C) = if (containsElement([x, y, z], C.callerPublicKey))
54+func z (A) = if (containsElement([v, w, x], A.callerPublicKey))
5955 then unit
6056 else throw("Only admin can call this function")
6157
6258
63-func D (C) = if ((C.caller == this))
59+func B (A) = if ((A.caller == this))
6460 then unit
6561 else throw("Only contract itself can call this function")
6662
6763
68-func E () = if (valueOrElse(getBoolean(this, t), true))
64+func C () = if (valueOrElse(getBoolean(this, r), true))
6965 then unit
7066 else throw("DApp is inactive at this moment")
7167
7268
73-func F (G) = {
74- let H = G
75- if ($isInstanceOf(H, "ByteVector"))
69+func D (E) = {
70+ let F = E
71+ if ($isInstanceOf(F, "ByteVector"))
7672 then {
77- let I = H
78- toBase58String(I)
73+ let G = F
74+ toBase58String(G)
7975 }
80- else if ($isInstanceOf(H, "Unit"))
76+ else if ($isInstanceOf(F, "Unit"))
8177 then {
82- let J = H
78+ let H = F
8379 "WAVES"
8480 }
8581 else throw("Not Asset id")
8682 }
8783
8884
89-func K (L) = {
90- let M = valueOrElse(getInteger(this, h), 0)
91- let N = valueOrElse(getInteger(this, d), 0)
92- let O = valueOrElse(getInteger(this, (L + f)), 0)
93- let P = valueOrElse(getInteger(this, (L + e)), N)
94- let Q = valueOrElse(getInteger(this, (L + g)), 0)
95- let R = fraction(Q, (N - P), a)
96- $Tuple4(N, (R + O), Q, M)
85+func I (J) = {
86+ let K = valueOrElse(getInteger(this, h), 0)
87+ let L = valueOrElse(getInteger(this, d), 0)
88+ let M = valueOrElse(getInteger(this, (J + f)), 0)
89+ let N = valueOrElse(getInteger(this, (J + e)), L)
90+ let O = valueOrElse(getInteger(this, (J + g)), 0)
91+ let P = fraction(O, (L - N), a)
92+ $Tuple4(L, (P + M), O, K)
9793 }
9894
9995
100-func S (L) = {
101- let T = valueOrElse(getInteger(this, l), 0)
102- let N = valueOrElse(getInteger(this, i), 0)
103- let O = valueOrElse(getInteger(this, (L + k)), 0)
104- let P = valueOrElse(getInteger(this, (L + j)), N)
105- let U = valueOrElse(getInteger(this, (L + m)), 0)
106- let R = (U * (N - P))
107- $Tuple4(N, (R + O), U, T)
96+func Q (J) = {
97+ let R = valueOrElse(getInteger(this, l), 0)
98+ let L = valueOrElse(getInteger(this, i), 0)
99+ let M = valueOrElse(getInteger(this, (J + k)), 0)
100+ let N = valueOrElse(getInteger(this, (J + j)), L)
101+ let S = valueOrElse(getInteger(this, (J + m)), 0)
102+ let P = (S * (L - N))
103+ $Tuple4(L, (P + M), S, R)
108104 }
109105
110106
111-func V () = {
112- let W = valueOrElse(getInteger(this, p), 0)
113- let M = valueOrElse(getInteger(this, h), 0)
114- let X = valueOrElse(getInteger(this, l), 0)
115- let Y = getIntegerValue(this, r)
116- let Z = if ((X == 0))
117- then W
118- else fraction(W, (100 - min([Y, (X * 10)])), 100)
119- (fraction(Z, b, M) * 52)
107+func T () = {
108+ let U = valueOrElse(getInteger(this, p), 0)
109+ let K = valueOrElse(getInteger(this, h), 0)
110+ let V = valueOrElse(getInteger(this, l), 0)
111+ let W = if ((V == 0))
112+ then U
113+ else fraction(U, (100 - V), 100)
114+ (fraction(W, b, K) * 52)
120115 }
121116
122117
123-func aa (L) = {
124- func ab (ac,ad) = if (isDefined(getBoolean(this, (((L + "_") + ad) + n))))
125- then (ac :+ ad)
126- else ac
127-
128- let ae = valueOrElse(getString(this, s), "")
129- let af = if ((ae == ""))
130- then nil
131- else split(ae, c)
132- let ag = {
133- let ah = af
134- let ai = size(ah)
135- let aj = nil
136- func ak (al,am) = if ((am >= ai))
137- then al
138- else ab(al, ah[am])
139-
140- func an (al,am) = if ((am >= ai))
141- then al
142- else throw("List size exceeds 5")
143-
144- an(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5)
145- }
146- makeString(ag, ",")
147- }
148-
149-
150-@Callable(C)
118+@Callable(A)
151119 func getStatsREADONLY () = {
152- let ao = V()
153- let M = valueOrElse(getInteger(this, h), 0)
154- let T = valueOrElse(getInteger(this, l), 0)
155- $Tuple2(nil, makeString(["%d%d%d", toString(ao), toString(M), toString(T)], c))
120+ let X = T()
121+ let K = valueOrElse(getInteger(this, h), 0)
122+ let R = valueOrElse(getInteger(this, l), 0)
123+ $Tuple2(nil, makeString(["%d%d%d", toString(X), toString(K), toString(R)], c))
156124 }
157125
158126
159127
160-@Callable(C)
161-func getStatsByUserREADONLY (L) = {
162- let ap = valueOrErrorMessage(addressFromString(L), "Wrong user address")
163- let aq = K(L)
164- let ar = aq._1
165- let as = aq._2
166- let Q = aq._3
167- let M = aq._4
168- let at = S(L)
169- let au = at._1
170- let av = at._2
171- let aw = at._3
172- let X = at._4
173- let ax = assetBalance(ap, fromBase58String(A))
174- let ag = aa(L)
175- $Tuple2(nil, makeString(["%d%d%d%d%s", toString(ax), toString(Q), toString(as), toString(av), ag], c))
128+@Callable(A)
129+func getStatsByUserREADONLY (J) = {
130+ let Y = valueOrErrorMessage(addressFromString(J), "Wrong user address")
131+ let Z = I(J)
132+ let aa = Z._1
133+ let ab = Z._2
134+ let O = Z._3
135+ let K = Z._4
136+ let ac = Q(J)
137+ let ad = ac._1
138+ let ae = ac._2
139+ let af = ac._3
140+ let V = ac._4
141+ let ag = assetBalance(Y, fromBase58String(y))
142+ $Tuple2(nil, makeString(["%d%d%d%d%s", toString(ag), toString(O), toString(ab), toString(ae)], c))
176143 }
177144
178145
179146
180-@Callable(C)
181-func getUserStatsREADONLY (L) = {
182- let ao = V()
183- let ay = if ((L == ""))
184- then $Tuple4(0, 0, 0, 0)
185- else {
186- let ap = valueOrErrorMessage(addressFromString(L), "Wrong user address")
187- let az = K(L)
188- let ar = az._1
189- let as = az._2
190- let Q = az._3
191- let M = az._4
192- let aA = S(L)
193- let au = aA._1
194- let av = aA._2
195- let aw = aA._3
196- let X = aA._4
197- let aB = assetBalance(ap, fromBase58String(A))
198- $Tuple4(aB, Q, as, av)
199- }
200- let ax = ay._1
201- let Q = ay._2
202- let as = ay._3
203- let av = ay._4
204- $Tuple2(nil, makeString(["%d%d%d%d%d", toString(ao), toString(ax), toString(Q), toString(as), toString(av)], c))
205- }
147+@Callable(A)
148+func init (y,ah,ai,aj) = valueOrElse(B(A), if (isDefined(getString(this, q)))
149+ then throw("DApp already inited")
150+ else if (!(isDefined(assetInfo(fromBase58String(y)))))
151+ then throw("asset id is not correct asset id")
152+ else if ((size(fromBase58String(ah)) != 32))
153+ then throw("group1Admin1PubKey is not correct")
154+ else if ((size(fromBase58String(ai)) != 32))
155+ then throw("group1Admin1PubKey is not correct")
156+ else if ((size(fromBase58String(aj)) != 32))
157+ then throw("group1Admin1PubKey is not correct")
158+ else [StringEntry(q, y), StringEntry(s, ah), StringEntry(t, ai), StringEntry(u, aj)])
206159
207160
208161
209-@Callable(C)
210-func init (A,aC,aD,aE,aF) = valueOrElse(D(C), if (isDefined(getString(this, q)))
211- then throw("DApp already inited")
212- else if (!(isDefined(assetInfo(fromBase58String(A)))))
213- then throw("asset id is not correct asset id")
214- else if ((size(fromBase58String(aC)) != 32))
215- then throw("group1Admin1PubKey is not correct")
216- else if ((size(fromBase58String(aD)) != 32))
217- then throw("group1Admin1PubKey is not correct")
218- else if ((size(fromBase58String(aE)) != 32))
219- then throw("group1Admin1PubKey is not correct")
220- else [StringEntry(q, A), StringEntry(u, aC), StringEntry(v, aD), StringEntry(w, aE), IntegerEntry(r, aF)])
221-
222-
223-
224-@Callable(C)
225-func stake () = valueOrElse(E(), if ((size(C.payments) != 1))
162+@Callable(A)
163+func stake () = valueOrElse(C(), if ((size(A.payments) != 1))
226164 then throw("One payment expected")
227165 else {
228- let aG = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
229- let aH = aG._1
230- let aI = aG._2
231- if ((aI != fromBase58String(A)))
166+ let ak = $Tuple2(A.payments[0].amount, A.payments[0].assetId)
167+ let al = ak._1
168+ let am = ak._2
169+ if ((am != fromBase58String(y)))
232170 then throw("Wrong payment asset")
233171 else {
234- let L = toString(C.caller)
235- let aJ = K(L)
236- let ar = aJ._1
237- let as = aJ._2
238- let Q = aJ._3
239- let M = aJ._4
240-[IntegerEntry((L + e), ar), IntegerEntry((L + f), as), IntegerEntry((L + g), (Q + aH)), IntegerEntry(h, (M + aH))]
172+ let J = toString(A.caller)
173+ let an = I(J)
174+ let aa = an._1
175+ let ab = an._2
176+ let O = an._3
177+ let K = an._4
178+[IntegerEntry((J + e), aa), IntegerEntry((J + f), ab), IntegerEntry((J + g), (O + al)), IntegerEntry(h, (K + al))]
241179 }
242180 })
243181
244182
245183
246-@Callable(C)
247-func unstake (aK) = valueOrElse(E(), {
248- let L = toString(C.caller)
249- if ((0 >= aK))
184+@Callable(A)
185+func unstake (ao) = valueOrElse(C(), {
186+ let J = toString(A.caller)
187+ if ((0 >= ao))
250188 then throw("Amount must be greater than 0")
251189 else {
252- let aL = K(L)
253- let ar = aL._1
254- let as = aL._2
255- let Q = aL._3
256- let M = aL._4
257- if ((aK > Q))
190+ let ap = I(J)
191+ let aa = ap._1
192+ let ab = ap._2
193+ let O = ap._3
194+ let K = ap._4
195+ if ((ao > O))
258196 then throw("You can't unstake more than staked")
259- else [IntegerEntry((L + e), ar), IntegerEntry((L + f), as), IntegerEntry((L + g), (Q - aK)), IntegerEntry(h, (M - aK)), ScriptTransfer(C.caller, aK, fromBase58String(A))]
197+ else [IntegerEntry((J + e), aa), IntegerEntry((J + f), ab), IntegerEntry((J + g), (O - ao)), IntegerEntry(h, (K - ao)), ScriptTransfer(A.caller, ao, fromBase58String(y))]
260198 }
261199 })
262200
263201
264202
265-@Callable(C)
266-func claim () = valueOrElse(E(), {
267- let L = toString(C.caller)
268- let aM = K(L)
269- let ar = aM._1
270- let as = aM._2
271- let Q = aM._3
272- let M = aM._4
273- let aN = S(L)
274- let au = aN._1
275- let av = aN._2
276- let aw = aN._3
277- let X = aN._4
278- if (((as + av) == 0))
203+@Callable(A)
204+func claim () = valueOrElse(C(), {
205+ let J = toString(A.caller)
206+ let aq = I(J)
207+ let aa = aq._1
208+ let ab = aq._2
209+ let O = aq._3
210+ let K = aq._4
211+ let ar = Q(J)
212+ let ad = ar._1
213+ let ae = ar._2
214+ let af = ar._3
215+ let V = ar._4
216+ if (((ab + ae) == 0))
279217 then throw("Nothing to claim")
280- else [IntegerEntry((L + e), ar), IntegerEntry((L + f), 0), IntegerEntry((L + j), au), IntegerEntry((L + k), 0), ScriptTransfer(C.caller, (as + av), fromBase58String(A))]
218+ else [IntegerEntry((J + e), aa), IntegerEntry((J + f), 0), IntegerEntry((J + j), ad), IntegerEntry((J + k), 0), ScriptTransfer(A.caller, (ab + ae), fromBase58String(y))]
281219 })
282220
283221
284222
285-@Callable(C)
286-func stakeNFT () = valueOrElse(E(), if ((size(C.payments) != 1))
223+@Callable(A)
224+func stakeNFT () = valueOrElse(C(), if ((size(A.payments) != 1))
287225 then throw("One payment expected")
288226 else {
289- let aO = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
290- let aH = aO._1
291- let aI = aO._2
292- let aP = F(aI)
293- if (!(isDefined(getString(this, (aP + o)))))
227+ let as = $Tuple2(A.payments[0].amount, A.payments[0].assetId)
228+ let al = as._1
229+ let am = as._2
230+ let at = D(am)
231+ if (!(isDefined(getString(this, (at + o)))))
294232 then throw("Wrong nft asset")
295233 else {
296- let L = toString(C.caller)
297- let aQ = S(L)
298- let ar = aQ._1
299- let as = aQ._2
300- let aw = aQ._3
301- let X = aQ._4
302-[IntegerEntry((L + j), ar), IntegerEntry((L + k), as), IntegerEntry((L + m), (aw + 1)), IntegerEntry(l, (X + 1)), BooleanEntry((((L + "_") + aP) + n), true)]
234+ let J = toString(A.caller)
235+ let au = Q(J)
236+ let aa = au._1
237+ let ab = au._2
238+ let af = au._3
239+ let V = au._4
240+[IntegerEntry((J + j), aa), IntegerEntry((J + k), ab), IntegerEntry((J + m), (af + 1)), IntegerEntry(l, (V + 1)), BooleanEntry((((J + "_") + at) + n), true)]
303241 }
304242 })
305243
306244
307245
308-@Callable(C)
309-func unstakeNFT (I) = valueOrElse(E(), {
310- let L = toString(C.caller)
311- if (!(isDefined(getBoolean(this, (((L + "_") + I) + n)))))
246+@Callable(A)
247+func unstakeNFT (G) = valueOrElse(C(), {
248+ let J = toString(A.caller)
249+ if (!(isDefined(getBoolean(this, (((J + "_") + G) + n)))))
312250 then throw("You didn't staked")
313251 else {
314- let aR = S(L)
315- let ar = aR._1
316- let as = aR._2
317- let aw = aR._3
318- let X = aR._4
319-[IntegerEntry((L + j), ar), IntegerEntry((L + k), as), IntegerEntry((L + m), (aw - 1)), IntegerEntry(l, (X - 1)), DeleteEntry((((L + "_") + I) + n)), ScriptTransfer(C.caller, 1, fromBase58String(I))]
252+ let av = Q(J)
253+ let aa = av._1
254+ let ab = av._2
255+ let af = av._3
256+ let V = av._4
257+[IntegerEntry((J + j), aa), IntegerEntry((J + k), ab), IntegerEntry((J + m), (af - 1)), IntegerEntry(l, (V - 1)), DeleteEntry((((J + "_") + G) + n)), ScriptTransfer(A.caller, 1, fromBase58String(G))]
320258 }
321259 })
322260
323261
324262
325-@Callable(C)
326-func issueNFT (ap,aS,aT) = valueOrElse(E(), valueOrElse(B(C), {
327- let aU = valueOrErrorMessage(addressFromString(ap), "Wrong user address")
328- let aV = Issue(aS, aT, 1, 0, false)
329- let ad = calculateAssetId(aV)
330- let af = valueOrElse(getString(this, s), "")
331- let aW = (af + (if ((af != ""))
332- then (c + toBase58String(ad))
333- else ("" + toBase58String(ad))))
334-[aV, StringEntry((toBase58String(ad) + o), ap), StringEntry(s, aW), ScriptTransfer(aU, 1, ad)]
263+@Callable(A)
264+func issueNFT (Y,aw,ax) = valueOrElse(C(), valueOrElse(z(A), {
265+ let ay = valueOrErrorMessage(addressFromString(Y), "Wrong user address")
266+ let az = Issue(aw, ax, 1, 0, false)
267+ let aA = calculateAssetId(az)
268+[az, StringEntry((toBase58String(aA) + o), Y), ScriptTransfer(ay, 1, aA)]
335269 }))
336270
337271
338272
339-@Callable(C)
340-func airdrop () = valueOrElse(E(), valueOrElse(B(C), if ((size(C.payments) != 1))
273+@Callable(A)
274+func airdrop () = valueOrElse(C(), valueOrElse(z(A), if ((size(A.payments) != 1))
341275 then throw("One payment expected")
342276 else {
343- let aX = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
344- let aH = aX._1
345- let aI = aX._2
346- if ((aI != fromBase58String(A)))
277+ let aB = $Tuple2(A.payments[0].amount, A.payments[0].assetId)
278+ let al = aB._1
279+ let am = aB._2
280+ if ((am != fromBase58String(y)))
347281 then throw("Wrong payment asset")
348282 else {
349- let Y = getIntegerValue(this, r)
350- let M = valueOrElse(getInteger(this, h), 0)
351- let X = valueOrElse(getInteger(this, l), 0)
352- let N = valueOrElse(getInteger(this, d), 0)
353- let aY = valueOrElse(getInteger(this, i), 0)
354- let aZ = if ((X == 0))
355- then $Tuple2(0, aH)
283+ let K = valueOrElse(getInteger(this, h), 0)
284+ let V = valueOrElse(getInteger(this, l), 0)
285+ let L = valueOrElse(getInteger(this, d), 0)
286+ let aC = valueOrElse(getInteger(this, i), 0)
287+ let aD = if ((V == 0))
288+ then $Tuple2(0, al)
356289 else {
357- let ba = fraction(aH, min([Y, (X * 10)]), 100)
358- $Tuple2(ba, (aH - ba))
290+ let aE = fraction(al, V, 100)
291+ $Tuple2(aE, (al - aE))
359292 }
360- let bb = aZ._1
361- let bc = aZ._2
362- let bd = if ((M > 0))
363- then (N + fraction(bc, a, M))
364- else N
365- let be = if ((X > 0))
366- then (aY + (bb / X))
367- else aY
368-[IntegerEntry(d, bd), IntegerEntry(i, be), IntegerEntry(p, aH)]
293+ let aF = aD._1
294+ let aG = aD._2
295+ let aH = if ((K > 0))
296+ then (L + fraction(aG, a, K))
297+ else L
298+ let aI = if ((V > 0))
299+ then (aC + (aF / V))
300+ else aC
301+[IntegerEntry(d, aH), IntegerEntry(i, aI), IntegerEntry(p, al)]
369302 }
370303 }))
371304
372305
373306
374-@Callable(C)
375-func activate () = valueOrElse(B(C), if (valueOrElse(getBoolean(this, t), true))
307+@Callable(A)
308+func activate () = valueOrElse(z(A), if (valueOrElse(getBoolean(this, r), true))
376309 then throw("dApp already active")
377- else [BooleanEntry(t, true)])
310+ else [BooleanEntry(r, true)])
378311
379312
380313
381-@Callable(C)
382-func shutdown () = valueOrElse(B(C), if (!(valueOrElse(getBoolean(this, t), true)))
314+@Callable(A)
315+func shutdown () = valueOrElse(z(A), if (!(valueOrElse(getBoolean(this, r), true)))
383316 then throw("dApp already shutdown")
384- else [BooleanEntry(t, false)])
317+ else [BooleanEntry(r, false)])
385318
386319
387-@Verifier(bf)
388-func bg () = {
389- let bh = {
390- let bi = if (sigVerify(bf.bodyBytes, bf.proofs[0], x))
320+@Verifier(aJ)
321+func aK () = {
322+ let aL = {
323+ let aM = if (sigVerify(aJ.bodyBytes, aJ.proofs[0], v))
391324 then 1
392325 else 0
393- let bj = if (sigVerify(bf.bodyBytes, bf.proofs[1], y))
326+ let aN = if (sigVerify(aJ.bodyBytes, aJ.proofs[1], w))
394327 then 1
395328 else 0
396- let bk = if (sigVerify(bf.bodyBytes, bf.proofs[2], z))
329+ let aO = if (sigVerify(aJ.bodyBytes, aJ.proofs[2], x))
397330 then 1
398331 else 0
399- (((bi + bj) + bk) >= 2)
332+ (((aM + aN) + aO) >= 2)
400333 }
401- let H = bf
402- if ($isInstanceOf(H, "InvokeScriptTransaction"))
334+ let F = aJ
335+ if ($isInstanceOf(F, "InvokeScriptTransaction"))
403336 then {
404- let bl = H
405- let bm = sigVerify(bf.bodyBytes, bf.proofs[0], bf.senderPublicKey)
406- let bn = if ((bl.fee == 900000))
407- then (bl.feeAssetId == unit)
337+ let aP = F
338+ let aQ = sigVerify(aJ.bodyBytes, aJ.proofs[0], aJ.senderPublicKey)
339+ let aR = if ((aP.fee == 900000))
340+ then (aP.feeAssetId == unit)
408341 else false
409- let bo = (bl.function == "init")
410- let bp = (size(bl.payments) == 0)
411- if (if (if (if (bn)
412- then bo
342+ let aS = (aP.function == "init")
343+ let aT = (size(aP.payments) == 0)
344+ if (if (if (if (aR)
345+ then aS
413346 else false)
414- then bm
347+ then aQ
415348 else false)
416- then bp
349+ then aT
417350 else false)
418351 then true
419- else bh
352+ else aL
420353 }
421- else bh
354+ else aL
422355 }
423356

github/deemru/w8io/169f3d6 
140.40 ms