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/QCAAtGT01PX1BFUklPRAA8AAxSQU5ET01fREVMQVkAAgAUQ1VSUkVOVF9KQUNLUE9UX1BFUkMAMgARTkVYVF9KQUNLUE9UX1BFUkMAFAAMU1RBS0VSU19QRVJDABQACVRFQU1fUEVSQwAKAA5nb3JjQXNzZXRJZEtleQILZ29yY0Fzc2V0SWQAC2dvcmNBc3NldElkCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAKEIAQUOZ29yY0Fzc2V0SWRLZXkCFkdPUkMgaXMgbm90IGlzc3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QDMCAIJAKwCAgINJXMlZF9fZ3Vlc3NfXwkApAMBBQVndWVzcwUDbmlsAWkBEndhbGxldEluZm9SRUFET05MWQEOdXNlckFkZHJlc3NPcHQJAJQKAgUDbmlsCQEOd2FsbGV0SW50ZXJuYWwBBQ51c2VyQWRkcmVzc09wdACgWdLK", "height": 3448846, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: nrHckPCsDibbJErdzhdt5m9gk8oea1CUSrwfQmoqX4W Next: 8FKkxFVgbff7We1HYdDk9TsPERUy3bd4DuamRE85kmeT Diff:
Old | New | Differences | |
---|---|---|---|
55 | 55 | ||
56 | 56 | let A = "lastFomoPlayer" | |
57 | 57 | ||
58 | - | let B = " | |
58 | + | let B = "lastFomoWinner" | |
59 | 59 | ||
60 | - | let C = " | |
60 | + | let C = "lastFomoWinnerAmount" | |
61 | 61 | ||
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) | |
63 | 69 | ||
64 | 70 | ||
65 | - | func | |
71 | + | func I (H) = ("guessFor_" + H) | |
66 | 72 | ||
67 | 73 | ||
68 | - | func | |
74 | + | func J (H) = ("saltFor_" + H) | |
69 | 75 | ||
70 | 76 | ||
71 | - | let | |
77 | + | let K = "currLotteryJackpot" | |
72 | 78 | ||
73 | - | let | |
79 | + | let L = "nextLotteryJackpot" | |
74 | 80 | ||
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) | |
80 | 92 | else { | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | let | |
88 | - | then fraction( | |
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) | |
89 | 101 | else 0 | |
90 | - | $Tuple2( | |
102 | + | $Tuple2(Z, (R - Z)) | |
91 | 103 | } | |
92 | 104 | } | |
93 | 105 | ||
94 | 106 | ||
95 | - | func | |
96 | - | let | |
97 | - | let | |
98 | - | let | |
99 | - | (((toString(( | |
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) | |
100 | 112 | } | |
101 | 113 | ||
102 | 114 | ||
103 | - | func | |
115 | + | func ag (ah) = if ((size(ah.payments) != 1)) | |
104 | 116 | then throw("exactly 1 payment must be attached") | |
105 | 117 | else { | |
106 | - | let | |
107 | - | let | |
108 | - | if (if (!(isDefined( | |
118 | + | let ai = ah.payments[0] | |
119 | + | let aj = ai.amount | |
120 | + | if (if (!(isDefined(ai.assetId))) | |
109 | 121 | then true | |
110 | - | else (value( | |
122 | + | else (value(ai.assetId) != p)) | |
111 | 123 | then throw("GORC payments only!") | |
112 | 124 | else { | |
113 | - | let | |
114 | - | if ((0 > | |
115 | - | then throw(((("You need to sacrifice " + | |
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))) | |
116 | 128 | else { | |
117 | - | let | |
118 | - | then [ScriptTransfer( | |
129 | + | let al = if ((ak > 0)) | |
130 | + | then [ScriptTransfer(ah.caller, ak, p)] | |
119 | 131 | else nil | |
120 | - | let | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | then ( | |
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) | |
130 | 142 | else false) | |
131 | - | then ( | |
143 | + | then (an != "") | |
132 | 144 | else false) | |
133 | - | then [ScriptTransfer(addressFromStringValue( | |
134 | - | else [IntegerEntry(y, ( | |
135 | - | (([IntegerEntry(x, height), StringEntry(A, toString( | |
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) | |
136 | 148 | } | |
137 | 149 | } | |
138 | 150 | } | |
139 | 151 | ||
140 | 152 | ||
141 | - | func | |
153 | + | func av (aw,ax,ay) = if ((0 >= aw)) | |
142 | 154 | then throw("maxValue should be > 0") | |
143 | 155 | else { | |
144 | - | let | |
145 | - | (toInt( | |
156 | + | let az = sha256_16Kb((ax + ay)) | |
157 | + | (toInt(az) % aw) | |
146 | 158 | } | |
147 | 159 | ||
148 | 160 | ||
149 | - | func | |
150 | - | let v = addressFromString( | |
151 | - | let | |
161 | + | func aA (aB) = { | |
162 | + | let v = addressFromString(aB) | |
163 | + | let aC = if (isDefined(v)) | |
152 | 164 | then wavesBalance(value(v)) | |
153 | 165 | else BalanceDetails(0, 0, 0, 0) | |
154 | - | let | |
166 | + | let aD = if (isDefined(v)) | |
155 | 167 | then assetBalance(value(v), p) | |
156 | 168 | else 0 | |
157 | - | let | |
158 | - | [("%s%d__wavesBalance__" + toString( | |
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))] | |
159 | 171 | } | |
160 | 172 | ||
161 | 173 | ||
162 | - | @Callable( | |
163 | - | func testArgs ( | |
174 | + | @Callable(ah) | |
175 | + | func testArgs (aF,aG,aH,aI,aJ,aK,aL,aM) = nil | |
164 | 176 | ||
165 | 177 | ||
166 | 178 | ||
167 | - | @Callable( | |
168 | - | func constructorV1 ( | |
179 | + | @Callable(ah) | |
180 | + | func constructorV1 (aN,aO) = if ((ah.caller != this)) | |
169 | 181 | then throw("Permission denied") | |
170 | 182 | else { | |
171 | - | let | |
172 | - | let | |
173 | - | let | |
174 | - | [ | |
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)] | |
175 | 187 | } | |
176 | 188 | ||
177 | 189 | ||
178 | 190 | ||
179 | - | @Callable( | |
180 | - | func stakeGorc () = if ((size( | |
191 | + | @Callable(ah) | |
192 | + | func stakeGorc () = if ((size(ah.payments) != 1)) | |
181 | 193 | then throw("exactly 1 payment must be attached") | |
182 | 194 | else { | |
183 | - | let | |
184 | - | let | |
185 | - | if (if (!(isDefined( | |
195 | + | let ai = ah.payments[0] | |
196 | + | let aj = ai.amount | |
197 | + | if (if (!(isDefined(ai.assetId))) | |
186 | 198 | then true | |
187 | - | else (value( | |
199 | + | else (value(ai.assetId) != p)) | |
188 | 200 | then throw("GORC payments only!") | |
189 | 201 | else { | |
190 | - | let v = toString( | |
191 | - | let | |
192 | - | let | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | then [ScriptTransfer( | |
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)] | |
197 | 209 | else nil | |
198 | - | $Tuple2(( | |
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) | |
199 | 211 | } | |
200 | 212 | } | |
201 | 213 | ||
202 | 214 | ||
203 | 215 | ||
204 | - | @Callable( | |
205 | - | func unstakeGorc ( | |
216 | + | @Callable(ah) | |
217 | + | func unstakeGorc (aV) = if ((0 >= aV)) | |
206 | 218 | then throw("Amount should be positive") | |
207 | 219 | else { | |
208 | - | let v = toString( | |
209 | - | if ((size( | |
220 | + | let v = toString(ah.caller) | |
221 | + | if ((size(ah.payments) != 0)) | |
210 | 222 | then throw("No payments required") | |
211 | 223 | else { | |
212 | - | let | |
213 | - | let | |
214 | - | if ((0 > ( | |
215 | - | then throw(((("You have only " + | |
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))) | |
216 | 228 | else { | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | then [ScriptTransfer( | |
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)] | |
222 | 234 | else nil | |
223 | - | $Tuple2(( | |
235 | + | $Tuple2((aU ++ [IntegerEntry(t, (valueOrErrorMessage(getInteger(t), "No GORC staked") - aV)), IntegerEntry(aT, (aW - aV)), IntegerEntry(w(v), height), IntegerEntry(s, R)]), 0) | |
224 | 236 | } | |
225 | 237 | } | |
226 | 238 | } | |
227 | 239 | ||
228 | 240 | ||
229 | 241 | ||
230 | - | @Callable( | |
231 | - | func claimGorc () = if ((size( | |
242 | + | @Callable(ah) | |
243 | + | func claimGorc () = if ((size(ah.payments) != 0)) | |
232 | 244 | then throw("No payments required") | |
233 | 245 | else { | |
234 | - | let v = toString( | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | then [ScriptTransfer( | |
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)] | |
240 | 252 | else nil | |
241 | - | $Tuple2(( | |
253 | + | $Tuple2((aU ++ [IntegerEntry(w(v), height), IntegerEntry(s, R)]), Z) | |
242 | 254 | } | |
243 | 255 | ||
244 | 256 | ||
245 | 257 | ||
246 | - | @Callable( | |
247 | - | func answerMe () = $Tuple2( | |
258 | + | @Callable(ah) | |
259 | + | func answerMe () = $Tuple2(ag(ah), toInt(ah.transactionId)) | |
248 | 260 | ||
249 | 261 | ||
250 | 262 | ||
251 | - | @Callable( | |
252 | - | func blessMe () = $Tuple2( | |
263 | + | @Callable(ah) | |
264 | + | func blessMe () = $Tuple2(ag(ah), 42) | |
253 | 265 | ||
254 | 266 | ||
255 | 267 | ||
256 | - | @Callable( | |
257 | - | func commitGuess ( | |
258 | - | let v = toString( | |
259 | - | let | |
260 | - | let | |
261 | - | if (isDefined(getInteger( | |
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))) | |
262 | 274 | then throw("You already made a bet, please use it") | |
263 | - | else if (if ((0 > | |
275 | + | else if (if ((0 > aZ)) | |
264 | 276 | then true | |
265 | - | else ( | |
277 | + | else (aZ > 11)) | |
266 | 278 | then throw("The number should be between 0 and 11") | |
267 | - | else if ((size( | |
279 | + | else if ((size(ah.payments) != 1)) | |
268 | 280 | then throw("exactly 1 payment must be attached") | |
269 | 281 | else { | |
270 | - | let | |
271 | - | let | |
272 | - | if (if (!(isDefined( | |
282 | + | let ai = ah.payments[0] | |
283 | + | let aj = ai.amount | |
284 | + | if (if (!(isDefined(ai.assetId))) | |
273 | 285 | then true | |
274 | - | else (value( | |
286 | + | else (value(ai.assetId) != p)) | |
275 | 287 | then throw("GORC payments only!") | |
276 | 288 | else { | |
277 | - | let | |
278 | - | if ((0 > | |
279 | - | then throw(((("You need to sacrifice " + | |
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))) | |
280 | 292 | else { | |
281 | - | let | |
282 | - | then [ScriptTransfer( | |
293 | + | let al = if ((ak > 0)) | |
294 | + | then [ScriptTransfer(ah.caller, ak, p)] | |
283 | 295 | else nil | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | $Tuple2(([IntegerEntry( | |
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) | |
290 | 302 | } | |
291 | 303 | } | |
292 | 304 | } | |
294 | 306 | ||
295 | 307 | ||
296 | 308 | ||
297 | - | @Callable( | |
309 | + | @Callable(ah) | |
298 | 310 | func guessLottery () = { | |
299 | - | let v = toString( | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | if (( | |
305 | - | then throw(("Random number is not ready yet, wait until height = " + toString( | |
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))) | |
306 | 318 | else { | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | then [ScriptTransfer( | |
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)] | |
314 | 326 | else nil | |
315 | - | $Tuple2(([DeleteEntry( | |
327 | + | $Tuple2(([DeleteEntry(ba), DeleteEntry(bb), DeleteEntry(bd)] ++ bg), be) | |
316 | 328 | } | |
317 | 329 | } | |
318 | 330 | ||
319 | 331 | ||
320 | 332 | ||
321 | - | @Callable( | |
322 | - | func statsREADONLY ( | |
323 | - | let | |
324 | - | let | |
325 | - | let | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | $Tuple2(nil, [("%s%d__gorcAvailToClaim__" + toString( | |
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))]) | |
337 | 349 | } | |
338 | 350 | ||
339 | 351 | ||
340 | 352 | ||
341 | - | @Callable( | |
342 | - | func walletInfoREADONLY ( | |
353 | + | @Callable(ah) | |
354 | + | func walletInfoREADONLY (aB) = $Tuple2(nil, aA(aB)) | |
343 | 355 | ||
344 | 356 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 10000000000000000 | |
5 | 5 | ||
6 | 6 | let b = 3000000000000000 | |
7 | 7 | ||
8 | 8 | let c = 1000000000000000 | |
9 | 9 | ||
10 | 10 | let d = 6000000000000000 | |
11 | 11 | ||
12 | 12 | let e = (365 * 1440) | |
13 | 13 | ||
14 | 14 | let f = (5 * e) | |
15 | 15 | ||
16 | 16 | let g = 100000000000 | |
17 | 17 | ||
18 | 18 | let h = 100000000000 | |
19 | 19 | ||
20 | 20 | let i = 60 | |
21 | 21 | ||
22 | 22 | let j = 2 | |
23 | 23 | ||
24 | 24 | let k = 50 | |
25 | 25 | ||
26 | 26 | let l = 20 | |
27 | 27 | ||
28 | 28 | let m = 20 | |
29 | 29 | ||
30 | 30 | let n = 10 | |
31 | 31 | ||
32 | 32 | let o = "gorcAssetId" | |
33 | 33 | ||
34 | 34 | let p = valueOrErrorMessage(getBinary(o), "GORC is not issued yet") | |
35 | 35 | ||
36 | 36 | let q = "issueTime" | |
37 | 37 | ||
38 | 38 | let r = "stakersAmountTotal" | |
39 | 39 | ||
40 | 40 | let s = "stakersAmountLeft" | |
41 | 41 | ||
42 | 42 | let t = "stakedTotal" | |
43 | 43 | ||
44 | 44 | func u (v) = ("stakedAmount_" + v) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func w (v) = ("lastClaimTime_" + v) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | let x = "lastFomoTime" | |
51 | 51 | ||
52 | 52 | let y = "currFomoJackpot" | |
53 | 53 | ||
54 | 54 | let z = "nextFomoJackpot" | |
55 | 55 | ||
56 | 56 | let A = "lastFomoPlayer" | |
57 | 57 | ||
58 | - | let B = " | |
58 | + | let B = "lastFomoWinner" | |
59 | 59 | ||
60 | - | let C = " | |
60 | + | let C = "lastFomoWinnerAmount" | |
61 | 61 | ||
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) | |
63 | 69 | ||
64 | 70 | ||
65 | - | func | |
71 | + | func I (H) = ("guessFor_" + H) | |
66 | 72 | ||
67 | 73 | ||
68 | - | func | |
74 | + | func J (H) = ("saltFor_" + H) | |
69 | 75 | ||
70 | 76 | ||
71 | - | let | |
77 | + | let K = "currLotteryJackpot" | |
72 | 78 | ||
73 | - | let | |
79 | + | let L = "nextLotteryJackpot" | |
74 | 80 | ||
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) | |
80 | 92 | else { | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | let | |
88 | - | then fraction( | |
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) | |
89 | 101 | else 0 | |
90 | - | $Tuple2( | |
102 | + | $Tuple2(Z, (R - Z)) | |
91 | 103 | } | |
92 | 104 | } | |
93 | 105 | ||
94 | 106 | ||
95 | - | func | |
96 | - | let | |
97 | - | let | |
98 | - | let | |
99 | - | (((toString(( | |
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) | |
100 | 112 | } | |
101 | 113 | ||
102 | 114 | ||
103 | - | func | |
115 | + | func ag (ah) = if ((size(ah.payments) != 1)) | |
104 | 116 | then throw("exactly 1 payment must be attached") | |
105 | 117 | else { | |
106 | - | let | |
107 | - | let | |
108 | - | if (if (!(isDefined( | |
118 | + | let ai = ah.payments[0] | |
119 | + | let aj = ai.amount | |
120 | + | if (if (!(isDefined(ai.assetId))) | |
109 | 121 | then true | |
110 | - | else (value( | |
122 | + | else (value(ai.assetId) != p)) | |
111 | 123 | then throw("GORC payments only!") | |
112 | 124 | else { | |
113 | - | let | |
114 | - | if ((0 > | |
115 | - | then throw(((("You need to sacrifice " + | |
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))) | |
116 | 128 | else { | |
117 | - | let | |
118 | - | then [ScriptTransfer( | |
129 | + | let al = if ((ak > 0)) | |
130 | + | then [ScriptTransfer(ah.caller, ak, p)] | |
119 | 131 | else nil | |
120 | - | let | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | then ( | |
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) | |
130 | 142 | else false) | |
131 | - | then ( | |
143 | + | then (an != "") | |
132 | 144 | else false) | |
133 | - | then [ScriptTransfer(addressFromStringValue( | |
134 | - | else [IntegerEntry(y, ( | |
135 | - | (([IntegerEntry(x, height), StringEntry(A, toString( | |
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) | |
136 | 148 | } | |
137 | 149 | } | |
138 | 150 | } | |
139 | 151 | ||
140 | 152 | ||
141 | - | func | |
153 | + | func av (aw,ax,ay) = if ((0 >= aw)) | |
142 | 154 | then throw("maxValue should be > 0") | |
143 | 155 | else { | |
144 | - | let | |
145 | - | (toInt( | |
156 | + | let az = sha256_16Kb((ax + ay)) | |
157 | + | (toInt(az) % aw) | |
146 | 158 | } | |
147 | 159 | ||
148 | 160 | ||
149 | - | func | |
150 | - | let v = addressFromString( | |
151 | - | let | |
161 | + | func aA (aB) = { | |
162 | + | let v = addressFromString(aB) | |
163 | + | let aC = if (isDefined(v)) | |
152 | 164 | then wavesBalance(value(v)) | |
153 | 165 | else BalanceDetails(0, 0, 0, 0) | |
154 | - | let | |
166 | + | let aD = if (isDefined(v)) | |
155 | 167 | then assetBalance(value(v), p) | |
156 | 168 | else 0 | |
157 | - | let | |
158 | - | [("%s%d__wavesBalance__" + toString( | |
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))] | |
159 | 171 | } | |
160 | 172 | ||
161 | 173 | ||
162 | - | @Callable( | |
163 | - | func testArgs ( | |
174 | + | @Callable(ah) | |
175 | + | func testArgs (aF,aG,aH,aI,aJ,aK,aL,aM) = nil | |
164 | 176 | ||
165 | 177 | ||
166 | 178 | ||
167 | - | @Callable( | |
168 | - | func constructorV1 ( | |
179 | + | @Callable(ah) | |
180 | + | func constructorV1 (aN,aO) = if ((ah.caller != this)) | |
169 | 181 | then throw("Permission denied") | |
170 | 182 | else { | |
171 | - | let | |
172 | - | let | |
173 | - | let | |
174 | - | [ | |
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)] | |
175 | 187 | } | |
176 | 188 | ||
177 | 189 | ||
178 | 190 | ||
179 | - | @Callable( | |
180 | - | func stakeGorc () = if ((size( | |
191 | + | @Callable(ah) | |
192 | + | func stakeGorc () = if ((size(ah.payments) != 1)) | |
181 | 193 | then throw("exactly 1 payment must be attached") | |
182 | 194 | else { | |
183 | - | let | |
184 | - | let | |
185 | - | if (if (!(isDefined( | |
195 | + | let ai = ah.payments[0] | |
196 | + | let aj = ai.amount | |
197 | + | if (if (!(isDefined(ai.assetId))) | |
186 | 198 | then true | |
187 | - | else (value( | |
199 | + | else (value(ai.assetId) != p)) | |
188 | 200 | then throw("GORC payments only!") | |
189 | 201 | else { | |
190 | - | let v = toString( | |
191 | - | let | |
192 | - | let | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | then [ScriptTransfer( | |
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)] | |
197 | 209 | else nil | |
198 | - | $Tuple2(( | |
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) | |
199 | 211 | } | |
200 | 212 | } | |
201 | 213 | ||
202 | 214 | ||
203 | 215 | ||
204 | - | @Callable( | |
205 | - | func unstakeGorc ( | |
216 | + | @Callable(ah) | |
217 | + | func unstakeGorc (aV) = if ((0 >= aV)) | |
206 | 218 | then throw("Amount should be positive") | |
207 | 219 | else { | |
208 | - | let v = toString( | |
209 | - | if ((size( | |
220 | + | let v = toString(ah.caller) | |
221 | + | if ((size(ah.payments) != 0)) | |
210 | 222 | then throw("No payments required") | |
211 | 223 | else { | |
212 | - | let | |
213 | - | let | |
214 | - | if ((0 > ( | |
215 | - | then throw(((("You have only " + | |
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))) | |
216 | 228 | else { | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | then [ScriptTransfer( | |
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)] | |
222 | 234 | else nil | |
223 | - | $Tuple2(( | |
235 | + | $Tuple2((aU ++ [IntegerEntry(t, (valueOrErrorMessage(getInteger(t), "No GORC staked") - aV)), IntegerEntry(aT, (aW - aV)), IntegerEntry(w(v), height), IntegerEntry(s, R)]), 0) | |
224 | 236 | } | |
225 | 237 | } | |
226 | 238 | } | |
227 | 239 | ||
228 | 240 | ||
229 | 241 | ||
230 | - | @Callable( | |
231 | - | func claimGorc () = if ((size( | |
242 | + | @Callable(ah) | |
243 | + | func claimGorc () = if ((size(ah.payments) != 0)) | |
232 | 244 | then throw("No payments required") | |
233 | 245 | else { | |
234 | - | let v = toString( | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | then [ScriptTransfer( | |
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)] | |
240 | 252 | else nil | |
241 | - | $Tuple2(( | |
253 | + | $Tuple2((aU ++ [IntegerEntry(w(v), height), IntegerEntry(s, R)]), Z) | |
242 | 254 | } | |
243 | 255 | ||
244 | 256 | ||
245 | 257 | ||
246 | - | @Callable( | |
247 | - | func answerMe () = $Tuple2( | |
258 | + | @Callable(ah) | |
259 | + | func answerMe () = $Tuple2(ag(ah), toInt(ah.transactionId)) | |
248 | 260 | ||
249 | 261 | ||
250 | 262 | ||
251 | - | @Callable( | |
252 | - | func blessMe () = $Tuple2( | |
263 | + | @Callable(ah) | |
264 | + | func blessMe () = $Tuple2(ag(ah), 42) | |
253 | 265 | ||
254 | 266 | ||
255 | 267 | ||
256 | - | @Callable( | |
257 | - | func commitGuess ( | |
258 | - | let v = toString( | |
259 | - | let | |
260 | - | let | |
261 | - | if (isDefined(getInteger( | |
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))) | |
262 | 274 | then throw("You already made a bet, please use it") | |
263 | - | else if (if ((0 > | |
275 | + | else if (if ((0 > aZ)) | |
264 | 276 | then true | |
265 | - | else ( | |
277 | + | else (aZ > 11)) | |
266 | 278 | then throw("The number should be between 0 and 11") | |
267 | - | else if ((size( | |
279 | + | else if ((size(ah.payments) != 1)) | |
268 | 280 | then throw("exactly 1 payment must be attached") | |
269 | 281 | else { | |
270 | - | let | |
271 | - | let | |
272 | - | if (if (!(isDefined( | |
282 | + | let ai = ah.payments[0] | |
283 | + | let aj = ai.amount | |
284 | + | if (if (!(isDefined(ai.assetId))) | |
273 | 285 | then true | |
274 | - | else (value( | |
286 | + | else (value(ai.assetId) != p)) | |
275 | 287 | then throw("GORC payments only!") | |
276 | 288 | else { | |
277 | - | let | |
278 | - | if ((0 > | |
279 | - | then throw(((("You need to sacrifice " + | |
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))) | |
280 | 292 | else { | |
281 | - | let | |
282 | - | then [ScriptTransfer( | |
293 | + | let al = if ((ak > 0)) | |
294 | + | then [ScriptTransfer(ah.caller, ak, p)] | |
283 | 295 | else nil | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | $Tuple2(([IntegerEntry( | |
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) | |
290 | 302 | } | |
291 | 303 | } | |
292 | 304 | } | |
293 | 305 | } | |
294 | 306 | ||
295 | 307 | ||
296 | 308 | ||
297 | - | @Callable( | |
309 | + | @Callable(ah) | |
298 | 310 | func guessLottery () = { | |
299 | - | let v = toString( | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | if (( | |
305 | - | then throw(("Random number is not ready yet, wait until height = " + toString( | |
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))) | |
306 | 318 | else { | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | then [ScriptTransfer( | |
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)] | |
314 | 326 | else nil | |
315 | - | $Tuple2(([DeleteEntry( | |
327 | + | $Tuple2(([DeleteEntry(ba), DeleteEntry(bb), DeleteEntry(bd)] ++ bg), be) | |
316 | 328 | } | |
317 | 329 | } | |
318 | 330 | ||
319 | 331 | ||
320 | 332 | ||
321 | - | @Callable( | |
322 | - | func statsREADONLY ( | |
323 | - | let | |
324 | - | let | |
325 | - | let | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | $Tuple2(nil, [("%s%d__gorcAvailToClaim__" + toString( | |
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))]) | |
337 | 349 | } | |
338 | 350 | ||
339 | 351 | ||
340 | 352 | ||
341 | - | @Callable( | |
342 | - | func walletInfoREADONLY ( | |
353 | + | @Callable(ah) | |
354 | + | func walletInfoREADONLY (aB) = $Tuple2(nil, aA(aB)) | |
343 | 355 | ||
344 | 356 |
github/deemru/w8io/169f3d6 120.55 ms ◑