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