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:AAIFAAAAAAAAABAIAhIAEgASABIAEgASABIAAAAAGgAAAAAOZ2FtZVRva2VuTGFiZWwCAAAACUdfVE9LRU5JRAAAAAAQZ2FtZUJhbGFuY2VMYWJlbAIAAAAJR19CQUxBTkNFAAAAABVnYW1lQ29tbXVuaXR5UG90TGFiZWwCAAAADkdfQ09NTVVOSVRZUE9UAAAAABFnYW1lUHJpemVQb3RMYWJlbAIAAAAKR19QUklaRVBPVAAAAAAZZ2FtZVByaXplU2hhcmVBbW91bnRMYWJlbAIAAAASR19QUklaRVNIQVJFQU1PVU5UAAAAABBnYW1lQ291bnRlckxhYmVsAgAAAA5HX0dBTUVTQ09VTlRFUgAAAAASZ2FtZVRvdGFsQmV0c0xhYmVsAgAAAAtHX1RPVEFMQkVUUwAAAAAWZ2FtZVByb2Nlc3NlZEJldHNMYWJlbAIAAAAPR19QUk9DRVNTRURCRVRTAAAAABdnYW1lV2lubmVyc0NvdW50ZXJMYWJlbAIAAAAOR19XSU5ORVJTQ09VTlQAAAAAGWdhbWVQcm9jZXNzZWRXaW5uZXJzTGFiZWwCAAAAEkd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AAAAByRtYXRjaDIJAQAAABRnYW1lUHJpemVTaGFyZUFtb3VudAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDICAAAAA0ludAQAAAAQcHJpemVTaGFyZUFtb3VudAUAAAAHJG1hdGNoMgQAAAAJYmV0UGxhY2VyCQEAAAANd2lubmVyRGV0YWlscwAAAAEFAAAACm5leHRXaW5uZXIEAAAAB2FkZHJlc3MJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQUAAAAJYmV0UGxhY2VyBAAAAAh3aW5uaW5ncwkBAAAAFGdhbWVQcml6ZVNoYXJlQW1vdW50AAAAAAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAdhZGRyZXNzBQAAABBwcml6ZVNoYXJlQW1vdW50CQEAAAAJZ2FtZVRva2VuAAAAAAUAAAADbmlsCQAAAgAAAAECAAAAO0dhbWUgaGFzIG5vdCBiZWVuIGluaXRpYWxpemVkLCBwcml6ZSBzaGFyZSBhbW91bnQgbm90IGZvdW5kCQAAAgAAAAECAAAAQEdhbWUgaGFzIG5vdCBiZWVuIGluaXRpYWxpemVkLCB0b3RhbCBwcm9jZXNzZWQgd2lubmVycyBub3QgZm91bmQJAAACAAAAAQIAAAA2R2FtZSBoYXMgbm90IGJlZW4gaW5pdGlhbGl6ZWQsIHRvdGFsIHdpbm5lcnMgbm90IGZvdW5kAAAAAI2f7BU=", "height": 2209027, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G82eTsvCbwMs9V4Z74omAjt4fPtSzibv7VzzseJAm9xJ Next: 59pAUTAXhHGoTvkSJCWrRWBHbWcfBUyoUbn84kR1cMPG Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "G_GAMESCOUNTER"
4+let a = "G_TOKENID"
55
6-let b = "G_TOTALBETS"
6+let b = "G_BALANCE"
77
8-let c = "G_PROCESSEDBETS"
8+let c = "G_COMMUNITYPOT"
99
10-let d = "G_WINNERSCOUNT"
10+let d = "G_PRIZEPOT"
1111
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")
1325
1426
15-func g (h) = (("B_" + toString(h)) + "_BETDETAILS")
27+func m (n) = (("B_" + toString(n)) + "_BETDETAILS")
1628
1729
18-func i (j) = (("W_" + toString(j)) + "_WINNERDETAILS")
30+func o (p) = (("W_" + toString(p)) + "_WINNERDETAILS")
1931
2032
21-func k () = getInteger(this, a)
33+func q () = getInteger(this, b)
2234
2335
24-func l () = getInteger(this, b)
36+func r () = getInteger(this, c)
2537
2638
27-func m () = getInteger(this, c)
39+func s () = getInteger(this, d)
2840
2941
30-func n () = getInteger(this, d)
42+func t () = getInteger(this, e)
3143
3244
33-func o (f) = getStringValue(this, e(f))
45+func u () = getInteger(this, f)
3446
3547
36-func p (h) = getStringValue(this, g(h))
48+func v () = getInteger(this, g)
3749
3850
39-func q (j) = getStringValue(this, i(j))
51+func w () = getInteger(this, h)
4052
4153
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)]
4484
4585
4686
47-@Callable(r)
87+@Callable(F)
4888 func startGame () = {
49- let s = k()
50- if ($isInstanceOf(s, "Int"))
89+ let D = u()
90+ if ($isInstanceOf(D, "Int"))
5191 then {
52- let t = s
53- let u = (t + 1)
54-[IntegerEntry(a, u)]
92+ let G = D
93+ let H = (G + 1)
94+[IntegerEntry(f, H)]
5595 }
5696 else throw("Game has not been initialized, total games not found")
5797 }
5898
5999
60100
61-@Callable(r)
101+@Callable(F)
62102 func placeBet () = {
63- let s = k()
64- if ($isInstanceOf(s, "Int"))
103+ let D = u()
104+ if ($isInstanceOf(D, "Int"))
65105 then {
66- let t = s
67- let v = l()
68- if ($isInstanceOf(v, "Int"))
106+ let G = D
107+ let I = v()
108+ if ($isInstanceOf(I, "Int"))
69109 then {
70- let w = v
71- let x = (w + 1)
72- let y = "1,2,3"
73-[IntegerEntry(b, x), StringEntry(g(x), ((("G" + toString(t)) + "-") + y))]
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))]
74114 }
75115 else throw("Game has not been initialized, total bets not found")
76116 }
79119
80120
81121
82-@Callable(r)
122+@Callable(F)
83123 func endGame () = {
84- let s = k()
85- if ($isInstanceOf(s, "Int"))
124+ let D = u()
125+ if ($isInstanceOf(D, "Int"))
86126 then {
87- let t = s
88-[StringEntry(e(t), ((("G" + toString(t)) + "-") + "1,2,3"))]
127+ let G = D
128+[StringEntry(k(G), ((("G" + toString(G)) + "-") + "1,2,3"))]
89129 }
90130 else throw("Game has not been initialized, total games not found")
91131 }
92132
93133
94134
95-@Callable(r)
135+@Callable(F)
96136 func processNextBet () = {
97- let s = l()
98- if ($isInstanceOf(s, "Int"))
137+ let D = v()
138+ if ($isInstanceOf(D, "Int"))
99139 then {
100- let w = s
101- let v = m()
102- if ($isInstanceOf(v, "Int"))
140+ let J = D
141+ let I = w()
142+ if ($isInstanceOf(I, "Int"))
103143 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"))
117155 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)]
120165 }
121- else [IntegerEntry(c, C)]
166+ else throw("Game has not been initialized, total winners not found")
122167 }
168+ else throw("Game has not been initialized, total games not found")
123169 }
124- else throw("Game has not been initialized, total winners not found")
125170 }
126171 else throw("Game has not been initialized, total processed bets not found")
127172 }
129174 }
130175
131176
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+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "G_GAMESCOUNTER"
4+let a = "G_TOKENID"
55
6-let b = "G_TOTALBETS"
6+let b = "G_BALANCE"
77
8-let c = "G_PROCESSEDBETS"
8+let c = "G_COMMUNITYPOT"
99
10-let d = "G_WINNERSCOUNT"
10+let d = "G_PRIZEPOT"
1111
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")
1325
1426
15-func g (h) = (("B_" + toString(h)) + "_BETDETAILS")
27+func m (n) = (("B_" + toString(n)) + "_BETDETAILS")
1628
1729
18-func i (j) = (("W_" + toString(j)) + "_WINNERDETAILS")
30+func o (p) = (("W_" + toString(p)) + "_WINNERDETAILS")
1931
2032
21-func k () = getInteger(this, a)
33+func q () = getInteger(this, b)
2234
2335
24-func l () = getInteger(this, b)
36+func r () = getInteger(this, c)
2537
2638
27-func m () = getInteger(this, c)
39+func s () = getInteger(this, d)
2840
2941
30-func n () = getInteger(this, d)
42+func t () = getInteger(this, e)
3143
3244
33-func o (f) = getStringValue(this, e(f))
45+func u () = getInteger(this, f)
3446
3547
36-func p (h) = getStringValue(this, g(h))
48+func v () = getInteger(this, g)
3749
3850
39-func q (j) = getStringValue(this, i(j))
51+func w () = getInteger(this, h)
4052
4153
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)]
4484
4585
4686
47-@Callable(r)
87+@Callable(F)
4888 func startGame () = {
49- let s = k()
50- if ($isInstanceOf(s, "Int"))
89+ let D = u()
90+ if ($isInstanceOf(D, "Int"))
5191 then {
52- let t = s
53- let u = (t + 1)
54-[IntegerEntry(a, u)]
92+ let G = D
93+ let H = (G + 1)
94+[IntegerEntry(f, H)]
5595 }
5696 else throw("Game has not been initialized, total games not found")
5797 }
5898
5999
60100
61-@Callable(r)
101+@Callable(F)
62102 func placeBet () = {
63- let s = k()
64- if ($isInstanceOf(s, "Int"))
103+ let D = u()
104+ if ($isInstanceOf(D, "Int"))
65105 then {
66- let t = s
67- let v = l()
68- if ($isInstanceOf(v, "Int"))
106+ let G = D
107+ let I = v()
108+ if ($isInstanceOf(I, "Int"))
69109 then {
70- let w = v
71- let x = (w + 1)
72- let y = "1,2,3"
73-[IntegerEntry(b, x), StringEntry(g(x), ((("G" + toString(t)) + "-") + y))]
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))]
74114 }
75115 else throw("Game has not been initialized, total bets not found")
76116 }
77117 else throw("Game has not been initialized, total games not found")
78118 }
79119
80120
81121
82-@Callable(r)
122+@Callable(F)
83123 func endGame () = {
84- let s = k()
85- if ($isInstanceOf(s, "Int"))
124+ let D = u()
125+ if ($isInstanceOf(D, "Int"))
86126 then {
87- let t = s
88-[StringEntry(e(t), ((("G" + toString(t)) + "-") + "1,2,3"))]
127+ let G = D
128+[StringEntry(k(G), ((("G" + toString(G)) + "-") + "1,2,3"))]
89129 }
90130 else throw("Game has not been initialized, total games not found")
91131 }
92132
93133
94134
95-@Callable(r)
135+@Callable(F)
96136 func processNextBet () = {
97- let s = l()
98- if ($isInstanceOf(s, "Int"))
137+ let D = v()
138+ if ($isInstanceOf(D, "Int"))
99139 then {
100- let w = s
101- let v = m()
102- if ($isInstanceOf(v, "Int"))
140+ let J = D
141+ let I = w()
142+ if ($isInstanceOf(I, "Int"))
103143 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"))
117155 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)]
120165 }
121- else [IntegerEntry(c, C)]
166+ else throw("Game has not been initialized, total winners not found")
122167 }
168+ else throw("Game has not been initialized, total games not found")
123169 }
124- else throw("Game has not been initialized, total winners not found")
125170 }
126171 else throw("Game has not been initialized, total processed bets not found")
127172 }
128173 else throw("Game has not been initialized, total bets not found")
129174 }
130175
131176
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