tx · XPeLieLgFx5Htg62rhiuVn2b6WPxHBUJ2Qa2Gf8uZEc

3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4:  -0.01500000 Waves

2023.09.11 14:38 [2750687] smart account 3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4 > SELF 0.00000000 Waves

{ "type": 13, "id": "XPeLieLgFx5Htg62rhiuVn2b6WPxHBUJ2Qa2Gf8uZEc", "fee": 1500000, "feeAssetId": null, "timestamp": 1694432305992, "version": 2, "chainId": 84, "sender": "3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4", "senderPublicKey": "DU1U4j8FqHUMRr9WgfF3yo67ULEFkjp7dtMWMpjBK1ar", "proofs": [ "jCZz663jbGCvWjwd3T7zewKMC31Vv2ZdvbFnUwnjsKh3pJpjUrPXTcL2h6HwCePBp69zJy2MC57wMspNED83AwB", "4uSgp5rnVnL3aX7azSrxUAQBagK2BQv77AqdQyH9G2nUAovvQKYYg9tP6YhMUY6erzdVjq6yUC88pWNWSdumziqz" ], "script": "base64:BgItCAISAwoBCBIHCgUICAgIARIAEgMKAQESABIAEgMKAQgSBQoDCAgIEgASABIAIgAGU0NBTEU4AIDC1y8ADVBFUkNFTlRfU0NBTEUAkE4ACVNFUEFSQVRPUgICX18ACWtJbnRlcmVzdAIIaW50ZXJlc3QADWtVc2VySW50ZXJlc3QCDV91c2VySW50ZXJlc3QADmtVc2VyQXZhaWxhYmxlAhNfdXNlckF2YWlsYWJsZUNsYWltABBrVXNlclRva2VuU3Rha2VkAhBfdXNlclRva2VuU3Rha2VkABFrVG90YWxUb2tlblN0YWtlZAIQdG90YWxUb2tlblN0YWtlZAAMa05GVEludGVyZXN0AgtORlRJbnRlcmVzdAAQa05GVFVzZXJJbnRlcmVzdAIQX05GVFVzZXJJbnRlcmVzdAAWa05GVFVzZXJBdmFpbGFibGVDbGFpbQIWX05GVFVzZXJBdmFpbGFibGVDbGFpbQAPa05GVFRvdGFsU3Rha2VkAg5ORlRUb3RhbFN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CQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAgQHJG1hdGNoMAUCdHgDCQABAgUHJG1hdGNoMAIXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EA2ludgUHJG1hdGNoMAQGaXNTZWxmCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5BAppc1JpZ2h0RmVlAwkAAAIIBQNpbnYDZmVlAKD3NgkAAAIIBQNpbnYKZmVlQXNzZXRJZAUEdW5pdAcECmlzSW5pdENhbGwJAAACCAUDaW52CGZ1bmN0aW9uAgRpbml0BAxpc25vUGF5bWVudHMJAAACCQCQAwEIBQNpbnYIcGF5bWVudHMAAAMDAwMFCmlzUmlnaHRGZWUFCmlzSW5pdENhbGwHBQZpc1NlbGYHBQxpc25vUGF5bWVudHMHBgUTbXVsdGlTaWduZWRCeUFkbWlucwUTbXVsdGlTaWduZWRCeUFkbWluc+rjKAo=", "height": 2750687, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CoSnShRbEYaTKsKRLMDT9vzqAy66izyZHP62wyt21Tci Next: 4ipPRY1tfDjXYHf3RgACkpV6xWnLcAF4ihmfxhQifYmQ Diff:
OldNewDifferences
3737
3838 let r = "percentForNFT"
3939
40-let s = "active"
40+let s = "nftCreatedList"
4141
42-let t = "admin_pub_1"
42+let t = "active"
4343
44-let u = "admin_pub_2"
44+let u = "admin_pub_1"
4545
46-let v = "admin_pub_3"
46+let v = "admin_pub_2"
4747
48-let w = fromBase58String(valueOrErrorMessage(getString(this, t), "Can't get admin1PK"))
48+let w = "admin_pub_3"
4949
50-let x = fromBase58String(valueOrErrorMessage(getString(this, u), "Can't get admin2PK"))
50+let x = fromBase58String(valueOrErrorMessage(getString(this, u), "Can't get admin1PK"))
5151
52-let y = fromBase58String(valueOrErrorMessage(getString(this, v), "Can't get operatorPK"))
52+let y = fromBase58String(valueOrErrorMessage(getString(this, v), "Can't get admin2PK"))
5353
54-let z = valueOrErrorMessage(getString(this, q), "Can't get staking token")
54+let z = fromBase58String(valueOrErrorMessage(getString(this, w), "Can't get operatorPK"))
5555
56-func A (B) = if (containsElement([w, x, y], B.callerPublicKey))
56+let A = valueOrErrorMessage(getString(this, q), "Can't get staking token")
57+
58+func B (C) = if (containsElement([x, y, z], C.callerPublicKey))
5759 then unit
5860 else throw("Only admin can call this function")
5961
6062
61-func C (B) = if ((B.caller == this))
63+func D (C) = if ((C.caller == this))
6264 then unit
6365 else throw("Only contract itself can call this function")
6466
6567
66-func D () = if (valueOrElse(getBoolean(this, s), true))
68+func E () = if (valueOrElse(getBoolean(this, t), true))
6769 then unit
6870 else throw("DApp is inactive at this moment")
6971
7072
71-func E (F) = {
72- let G = F
73- if ($isInstanceOf(G, "ByteVector"))
73+func F (G) = {
74+ let H = G
75+ if ($isInstanceOf(H, "ByteVector"))
7476 then {
75- let H = G
76- toBase58String(H)
77+ let I = H
78+ toBase58String(I)
7779 }
78- else if ($isInstanceOf(G, "Unit"))
80+ else if ($isInstanceOf(H, "Unit"))
7981 then {
80- let I = G
82+ let J = H
8183 "WAVES"
8284 }
8385 else throw("Not Asset id")
8486 }
8587
8688
87-func J (K) = {
88- let L = valueOrElse(getInteger(this, h), 0)
89- let M = valueOrElse(getInteger(this, d), 0)
90- let N = valueOrElse(getInteger(this, (K + f)), 0)
91- let O = valueOrElse(getInteger(this, (K + e)), M)
92- let P = valueOrElse(getInteger(this, (K + g)), 0)
93- let Q = fraction(P, (M - O), a)
94- $Tuple4(M, (Q + N), P, L)
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)
9597 }
9698
9799
98-func R (K) = {
99- let S = valueOrElse(getInteger(this, l), 0)
100- let M = valueOrElse(getInteger(this, i), 0)
101- let N = valueOrElse(getInteger(this, (K + k)), 0)
102- let O = valueOrElse(getInteger(this, (K + j)), M)
103- let T = valueOrElse(getInteger(this, (K + m)), 0)
104- let Q = (T * (M - O))
105- $Tuple4(M, (Q + N), T, S)
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)
106108 }
107109
108110
109-func U () = {
110- let V = valueOrElse(getInteger(this, p), 0)
111- let L = valueOrElse(getInteger(this, h), 0)
112- let W = valueOrElse(getInteger(this, l), 0)
113- let X = getIntegerValue(this, r)
114- let Y = if ((W == 0))
115- then V
116- else fraction(V, X, 100)
117- (fraction(Y, b, L) * 52)
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, min([Y, (X * 10)]), 100)
119+ (fraction(Z, b, M) * 52)
118120 }
119121
120122
121-@Callable(B)
122-func getUserStatsREADONLY (K) = {
123- let Z = U()
124- let aa = if ((K == ""))
125- then $Tuple3(0, 0, 0)
123+@Callable(C)
124+func getUserStatsREADONLY (L) = {
125+ let aa = V()
126+ let ab = if ((L == ""))
127+ then $Tuple4(0, 0, 0, 0)
126128 else {
127- let ab = valueOrErrorMessage(addressFromString(K), "Wrong user address")
128- let ac = J(K)
129- let ad = ac._1
130- let ae = ac._2
131- let P = ac._3
132- let L = ac._4
133- let af = assetBalance(ab, fromBase58String(z))
134- $Tuple3(af, P, ae)
129+ let ac = valueOrErrorMessage(addressFromString(L), "Wrong user address")
130+ let ad = K(L)
131+ let ae = ad._1
132+ let af = ad._2
133+ let Q = ad._3
134+ let M = ad._4
135+ let ag = S(L)
136+ let ah = ag._1
137+ let ai = ag._2
138+ let aj = ag._3
139+ let X = ag._4
140+ let ak = assetBalance(ac, fromBase58String(A))
141+ $Tuple4(ak, Q, af, ai)
135142 }
136- let ag = aa._1
137- let P = aa._2
138- let ae = aa._3
139- $Tuple2(nil, makeString(["%d%d%d%d", toString(Z), toString(ag), toString(P), toString(ae)], c))
143+ let al = ab._1
144+ let Q = ab._2
145+ let af = ab._3
146+ let ai = ab._4
147+ $Tuple2(nil, makeString(["%d%d%d%d%d", toString(aa), toString(al), toString(Q), toString(af), toString(ai)], c))
140148 }
141149
142150
143151
144-@Callable(B)
145-func init (z,ah,ai,aj,ak) = valueOrElse(C(B), if (isDefined(getString(this, q)))
152+@Callable(C)
153+func init (A,am,an,ao,ap) = valueOrElse(D(C), if (isDefined(getString(this, q)))
146154 then throw("DApp already inited")
147- else if (!(isDefined(assetInfo(fromBase58String(z)))))
155+ else if (!(isDefined(assetInfo(fromBase58String(A)))))
148156 then throw("asset id is not correct asset id")
149- else if ((size(fromBase58String(ah)) != 32))
157+ else if ((size(fromBase58String(am)) != 32))
150158 then throw("group1Admin1PubKey is not correct")
151- else if ((size(fromBase58String(ai)) != 32))
159+ else if ((size(fromBase58String(an)) != 32))
152160 then throw("group1Admin1PubKey is not correct")
153- else if ((size(fromBase58String(aj)) != 32))
161+ else if ((size(fromBase58String(ao)) != 32))
154162 then throw("group1Admin1PubKey is not correct")
155- else [StringEntry(q, z), StringEntry(t, ah), StringEntry(u, ai), StringEntry(v, aj), IntegerEntry(r, ak)])
163+ else [StringEntry(q, A), StringEntry(u, am), StringEntry(v, an), StringEntry(w, ao), IntegerEntry(r, ap)])
156164
157165
158166
159-@Callable(B)
160-func stake () = valueOrElse(D(), if ((size(B.payments) != 1))
167+@Callable(C)
168+func stake () = valueOrElse(E(), if ((size(C.payments) != 1))
161169 then throw("One payment expected")
162170 else {
163- let al = $Tuple2(B.payments[0].amount, B.payments[0].assetId)
164- let am = al._1
165- let an = al._2
166- if ((an != fromBase58String(z)))
171+ let aq = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
172+ let ar = aq._1
173+ let as = aq._2
174+ if ((as != fromBase58String(A)))
167175 then throw("Wrong payment asset")
168176 else {
169- let K = toString(B.caller)
170- let ao = J(K)
171- let ad = ao._1
172- let ae = ao._2
173- let P = ao._3
174- let L = ao._4
175-[IntegerEntry((K + e), ad), IntegerEntry((K + f), ae), IntegerEntry((K + g), (P + am)), IntegerEntry(h, (L + am))]
177+ let L = toString(C.caller)
178+ let at = K(L)
179+ let ae = at._1
180+ let af = at._2
181+ let Q = at._3
182+ let M = at._4
183+[IntegerEntry((L + e), ae), IntegerEntry((L + f), af), IntegerEntry((L + g), (Q + ar)), IntegerEntry(h, (M + ar))]
176184 }
177185 })
178186
179187
180188
181-@Callable(B)
182-func unstake (ap) = valueOrElse(D(), {
183- let K = toString(B.caller)
184- if ((0 >= ap))
189+@Callable(C)
190+func unstake (au) = valueOrElse(E(), {
191+ let L = toString(C.caller)
192+ if ((0 >= au))
185193 then throw("Amount must be greater than 0")
186194 else {
187- let aq = J(K)
188- let ad = aq._1
189- let ae = aq._2
190- let P = aq._3
191- let L = aq._4
192- if ((ap > P))
195+ let av = K(L)
196+ let ae = av._1
197+ let af = av._2
198+ let Q = av._3
199+ let M = av._4
200+ if ((au > Q))
193201 then throw("You can't unstake more than staked")
194- else [IntegerEntry((K + e), ad), IntegerEntry((K + f), ae), IntegerEntry((K + g), (P - ap)), IntegerEntry(h, (L - ap)), ScriptTransfer(B.caller, ap, fromBase58String(z))]
202+ else [IntegerEntry((L + e), ae), IntegerEntry((L + f), af), IntegerEntry((L + g), (Q - au)), IntegerEntry(h, (M - au)), ScriptTransfer(C.caller, au, fromBase58String(A))]
195203 }
196204 })
197205
198206
199207
200-@Callable(B)
201-func claim () = valueOrElse(D(), {
202- let K = toString(B.caller)
203- let ar = J(K)
204- let ad = ar._1
205- let ae = ar._2
206- let P = ar._3
207- let L = ar._4
208- if ((ae == 0))
208+@Callable(C)
209+func claim () = valueOrElse(E(), {
210+ let L = toString(C.caller)
211+ let aw = K(L)
212+ let ae = aw._1
213+ let af = aw._2
214+ let Q = aw._3
215+ let M = aw._4
216+ let ax = S(L)
217+ let ah = ax._1
218+ let ai = ax._2
219+ let aj = ax._3
220+ let X = ax._4
221+ if (((af + ai) == 0))
209222 then throw("Nothing to claim")
210- else [IntegerEntry((K + e), ad), IntegerEntry((K + f), 0), ScriptTransfer(B.caller, ae, fromBase58String(z))]
223+ else [IntegerEntry((L + e), ae), IntegerEntry((L + f), 0), IntegerEntry((L + j), ah), IntegerEntry((L + k), 0), ScriptTransfer(C.caller, (af + ai), fromBase58String(A))]
211224 })
212225
213226
214227
215-@Callable(B)
216-func stakeNFT () = valueOrElse(D(), if ((size(B.payments) != 1))
228+@Callable(C)
229+func stakeNFT () = valueOrElse(E(), if ((size(C.payments) != 1))
217230 then throw("One payment expected")
218231 else {
219- let as = $Tuple2(B.payments[0].amount, B.payments[0].assetId)
220- let am = as._1
221- let an = as._2
222- let at = E(an)
223- if (!(isDefined(getString(this, (at + o)))))
232+ let ay = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
233+ let ar = ay._1
234+ let as = ay._2
235+ let az = F(as)
236+ if (!(isDefined(getString(this, (az + o)))))
224237 then throw("Wrong nft asset")
225238 else {
226- let K = toString(B.caller)
227- let au = R(K)
228- let ad = au._1
229- let ae = au._2
230- let av = au._3
231- let W = au._4
232-[IntegerEntry((K + j), ad), IntegerEntry((K + k), ae), IntegerEntry((K + m), (av + am)), IntegerEntry(l, (W + am)), IntegerEntry((((K + "_") + at) + n), 1)]
239+ let L = toString(C.caller)
240+ let aA = S(L)
241+ let ae = aA._1
242+ let af = aA._2
243+ let aj = aA._3
244+ let X = aA._4
245+[IntegerEntry((L + j), ae), IntegerEntry((L + k), af), IntegerEntry((L + m), (aj + 1)), IntegerEntry(l, (X + 1)), BooleanEntry((((L + "_") + az) + n), true)]
233246 }
234247 })
235248
236249
237250
238-@Callable(B)
239-func unstakeNFT (H) = valueOrElse(D(), {
240- let K = toString(B.caller)
241- if (isDefined(getString(this, (((K + H) + "_") + n))))
251+@Callable(C)
252+func unstakeNFT (I) = valueOrElse(E(), {
253+ let L = toString(C.caller)
254+ if (isDefined(getBoolean(this, (((L + "_") + I) + n))))
242255 then throw("You didn't staked")
243256 else {
244- let aw = R(K)
245- let ad = aw._1
246- let ae = aw._2
247- let av = aw._3
248- let W = aw._4
249-[IntegerEntry((K + j), ad), IntegerEntry((K + k), ae), IntegerEntry((K + m), (av - 1)), IntegerEntry(l, (W - 1)), DeleteEntry((((K + "_") + H) + n)), ScriptTransfer(B.caller, 1, fromBase58String(H))]
257+ let aB = S(L)
258+ let ae = aB._1
259+ let af = aB._2
260+ let aj = aB._3
261+ let X = aB._4
262+[IntegerEntry((L + j), ae), IntegerEntry((L + k), af), IntegerEntry((L + m), (aj - 1)), IntegerEntry(l, (X - 1)), DeleteEntry((((L + "_") + I) + n)), ScriptTransfer(C.caller, 1, fromBase58String(I))]
250263 }
251264 })
252265
253266
254267
255-@Callable(B)
256-func claimNFT () = valueOrElse(D(), {
257- let K = toString(B.caller)
258- let ax = R(K)
259- let ad = ax._1
260- let ae = ax._2
261- let av = ax._3
262- let W = ax._4
263- if ((ae == 0))
264- then throw("Nothing to claim")
265- else [IntegerEntry((K + j), ad), IntegerEntry((K + k), 0), ScriptTransfer(B.caller, ae, fromBase58String(z))]
266- })
267-
268-
269-
270-@Callable(B)
271-func issueNFT (ab,ay,az) = valueOrElse(D(), valueOrElse(A(B), {
272- let aA = valueOrErrorMessage(addressFromString(ab), "Wrong user address")
273- let aB = Issue(ay, az, 1, 0, false)
274- let aC = calculateAssetId(aB)
275-[aB, StringEntry((toBase58String(aC) + o), ab), ScriptTransfer(aA, 1, aC)]
268+@Callable(C)
269+func issueNFT (ac,aC,aD) = valueOrElse(E(), valueOrElse(B(C), {
270+ let aE = valueOrErrorMessage(addressFromString(ac), "Wrong user address")
271+ let aF = Issue(aC, aD, 1, 0, false)
272+ let aG = calculateAssetId(aF)
273+ let aH = valueOrElse(getString(this, s), "")
274+ let aI = (aH + (if ((aH != ""))
275+ then c
276+ else ("" + toBase58String(aG))))
277+[aF, StringEntry((toBase58String(aG) + o), ac), StringEntry(s, aI), ScriptTransfer(aE, 1, aG)]
276278 }))
277279
278280
279281
280-@Callable(B)
281-func airdrop () = valueOrElse(D(), valueOrElse(A(B), if ((size(B.payments) != 1))
282+@Callable(C)
283+func airdrop () = valueOrElse(E(), valueOrElse(B(C), if ((size(C.payments) != 1))
282284 then throw("One payment expected")
283285 else {
284- let aD = $Tuple2(B.payments[0].amount, B.payments[0].assetId)
285- let am = aD._1
286- let an = aD._2
287- if ((an != fromBase58String(z)))
286+ let aJ = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
287+ let ar = aJ._1
288+ let as = aJ._2
289+ if ((as != fromBase58String(A)))
288290 then throw("Wrong payment asset")
289291 else {
290- let X = getIntegerValue(this, r)
291- let L = valueOrElse(getInteger(this, h), 0)
292- let W = valueOrElse(getInteger(this, l), 0)
293- let M = valueOrElse(getInteger(this, d), 0)
294- let aE = valueOrElse(getInteger(this, i), 0)
295- let aF = if ((W == 0))
296- then $Tuple2(0, am)
292+ let Y = getIntegerValue(this, r)
293+ let M = valueOrElse(getInteger(this, h), 0)
294+ let X = valueOrElse(getInteger(this, l), 0)
295+ let N = valueOrElse(getInteger(this, d), 0)
296+ let aK = valueOrElse(getInteger(this, i), 0)
297+ let aL = if ((X == 0))
298+ then $Tuple2(0, ar)
297299 else {
298- let aG = fraction(am, X, 100)
299- $Tuple2(aG, (am - aG))
300+ let aM = fraction(ar, min([Y, (X * 10)]), 100)
301+ $Tuple2(aM, (ar - aM))
300302 }
301- let aH = aF._1
302- let aI = aF._2
303- let aJ = if ((L > 0))
304- then (M + fraction(aI, a, L))
305- else M
306- let aK = if ((W > 0))
307- then (aE + (aH / W))
308- else aE
309-[IntegerEntry(d, aJ), IntegerEntry(i, aK), IntegerEntry(p, am)]
303+ let aN = aL._1
304+ let aO = aL._2
305+ let aP = if ((M > 0))
306+ then (N + fraction(aO, a, M))
307+ else N
308+ let aQ = if ((X > 0))
309+ then (aK + (aN / X))
310+ else aK
311+[IntegerEntry(d, aP), IntegerEntry(i, aQ), IntegerEntry(p, ar)]
310312 }
311313 }))
312314
313315
314316
315-@Callable(B)
316-func activate () = valueOrElse(A(B), if (valueOrElse(getBoolean(this, s), true))
317+@Callable(C)
318+func activate () = valueOrElse(B(C), if (valueOrElse(getBoolean(this, t), true))
317319 then throw("dApp already active")
318- else [BooleanEntry(s, true)])
320+ else [BooleanEntry(t, true)])
319321
320322
321323
322-@Callable(B)
323-func shutdown () = valueOrElse(A(B), if (!(valueOrElse(getBoolean(this, s), true)))
324+@Callable(C)
325+func shutdown () = valueOrElse(B(C), if (!(valueOrElse(getBoolean(this, t), true)))
324326 then throw("dApp already shutdown")
325- else [BooleanEntry(s, false)])
327+ else [BooleanEntry(t, false)])
326328
327329
328-@Verifier(aL)
329-func aM () = {
330- let aN = {
331- let aO = if (sigVerify(aL.bodyBytes, aL.proofs[0], w))
330+@Verifier(aR)
331+func aS () = {
332+ let aT = {
333+ let aU = if (sigVerify(aR.bodyBytes, aR.proofs[0], x))
332334 then 1
333335 else 0
334- let aP = if (sigVerify(aL.bodyBytes, aL.proofs[1], x))
336+ let aV = if (sigVerify(aR.bodyBytes, aR.proofs[1], y))
335337 then 1
336338 else 0
337- let aQ = if (sigVerify(aL.bodyBytes, aL.proofs[2], y))
339+ let aW = if (sigVerify(aR.bodyBytes, aR.proofs[2], z))
338340 then 1
339341 else 0
340- (((aO + aP) + aQ) >= 2)
342+ (((aU + aV) + aW) >= 2)
341343 }
342- let G = aL
343- if ($isInstanceOf(G, "InvokeScriptTransaction"))
344+ let H = aR
345+ if ($isInstanceOf(H, "InvokeScriptTransaction"))
344346 then {
345- let aR = G
346- let aS = sigVerify(aL.bodyBytes, aL.proofs[0], aL.senderPublicKey)
347- let aT = if ((aR.fee == 900000))
348- then (aR.feeAssetId == unit)
347+ let aX = H
348+ let aY = sigVerify(aR.bodyBytes, aR.proofs[0], aR.senderPublicKey)
349+ let aZ = if ((aX.fee == 900000))
350+ then (aX.feeAssetId == unit)
349351 else false
350- let aU = (aR.function == "init")
351- let aV = (size(aR.payments) == 0)
352- if (if (if (if (aT)
353- then aU
352+ let ba = (aX.function == "init")
353+ let bb = (size(aX.payments) == 0)
354+ if (if (if (if (aZ)
355+ then ba
354356 else false)
355- then aS
357+ then aY
356358 else false)
357- then aV
359+ then bb
358360 else false)
359361 then true
360- else aN
362+ else aT
361363 }
362- else aN
364+ else aT
363365 }
364366
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
3838 let r = "percentForNFT"
3939
40-let s = "active"
40+let s = "nftCreatedList"
4141
42-let t = "admin_pub_1"
42+let t = "active"
4343
44-let u = "admin_pub_2"
44+let u = "admin_pub_1"
4545
46-let v = "admin_pub_3"
46+let v = "admin_pub_2"
4747
48-let w = fromBase58String(valueOrErrorMessage(getString(this, t), "Can't get admin1PK"))
48+let w = "admin_pub_3"
4949
50-let x = fromBase58String(valueOrErrorMessage(getString(this, u), "Can't get admin2PK"))
50+let x = fromBase58String(valueOrErrorMessage(getString(this, u), "Can't get admin1PK"))
5151
52-let y = fromBase58String(valueOrErrorMessage(getString(this, v), "Can't get operatorPK"))
52+let y = fromBase58String(valueOrErrorMessage(getString(this, v), "Can't get admin2PK"))
5353
54-let z = valueOrErrorMessage(getString(this, q), "Can't get staking token")
54+let z = fromBase58String(valueOrErrorMessage(getString(this, w), "Can't get operatorPK"))
5555
56-func A (B) = if (containsElement([w, x, y], B.callerPublicKey))
56+let A = valueOrErrorMessage(getString(this, q), "Can't get staking token")
57+
58+func B (C) = if (containsElement([x, y, z], C.callerPublicKey))
5759 then unit
5860 else throw("Only admin can call this function")
5961
6062
61-func C (B) = if ((B.caller == this))
63+func D (C) = if ((C.caller == this))
6264 then unit
6365 else throw("Only contract itself can call this function")
6466
6567
66-func D () = if (valueOrElse(getBoolean(this, s), true))
68+func E () = if (valueOrElse(getBoolean(this, t), true))
6769 then unit
6870 else throw("DApp is inactive at this moment")
6971
7072
71-func E (F) = {
72- let G = F
73- if ($isInstanceOf(G, "ByteVector"))
73+func F (G) = {
74+ let H = G
75+ if ($isInstanceOf(H, "ByteVector"))
7476 then {
75- let H = G
76- toBase58String(H)
77+ let I = H
78+ toBase58String(I)
7779 }
78- else if ($isInstanceOf(G, "Unit"))
80+ else if ($isInstanceOf(H, "Unit"))
7981 then {
80- let I = G
82+ let J = H
8183 "WAVES"
8284 }
8385 else throw("Not Asset id")
8486 }
8587
8688
87-func J (K) = {
88- let L = valueOrElse(getInteger(this, h), 0)
89- let M = valueOrElse(getInteger(this, d), 0)
90- let N = valueOrElse(getInteger(this, (K + f)), 0)
91- let O = valueOrElse(getInteger(this, (K + e)), M)
92- let P = valueOrElse(getInteger(this, (K + g)), 0)
93- let Q = fraction(P, (M - O), a)
94- $Tuple4(M, (Q + N), P, L)
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)
9597 }
9698
9799
98-func R (K) = {
99- let S = valueOrElse(getInteger(this, l), 0)
100- let M = valueOrElse(getInteger(this, i), 0)
101- let N = valueOrElse(getInteger(this, (K + k)), 0)
102- let O = valueOrElse(getInteger(this, (K + j)), M)
103- let T = valueOrElse(getInteger(this, (K + m)), 0)
104- let Q = (T * (M - O))
105- $Tuple4(M, (Q + N), T, S)
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)
106108 }
107109
108110
109-func U () = {
110- let V = valueOrElse(getInteger(this, p), 0)
111- let L = valueOrElse(getInteger(this, h), 0)
112- let W = valueOrElse(getInteger(this, l), 0)
113- let X = getIntegerValue(this, r)
114- let Y = if ((W == 0))
115- then V
116- else fraction(V, X, 100)
117- (fraction(Y, b, L) * 52)
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, min([Y, (X * 10)]), 100)
119+ (fraction(Z, b, M) * 52)
118120 }
119121
120122
121-@Callable(B)
122-func getUserStatsREADONLY (K) = {
123- let Z = U()
124- let aa = if ((K == ""))
125- then $Tuple3(0, 0, 0)
123+@Callable(C)
124+func getUserStatsREADONLY (L) = {
125+ let aa = V()
126+ let ab = if ((L == ""))
127+ then $Tuple4(0, 0, 0, 0)
126128 else {
127- let ab = valueOrErrorMessage(addressFromString(K), "Wrong user address")
128- let ac = J(K)
129- let ad = ac._1
130- let ae = ac._2
131- let P = ac._3
132- let L = ac._4
133- let af = assetBalance(ab, fromBase58String(z))
134- $Tuple3(af, P, ae)
129+ let ac = valueOrErrorMessage(addressFromString(L), "Wrong user address")
130+ let ad = K(L)
131+ let ae = ad._1
132+ let af = ad._2
133+ let Q = ad._3
134+ let M = ad._4
135+ let ag = S(L)
136+ let ah = ag._1
137+ let ai = ag._2
138+ let aj = ag._3
139+ let X = ag._4
140+ let ak = assetBalance(ac, fromBase58String(A))
141+ $Tuple4(ak, Q, af, ai)
135142 }
136- let ag = aa._1
137- let P = aa._2
138- let ae = aa._3
139- $Tuple2(nil, makeString(["%d%d%d%d", toString(Z), toString(ag), toString(P), toString(ae)], c))
143+ let al = ab._1
144+ let Q = ab._2
145+ let af = ab._3
146+ let ai = ab._4
147+ $Tuple2(nil, makeString(["%d%d%d%d%d", toString(aa), toString(al), toString(Q), toString(af), toString(ai)], c))
140148 }
141149
142150
143151
144-@Callable(B)
145-func init (z,ah,ai,aj,ak) = valueOrElse(C(B), if (isDefined(getString(this, q)))
152+@Callable(C)
153+func init (A,am,an,ao,ap) = valueOrElse(D(C), if (isDefined(getString(this, q)))
146154 then throw("DApp already inited")
147- else if (!(isDefined(assetInfo(fromBase58String(z)))))
155+ else if (!(isDefined(assetInfo(fromBase58String(A)))))
148156 then throw("asset id is not correct asset id")
149- else if ((size(fromBase58String(ah)) != 32))
157+ else if ((size(fromBase58String(am)) != 32))
150158 then throw("group1Admin1PubKey is not correct")
151- else if ((size(fromBase58String(ai)) != 32))
159+ else if ((size(fromBase58String(an)) != 32))
152160 then throw("group1Admin1PubKey is not correct")
153- else if ((size(fromBase58String(aj)) != 32))
161+ else if ((size(fromBase58String(ao)) != 32))
154162 then throw("group1Admin1PubKey is not correct")
155- else [StringEntry(q, z), StringEntry(t, ah), StringEntry(u, ai), StringEntry(v, aj), IntegerEntry(r, ak)])
163+ else [StringEntry(q, A), StringEntry(u, am), StringEntry(v, an), StringEntry(w, ao), IntegerEntry(r, ap)])
156164
157165
158166
159-@Callable(B)
160-func stake () = valueOrElse(D(), if ((size(B.payments) != 1))
167+@Callable(C)
168+func stake () = valueOrElse(E(), if ((size(C.payments) != 1))
161169 then throw("One payment expected")
162170 else {
163- let al = $Tuple2(B.payments[0].amount, B.payments[0].assetId)
164- let am = al._1
165- let an = al._2
166- if ((an != fromBase58String(z)))
171+ let aq = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
172+ let ar = aq._1
173+ let as = aq._2
174+ if ((as != fromBase58String(A)))
167175 then throw("Wrong payment asset")
168176 else {
169- let K = toString(B.caller)
170- let ao = J(K)
171- let ad = ao._1
172- let ae = ao._2
173- let P = ao._3
174- let L = ao._4
175-[IntegerEntry((K + e), ad), IntegerEntry((K + f), ae), IntegerEntry((K + g), (P + am)), IntegerEntry(h, (L + am))]
177+ let L = toString(C.caller)
178+ let at = K(L)
179+ let ae = at._1
180+ let af = at._2
181+ let Q = at._3
182+ let M = at._4
183+[IntegerEntry((L + e), ae), IntegerEntry((L + f), af), IntegerEntry((L + g), (Q + ar)), IntegerEntry(h, (M + ar))]
176184 }
177185 })
178186
179187
180188
181-@Callable(B)
182-func unstake (ap) = valueOrElse(D(), {
183- let K = toString(B.caller)
184- if ((0 >= ap))
189+@Callable(C)
190+func unstake (au) = valueOrElse(E(), {
191+ let L = toString(C.caller)
192+ if ((0 >= au))
185193 then throw("Amount must be greater than 0")
186194 else {
187- let aq = J(K)
188- let ad = aq._1
189- let ae = aq._2
190- let P = aq._3
191- let L = aq._4
192- if ((ap > P))
195+ let av = K(L)
196+ let ae = av._1
197+ let af = av._2
198+ let Q = av._3
199+ let M = av._4
200+ if ((au > Q))
193201 then throw("You can't unstake more than staked")
194- else [IntegerEntry((K + e), ad), IntegerEntry((K + f), ae), IntegerEntry((K + g), (P - ap)), IntegerEntry(h, (L - ap)), ScriptTransfer(B.caller, ap, fromBase58String(z))]
202+ else [IntegerEntry((L + e), ae), IntegerEntry((L + f), af), IntegerEntry((L + g), (Q - au)), IntegerEntry(h, (M - au)), ScriptTransfer(C.caller, au, fromBase58String(A))]
195203 }
196204 })
197205
198206
199207
200-@Callable(B)
201-func claim () = valueOrElse(D(), {
202- let K = toString(B.caller)
203- let ar = J(K)
204- let ad = ar._1
205- let ae = ar._2
206- let P = ar._3
207- let L = ar._4
208- if ((ae == 0))
208+@Callable(C)
209+func claim () = valueOrElse(E(), {
210+ let L = toString(C.caller)
211+ let aw = K(L)
212+ let ae = aw._1
213+ let af = aw._2
214+ let Q = aw._3
215+ let M = aw._4
216+ let ax = S(L)
217+ let ah = ax._1
218+ let ai = ax._2
219+ let aj = ax._3
220+ let X = ax._4
221+ if (((af + ai) == 0))
209222 then throw("Nothing to claim")
210- else [IntegerEntry((K + e), ad), IntegerEntry((K + f), 0), ScriptTransfer(B.caller, ae, fromBase58String(z))]
223+ else [IntegerEntry((L + e), ae), IntegerEntry((L + f), 0), IntegerEntry((L + j), ah), IntegerEntry((L + k), 0), ScriptTransfer(C.caller, (af + ai), fromBase58String(A))]
211224 })
212225
213226
214227
215-@Callable(B)
216-func stakeNFT () = valueOrElse(D(), if ((size(B.payments) != 1))
228+@Callable(C)
229+func stakeNFT () = valueOrElse(E(), if ((size(C.payments) != 1))
217230 then throw("One payment expected")
218231 else {
219- let as = $Tuple2(B.payments[0].amount, B.payments[0].assetId)
220- let am = as._1
221- let an = as._2
222- let at = E(an)
223- if (!(isDefined(getString(this, (at + o)))))
232+ let ay = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
233+ let ar = ay._1
234+ let as = ay._2
235+ let az = F(as)
236+ if (!(isDefined(getString(this, (az + o)))))
224237 then throw("Wrong nft asset")
225238 else {
226- let K = toString(B.caller)
227- let au = R(K)
228- let ad = au._1
229- let ae = au._2
230- let av = au._3
231- let W = au._4
232-[IntegerEntry((K + j), ad), IntegerEntry((K + k), ae), IntegerEntry((K + m), (av + am)), IntegerEntry(l, (W + am)), IntegerEntry((((K + "_") + at) + n), 1)]
239+ let L = toString(C.caller)
240+ let aA = S(L)
241+ let ae = aA._1
242+ let af = aA._2
243+ let aj = aA._3
244+ let X = aA._4
245+[IntegerEntry((L + j), ae), IntegerEntry((L + k), af), IntegerEntry((L + m), (aj + 1)), IntegerEntry(l, (X + 1)), BooleanEntry((((L + "_") + az) + n), true)]
233246 }
234247 })
235248
236249
237250
238-@Callable(B)
239-func unstakeNFT (H) = valueOrElse(D(), {
240- let K = toString(B.caller)
241- if (isDefined(getString(this, (((K + H) + "_") + n))))
251+@Callable(C)
252+func unstakeNFT (I) = valueOrElse(E(), {
253+ let L = toString(C.caller)
254+ if (isDefined(getBoolean(this, (((L + "_") + I) + n))))
242255 then throw("You didn't staked")
243256 else {
244- let aw = R(K)
245- let ad = aw._1
246- let ae = aw._2
247- let av = aw._3
248- let W = aw._4
249-[IntegerEntry((K + j), ad), IntegerEntry((K + k), ae), IntegerEntry((K + m), (av - 1)), IntegerEntry(l, (W - 1)), DeleteEntry((((K + "_") + H) + n)), ScriptTransfer(B.caller, 1, fromBase58String(H))]
257+ let aB = S(L)
258+ let ae = aB._1
259+ let af = aB._2
260+ let aj = aB._3
261+ let X = aB._4
262+[IntegerEntry((L + j), ae), IntegerEntry((L + k), af), IntegerEntry((L + m), (aj - 1)), IntegerEntry(l, (X - 1)), DeleteEntry((((L + "_") + I) + n)), ScriptTransfer(C.caller, 1, fromBase58String(I))]
250263 }
251264 })
252265
253266
254267
255-@Callable(B)
256-func claimNFT () = valueOrElse(D(), {
257- let K = toString(B.caller)
258- let ax = R(K)
259- let ad = ax._1
260- let ae = ax._2
261- let av = ax._3
262- let W = ax._4
263- if ((ae == 0))
264- then throw("Nothing to claim")
265- else [IntegerEntry((K + j), ad), IntegerEntry((K + k), 0), ScriptTransfer(B.caller, ae, fromBase58String(z))]
266- })
267-
268-
269-
270-@Callable(B)
271-func issueNFT (ab,ay,az) = valueOrElse(D(), valueOrElse(A(B), {
272- let aA = valueOrErrorMessage(addressFromString(ab), "Wrong user address")
273- let aB = Issue(ay, az, 1, 0, false)
274- let aC = calculateAssetId(aB)
275-[aB, StringEntry((toBase58String(aC) + o), ab), ScriptTransfer(aA, 1, aC)]
268+@Callable(C)
269+func issueNFT (ac,aC,aD) = valueOrElse(E(), valueOrElse(B(C), {
270+ let aE = valueOrErrorMessage(addressFromString(ac), "Wrong user address")
271+ let aF = Issue(aC, aD, 1, 0, false)
272+ let aG = calculateAssetId(aF)
273+ let aH = valueOrElse(getString(this, s), "")
274+ let aI = (aH + (if ((aH != ""))
275+ then c
276+ else ("" + toBase58String(aG))))
277+[aF, StringEntry((toBase58String(aG) + o), ac), StringEntry(s, aI), ScriptTransfer(aE, 1, aG)]
276278 }))
277279
278280
279281
280-@Callable(B)
281-func airdrop () = valueOrElse(D(), valueOrElse(A(B), if ((size(B.payments) != 1))
282+@Callable(C)
283+func airdrop () = valueOrElse(E(), valueOrElse(B(C), if ((size(C.payments) != 1))
282284 then throw("One payment expected")
283285 else {
284- let aD = $Tuple2(B.payments[0].amount, B.payments[0].assetId)
285- let am = aD._1
286- let an = aD._2
287- if ((an != fromBase58String(z)))
286+ let aJ = $Tuple2(C.payments[0].amount, C.payments[0].assetId)
287+ let ar = aJ._1
288+ let as = aJ._2
289+ if ((as != fromBase58String(A)))
288290 then throw("Wrong payment asset")
289291 else {
290- let X = getIntegerValue(this, r)
291- let L = valueOrElse(getInteger(this, h), 0)
292- let W = valueOrElse(getInteger(this, l), 0)
293- let M = valueOrElse(getInteger(this, d), 0)
294- let aE = valueOrElse(getInteger(this, i), 0)
295- let aF = if ((W == 0))
296- then $Tuple2(0, am)
292+ let Y = getIntegerValue(this, r)
293+ let M = valueOrElse(getInteger(this, h), 0)
294+ let X = valueOrElse(getInteger(this, l), 0)
295+ let N = valueOrElse(getInteger(this, d), 0)
296+ let aK = valueOrElse(getInteger(this, i), 0)
297+ let aL = if ((X == 0))
298+ then $Tuple2(0, ar)
297299 else {
298- let aG = fraction(am, X, 100)
299- $Tuple2(aG, (am - aG))
300+ let aM = fraction(ar, min([Y, (X * 10)]), 100)
301+ $Tuple2(aM, (ar - aM))
300302 }
301- let aH = aF._1
302- let aI = aF._2
303- let aJ = if ((L > 0))
304- then (M + fraction(aI, a, L))
305- else M
306- let aK = if ((W > 0))
307- then (aE + (aH / W))
308- else aE
309-[IntegerEntry(d, aJ), IntegerEntry(i, aK), IntegerEntry(p, am)]
303+ let aN = aL._1
304+ let aO = aL._2
305+ let aP = if ((M > 0))
306+ then (N + fraction(aO, a, M))
307+ else N
308+ let aQ = if ((X > 0))
309+ then (aK + (aN / X))
310+ else aK
311+[IntegerEntry(d, aP), IntegerEntry(i, aQ), IntegerEntry(p, ar)]
310312 }
311313 }))
312314
313315
314316
315-@Callable(B)
316-func activate () = valueOrElse(A(B), if (valueOrElse(getBoolean(this, s), true))
317+@Callable(C)
318+func activate () = valueOrElse(B(C), if (valueOrElse(getBoolean(this, t), true))
317319 then throw("dApp already active")
318- else [BooleanEntry(s, true)])
320+ else [BooleanEntry(t, true)])
319321
320322
321323
322-@Callable(B)
323-func shutdown () = valueOrElse(A(B), if (!(valueOrElse(getBoolean(this, s), true)))
324+@Callable(C)
325+func shutdown () = valueOrElse(B(C), if (!(valueOrElse(getBoolean(this, t), true)))
324326 then throw("dApp already shutdown")
325- else [BooleanEntry(s, false)])
327+ else [BooleanEntry(t, false)])
326328
327329
328-@Verifier(aL)
329-func aM () = {
330- let aN = {
331- let aO = if (sigVerify(aL.bodyBytes, aL.proofs[0], w))
330+@Verifier(aR)
331+func aS () = {
332+ let aT = {
333+ let aU = if (sigVerify(aR.bodyBytes, aR.proofs[0], x))
332334 then 1
333335 else 0
334- let aP = if (sigVerify(aL.bodyBytes, aL.proofs[1], x))
336+ let aV = if (sigVerify(aR.bodyBytes, aR.proofs[1], y))
335337 then 1
336338 else 0
337- let aQ = if (sigVerify(aL.bodyBytes, aL.proofs[2], y))
339+ let aW = if (sigVerify(aR.bodyBytes, aR.proofs[2], z))
338340 then 1
339341 else 0
340- (((aO + aP) + aQ) >= 2)
342+ (((aU + aV) + aW) >= 2)
341343 }
342- let G = aL
343- if ($isInstanceOf(G, "InvokeScriptTransaction"))
344+ let H = aR
345+ if ($isInstanceOf(H, "InvokeScriptTransaction"))
344346 then {
345- let aR = G
346- let aS = sigVerify(aL.bodyBytes, aL.proofs[0], aL.senderPublicKey)
347- let aT = if ((aR.fee == 900000))
348- then (aR.feeAssetId == unit)
347+ let aX = H
348+ let aY = sigVerify(aR.bodyBytes, aR.proofs[0], aR.senderPublicKey)
349+ let aZ = if ((aX.fee == 900000))
350+ then (aX.feeAssetId == unit)
349351 else false
350- let aU = (aR.function == "init")
351- let aV = (size(aR.payments) == 0)
352- if (if (if (if (aT)
353- then aU
352+ let ba = (aX.function == "init")
353+ let bb = (size(aX.payments) == 0)
354+ if (if (if (if (aZ)
355+ then ba
354356 else false)
355- then aS
357+ then aY
356358 else false)
357- then aV
359+ then bb
358360 else false)
359361 then true
360- else aN
362+ else aT
361363 }
362- else aN
364+ else aT
363365 }
364366

github/deemru/w8io/fabc49c 
103.66 ms