tx · 65TyhCmJjseze6WvXstDDEZ5YvLzGcNiBJqkfFsjR3C2 3MyFXnLeXYYqkJ3ub4y56wJCHEquvQi7xK3: -0.01000000 Waves 2022.09.12 00:43 [2224995] smart account 3MyFXnLeXYYqkJ3ub4y56wJCHEquvQi7xK3 > SELF 0.00000000 Waves
{ "type": 13, "id": "65TyhCmJjseze6WvXstDDEZ5YvLzGcNiBJqkfFsjR3C2", "fee": 1000000, "feeAssetId": null, "timestamp": 1662932670363, "version": 2, "chainId": 84, "sender": "3MyFXnLeXYYqkJ3ub4y56wJCHEquvQi7xK3", "senderPublicKey": "FjxiNm6yG2bAMJDSy72PSsGQArUNm7ynbaYFDC4sFNhi", "proofs": [ "8THiy1k1jf6sdFCrScnZNYXU8sNZE3anR5tRcWfSJr5Sv15e8vcfnS7e1hXUCXQaGkZLejNCvc6B1ud5SLJ8xxE" ], "script": "base64:BgItCAISAwoBCBIAEgMKAQgSBAoCCAgSBQoDCAgBEgMKAQgSABIFCgMICAgSABIAFQAFd2F2ZXMAgMLXLwAOdGlja2V0UHJpY2VJbnQAwIQ9AAt0aWNrZXRQcmljZQUOdGlja2V0UHJpY2VJbnQABmludkZlZQCgwh4AEndpdGhkcmF3RmVlUGVyY2VudAAFABZmZWVDb2xsZWN0b3JBZGRyZXNzS2V5AhNmZWVDb2xsZWN0b3JBZGRyZXNzAA5kZXBvc2l0QXNzZXRJZAIsNXVlMWZpdVY2ajZVQnI2WGYyOFFtczZ5NUZxekt0cXZheHhod3U3aFRRNTgBDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABEmdldFRpY2tldHNDb3VudEtleQENYWRkcmVzc1N0cmluZwkArAICBQ1hZGRyZXNzU3RyaW5nAg1fdGlja2V0c0NvdW50ARh0b3VybmFtZW50UHJpemVBbW91bnRLZXkBDHRvdXJuYW1lbnRJZAkArAICBQx0b3Vybm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QpidXlUaWNrZXRzAAQDcG10AwkAAAIJAJADAQgFAWkIcGF5bWVudHMAAQkAkQMCCAUBaQhwYXltZW50cwAACQACAQIhUGxlYXNlIGF0dGFjaCBleGFjdGx5IG9uZSBwYXltZW50AwkBCWlzRGVmaW5lZAEIBQNwbXQHYXNzZXRJZAkAAgECJ1RpY2tldHMgY2FuIG9ubHkgaWJlIHB1cmNoYXNlZCBpbiBXYXZlcwMJAQIhPQIIBQNwbXQGYW1vdW50BQt0aWNrZXRQcmljZQkAAgEJAKwCAgkArAICAh9UaGUgcGF5bWVudCBtdXN0IGJlIG9mIGV4YWN0bHkgCQCkAwEFDnRpY2tldFByaWNlSW50AgYgd2F2ZXMEDWNhbGxlckFkZHJTdHIJANgEAQgIBQFpBmNhbGxlcgVieXRlcwQTY3VycmVudFRpY2tldHNDb3VudAkBDXRyeUdldEludGVnZXIBCQESZ2V0VGlja2V0c0NvdW50S2V5AQUNY2FsbGVyQWRkclN0cgkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQESZ2V0VGlja2V0c0NvdW50S2V5AQUNY2FsbGVyQWRkclN0cgkAZAIFE2N1cnJlbnRUaWNrZXRzQ291bnQAAQUDbmlsAAEBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V51HaL/Q==", "height": 2224995, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = 100000000 | |
5 | + | ||
6 | + | let b = 1000000 | |
7 | + | ||
8 | + | let c = b | |
9 | + | ||
10 | + | let d = 500000 | |
11 | + | ||
12 | + | let e = 5 | |
13 | + | ||
14 | + | let f = "feeCollectorAddress" | |
15 | + | ||
16 | + | let g = "5ue1fiuV6j6UBr6Xf28Qms6y5FqzKtqvaxxhwu7hTQ58" | |
17 | + | ||
18 | + | func h (i) = { | |
19 | + | let j = getInteger(this, i) | |
20 | + | if ($isInstanceOf(j, "Int")) | |
21 | + | then { | |
22 | + | let k = j | |
23 | + | k | |
24 | + | } | |
25 | + | else 0 | |
26 | + | } | |
27 | + | ||
28 | + | ||
29 | + | func l (m) = (m + "_ticketsCount") | |
30 | + | ||
31 | + | ||
32 | + | func n (o) = (o + "_tournamentPrizeAmount") | |
33 | + | ||
34 | + | ||
35 | + | func p (o) = (o + "_tournamentPrizeAssetId") | |
36 | + | ||
37 | + | ||
38 | + | func q (o) = (o + "_tournamentStatus") | |
39 | + | ||
40 | + | ||
41 | + | func r (o) = (o + "_tournamentWinningTransactionId") | |
42 | + | ||
43 | + | ||
44 | + | func s (t) = (t + "_winner") | |
45 | + | ||
46 | + | ||
47 | + | func u (v) = (v + "_availableFunds") | |
48 | + | ||
49 | + | ||
50 | + | func w (v) = (v + "_totalLockedFunds") | |
51 | + | ||
52 | + | ||
53 | + | func x (v) = (v + "_lockedFundsTotalHistory") | |
54 | + | ||
55 | + | ||
56 | + | func y (v,t) = ((v + "_lockedFunds_") + t) | |
57 | + | ||
58 | + | ||
59 | + | func z (v) = (v + "_availableRewards") | |
60 | + | ||
61 | + | ||
62 | + | func A (m) = h(l(m)) | |
63 | + | ||
64 | + | ||
65 | + | func B (C) = { | |
66 | + | let D = A(C) | |
67 | + | let E = (D - 1) | |
68 | + | if ((0 > E)) | |
69 | + | then 0 | |
70 | + | else E | |
71 | + | } | |
72 | + | ||
73 | + | ||
74 | + | @Callable(F) | |
75 | + | func setFeeCollectorAddress (G) = if ((F.caller != this)) | |
76 | + | then throw("Admin Only") | |
77 | + | else [StringEntry(f, G)] | |
78 | + | ||
79 | + | ||
80 | + | ||
81 | + | @Callable(F) | |
82 | + | func depositFunds () = { | |
83 | + | let H = if ((size(F.payments) == 1)) | |
84 | + | then F.payments[0] | |
85 | + | else throw("Please attach exactly one payment") | |
86 | + | if ((H.assetId != fromBase58String(g))) | |
87 | + | then throw("You can only deposit USDN") | |
88 | + | else { | |
89 | + | let I = toBase58String(F.caller.bytes) | |
90 | + | let J = h(u(I)) | |
91 | + | $Tuple2([IntegerEntry(u(I), (J + H.amount))], 1) | |
92 | + | } | |
93 | + | } | |
94 | + | ||
95 | + | ||
96 | + | ||
97 | + | @Callable(F) | |
98 | + | func createTournament (o) = { | |
99 | + | let H = if ((size(F.payments) == 1)) | |
100 | + | then F.payments[0] | |
101 | + | else throw("Please attach exactly one payment") | |
102 | + | let K = { | |
103 | + | let j = H.assetId | |
104 | + | if ($isInstanceOf(j, "Unit")) | |
105 | + | then { | |
106 | + | let k = j | |
107 | + | "" | |
108 | + | } | |
109 | + | else if ($isInstanceOf(j, "ByteVector")) | |
110 | + | then { | |
111 | + | let k = j | |
112 | + | toBase58String(k) | |
113 | + | } | |
114 | + | else throw("Match error") | |
115 | + | } | |
116 | + | $Tuple2([IntegerEntry(n(o), H.amount), StringEntry(p(o), K), StringEntry(q(o), "registration")], 1) | |
117 | + | } | |
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | @Callable(F) | |
122 | + | func finishTournament (o,L) = if ((F.caller != this)) | |
123 | + | then throw("Admin Only") | |
124 | + | else $Tuple2([StringEntry(r(o), L), StringEntry(q(o), "finished")], 1) | |
125 | + | ||
126 | + | ||
127 | + | ||
128 | + | @Callable(F) | |
129 | + | func playerExitGame (t,C,M) = if ((F.caller != this)) | |
130 | + | then throw("Admin Only") | |
131 | + | else { | |
132 | + | let N = h(w(C)) | |
133 | + | let O = h(y(C, t)) | |
134 | + | $Tuple2([IntegerEntry(w(C), (N - O)), IntegerEntry(y(C, t), 0), ScriptTransfer(addressFromStringValue(C), M, fromBase58String(g))], 1) | |
135 | + | } | |
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | @Callable(F) | |
140 | + | func lockFundsForGame (t) = { | |
141 | + | let H = if ((size(F.payments) == 1)) | |
142 | + | then F.payments[0] | |
143 | + | else throw("Please attach exactly one payment") | |
144 | + | if ((H.assetId != fromBase58String(g))) | |
145 | + | then throw("You can only deposit USDN") | |
146 | + | else { | |
147 | + | let I = toBase58String(F.caller.bytes) | |
148 | + | let N = h(w(I)) | |
149 | + | let P = h(x(I)) | |
150 | + | $Tuple2([IntegerEntry(w(I), (N + H.amount)), IntegerEntry(x(I), (P + H.amount)), IntegerEntry(y(I, t), H.amount)], 1) | |
151 | + | } | |
152 | + | } | |
153 | + | ||
154 | + | ||
155 | + | ||
156 | + | @Callable(F) | |
157 | + | func withdrawFunds () = { | |
158 | + | let I = toBase58String(F.caller.bytes) | |
159 | + | let Q = addressFromStringValue(getStringValue(f)) | |
160 | + | let J = h(u(I)) | |
161 | + | let R = fraction(J, e, 100) | |
162 | + | let S = (J - R) | |
163 | + | if ((0 >= S)) | |
164 | + | then throw("No available funds to withdraw") | |
165 | + | else [IntegerEntry(u(I), 0), ScriptTransfer(F.caller, S, fromBase58String(g)), ScriptTransfer(Q, R, fromBase58String(g))] | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | @Callable(F) | |
171 | + | func setWinnerHeadsUp (t,T,U) = if ((F.caller != this)) | |
172 | + | then throw("Admin Only") | |
173 | + | else { | |
174 | + | let V = z(T) | |
175 | + | let W = h(V) | |
176 | + | let X = B(T) | |
177 | + | let Y = B(U) | |
178 | + | [StringEntry(s(t), T), IntegerEntry(V, (W + (c * 2))), IntegerEntry(l(T), X), IntegerEntry(l(U), Y)] | |
179 | + | } | |
180 | + | ||
181 | + | ||
182 | + | ||
183 | + | @Callable(F) | |
184 | + | func withdrawRewards () = { | |
185 | + | let I = toBase58String(F.caller.bytes) | |
186 | + | let Q = addressFromStringValue(getStringValue(f)) | |
187 | + | let W = h(z(I)) | |
188 | + | let R = fraction(W, e, 100) | |
189 | + | let Z = ((W - d) - R) | |
190 | + | if ((0 >= W)) | |
191 | + | then throw("No available rewards to withdraw") | |
192 | + | else [IntegerEntry(z(I), 0), ScriptTransfer(F.caller, Z, unit), ScriptTransfer(Q, R, unit)] | |
193 | + | } | |
194 | + | ||
195 | + | ||
196 | + | ||
197 | + | @Callable(F) | |
198 | + | func buyTickets () = { | |
199 | + | let H = if ((size(F.payments) == 1)) | |
200 | + | then F.payments[0] | |
201 | + | else throw("Please attach exactly one payment") | |
202 | + | if (isDefined(H.assetId)) | |
203 | + | then throw("Tickets can only ibe purchased in Waves") | |
204 | + | else if ((H.amount != c)) | |
205 | + | then throw((("The payment must be of exactly " + toString(b)) + " waves")) | |
206 | + | else { | |
207 | + | let I = toBase58String(F.caller.bytes) | |
208 | + | let aa = h(l(I)) | |
209 | + | $Tuple2([IntegerEntry(l(I), (aa + 1))], 1) | |
210 | + | } | |
211 | + | } | |
212 | + | ||
213 | + | ||
214 | + | @Verifier(ab) | |
215 | + | func ac () = sigVerify(ab.bodyBytes, ab.proofs[0], ab.senderPublicKey) | |
216 | + |
github/deemru/w8io/026f985 20.88 ms ◑