tx · 59pAUTAXhHGoTvkSJCWrRWBHbWcfBUyoUbn84kR1cMPG 3Mt6NEJ6ZK6TFZs14tvnR5iAgemnomy2m1V: -0.00700000 Waves 2022.08.31 22:13 [2209032] smart account 3Mt6NEJ6ZK6TFZs14tvnR5iAgemnomy2m1V > SELF 0.00000000 Waves
{ "type": 13, "id": "59pAUTAXhHGoTvkSJCWrRWBHbWcfBUyoUbn84kR1cMPG", "fee": 700000, "feeAssetId": null, "timestamp": 1661973248435, "version": 2, "chainId": 84, "sender": "3Mt6NEJ6ZK6TFZs14tvnR5iAgemnomy2m1V", "senderPublicKey": "5f9EawB8nxaLg7KKhyqV2RDBMwRBG6o69D8zc9myAzrY", "proofs": [ "4x7gJR1VYbTcY34ZNEqmowGVcXJyHz8Rd9tmZDxaaPSqVP1wWJAP1ammJPjGtBthtFfYYdUpqouDRKLaurfjrpKQ" ], "script": "base64:AAIFAAAAAAAAABAIAhIAEgASABIAEgASABIAAAAAGgAAAAAOZ2FtZVRva2VuTGFiZWwCAAAACUdfVE9LRU5JRAAAAAAQZ2FtZUJhbGFuY2VMYWJlbAIAAAAJR19CQUxBTkNFAAAAABVnYW1lQ29tbXVuaXR5UG90TGFiZWwCAAAADkdfQ09NTVVOSVRZUE9UAAAAABFnYW1lUHJpemVQb3RMYWJlbAIAAAAKR19QUklaRVBPVAAAAAAZZ2FtZVByaXplU2hhcmVBbW91bnRMYWJlbAIAAAASR19QUklaRVNIQVJFQU1PVU5UAAAAABBnYW1lQ291bnRlckxhYmVsAgAAAA5HX0dBTUVTQ09VTlRFUgAAAAASZ2FtZVRvdGFsQmV0c0xhYmVsAgAAAAtHX1RPVEFMQkVUUwAAAAAWZ2FtZVByb2Nlc3NlZEJldHNMYWJlbAIAAAAPR19QUk9DRVNTRURCRVRTAAAAABdnYW1lV2lubmVyc0NvdW50ZXJMYWJlbAIAAAAOR19XSU5ORVJTQ09VTlQAAAAAGWdhbWVQcm9jZXNzZWRXaW5uZXJzTGFiZWwCAAAAEk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0V2lubmVyBQAAAAx0b3RhbFdpbm5lcnMJAAACAAAAAQIAAAAgTm8gbW9yZSB3aW5uZXJzIHRvIGJlIHByb2Nlc3NlZC4EAAAAByRtYXRjaDIJAQAAABRnYW1lUHJpemVTaGFyZUFtb3VudAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDICAAAAA0ludAQAAAAQcHJpemVTaGFyZUFtb3VudAUAAAAHJG1hdGNoMgQAAAAJYmV0UGxhY2VyCQEAAAANd2lubmVyRGV0YWlscwAAAAEFAAAACm5leHRXaW5uZXIEAAAAB2FkZHJlc3MJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQUAAAAJYmV0UGxhY2VyBAAAAAh3aW5uaW5ncwkBAAAAFGdhbWVQcml6ZVNoYXJlQW1vdW50AAAAAAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAdhZGRyZXNzBQAAABBwcml6ZVNoYXJlQW1vdW50CQEAAAAJZ2FtZVRva2VuAAAAAAUAAAADbmlsCQAAAgAAAAECAAAAO0dhbWUgaGFzIG5vdCBiZWVuIGluaXRpYWxpemVkLCBwcml6ZSBzaGFyZSBhbW91bnQgbm90IGZvdW5kCQAAAgAAAAECAAAAQEdhbWUgaGFzIG5vdCBiZWVuIGluaXRpYWxpemVkLCB0b3RhbCBwcm9jZXNzZWQgd2lubmVycyBub3QgZm91bmQJAAACAAAAAQIAAAA2R2FtZSBoYXMgbm90IGJlZW4gaW5pdGlhbGl6ZWQsIHRvdGFsIHdpbm5lcnMgbm90IGZvdW5kAAAAABtFtiI=", "height": 2209032, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4Xgs92tEEYbCYmRww2REc3iY4fEDSPiHobZ1g8R6WUBS Next: FCk9jqnhrbfpy4RAE5C7kahBzZGftQw7rKWw6f78ZH27 Diff:
Old | New | Differences | |
---|---|---|---|
80 | 80 | ||
81 | 81 | ||
82 | 82 | @Callable(F) | |
83 | - | func initGame () = [IntegerEntry(b, 0), IntegerEntry(c, 0), IntegerEntry(d, 10000000), IntegerEntry(e, 0), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(h, 0), IntegerEntry(i, 0)] | |
83 | + | func initGame () = [IntegerEntry(b, 0), IntegerEntry(c, 0), IntegerEntry(d, 10000000), IntegerEntry(e, 0), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(h, 0), IntegerEntry(i, 0), IntegerEntry(j, 0)] | |
84 | 84 | ||
85 | 85 | ||
86 | 86 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "G_TOKENID" | |
5 | 5 | ||
6 | 6 | let b = "G_BALANCE" | |
7 | 7 | ||
8 | 8 | let c = "G_COMMUNITYPOT" | |
9 | 9 | ||
10 | 10 | let d = "G_PRIZEPOT" | |
11 | 11 | ||
12 | 12 | let e = "G_PRIZESHAREAMOUNT" | |
13 | 13 | ||
14 | 14 | let f = "G_GAMESCOUNTER" | |
15 | 15 | ||
16 | 16 | let g = "G_TOTALBETS" | |
17 | 17 | ||
18 | 18 | let h = "G_PROCESSEDBETS" | |
19 | 19 | ||
20 | 20 | let i = "G_WINNERSCOUNT" | |
21 | 21 | ||
22 | 22 | let j = "G_PROCESSEDWINNERS" | |
23 | 23 | ||
24 | 24 | func k (l) = (("G_" + toString(l)) + "_RESULT") | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func m (n) = (("B_" + toString(n)) + "_BETDETAILS") | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func o (p) = (("W_" + toString(p)) + "_WINNERDETAILS") | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func q () = getInteger(this, b) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func r () = getInteger(this, c) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func s () = getInteger(this, d) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func t () = getInteger(this, e) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func u () = getInteger(this, f) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func v () = getInteger(this, g) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func w () = getInteger(this, h) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func x () = getInteger(this, i) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func y () = getInteger(this, j) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func z (l) = getStringValue(this, k(l)) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func A (n) = getStringValue(this, m(n)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func B (p) = getStringValue(this, o(p)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func C () = { | |
70 | 70 | let D = getString(this, a) | |
71 | 71 | if ($isInstanceOf(D, "String")) | |
72 | 72 | then { | |
73 | 73 | let E = D | |
74 | 74 | if ((E == "")) | |
75 | 75 | then unit | |
76 | 76 | else fromBase58String(E) | |
77 | 77 | } | |
78 | 78 | else unit | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | @Callable(F) | |
83 | - | func initGame () = [IntegerEntry(b, 0), IntegerEntry(c, 0), IntegerEntry(d, 10000000), IntegerEntry(e, 0), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(h, 0), IntegerEntry(i, 0)] | |
83 | + | func initGame () = [IntegerEntry(b, 0), IntegerEntry(c, 0), IntegerEntry(d, 10000000), IntegerEntry(e, 0), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(h, 0), IntegerEntry(i, 0), IntegerEntry(j, 0)] | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | ||
87 | 87 | @Callable(F) | |
88 | 88 | func startGame () = { | |
89 | 89 | let D = u() | |
90 | 90 | if ($isInstanceOf(D, "Int")) | |
91 | 91 | then { | |
92 | 92 | let G = D | |
93 | 93 | let H = (G + 1) | |
94 | 94 | [IntegerEntry(f, H)] | |
95 | 95 | } | |
96 | 96 | else throw("Game has not been initialized, total games not found") | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | ||
101 | 101 | @Callable(F) | |
102 | 102 | func placeBet () = { | |
103 | 103 | let D = u() | |
104 | 104 | if ($isInstanceOf(D, "Int")) | |
105 | 105 | then { | |
106 | 106 | let G = D | |
107 | 107 | let I = v() | |
108 | 108 | if ($isInstanceOf(I, "Int")) | |
109 | 109 | then { | |
110 | 110 | let J = I | |
111 | 111 | let K = (J + 1) | |
112 | 112 | let L = "1,2,3" | |
113 | 113 | [IntegerEntry(g, K), StringEntry(m(K), ((("G" + toString(G)) + "-") + L))] | |
114 | 114 | } | |
115 | 115 | else throw("Game has not been initialized, total bets not found") | |
116 | 116 | } | |
117 | 117 | else throw("Game has not been initialized, total games not found") | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | ||
122 | 122 | @Callable(F) | |
123 | 123 | func endGame () = { | |
124 | 124 | let D = u() | |
125 | 125 | if ($isInstanceOf(D, "Int")) | |
126 | 126 | then { | |
127 | 127 | let G = D | |
128 | 128 | [StringEntry(k(G), ((("G" + toString(G)) + "-") + "1,2,3"))] | |
129 | 129 | } | |
130 | 130 | else throw("Game has not been initialized, total games not found") | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | ||
135 | 135 | @Callable(F) | |
136 | 136 | func processNextBet () = { | |
137 | 137 | let D = v() | |
138 | 138 | if ($isInstanceOf(D, "Int")) | |
139 | 139 | then { | |
140 | 140 | let J = D | |
141 | 141 | let I = w() | |
142 | 142 | if ($isInstanceOf(I, "Int")) | |
143 | 143 | then { | |
144 | 144 | let M = I | |
145 | 145 | let N = (M + 1) | |
146 | 146 | if ((N > J)) | |
147 | 147 | then throw("Next bet has not been placed.") | |
148 | 148 | else { | |
149 | 149 | let O = u() | |
150 | 150 | if ($isInstanceOf(O, "Int")) | |
151 | 151 | then { | |
152 | 152 | let l = O | |
153 | 153 | let P = x() | |
154 | 154 | if ($isInstanceOf(P, "Int")) | |
155 | 155 | then { | |
156 | 156 | let Q = P | |
157 | 157 | let R = z(l) | |
158 | 158 | let S = A(N) | |
159 | 159 | if ((S == R)) | |
160 | 160 | then { | |
161 | 161 | let T = (Q + 1) | |
162 | 162 | [IntegerEntry(h, N), IntegerEntry(i, (Q + 1)), StringEntry(o(T), toBase58String(F.caller.bytes))] | |
163 | 163 | } | |
164 | 164 | else [IntegerEntry(h, N)] | |
165 | 165 | } | |
166 | 166 | else throw("Game has not been initialized, total winners not found") | |
167 | 167 | } | |
168 | 168 | else throw("Game has not been initialized, total games not found") | |
169 | 169 | } | |
170 | 170 | } | |
171 | 171 | else throw("Game has not been initialized, total processed bets not found") | |
172 | 172 | } | |
173 | 173 | else throw("Game has not been initialized, total bets not found") | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
178 | 178 | @Callable(F) | |
179 | 179 | func calculatePrize () = { | |
180 | 180 | let D = x() | |
181 | 181 | if ($isInstanceOf(D, "Int")) | |
182 | 182 | then { | |
183 | 183 | let Q = D | |
184 | 184 | if ((Q == 0)) | |
185 | 185 | then throw("There are no winners this round.") | |
186 | 186 | else { | |
187 | 187 | let I = s() | |
188 | 188 | if ($isInstanceOf(I, "Int")) | |
189 | 189 | then { | |
190 | 190 | let U = I | |
191 | 191 | let V = s() | |
192 | 192 | let W = (U / Q) | |
193 | 193 | [IntegerEntry(e, W)] | |
194 | 194 | } | |
195 | 195 | else throw("Game has not been initialized, total games not found") | |
196 | 196 | } | |
197 | 197 | } | |
198 | 198 | else throw("Game has not been initialized, total winners not found") | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | ||
203 | 203 | @Callable(F) | |
204 | 204 | func processNextWinner () = { | |
205 | 205 | let D = x() | |
206 | 206 | if ($isInstanceOf(D, "Int")) | |
207 | 207 | then { | |
208 | 208 | let X = D | |
209 | 209 | if ((X == 0)) | |
210 | 210 | then throw("There are no winners this round.") | |
211 | 211 | else { | |
212 | 212 | let I = y() | |
213 | 213 | if ($isInstanceOf(I, "Int")) | |
214 | 214 | then { | |
215 | 215 | let Y = I | |
216 | 216 | let Z = (Y + 1) | |
217 | 217 | if ((Z > X)) | |
218 | 218 | then throw("No more winners to be processed.") | |
219 | 219 | else { | |
220 | 220 | let O = t() | |
221 | 221 | if ($isInstanceOf(O, "Int")) | |
222 | 222 | then { | |
223 | 223 | let W = O | |
224 | 224 | let aa = B(Z) | |
225 | 225 | let ab = value(addressFromString(aa)) | |
226 | 226 | let ac = t() | |
227 | 227 | [ScriptTransfer(ab, W, C())] | |
228 | 228 | } | |
229 | 229 | else throw("Game has not been initialized, prize share amount not found") | |
230 | 230 | } | |
231 | 231 | } | |
232 | 232 | else throw("Game has not been initialized, total processed winners not found") | |
233 | 233 | } | |
234 | 234 | } | |
235 | 235 | else throw("Game has not been initialized, total winners not found") | |
236 | 236 | } | |
237 | 237 | ||
238 | 238 |
github/deemru/w8io/169f3d6 30.47 ms ◑