tx · 5getpkRd5wzVxfGyyoQUFuTxkZcdDPDf7QF3HFQtesdn 3N5q1m8whV3SztrPuN3z5sbKsEm3ZeSYF2T: -0.01200000 Waves 2024.06.02 11:04 [3132801] smart account 3N5q1m8whV3SztrPuN3z5sbKsEm3ZeSYF2T > SELF 0.00000000 Waves
{ "type": 13, "id": "5getpkRd5wzVxfGyyoQUFuTxkZcdDPDf7QF3HFQtesdn", "fee": 1200000, "feeAssetId": null, "timestamp": 1717315013739, "version": 2, "chainId": 84, "sender": "3N5q1m8whV3SztrPuN3z5sbKsEm3ZeSYF2T", "senderPublicKey": "BNpSmh5j4pzfsxKnEskdG2d4wxQZgbJwnFb5hC7NgrsA", "proofs": [ "2woQ3WKGvPAEewwJ4Yxg9unLkygSSrKcQ2viaF7kjNMrzLn3sNo66xQNxdVSaCgPNi5wD1X6yhTTXcoviJq1obuF" ], "script": "base64:AAIFAAAAAAAAADwIAhIDCgEIEgQKAggEEgcKBQgICAgIEgASBAoCCAESBAoCCAESBAoCCAESBAoCCAESCgoICAEBAQEBCAEAAAAZAAAAAAhhZG1pbm1zZwIAAAApRXJyb3I6IE9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbiEAAAAADmludmFsaWRBZGRyZXNzAgAAABdFcnJvcjogQWRkcmVzcyBpbnZhbGlkIQAAAAAPaW52YWxpZFRva2VuTXNnAgAAABVFcnJvcjogSW52YWxpZCBBc3NldCEAAAAADW1hdGNoTXNnRXJyb3ICAAAAakVycm9yOiBZb3UgYXJlIGFscmVhZHkgcGFydGljaXBhdGluZyBpbiBhIHJvb20uIFRyeSB0byBlbmQgaXQgb3IgbGVhdmUgdGhlIHJvb20gYnkgYWNjZXNzaW5nICdJbiBQcm9ncmVzcycAAAAACWJhbm5lZG1zZwIAAAA0RXJyb3I6IHRoZSB1c2VyIGhhcyBiZWVuIGJhbm5lZCBieSBhbiBhZG1pbmlzdHJhdG9yLgAAAAAGT3JhY2xlAgAAACMzTXh1ZFhOdH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eAAAAA9zZW5kZXJQdWJsaWNLZXlDh3Lo", "height": 3132801, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: us41VUCFRavJrc21o4vbyb7ssEtcaVoc7yPuJLjWWk9 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let adminmsg = "Error: Only admin can call this function!" | |
5 | + | ||
6 | + | let invalidAddress = "Error: Address invalid!" | |
7 | + | ||
8 | + | let invalidTokenMsg = "Error: Invalid Asset!" | |
9 | + | ||
10 | + | let matchMsgError = "Error: You are already participating in a room. Try to end it or leave the room by accessing 'In Progress'" | |
11 | + | ||
12 | + | let bannedmsg = "Error: the user has been banned by an administrator." | |
13 | + | ||
14 | + | let Oracle = "3MxudXNtrPExNtG9MsGV6e1kizuybgpiVq2" | |
15 | + | ||
16 | + | let roomExistError = "Error: You already have a previously created room. Go to 'In Progress' and close your room to create a new game." | |
17 | + | ||
18 | + | let balanceErrorMsg = "Error: You have no amount deposited as a chip in the poker module." | |
19 | + | ||
20 | + | let whithdrawError = "Error: Amount you want to withdraw greater than the amount available for withdrawal." | |
21 | + | ||
22 | + | let roomErrorNotExist = "Error:The room you want to join no longer exists." | |
23 | + | ||
24 | + | let errorGuest = "Error: You have not been invited to join this room." | |
25 | + | ||
26 | + | let errorMainGuest = "Error: You are the creator of the room." | |
27 | + | ||
28 | + | let errorCloseRoom = "Error: Only the room creator can close the room." | |
29 | + | ||
30 | + | func errorTokenInvalidAmount (assetId) = (("Error: You do not have enough chips in the poker module for asset " + assetId) + ". Go to 'Select Token', select the token you are using and click 'Deposit'.") | |
31 | + | ||
32 | + | ||
33 | + | func isValidToken (tokenId) = if ((tokenId == "WAVES")) | |
34 | + | then true | |
35 | + | else isDefined(getBoolean(Address(fromBase58String(Oracle)), tokenId)) | |
36 | + | ||
37 | + | ||
38 | + | func convertToken (tokenId) = if ((tokenId == "WAVES")) | |
39 | + | then unit | |
40 | + | else fromBase58String(tokenId) | |
41 | + | ||
42 | + | ||
43 | + | func isValidAddress (address) = (addressFromString(address) != unit) | |
44 | + | ||
45 | + | ||
46 | + | func isGuest (address,Room,heightRoom) = { | |
47 | + | let address1 = getStringValue(((("address1_" + Room) + "_") + toString(heightRoom))) | |
48 | + | let address2 = getStringValue(((("address2_" + Room) + "_") + toString(heightRoom))) | |
49 | + | let address3 = getStringValue(((("address3_" + Room) + "_") + toString(heightRoom))) | |
50 | + | let address4 = getStringValue(((("address4_" + Room) + "_") + toString(heightRoom))) | |
51 | + | if (if (if ((address == address1)) | |
52 | + | then true | |
53 | + | else (address == address2)) | |
54 | + | then true | |
55 | + | else (address == address3)) | |
56 | + | then true | |
57 | + | else (address == address4) | |
58 | + | } | |
59 | + | ||
60 | + | ||
61 | + | func getBalanceToken (address,tokenId) = if (isDefined(getInteger(((address + "_") + tokenId)))) | |
62 | + | then getIntegerValue(((address + "_") + tokenId)) | |
63 | + | else 0 | |
64 | + | ||
65 | + | ||
66 | + | func tokenRoom (address,heightRoom) = getStringValue((((address + "_height_") + toString(heightRoom)) + "_token")) | |
67 | + | ||
68 | + | ||
69 | + | func isSufficientBalance (address,tokenId) = (getBalanceToken(address, tokenId) > 0) | |
70 | + | ||
71 | + | ||
72 | + | func isAdmin (address) = { | |
73 | + | let c = toBase58String(address) | |
74 | + | if (isDefined(getString("admin"))) | |
75 | + | then if (if ((c == getStringValue("admin"))) | |
76 | + | then true | |
77 | + | else (c == toBase58String(this.bytes))) | |
78 | + | then true | |
79 | + | else false | |
80 | + | else if ((c == toBase58String(this.bytes))) | |
81 | + | then true | |
82 | + | else false | |
83 | + | } | |
84 | + | ||
85 | + | ||
86 | + | func isMatch (address) = { | |
87 | + | let c = toBase58String(address) | |
88 | + | if (isDefined(getBoolean((c + "_isMatch")))) | |
89 | + | then true | |
90 | + | else false | |
91 | + | } | |
92 | + | ||
93 | + | ||
94 | + | func isBanned (address) = if (isDefined(getBoolean((address + "_banned")))) | |
95 | + | then getBooleanValue((address + "_banned")) | |
96 | + | else false | |
97 | + | ||
98 | + | ||
99 | + | func isRoomExist (address) = isDefined(getBoolean(address)) | |
100 | + | ||
101 | + | ||
102 | + | @Callable(i) | |
103 | + | func addAdmin (address) = if (isAdmin(i.caller.bytes)) | |
104 | + | then if (isValidAddress(address)) | |
105 | + | then [StringEntry("admin", address)] | |
106 | + | else throw(invalidAddress) | |
107 | + | else throw(adminmsg) | |
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | @Callable(i) | |
112 | + | func ban (address,isBanned) = if (isAdmin(i.caller.bytes)) | |
113 | + | then if (isValidAddress(address)) | |
114 | + | then [BooleanEntry((address + "_banned"), isBanned)] | |
115 | + | else throw(invalidAddress) | |
116 | + | else throw(adminmsg) | |
117 | + | ||
118 | + | ||
119 | + | ||
120 | + | @Callable(i) | |
121 | + | func new (assetId,address1,address2,address3,address4) = { | |
122 | + | let kk = toBase58String(i.caller.bytes) | |
123 | + | if (isBanned(kk)) | |
124 | + | then throw(bannedmsg) | |
125 | + | else if (!(isValidToken(assetId))) | |
126 | + | then throw(invalidTokenMsg) | |
127 | + | else if (isMatch(i.caller.bytes)) | |
128 | + | then throw(matchMsgError) | |
129 | + | else if (!(isSufficientBalance(kk, assetId))) | |
130 | + | then throw(errorTokenInvalidAmount(assetId)) | |
131 | + | else if (isRoomExist(kk)) | |
132 | + | then throw(roomExistError) | |
133 | + | else if (if (if (if (if ((address1 != "")) | |
134 | + | then isValidAddress(address1) | |
135 | + | else false) | |
136 | + | then if ((address2 != "")) | |
137 | + | then isValidAddress(address2) | |
138 | + | else false | |
139 | + | else false) | |
140 | + | then if ((address3 != "")) | |
141 | + | then isValidAddress(address3) | |
142 | + | else false | |
143 | + | else false) | |
144 | + | then if ((address4 != "")) | |
145 | + | then isValidAddress(address4) | |
146 | + | else false | |
147 | + | else false) | |
148 | + | then [BooleanEntry(((kk + "_height_") + toString(height)), true), IntegerEntry((kk + "_height_latest"), height), StringEntry(((("address1_" + kk) + "_") + toString(height)), address1), StringEntry(((("address2_" + kk) + "_") + toString(height)), address2), StringEntry(((("address3_" + kk) + "_") + toString(height)), address3), StringEntry(((("address4_" + kk) + "_") + toString(height)), address4), StringEntry((((kk + "_height_") + toString(height)) + "_token"), assetId), BooleanEntry((kk + "_isMatch"), true), BooleanEntry(kk, true)] | |
149 | + | else throw(invalidAddress) | |
150 | + | } | |
151 | + | ||
152 | + | ||
153 | + | ||
154 | + | @Callable(i) | |
155 | + | func Deposit () = { | |
156 | + | let tId = match i.payments[0].assetId { | |
157 | + | case t: ByteVector => | |
158 | + | toBase58String(t) | |
159 | + | case _ => | |
160 | + | "WAVES" | |
161 | + | } | |
162 | + | let kk = toBase58String(i.caller.bytes) | |
163 | + | if (isBanned(kk)) | |
164 | + | then throw(bannedmsg) | |
165 | + | else if (!(isValidToken(tId))) | |
166 | + | then throw(invalidTokenMsg) | |
167 | + | else if (isMatch(i.caller.bytes)) | |
168 | + | then throw(matchMsgError) | |
169 | + | else [IntegerEntry(((kk + "_") + tId), (i.payments[0].amount + getBalanceToken(kk, tId)))] | |
170 | + | } | |
171 | + | ||
172 | + | ||
173 | + | ||
174 | + | @Callable(i) | |
175 | + | func Withdraw (tId,amount) = { | |
176 | + | let kk = toBase58String(i.caller.bytes) | |
177 | + | if (isBanned(kk)) | |
178 | + | then throw(bannedmsg) | |
179 | + | else if (!(isValidToken(tId))) | |
180 | + | then throw(invalidTokenMsg) | |
181 | + | else if (isMatch(i.caller.bytes)) | |
182 | + | then throw(matchMsgError) | |
183 | + | else if ((getBalanceToken(kk, tId) == 0)) | |
184 | + | then throw(balanceErrorMsg) | |
185 | + | else if ((amount > getBalanceToken(kk, tId))) | |
186 | + | then throw(whithdrawError) | |
187 | + | else [ScriptTransfer(i.caller, amount, convertToken(tId)), IntegerEntry(((kk + "_") + tId), (getBalanceToken(kk, tId) - amount))] | |
188 | + | } | |
189 | + | ||
190 | + | ||
191 | + | ||
192 | + | @Callable(i) | |
193 | + | func join (address,heightRoom) = { | |
194 | + | let kk = toBase58String(i.caller.bytes) | |
195 | + | if (isBanned(kk)) | |
196 | + | then throw(bannedmsg) | |
197 | + | else if (isMatch(i.caller.bytes)) | |
198 | + | then throw(matchMsgError) | |
199 | + | else if (!(isRoomExist(address))) | |
200 | + | then throw(roomErrorNotExist) | |
201 | + | else if (!(isSufficientBalance(kk, tokenRoom(address, heightRoom)))) | |
202 | + | then throw(errorTokenInvalidAmount(tokenRoom(address, heightRoom))) | |
203 | + | else if (!(isGuest(kk, address, heightRoom))) | |
204 | + | then throw(errorGuest) | |
205 | + | else [BooleanEntry((kk + "_isMatch"), true), StringEntry((kk + "_matchIn"), address), IntegerEntry((kk + "_match_height"), heightRoom)] | |
206 | + | } | |
207 | + | ||
208 | + | ||
209 | + | ||
210 | + | @Callable(i) | |
211 | + | func leaveRoom (address,heightRoom) = { | |
212 | + | let kk = toBase58String(i.caller.bytes) | |
213 | + | if (isMatch(i.caller.bytes)) | |
214 | + | then throw(matchMsgError) | |
215 | + | else if (!(isRoomExist(address))) | |
216 | + | then throw(roomErrorNotExist) | |
217 | + | else if (!(isGuest(kk, address, heightRoom))) | |
218 | + | then throw(errorGuest) | |
219 | + | else if ((address == toBase58String(i.caller.bytes))) | |
220 | + | then throw(errorMainGuest) | |
221 | + | else [DeleteEntry((kk + "_isMatch")), DeleteEntry((kk + "_matchIn")), DeleteEntry((kk + "_match_height"))] | |
222 | + | } | |
223 | + | ||
224 | + | ||
225 | + | ||
226 | + | @Callable(i) | |
227 | + | func CloseRoom (address,heightRoom) = { | |
228 | + | let kk = toBase58String(i.caller.bytes) | |
229 | + | if (isMatch(i.caller.bytes)) | |
230 | + | then throw(matchMsgError) | |
231 | + | else if (!(isRoomExist(address))) | |
232 | + | then throw(roomErrorNotExist) | |
233 | + | else if ((address == toBase58String(i.caller.bytes))) | |
234 | + | then [DeleteEntry((kk + "_isMatch")), DeleteEntry((kk + "_matchIn")), DeleteEntry((kk + "_match_height")), BooleanEntry(((kk + "_height_") + toString(height)), false), BooleanEntry((kk + "_isMatch"), false), BooleanEntry(kk, false)] | |
235 | + | else throw(errorCloseRoom) | |
236 | + | } | |
237 | + | ||
238 | + | ||
239 | + | ||
240 | + | @Callable(i) | |
241 | + | func setWinner (winner,address1Value,address2Value,address3Value,address4Value,mainAddressValue,addressRoom,heightRoom) = if (isAdmin(i.caller.bytes)) | |
242 | + | then { | |
243 | + | let a = (((address1Value + address2Value) + address3Value) + address4Value) | |
244 | + | let address1 = getStringValue(((("address1_" + addressRoom) + "_") + toString(heightRoom))) | |
245 | + | let address2 = getStringValue(((("address2_" + addressRoom) + "_") + toString(heightRoom))) | |
246 | + | let address3 = getStringValue(((("address3_" + addressRoom) + "_") + toString(heightRoom))) | |
247 | + | let address4 = getStringValue(((("address4_" + addressRoom) + "_") + toString(heightRoom))) | |
248 | + | [ScriptTransfer(Address(fromBase58String(getStringValue("admin"))), ((a * 4) / 100), convertToken(tokenRoom(addressRoom, heightRoom))), StringEntry((((addressRoom + "_height_") + toString(height)) + "_winner"), winner), BooleanEntry(((addressRoom + "_height_") + toString(height)), false), BooleanEntry((addressRoom + "_isMatch"), false), BooleanEntry(addressRoom, false), DeleteEntry((addressRoom + "_isMatch")), DeleteEntry((addressRoom + "_matchIn")), DeleteEntry((addressRoom + "_match_height")), IntegerEntry(((winner + "_") + tokenRoom(addressRoom, heightRoom)), (getBalanceToken(winner, tokenRoom(addressRoom, heightRoom)) + (a - ((a * 4) / 100)))), IntegerEntry(((addressRoom + "_") + tokenRoom(addressRoom, heightRoom)), (getBalanceToken(addressRoom, tokenRoom(addressRoom, heightRoom)) - mainAddressValue)), IntegerEntry(((address1 + "_") + tokenRoom(addressRoom, heightRoom)), (getBalanceToken(address1, tokenRoom(addressRoom, heightRoom)) - address1Value)), IntegerEntry(((address2 + "_") + tokenRoom(addressRoom, heightRoom)), (getBalanceToken(address2, tokenRoom(addressRoom, heightRoom)) - address2Value)), IntegerEntry(((address3 + "_") + tokenRoom(addressRoom, heightRoom)), (getBalanceToken(address3, tokenRoom(addressRoom, heightRoom)) - address3Value)), IntegerEntry(((address4 + "_") + tokenRoom(addressRoom, heightRoom)), (getBalanceToken(address4, tokenRoom(addressRoom, heightRoom)) - address4Value))] | |
249 | + | } | |
250 | + | else throw(adminmsg) | |
251 | + | ||
252 | + | ||
253 | + | @Verifier(tx) | |
254 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
255 | + |
github/deemru/w8io/169f3d6 22.06 ms ◑