tx · 5rvpZRhiBw9zDWWdWwWj9ddqmVyuLmxXsExcTr4JNxBi

3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z:  -0.01300000 Waves

2025.01.07 16:59 [3448846] smart account 3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z > SELF 0.00000000 Waves

{ "type": 13, "id": "5rvpZRhiBw9zDWWdWwWj9ddqmVyuLmxXsExcTr4JNxBi", "fee": 1300000, "feeAssetId": null, "timestamp": 1736258391899, "version": 2, "chainId": 84, "sender": "3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z", "senderPublicKey": "5CoDbXxoqnvJpx9GrS6M4G5GYJXh9rcoiXJz7RYTPVkL", "proofs": [ "k2Kn7GtLZmJUAfW3CET2pU6HuXfSF1yFafSbmGV6j7itrXDBqKjqyPBJgGcgumz7ZStH8Cz9Qf2ao8mcZnSSefV" ], "script": "base64:BgIyCAISCgoIAQgEAhEYFBISBAoCCAgSABIDCgEBEgASABIAEgMKAQESABIDCgEIEgMKAQgsAANNMTYAgICE/qbe4READlNUQUtFUlNfQU1PVU5UAICAzvK+j6oFAAtURUFNX0FNT1VOVACAgJqm6q/jAQANTUFSS0VUX0FNT1VOVACAgJzl/Z7UCgALWUVBUl9CTE9DS1MJAGgCAO0CAKALAAxTVEFLRV9QRVJJT0QJAGgCAAUFC1lFQVJfQkxPQ0tTAAtCTEVTU19QUklDRQCA0NvD9AIADUxPVFRFUllfUFJJQ0UAgNDbw/QCAAtGT01PX1BFUklPRAA8AAxSQU5ET01fREVMQVkAAgAUQ1VSUkVOVF9KQUNLUE9UX1BFUkMAMgARTkVYVF9KQUNLUE9UX1BFUkMAFAAMU1RBS0VSU19QRVJDABQACVRFQU1fUEVSQwAKAA5nb3JjQXNzZXRJZEtleQILZ29yY0Fzc2V0SWQAC2dvcmNBc3NldElkCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAKEIAQUOZ29yY0Fzc2V0SWRLZXkCFkdPUkMgaXMgbm90IGlzc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CQDMCAIJAKwCAgINJXMlZF9fZ3Vlc3NfXwkApAMBBQVndWVzcwUDbmlsAWkBEndhbGxldEluZm9SRUFET05MWQEOdXNlckFkZHJlc3NPcHQJAJQKAgUDbmlsCQEOd2FsbGV0SW50ZXJuYWwBBQ51c2VyQWRkcmVzc09wdACgWdLK", "height": 3448846, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: nrHckPCsDibbJErdzhdt5m9gk8oea1CUSrwfQmoqX4W Next: 8FKkxFVgbff7We1HYdDk9TsPERUy3bd4DuamRE85kmeT Diff:
OldNewDifferences
5555
5656 let A = "lastFomoPlayer"
5757
58-let B = "teamWalletAddr"
58+let B = "lastFomoWinner"
5959
60-let C = "brokerAddr"
60+let C = "lastFomoWinnerAmount"
6161
62-func D (E) = ("finishBlockFor_" + E)
62+let D = "lastFomoWinnerTime"
63+
64+let E = "teamWalletAddr"
65+
66+let F = "brokerAddr"
67+
68+func G (H) = ("finishBlockFor_" + H)
6369
6470
65-func F (E) = ("guessFor_" + E)
71+func I (H) = ("guessFor_" + H)
6672
6773
68-func G (E) = ("saltFor_" + E)
74+func J (H) = ("saltFor_" + H)
6975
7076
71-let H = "currLotteryJackpot"
77+let K = "currLotteryJackpot"
7278
73-let I = "nextLotteryJackpot"
79+let L = "nextLotteryJackpot"
7480
75-func J (K) = {
76- let L = valueOrElse(getInteger(s), 0)
77- let M = valueOrElse(getInteger(w(K)), -1)
78- if ((0 > M))
79- then $Tuple2(0, L)
81+let M = "lastLotteryWinner"
82+
83+let N = "lastLotteryWinnerAmount"
84+
85+let O = "lastLotteryWinnerTime"
86+
87+func P (Q) = {
88+ let R = valueOrElse(getInteger(s), 0)
89+ let S = valueOrElse(getInteger(w(Q)), -1)
90+ if ((0 > S))
91+ then $Tuple2(0, R)
8092 else {
81- let N = valueOrErrorMessage(getInteger(q), "GORC is not issued yet")
82- let O = min([height, (N + f)])
83- let P = valueOrElse(getInteger(u(K)), 0)
84- let Q = valueOrElse(getInteger(t), 0)
85- let R = valueOrElse(getInteger(r), b)
86- let S = fraction(R, (O - M), f)
87- let T = if ((Q != 0))
88- then fraction(S, P, Q)
93+ let T = valueOrErrorMessage(getInteger(q), "GORC is not issued yet")
94+ let U = min([height, (T + f)])
95+ let V = valueOrElse(getInteger(u(Q)), 0)
96+ let W = valueOrElse(getInteger(t), 0)
97+ let X = valueOrElse(getInteger(r), b)
98+ let Y = fraction(X, (U - S), f)
99+ let Z = if ((W != 0))
100+ then fraction(Y, V, W)
89101 else 0
90- $Tuple2(T, (L - T))
102+ $Tuple2(Z, (R - Z))
91103 }
92104 }
93105
94106
95-func U (V,W) = {
96- let X = pow(10, 0, W, 0, 0, DOWN)
97- let Y = toString((V % X))
98- let Z = drop(toString(X), (1 + size(Y)))
99- (((toString((V / X)) + ".") + Z) + Y)
107+func aa (ab,ac) = {
108+ let ad = pow(10, 0, ac, 0, 0, DOWN)
109+ let ae = toString((ab % ad))
110+ let af = drop(toString(ad), (1 + size(ae)))
111+ (((toString((ab / ad)) + ".") + af) + ae)
100112 }
101113
102114
103-func aa (ab) = if ((size(ab.payments) != 1))
115+func ag (ah) = if ((size(ah.payments) != 1))
104116 then throw("exactly 1 payment must be attached")
105117 else {
106- let ac = ab.payments[0]
107- let ad = ac.amount
108- if (if (!(isDefined(ac.assetId)))
118+ let ai = ah.payments[0]
119+ let aj = ai.amount
120+ if (if (!(isDefined(ai.assetId)))
109121 then true
110- else (value(ac.assetId) != p))
122+ else (value(ai.assetId) != p))
111123 then throw("GORC payments only!")
112124 else {
113- let ae = (ad - g)
114- if ((0 > ae))
115- then throw(((("You need to sacrifice " + U(g, 8)) + " GORC, but I see only ") + U(ad, 8)))
125+ let ak = (aj - g)
126+ if ((0 > ak))
127+ then throw(((("You need to sacrifice " + aa(g, 8)) + " GORC, but I see only ") + aa(aj, 8)))
116128 else {
117- let af = if ((ae > 0))
118- then [ScriptTransfer(ab.caller, ae, p)]
129+ let al = if ((ak > 0))
130+ then [ScriptTransfer(ah.caller, ak, p)]
119131 else nil
120- let ag = valueOrElse(getInteger(x), 0)
121- let ah = valueOrElse(getString(A), "")
122- let ai = fraction(g, k, 100)
123- let aj = fraction(g, l, 100)
124- let ak = fraction(g, n, 100)
125- let al = (((g - ai) - aj) - ak)
126- let am = valueOrElse(getInteger(y), 0)
127- let an = valueOrElse(getInteger(z), 0)
128- let ao = if (if (if ((height > (ag + i)))
129- then (am > 0)
132+ let am = valueOrElse(getInteger(x), 0)
133+ let an = valueOrElse(getString(A), "")
134+ let ao = fraction(g, k, 100)
135+ let ap = fraction(g, l, 100)
136+ let aq = fraction(g, n, 100)
137+ let ar = (((g - ao) - ap) - aq)
138+ let as = valueOrElse(getInteger(y), 0)
139+ let at = valueOrElse(getInteger(z), 0)
140+ let au = if (if (if ((height > (am + i)))
141+ then (as > 0)
130142 else false)
131- then (ah != "")
143+ then (an != "")
132144 else false)
133- then [ScriptTransfer(addressFromStringValue(ah), am, p), IntegerEntry(y, (an + ai)), IntegerEntry(z, aj)]
134- else [IntegerEntry(y, (am + ai)), IntegerEntry(z, (an + aj))]
135- (([IntegerEntry(x, height), StringEntry(A, toString(ab.caller)), ScriptTransfer(addressFromStringValue(getStringValue(B)), ak, p), IntegerEntry(s, (getIntegerValue(s) + al)), IntegerEntry(r, (getIntegerValue(r) + al))] ++ af) ++ ao)
145+ then [ScriptTransfer(addressFromStringValue(an), as, p), StringEntry(B, an), IntegerEntry(C, as), IntegerEntry(D, lastBlock.timestamp), IntegerEntry(y, (at + ao)), IntegerEntry(z, ap)]
146+ else [IntegerEntry(y, (as + ao)), IntegerEntry(z, (at + ap))]
147+ (([IntegerEntry(x, height), StringEntry(A, toString(ah.caller)), ScriptTransfer(addressFromStringValue(getStringValue(E)), aq, p), IntegerEntry(s, (getIntegerValue(s) + ar)), IntegerEntry(r, (getIntegerValue(r) + ar))] ++ al) ++ au)
136148 }
137149 }
138150 }
139151
140152
141-func ap (aq,ar,as) = if ((0 >= aq))
153+func av (aw,ax,ay) = if ((0 >= aw))
142154 then throw("maxValue should be > 0")
143155 else {
144- let at = sha256_16Kb((ar + as))
145- (toInt(at) % aq)
156+ let az = sha256_16Kb((ax + ay))
157+ (toInt(az) % aw)
146158 }
147159
148160
149-func au (av) = {
150- let v = addressFromString(av)
151- let aw = if (isDefined(v))
161+func aA (aB) = {
162+ let v = addressFromString(aB)
163+ let aC = if (isDefined(v))
152164 then wavesBalance(value(v))
153165 else BalanceDetails(0, 0, 0, 0)
154- let ax = if (isDefined(v))
166+ let aD = if (isDefined(v))
155167 then assetBalance(value(v), p)
156168 else 0
157- let ay = valueOrElse(getInteger(u(av)), 0)
158-[("%s%d__wavesBalance__" + toString(aw.available)), ("%s%d__gorcBalance__" + toString(ax)), ("%s%d__stakedGorc__" + toString(ay))]
169+ let aE = valueOrElse(getInteger(u(aB)), 0)
170+[("%s%d__wavesBalance__" + toString(aC.available)), ("%s%d__gorcBalance__" + toString(aD)), ("%s%d__stakedGorc__" + toString(aE))]
159171 }
160172
161173
162-@Callable(ab)
163-func testArgs (az,aA,aB,aC,aD,aE,aF,aG) = nil
174+@Callable(ah)
175+func testArgs (aF,aG,aH,aI,aJ,aK,aL,aM) = nil
164176
165177
166178
167-@Callable(ab)
168-func constructorV1 (aH,aI) = if ((ab.caller != this))
179+@Callable(ah)
180+func constructorV1 (aN,aO) = if ((ah.caller != this))
169181 then throw("Permission denied")
170182 else {
171- let aJ = a
172- let aK = Issue("GORC", "Meme coin by God of Random Chance. Visit https://gorc.meme, sacrifice to the God of Random and you will receive an answer to any question or a blessing. Lucky one gets a Gift of God", aJ, 8, false, unit, 0)
173- let aL = calculateAssetId(aK)
174-[aK, BinaryEntry(o, aL), IntegerEntry(q, height), IntegerEntry(s, b), IntegerEntry(r, b), StringEntry(B, aH), StringEntry(C, aI), ScriptTransfer(addressFromStringValue(aH), c, aL), ScriptTransfer(addressFromStringValue(aI), d, aL)]
183+ let aP = a
184+ let aQ = Issue("GORC", "Meme coin by God of Random Chance. Visit https://gorc.meme, sacrifice to the God of Random and you will receive an answer to any question or a blessing. Lucky one gets a Gift of God", aP, 8, false, unit, 0)
185+ let aR = calculateAssetId(aQ)
186+[aQ, BinaryEntry(o, aR), IntegerEntry(q, height), IntegerEntry(s, b), IntegerEntry(r, b), StringEntry(E, aN), StringEntry(F, aO), ScriptTransfer(addressFromStringValue(aN), c, aR), ScriptTransfer(addressFromStringValue(aO), d, aR)]
175187 }
176188
177189
178190
179-@Callable(ab)
180-func stakeGorc () = if ((size(ab.payments) != 1))
191+@Callable(ah)
192+func stakeGorc () = if ((size(ah.payments) != 1))
181193 then throw("exactly 1 payment must be attached")
182194 else {
183- let ac = ab.payments[0]
184- let ad = ac.amount
185- if (if (!(isDefined(ac.assetId)))
195+ let ai = ah.payments[0]
196+ let aj = ai.amount
197+ if (if (!(isDefined(ai.assetId)))
186198 then true
187- else (value(ac.assetId) != p))
199+ else (value(ai.assetId) != p))
188200 then throw("GORC payments only!")
189201 else {
190- let v = toString(ab.caller)
191- let aM = J(v)
192- let T = aM._1
193- let L = aM._2
194- let aN = u(v)
195- let aO = if ((T > 0))
196- then [ScriptTransfer(ab.caller, T, p)]
202+ let v = toString(ah.caller)
203+ let aS = P(v)
204+ let Z = aS._1
205+ let R = aS._2
206+ let aT = u(v)
207+ let aU = if ((Z > 0))
208+ then [ScriptTransfer(ah.caller, Z, p)]
197209 else nil
198- $Tuple2((aO ++ [IntegerEntry(t, (valueOrElse(getInteger(t), 0) + ad)), IntegerEntry(aN, (valueOrElse(getInteger(aN), 0) + ad)), IntegerEntry(w(v), height), IntegerEntry(s, L)]), T)
210+ $Tuple2((aU ++ [IntegerEntry(t, (valueOrElse(getInteger(t), 0) + aj)), IntegerEntry(aT, (valueOrElse(getInteger(aT), 0) + aj)), IntegerEntry(w(v), height), IntegerEntry(s, R)]), Z)
199211 }
200212 }
201213
202214
203215
204-@Callable(ab)
205-func unstakeGorc (aP) = if ((0 >= aP))
216+@Callable(ah)
217+func unstakeGorc (aV) = if ((0 >= aV))
206218 then throw("Amount should be positive")
207219 else {
208- let v = toString(ab.caller)
209- if ((size(ab.payments) != 0))
220+ let v = toString(ah.caller)
221+ if ((size(ah.payments) != 0))
210222 then throw("No payments required")
211223 else {
212- let aN = u(v)
213- let aQ = valueOrElse(getInteger(aN), 0)
214- if ((0 > (aQ - aP)))
215- then throw(((("You have only " + U(aQ, 8)) + " GORC staked, tried to unstake ") + U(aP, 8)))
224+ let aT = u(v)
225+ let aW = valueOrElse(getInteger(aT), 0)
226+ if ((0 > (aW - aV)))
227+ then throw(((("You have only " + aa(aW, 8)) + " GORC staked, tried to unstake ") + aa(aV, 8)))
216228 else {
217- let aR = J(v)
218- let T = aR._1
219- let L = aR._2
220- let aO = if ((T > 0))
221- then [ScriptTransfer(ab.caller, T, p)]
229+ let aX = P(v)
230+ let Z = aX._1
231+ let R = aX._2
232+ let aU = if ((Z > 0))
233+ then [ScriptTransfer(ah.caller, Z, p)]
222234 else nil
223- $Tuple2((aO ++ [IntegerEntry(t, (valueOrErrorMessage(getInteger(t), "No GORC staked") - aP)), IntegerEntry(aN, (aQ - aP)), IntegerEntry(w(v), height), IntegerEntry(s, L)]), 0)
235+ $Tuple2((aU ++ [IntegerEntry(t, (valueOrErrorMessage(getInteger(t), "No GORC staked") - aV)), IntegerEntry(aT, (aW - aV)), IntegerEntry(w(v), height), IntegerEntry(s, R)]), 0)
224236 }
225237 }
226238 }
227239
228240
229241
230-@Callable(ab)
231-func claimGorc () = if ((size(ab.payments) != 0))
242+@Callable(ah)
243+func claimGorc () = if ((size(ah.payments) != 0))
232244 then throw("No payments required")
233245 else {
234- let v = toString(ab.caller)
235- let aS = J(v)
236- let T = aS._1
237- let L = aS._2
238- let aO = if ((T > 0))
239- then [ScriptTransfer(ab.caller, T, p)]
246+ let v = toString(ah.caller)
247+ let aY = P(v)
248+ let Z = aY._1
249+ let R = aY._2
250+ let aU = if ((Z > 0))
251+ then [ScriptTransfer(ah.caller, Z, p)]
240252 else nil
241- $Tuple2((aO ++ [IntegerEntry(w(v), height), IntegerEntry(s, L)]), T)
253+ $Tuple2((aU ++ [IntegerEntry(w(v), height), IntegerEntry(s, R)]), Z)
242254 }
243255
244256
245257
246-@Callable(ab)
247-func answerMe () = $Tuple2(aa(ab), toInt(ab.transactionId))
258+@Callable(ah)
259+func answerMe () = $Tuple2(ag(ah), toInt(ah.transactionId))
248260
249261
250262
251-@Callable(ab)
252-func blessMe () = $Tuple2(aa(ab), 42)
263+@Callable(ah)
264+func blessMe () = $Tuple2(ag(ah), 42)
253265
254266
255267
256-@Callable(ab)
257-func commitGuess (aT) = {
258- let v = toString(ab.caller)
259- let aU = D(v)
260- let aV = F(v)
261- if (isDefined(getInteger(aU)))
268+@Callable(ah)
269+func commitGuess (aZ) = {
270+ let v = toString(ah.caller)
271+ let ba = G(v)
272+ let bb = I(v)
273+ if (isDefined(getInteger(ba)))
262274 then throw("You already made a bet, please use it")
263- else if (if ((0 > aT))
275+ else if (if ((0 > aZ))
264276 then true
265- else (aT > 11))
277+ else (aZ > 11))
266278 then throw("The number should be between 0 and 11")
267- else if ((size(ab.payments) != 1))
279+ else if ((size(ah.payments) != 1))
268280 then throw("exactly 1 payment must be attached")
269281 else {
270- let ac = ab.payments[0]
271- let ad = ac.amount
272- if (if (!(isDefined(ac.assetId)))
282+ let ai = ah.payments[0]
283+ let aj = ai.amount
284+ if (if (!(isDefined(ai.assetId)))
273285 then true
274- else (value(ac.assetId) != p))
286+ else (value(ai.assetId) != p))
275287 then throw("GORC payments only!")
276288 else {
277- let ae = (ad - h)
278- if ((0 > ae))
279- then throw(((("You need to sacrifice " + U(h, 8)) + " GORC, but I see only ") + U(ad, 8)))
289+ let ak = (aj - h)
290+ if ((0 > ak))
291+ then throw(((("You need to sacrifice " + aa(h, 8)) + " GORC, but I see only ") + aa(aj, 8)))
280292 else {
281- let af = if ((ae > 0))
282- then [ScriptTransfer(ab.caller, ae, p)]
293+ let al = if ((ak > 0))
294+ then [ScriptTransfer(ah.caller, ak, p)]
283295 else nil
284- let aW = (height + j)
285- let ai = fraction(h, k, 100)
286- let aj = fraction(h, l, 100)
287- let ak = fraction(h, n, 100)
288- let al = (((h - ai) - aj) - ak)
289- $Tuple2(([IntegerEntry(aU, aW), IntegerEntry(aV, aT), IntegerEntry(H, (valueOrElse(getInteger(H), 0) + ai)), IntegerEntry(I, (valueOrElse(getInteger(I), 0) + aj)), ScriptTransfer(addressFromStringValue(getStringValue(B)), ak, p), IntegerEntry(s, (getIntegerValue(s) + al)), IntegerEntry(r, (getIntegerValue(r) + al)), StringEntry(G(v), toBase58String(ab.transactionId))] ++ af), aW)
296+ let bc = (height + j)
297+ let ao = fraction(h, k, 100)
298+ let ap = fraction(h, l, 100)
299+ let aq = fraction(h, n, 100)
300+ let ar = (((h - ao) - ap) - aq)
301+ $Tuple2(([IntegerEntry(ba, bc), IntegerEntry(bb, aZ), IntegerEntry(K, (valueOrElse(getInteger(K), 0) + ao)), IntegerEntry(L, (valueOrElse(getInteger(L), 0) + ap)), ScriptTransfer(addressFromStringValue(getStringValue(E)), aq, p), IntegerEntry(s, (getIntegerValue(s) + ar)), IntegerEntry(r, (getIntegerValue(r) + ar)), StringEntry(J(v), toBase58String(ah.transactionId))] ++ al), bc)
290302 }
291303 }
292304 }
294306
295307
296308
297-@Callable(ab)
309+@Callable(ah)
298310 func guessLottery () = {
299- let v = toString(ab.caller)
300- let aU = D(v)
301- let aV = F(v)
302- let aT = valueOrErrorMessage(getInteger(aV), "You have not made a bet")
303- let aW = valueOrErrorMessage(getInteger(aU), "You have not made a bet")
304- if ((aW > height))
305- then throw(("Random number is not ready yet, wait until height = " + toString(aW)))
311+ let v = toString(ah.caller)
312+ let ba = G(v)
313+ let bb = I(v)
314+ let aZ = valueOrErrorMessage(getInteger(bb), "You have not made a bet")
315+ let bc = valueOrErrorMessage(getInteger(ba), "You have not made a bet")
316+ if ((bc > height))
317+ then throw(("Random number is not ready yet, wait until height = " + toString(bc)))
306318 else {
307- let as = value(value(blockInfoByHeight(aW)).vrf)
308- let aX = G(v)
309- let ar = fromBase58String(valueOrElse(getString(aX), "DEFAULT"))
310- let aY = ap(12, ar, as)
311- let aZ = valueOrElse(getInteger(H), 0)
312- let ba = if ((aY == aT))
313- then [ScriptTransfer(ab.caller, aZ, p), IntegerEntry(H, valueOrElse(getInteger(I), 0)), IntegerEntry(I, 0)]
319+ let ay = value(value(blockInfoByHeight(bc)).vrf)
320+ let bd = J(v)
321+ let ax = fromBase58String(valueOrElse(getString(bd), "DEFAULT"))
322+ let be = av(12, ax, ay)
323+ let bf = valueOrElse(getInteger(K), 0)
324+ let bg = if ((be == aZ))
325+ then [ScriptTransfer(ah.caller, bf, p), StringEntry(M, v), IntegerEntry(N, bf), IntegerEntry(O, lastBlock.timestamp), IntegerEntry(K, valueOrElse(getInteger(L), 0)), IntegerEntry(L, 0)]
314326 else nil
315- $Tuple2(([DeleteEntry(aU), DeleteEntry(aV), DeleteEntry(aX)] ++ ba), aY)
327+ $Tuple2(([DeleteEntry(ba), DeleteEntry(bb), DeleteEntry(bd)] ++ bg), be)
316328 }
317329 }
318330
319331
320332
321-@Callable(ab)
322-func statsREADONLY (K) = {
323- let bb = J(K)
324- let T = bb._1
325- let L = bb._2
326- let bc = valueOrElse(getInteger(y), 0)
327- let bd = valueOrElse(getInteger(z), 0)
328- let ag = valueOrElse(getInteger(x), 0)
329- let ah = valueOrElse(getString(A), "")
330- let be = valueOrElse(getInteger(H), 0)
331- let bf = valueOrElse(getInteger(I), 0)
332- let aU = D(K)
333- let aV = F(K)
334- let aT = valueOrElse(getInteger(aV), -1)
335- let aW = valueOrElse(getInteger(aU), -1)
336- $Tuple2(nil, [("%s%d__gorcAvailToClaim__" + toString(T)), ("%s%d__currFomoJackpotAmount__" + toString(bc)), ("%s%d__nextFomoJackpotAmount__" + toString(bd)), ("%s%d__currLotteryJackpotAmount__" + toString(be)), ("%s%d__nextLotteryJackpotAmount__" + toString(bf)), ("%s%d__lastFomoTime__" + toString(ag)), ("%s%s__lastFomoPlayer__" + ah), ("%s%d__amountLeftTotal__" + toString(L)), ("%s%d__finishBlock__" + toString(aW)), ("%s%d__guess__" + toString(aT))])
333+@Callable(ah)
334+func statsREADONLY (Q) = {
335+ let bh = P(Q)
336+ let Z = bh._1
337+ let R = bh._2
338+ let bi = valueOrElse(getInteger(y), 0)
339+ let bj = valueOrElse(getInteger(z), 0)
340+ let am = valueOrElse(getInteger(x), 0)
341+ let an = valueOrElse(getString(A), "")
342+ let bk = valueOrElse(getInteger(K), 0)
343+ let bl = valueOrElse(getInteger(L), 0)
344+ let ba = G(Q)
345+ let bb = I(Q)
346+ let aZ = valueOrElse(getInteger(bb), -1)
347+ let bc = valueOrElse(getInteger(ba), -1)
348+ $Tuple2(nil, [("%s%d__gorcAvailToClaim__" + toString(Z)), ("%s%d__currFomoJackpotAmount__" + toString(bi)), ("%s%d__nextFomoJackpotAmount__" + toString(bj)), ("%s%d__currLotteryJackpotAmount__" + toString(bk)), ("%s%d__nextLotteryJackpotAmount__" + toString(bl)), ("%s%d__lastFomoTime__" + toString(am)), ("%s%s__lastFomoPlayer__" + an), ("%s%d__amountLeftTotal__" + toString(R)), ("%s%d__finishBlock__" + toString(bc)), ("%s%d__guess__" + toString(aZ))])
337349 }
338350
339351
340352
341-@Callable(ab)
342-func walletInfoREADONLY (av) = $Tuple2(nil, au(av))
353+@Callable(ah)
354+func walletInfoREADONLY (aB) = $Tuple2(nil, aA(aB))
343355
344356
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 10000000000000000
55
66 let b = 3000000000000000
77
88 let c = 1000000000000000
99
1010 let d = 6000000000000000
1111
1212 let e = (365 * 1440)
1313
1414 let f = (5 * e)
1515
1616 let g = 100000000000
1717
1818 let h = 100000000000
1919
2020 let i = 60
2121
2222 let j = 2
2323
2424 let k = 50
2525
2626 let l = 20
2727
2828 let m = 20
2929
3030 let n = 10
3131
3232 let o = "gorcAssetId"
3333
3434 let p = valueOrErrorMessage(getBinary(o), "GORC is not issued yet")
3535
3636 let q = "issueTime"
3737
3838 let r = "stakersAmountTotal"
3939
4040 let s = "stakersAmountLeft"
4141
4242 let t = "stakedTotal"
4343
4444 func u (v) = ("stakedAmount_" + v)
4545
4646
4747 func w (v) = ("lastClaimTime_" + v)
4848
4949
5050 let x = "lastFomoTime"
5151
5252 let y = "currFomoJackpot"
5353
5454 let z = "nextFomoJackpot"
5555
5656 let A = "lastFomoPlayer"
5757
58-let B = "teamWalletAddr"
58+let B = "lastFomoWinner"
5959
60-let C = "brokerAddr"
60+let C = "lastFomoWinnerAmount"
6161
62-func D (E) = ("finishBlockFor_" + E)
62+let D = "lastFomoWinnerTime"
63+
64+let E = "teamWalletAddr"
65+
66+let F = "brokerAddr"
67+
68+func G (H) = ("finishBlockFor_" + H)
6369
6470
65-func F (E) = ("guessFor_" + E)
71+func I (H) = ("guessFor_" + H)
6672
6773
68-func G (E) = ("saltFor_" + E)
74+func J (H) = ("saltFor_" + H)
6975
7076
71-let H = "currLotteryJackpot"
77+let K = "currLotteryJackpot"
7278
73-let I = "nextLotteryJackpot"
79+let L = "nextLotteryJackpot"
7480
75-func J (K) = {
76- let L = valueOrElse(getInteger(s), 0)
77- let M = valueOrElse(getInteger(w(K)), -1)
78- if ((0 > M))
79- then $Tuple2(0, L)
81+let M = "lastLotteryWinner"
82+
83+let N = "lastLotteryWinnerAmount"
84+
85+let O = "lastLotteryWinnerTime"
86+
87+func P (Q) = {
88+ let R = valueOrElse(getInteger(s), 0)
89+ let S = valueOrElse(getInteger(w(Q)), -1)
90+ if ((0 > S))
91+ then $Tuple2(0, R)
8092 else {
81- let N = valueOrErrorMessage(getInteger(q), "GORC is not issued yet")
82- let O = min([height, (N + f)])
83- let P = valueOrElse(getInteger(u(K)), 0)
84- let Q = valueOrElse(getInteger(t), 0)
85- let R = valueOrElse(getInteger(r), b)
86- let S = fraction(R, (O - M), f)
87- let T = if ((Q != 0))
88- then fraction(S, P, Q)
93+ let T = valueOrErrorMessage(getInteger(q), "GORC is not issued yet")
94+ let U = min([height, (T + f)])
95+ let V = valueOrElse(getInteger(u(Q)), 0)
96+ let W = valueOrElse(getInteger(t), 0)
97+ let X = valueOrElse(getInteger(r), b)
98+ let Y = fraction(X, (U - S), f)
99+ let Z = if ((W != 0))
100+ then fraction(Y, V, W)
89101 else 0
90- $Tuple2(T, (L - T))
102+ $Tuple2(Z, (R - Z))
91103 }
92104 }
93105
94106
95-func U (V,W) = {
96- let X = pow(10, 0, W, 0, 0, DOWN)
97- let Y = toString((V % X))
98- let Z = drop(toString(X), (1 + size(Y)))
99- (((toString((V / X)) + ".") + Z) + Y)
107+func aa (ab,ac) = {
108+ let ad = pow(10, 0, ac, 0, 0, DOWN)
109+ let ae = toString((ab % ad))
110+ let af = drop(toString(ad), (1 + size(ae)))
111+ (((toString((ab / ad)) + ".") + af) + ae)
100112 }
101113
102114
103-func aa (ab) = if ((size(ab.payments) != 1))
115+func ag (ah) = if ((size(ah.payments) != 1))
104116 then throw("exactly 1 payment must be attached")
105117 else {
106- let ac = ab.payments[0]
107- let ad = ac.amount
108- if (if (!(isDefined(ac.assetId)))
118+ let ai = ah.payments[0]
119+ let aj = ai.amount
120+ if (if (!(isDefined(ai.assetId)))
109121 then true
110- else (value(ac.assetId) != p))
122+ else (value(ai.assetId) != p))
111123 then throw("GORC payments only!")
112124 else {
113- let ae = (ad - g)
114- if ((0 > ae))
115- then throw(((("You need to sacrifice " + U(g, 8)) + " GORC, but I see only ") + U(ad, 8)))
125+ let ak = (aj - g)
126+ if ((0 > ak))
127+ then throw(((("You need to sacrifice " + aa(g, 8)) + " GORC, but I see only ") + aa(aj, 8)))
116128 else {
117- let af = if ((ae > 0))
118- then [ScriptTransfer(ab.caller, ae, p)]
129+ let al = if ((ak > 0))
130+ then [ScriptTransfer(ah.caller, ak, p)]
119131 else nil
120- let ag = valueOrElse(getInteger(x), 0)
121- let ah = valueOrElse(getString(A), "")
122- let ai = fraction(g, k, 100)
123- let aj = fraction(g, l, 100)
124- let ak = fraction(g, n, 100)
125- let al = (((g - ai) - aj) - ak)
126- let am = valueOrElse(getInteger(y), 0)
127- let an = valueOrElse(getInteger(z), 0)
128- let ao = if (if (if ((height > (ag + i)))
129- then (am > 0)
132+ let am = valueOrElse(getInteger(x), 0)
133+ let an = valueOrElse(getString(A), "")
134+ let ao = fraction(g, k, 100)
135+ let ap = fraction(g, l, 100)
136+ let aq = fraction(g, n, 100)
137+ let ar = (((g - ao) - ap) - aq)
138+ let as = valueOrElse(getInteger(y), 0)
139+ let at = valueOrElse(getInteger(z), 0)
140+ let au = if (if (if ((height > (am + i)))
141+ then (as > 0)
130142 else false)
131- then (ah != "")
143+ then (an != "")
132144 else false)
133- then [ScriptTransfer(addressFromStringValue(ah), am, p), IntegerEntry(y, (an + ai)), IntegerEntry(z, aj)]
134- else [IntegerEntry(y, (am + ai)), IntegerEntry(z, (an + aj))]
135- (([IntegerEntry(x, height), StringEntry(A, toString(ab.caller)), ScriptTransfer(addressFromStringValue(getStringValue(B)), ak, p), IntegerEntry(s, (getIntegerValue(s) + al)), IntegerEntry(r, (getIntegerValue(r) + al))] ++ af) ++ ao)
145+ then [ScriptTransfer(addressFromStringValue(an), as, p), StringEntry(B, an), IntegerEntry(C, as), IntegerEntry(D, lastBlock.timestamp), IntegerEntry(y, (at + ao)), IntegerEntry(z, ap)]
146+ else [IntegerEntry(y, (as + ao)), IntegerEntry(z, (at + ap))]
147+ (([IntegerEntry(x, height), StringEntry(A, toString(ah.caller)), ScriptTransfer(addressFromStringValue(getStringValue(E)), aq, p), IntegerEntry(s, (getIntegerValue(s) + ar)), IntegerEntry(r, (getIntegerValue(r) + ar))] ++ al) ++ au)
136148 }
137149 }
138150 }
139151
140152
141-func ap (aq,ar,as) = if ((0 >= aq))
153+func av (aw,ax,ay) = if ((0 >= aw))
142154 then throw("maxValue should be > 0")
143155 else {
144- let at = sha256_16Kb((ar + as))
145- (toInt(at) % aq)
156+ let az = sha256_16Kb((ax + ay))
157+ (toInt(az) % aw)
146158 }
147159
148160
149-func au (av) = {
150- let v = addressFromString(av)
151- let aw = if (isDefined(v))
161+func aA (aB) = {
162+ let v = addressFromString(aB)
163+ let aC = if (isDefined(v))
152164 then wavesBalance(value(v))
153165 else BalanceDetails(0, 0, 0, 0)
154- let ax = if (isDefined(v))
166+ let aD = if (isDefined(v))
155167 then assetBalance(value(v), p)
156168 else 0
157- let ay = valueOrElse(getInteger(u(av)), 0)
158-[("%s%d__wavesBalance__" + toString(aw.available)), ("%s%d__gorcBalance__" + toString(ax)), ("%s%d__stakedGorc__" + toString(ay))]
169+ let aE = valueOrElse(getInteger(u(aB)), 0)
170+[("%s%d__wavesBalance__" + toString(aC.available)), ("%s%d__gorcBalance__" + toString(aD)), ("%s%d__stakedGorc__" + toString(aE))]
159171 }
160172
161173
162-@Callable(ab)
163-func testArgs (az,aA,aB,aC,aD,aE,aF,aG) = nil
174+@Callable(ah)
175+func testArgs (aF,aG,aH,aI,aJ,aK,aL,aM) = nil
164176
165177
166178
167-@Callable(ab)
168-func constructorV1 (aH,aI) = if ((ab.caller != this))
179+@Callable(ah)
180+func constructorV1 (aN,aO) = if ((ah.caller != this))
169181 then throw("Permission denied")
170182 else {
171- let aJ = a
172- let aK = Issue("GORC", "Meme coin by God of Random Chance. Visit https://gorc.meme, sacrifice to the God of Random and you will receive an answer to any question or a blessing. Lucky one gets a Gift of God", aJ, 8, false, unit, 0)
173- let aL = calculateAssetId(aK)
174-[aK, BinaryEntry(o, aL), IntegerEntry(q, height), IntegerEntry(s, b), IntegerEntry(r, b), StringEntry(B, aH), StringEntry(C, aI), ScriptTransfer(addressFromStringValue(aH), c, aL), ScriptTransfer(addressFromStringValue(aI), d, aL)]
183+ let aP = a
184+ let aQ = Issue("GORC", "Meme coin by God of Random Chance. Visit https://gorc.meme, sacrifice to the God of Random and you will receive an answer to any question or a blessing. Lucky one gets a Gift of God", aP, 8, false, unit, 0)
185+ let aR = calculateAssetId(aQ)
186+[aQ, BinaryEntry(o, aR), IntegerEntry(q, height), IntegerEntry(s, b), IntegerEntry(r, b), StringEntry(E, aN), StringEntry(F, aO), ScriptTransfer(addressFromStringValue(aN), c, aR), ScriptTransfer(addressFromStringValue(aO), d, aR)]
175187 }
176188
177189
178190
179-@Callable(ab)
180-func stakeGorc () = if ((size(ab.payments) != 1))
191+@Callable(ah)
192+func stakeGorc () = if ((size(ah.payments) != 1))
181193 then throw("exactly 1 payment must be attached")
182194 else {
183- let ac = ab.payments[0]
184- let ad = ac.amount
185- if (if (!(isDefined(ac.assetId)))
195+ let ai = ah.payments[0]
196+ let aj = ai.amount
197+ if (if (!(isDefined(ai.assetId)))
186198 then true
187- else (value(ac.assetId) != p))
199+ else (value(ai.assetId) != p))
188200 then throw("GORC payments only!")
189201 else {
190- let v = toString(ab.caller)
191- let aM = J(v)
192- let T = aM._1
193- let L = aM._2
194- let aN = u(v)
195- let aO = if ((T > 0))
196- then [ScriptTransfer(ab.caller, T, p)]
202+ let v = toString(ah.caller)
203+ let aS = P(v)
204+ let Z = aS._1
205+ let R = aS._2
206+ let aT = u(v)
207+ let aU = if ((Z > 0))
208+ then [ScriptTransfer(ah.caller, Z, p)]
197209 else nil
198- $Tuple2((aO ++ [IntegerEntry(t, (valueOrElse(getInteger(t), 0) + ad)), IntegerEntry(aN, (valueOrElse(getInteger(aN), 0) + ad)), IntegerEntry(w(v), height), IntegerEntry(s, L)]), T)
210+ $Tuple2((aU ++ [IntegerEntry(t, (valueOrElse(getInteger(t), 0) + aj)), IntegerEntry(aT, (valueOrElse(getInteger(aT), 0) + aj)), IntegerEntry(w(v), height), IntegerEntry(s, R)]), Z)
199211 }
200212 }
201213
202214
203215
204-@Callable(ab)
205-func unstakeGorc (aP) = if ((0 >= aP))
216+@Callable(ah)
217+func unstakeGorc (aV) = if ((0 >= aV))
206218 then throw("Amount should be positive")
207219 else {
208- let v = toString(ab.caller)
209- if ((size(ab.payments) != 0))
220+ let v = toString(ah.caller)
221+ if ((size(ah.payments) != 0))
210222 then throw("No payments required")
211223 else {
212- let aN = u(v)
213- let aQ = valueOrElse(getInteger(aN), 0)
214- if ((0 > (aQ - aP)))
215- then throw(((("You have only " + U(aQ, 8)) + " GORC staked, tried to unstake ") + U(aP, 8)))
224+ let aT = u(v)
225+ let aW = valueOrElse(getInteger(aT), 0)
226+ if ((0 > (aW - aV)))
227+ then throw(((("You have only " + aa(aW, 8)) + " GORC staked, tried to unstake ") + aa(aV, 8)))
216228 else {
217- let aR = J(v)
218- let T = aR._1
219- let L = aR._2
220- let aO = if ((T > 0))
221- then [ScriptTransfer(ab.caller, T, p)]
229+ let aX = P(v)
230+ let Z = aX._1
231+ let R = aX._2
232+ let aU = if ((Z > 0))
233+ then [ScriptTransfer(ah.caller, Z, p)]
222234 else nil
223- $Tuple2((aO ++ [IntegerEntry(t, (valueOrErrorMessage(getInteger(t), "No GORC staked") - aP)), IntegerEntry(aN, (aQ - aP)), IntegerEntry(w(v), height), IntegerEntry(s, L)]), 0)
235+ $Tuple2((aU ++ [IntegerEntry(t, (valueOrErrorMessage(getInteger(t), "No GORC staked") - aV)), IntegerEntry(aT, (aW - aV)), IntegerEntry(w(v), height), IntegerEntry(s, R)]), 0)
224236 }
225237 }
226238 }
227239
228240
229241
230-@Callable(ab)
231-func claimGorc () = if ((size(ab.payments) != 0))
242+@Callable(ah)
243+func claimGorc () = if ((size(ah.payments) != 0))
232244 then throw("No payments required")
233245 else {
234- let v = toString(ab.caller)
235- let aS = J(v)
236- let T = aS._1
237- let L = aS._2
238- let aO = if ((T > 0))
239- then [ScriptTransfer(ab.caller, T, p)]
246+ let v = toString(ah.caller)
247+ let aY = P(v)
248+ let Z = aY._1
249+ let R = aY._2
250+ let aU = if ((Z > 0))
251+ then [ScriptTransfer(ah.caller, Z, p)]
240252 else nil
241- $Tuple2((aO ++ [IntegerEntry(w(v), height), IntegerEntry(s, L)]), T)
253+ $Tuple2((aU ++ [IntegerEntry(w(v), height), IntegerEntry(s, R)]), Z)
242254 }
243255
244256
245257
246-@Callable(ab)
247-func answerMe () = $Tuple2(aa(ab), toInt(ab.transactionId))
258+@Callable(ah)
259+func answerMe () = $Tuple2(ag(ah), toInt(ah.transactionId))
248260
249261
250262
251-@Callable(ab)
252-func blessMe () = $Tuple2(aa(ab), 42)
263+@Callable(ah)
264+func blessMe () = $Tuple2(ag(ah), 42)
253265
254266
255267
256-@Callable(ab)
257-func commitGuess (aT) = {
258- let v = toString(ab.caller)
259- let aU = D(v)
260- let aV = F(v)
261- if (isDefined(getInteger(aU)))
268+@Callable(ah)
269+func commitGuess (aZ) = {
270+ let v = toString(ah.caller)
271+ let ba = G(v)
272+ let bb = I(v)
273+ if (isDefined(getInteger(ba)))
262274 then throw("You already made a bet, please use it")
263- else if (if ((0 > aT))
275+ else if (if ((0 > aZ))
264276 then true
265- else (aT > 11))
277+ else (aZ > 11))
266278 then throw("The number should be between 0 and 11")
267- else if ((size(ab.payments) != 1))
279+ else if ((size(ah.payments) != 1))
268280 then throw("exactly 1 payment must be attached")
269281 else {
270- let ac = ab.payments[0]
271- let ad = ac.amount
272- if (if (!(isDefined(ac.assetId)))
282+ let ai = ah.payments[0]
283+ let aj = ai.amount
284+ if (if (!(isDefined(ai.assetId)))
273285 then true
274- else (value(ac.assetId) != p))
286+ else (value(ai.assetId) != p))
275287 then throw("GORC payments only!")
276288 else {
277- let ae = (ad - h)
278- if ((0 > ae))
279- then throw(((("You need to sacrifice " + U(h, 8)) + " GORC, but I see only ") + U(ad, 8)))
289+ let ak = (aj - h)
290+ if ((0 > ak))
291+ then throw(((("You need to sacrifice " + aa(h, 8)) + " GORC, but I see only ") + aa(aj, 8)))
280292 else {
281- let af = if ((ae > 0))
282- then [ScriptTransfer(ab.caller, ae, p)]
293+ let al = if ((ak > 0))
294+ then [ScriptTransfer(ah.caller, ak, p)]
283295 else nil
284- let aW = (height + j)
285- let ai = fraction(h, k, 100)
286- let aj = fraction(h, l, 100)
287- let ak = fraction(h, n, 100)
288- let al = (((h - ai) - aj) - ak)
289- $Tuple2(([IntegerEntry(aU, aW), IntegerEntry(aV, aT), IntegerEntry(H, (valueOrElse(getInteger(H), 0) + ai)), IntegerEntry(I, (valueOrElse(getInteger(I), 0) + aj)), ScriptTransfer(addressFromStringValue(getStringValue(B)), ak, p), IntegerEntry(s, (getIntegerValue(s) + al)), IntegerEntry(r, (getIntegerValue(r) + al)), StringEntry(G(v), toBase58String(ab.transactionId))] ++ af), aW)
296+ let bc = (height + j)
297+ let ao = fraction(h, k, 100)
298+ let ap = fraction(h, l, 100)
299+ let aq = fraction(h, n, 100)
300+ let ar = (((h - ao) - ap) - aq)
301+ $Tuple2(([IntegerEntry(ba, bc), IntegerEntry(bb, aZ), IntegerEntry(K, (valueOrElse(getInteger(K), 0) + ao)), IntegerEntry(L, (valueOrElse(getInteger(L), 0) + ap)), ScriptTransfer(addressFromStringValue(getStringValue(E)), aq, p), IntegerEntry(s, (getIntegerValue(s) + ar)), IntegerEntry(r, (getIntegerValue(r) + ar)), StringEntry(J(v), toBase58String(ah.transactionId))] ++ al), bc)
290302 }
291303 }
292304 }
293305 }
294306
295307
296308
297-@Callable(ab)
309+@Callable(ah)
298310 func guessLottery () = {
299- let v = toString(ab.caller)
300- let aU = D(v)
301- let aV = F(v)
302- let aT = valueOrErrorMessage(getInteger(aV), "You have not made a bet")
303- let aW = valueOrErrorMessage(getInteger(aU), "You have not made a bet")
304- if ((aW > height))
305- then throw(("Random number is not ready yet, wait until height = " + toString(aW)))
311+ let v = toString(ah.caller)
312+ let ba = G(v)
313+ let bb = I(v)
314+ let aZ = valueOrErrorMessage(getInteger(bb), "You have not made a bet")
315+ let bc = valueOrErrorMessage(getInteger(ba), "You have not made a bet")
316+ if ((bc > height))
317+ then throw(("Random number is not ready yet, wait until height = " + toString(bc)))
306318 else {
307- let as = value(value(blockInfoByHeight(aW)).vrf)
308- let aX = G(v)
309- let ar = fromBase58String(valueOrElse(getString(aX), "DEFAULT"))
310- let aY = ap(12, ar, as)
311- let aZ = valueOrElse(getInteger(H), 0)
312- let ba = if ((aY == aT))
313- then [ScriptTransfer(ab.caller, aZ, p), IntegerEntry(H, valueOrElse(getInteger(I), 0)), IntegerEntry(I, 0)]
319+ let ay = value(value(blockInfoByHeight(bc)).vrf)
320+ let bd = J(v)
321+ let ax = fromBase58String(valueOrElse(getString(bd), "DEFAULT"))
322+ let be = av(12, ax, ay)
323+ let bf = valueOrElse(getInteger(K), 0)
324+ let bg = if ((be == aZ))
325+ then [ScriptTransfer(ah.caller, bf, p), StringEntry(M, v), IntegerEntry(N, bf), IntegerEntry(O, lastBlock.timestamp), IntegerEntry(K, valueOrElse(getInteger(L), 0)), IntegerEntry(L, 0)]
314326 else nil
315- $Tuple2(([DeleteEntry(aU), DeleteEntry(aV), DeleteEntry(aX)] ++ ba), aY)
327+ $Tuple2(([DeleteEntry(ba), DeleteEntry(bb), DeleteEntry(bd)] ++ bg), be)
316328 }
317329 }
318330
319331
320332
321-@Callable(ab)
322-func statsREADONLY (K) = {
323- let bb = J(K)
324- let T = bb._1
325- let L = bb._2
326- let bc = valueOrElse(getInteger(y), 0)
327- let bd = valueOrElse(getInteger(z), 0)
328- let ag = valueOrElse(getInteger(x), 0)
329- let ah = valueOrElse(getString(A), "")
330- let be = valueOrElse(getInteger(H), 0)
331- let bf = valueOrElse(getInteger(I), 0)
332- let aU = D(K)
333- let aV = F(K)
334- let aT = valueOrElse(getInteger(aV), -1)
335- let aW = valueOrElse(getInteger(aU), -1)
336- $Tuple2(nil, [("%s%d__gorcAvailToClaim__" + toString(T)), ("%s%d__currFomoJackpotAmount__" + toString(bc)), ("%s%d__nextFomoJackpotAmount__" + toString(bd)), ("%s%d__currLotteryJackpotAmount__" + toString(be)), ("%s%d__nextLotteryJackpotAmount__" + toString(bf)), ("%s%d__lastFomoTime__" + toString(ag)), ("%s%s__lastFomoPlayer__" + ah), ("%s%d__amountLeftTotal__" + toString(L)), ("%s%d__finishBlock__" + toString(aW)), ("%s%d__guess__" + toString(aT))])
333+@Callable(ah)
334+func statsREADONLY (Q) = {
335+ let bh = P(Q)
336+ let Z = bh._1
337+ let R = bh._2
338+ let bi = valueOrElse(getInteger(y), 0)
339+ let bj = valueOrElse(getInteger(z), 0)
340+ let am = valueOrElse(getInteger(x), 0)
341+ let an = valueOrElse(getString(A), "")
342+ let bk = valueOrElse(getInteger(K), 0)
343+ let bl = valueOrElse(getInteger(L), 0)
344+ let ba = G(Q)
345+ let bb = I(Q)
346+ let aZ = valueOrElse(getInteger(bb), -1)
347+ let bc = valueOrElse(getInteger(ba), -1)
348+ $Tuple2(nil, [("%s%d__gorcAvailToClaim__" + toString(Z)), ("%s%d__currFomoJackpotAmount__" + toString(bi)), ("%s%d__nextFomoJackpotAmount__" + toString(bj)), ("%s%d__currLotteryJackpotAmount__" + toString(bk)), ("%s%d__nextLotteryJackpotAmount__" + toString(bl)), ("%s%d__lastFomoTime__" + toString(am)), ("%s%s__lastFomoPlayer__" + an), ("%s%d__amountLeftTotal__" + toString(R)), ("%s%d__finishBlock__" + toString(bc)), ("%s%d__guess__" + toString(aZ))])
337349 }
338350
339351
340352
341-@Callable(ab)
342-func walletInfoREADONLY (av) = $Tuple2(nil, au(av))
353+@Callable(ah)
354+func walletInfoREADONLY (aB) = $Tuple2(nil, aA(aB))
343355
344356

github/deemru/w8io/169f3d6 
120.55 ms