tx · B1oeawy8RSFyDmshg5iATKRaoZRZL1gaKCnCAwhKtLj4 3MvJDKBFzztnd7KCU78zgJ8qUuzVux4c9yw: -0.01000000 Waves 2022.10.23 14:26 [2284982] smart account 3MvJDKBFzztnd7KCU78zgJ8qUuzVux4c9yw > SELF 0.00000000 Waves
{ "type": 13, "id": "B1oeawy8RSFyDmshg5iATKRaoZRZL1gaKCnCAwhKtLj4", "fee": 1000000, "feeAssetId": null, "timestamp": 1666524423876, "version": 2, "chainId": 84, "sender": "3MvJDKBFzztnd7KCU78zgJ8qUuzVux4c9yw", "senderPublicKey": "9gVuyFNzke49pnadJxJ312ZWhYudDhdcqP5hsm5pGQw6", "proofs": [ "1Hu8aMyeGwCWvsprkfh1L9UgJZMXJgq31uUDLJEvnp1f4G8DoSFE7FVLvdApdgK2gH2gi8BfFA569vfaMRLSkT1" ], "script": "base64:BgIyCAISAwoBCBIDCgEIEgYKBAgBAQgSBQoDCAEIEgUKAwgIARIAEgQKAggEEgQKAggEEgAtAAl1bmRlZmluZWQCCXVuZGVmaW5lZAAJc2VwYXJhdG9yAgE7ABBjb25maWdBZGRyZXNzS2V5AgZjb25maWcAE2NvbGxlY3RvckFkZHJlc3NLZXkCEWNvbGxlY3Rvcl9hZGRyZXNzABFoaXN0b3J5QWRkcmVzc0tleQIPaGlzdG9yeV9hZGRyZXNzABJwYXltYWtlckFkZHJlc3NLZXkCEHBheW1ha2VyX2FkZHJlc3MACWFkbWluc0tleQIGYWRtaW5zAA1jb25maWdBZGRyZXNzCQERQGV4dHJOYXRpdmUoMTA2MikBCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzBRBjb25maWdBZGRyZXNzS2V5ABBjb2xsZWN0b3JBZGRyZXNzCQERQGV4dHJOYXRpdmUoMTA2MikBCQERQGV4dHJOYXRpdmUoMTA1MykCBQ1jb25maWdBZGRyZXNzBRNjb2xsZWN0b3JBZGRyZXNzS2V5AA5oaXN0b3J5QWRkcmVzcwkBEUBleHRyTmF0aXZ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aXNoZWRFdmVudAUPbGFzdEFjdGl2ZUV2ZW50BQNuaWwJAMwIAgkBC1N0cmluZ0VudHJ5AgUNZmlyc3RFdmVudEtleQUKZmlyc3RFdmVudAkAzAgCCQELU3RyaW5nRW50cnkCBQxsYXN0RXZlbnRLZXkFCWxhc3RFdmVudAUDbmlsAI+DQ8E=", "height": 2284982, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ERvswQ6XDy5xjMvC1oBeMZbf2AiX16vNEKryiocJUvTW Next: HSuraZZehPmJxi7MVzuyvyJvuzjnteD67u56tSC5kFR3 Diff:
Old | New | Differences | |
---|---|---|---|
278 | 278 | let newListIndex = if (if ((listSize >= 100)) | |
279 | 279 | then (countBetsPrice == 0) | |
280 | 280 | else false) | |
281 | - | then listIndex | |
282 | - | else | |
281 | + | then (listIndex + 1) | |
282 | + | else listIndex | |
283 | 283 | let newGroupsCount = (((newListIndex - 1) / 10) + 1) | |
284 | 284 | [IntegerEntry(getPriceAddressKey(eventId, addressStr), price), IntegerEntry(getPricesListsCountKey(eventId), newListIndex), IntegerEntry(getPricesGroupsCountKey(eventId), newGroupsCount), StringEntry(getPricesListNKey(eventId, newListIndex), newPrices)] | |
285 | 285 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let undefined = "undefined" | |
5 | 5 | ||
6 | 6 | let separator = ";" | |
7 | 7 | ||
8 | 8 | let configAddressKey = "config" | |
9 | 9 | ||
10 | 10 | let collectorAddressKey = "collector_address" | |
11 | 11 | ||
12 | 12 | let historyAddressKey = "history_address" | |
13 | 13 | ||
14 | 14 | let paymakerAddressKey = "paymaker_address" | |
15 | 15 | ||
16 | 16 | let adminsKey = "admins" | |
17 | 17 | ||
18 | 18 | let configAddress = addressFromStringValue(getStringValue(this, configAddressKey)) | |
19 | 19 | ||
20 | 20 | let collectorAddress = addressFromStringValue(getStringValue(configAddress, collectorAddressKey)) | |
21 | 21 | ||
22 | 22 | let historyAddress = addressFromStringValue(getStringValue(configAddress, historyAddressKey)) | |
23 | 23 | ||
24 | 24 | let paymakerAddress = addressFromStringValue(getStringValue(configAddress, paymakerAddressKey)) | |
25 | 25 | ||
26 | 26 | func isAdmin (caller) = { | |
27 | 27 | let admRow = valueOrElse(getString(configAddress, adminsKey), "") | |
28 | 28 | if (if ((caller == this)) | |
29 | 29 | then true | |
30 | 30 | else contains(admRow, toString(caller))) | |
31 | 31 | then true | |
32 | 32 | else false | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func getCheckerKey (checker) = ("checker_" + checker) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func isChecker (checker) = { | |
40 | 40 | let isExists = isDefined(getBoolean(configAddress, getCheckerKey(checker))) | |
41 | 41 | isExists | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | let USDN = base58'2eFPx8M5qwNFRbW91pzsyBKMz1FZmYMUW3BVZzTQmbFD' | |
46 | 46 | ||
47 | 47 | let minAmount = 10000000 | |
48 | 48 | ||
49 | 49 | let feeNumerator = 5 | |
50 | 50 | ||
51 | 51 | let feeDenominator = 100 | |
52 | 52 | ||
53 | 53 | let maxBetsOnPrice = 3 | |
54 | 54 | ||
55 | 55 | let firstEventKey = "first_event" | |
56 | 56 | ||
57 | 57 | let lastEventKey = "last_event" | |
58 | 58 | ||
59 | 59 | let fisrtFinishedEventKey = "first_finished_event" | |
60 | 60 | ||
61 | 61 | let lastFinishedEventKey = "last_finished_event" | |
62 | 62 | ||
63 | 63 | let fisrtActiveEventKey = "first_active_event" | |
64 | 64 | ||
65 | 65 | let lastActiveEventKey = "last_active_event" | |
66 | 66 | ||
67 | 67 | func getStartBlockKey (eventId) = (eventId + "_start_block") | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getEndBlockKey (eventId) = (eventId + "_end_block") | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getFinishAtKey (eventId) = (eventId + "_finish_at_block") | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getIdKey (eventId) = (eventId + "_id") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getStatusKey (eventId) = (eventId + "_status") | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getDescKey (eventId) = (eventId + "_description") | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getPrevEventKey (eventId) = (eventId + "_prev_event") | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func getNextEventKey (eventId) = (eventId + "_next_event") | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func getAssetIdKey (eventId) = (eventId + "_asset_id") | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func getTotalAmountKey (eventId) = (eventId + "_total_amount") | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getPricesGroupsCountKey (eventId) = (eventId + "_prices_group_count") | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getPricesListsCountKey (eventId) = (eventId + "_prices_list_count") | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getPricesListNKey (eventId,n) = ((eventId + "_prices_list_") + toString(n)) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getPriceBetsCount (eventId,price) = (((eventId + "_") + toString(price)) + "_bets_count") | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func getPriceAddressKey (eventId,address) = (((eventId + "_") + address) + "_price") | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func asInt (v) = match v { | |
113 | 113 | case x: Int => | |
114 | 114 | x | |
115 | 115 | case t => | |
116 | 116 | throw("#err") | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func asString (v) = match v { | |
121 | 121 | case x: String => | |
122 | 122 | x | |
123 | 123 | case _ => | |
124 | 124 | throw("#err") | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getAssetInfo (assetStr) = { | |
129 | 129 | let assetId = fromBase58String(assetStr) | |
130 | 130 | let x = match assetInfo(assetId) { | |
131 | 131 | case asset: Asset => | |
132 | 132 | $Tuple2(assetStr, asset.decimals) | |
133 | 133 | case _ => | |
134 | 134 | $Tuple2("WAVES", 0) | |
135 | 135 | } | |
136 | 136 | x | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getStatus (eventId) = { | |
141 | 141 | let status = getStringValue(this, getStatusKey(eventId)) | |
142 | 142 | if (if (if ((status == "finished")) | |
143 | 143 | then true | |
144 | 144 | else (status == "#")) | |
145 | 145 | then true | |
146 | 146 | else (status == "ended")) | |
147 | 147 | then status | |
148 | 148 | else { | |
149 | 149 | let finishAt = getIntegerValue(this, getFinishAtKey(eventId)) | |
150 | 150 | let startBlock = getIntegerValue(this, getStartBlockKey(eventId)) | |
151 | 151 | let endBlock = getIntegerValue(this, getEndBlockKey(eventId)) | |
152 | 152 | if ((startBlock > height)) | |
153 | 153 | then "awaiting" | |
154 | 154 | else if (if ((height >= startBlock)) | |
155 | 155 | then (endBlock >= height) | |
156 | 156 | else false) | |
157 | 157 | then "active" | |
158 | 158 | else if (if ((height > endBlock)) | |
159 | 159 | then (finishAt >= height) | |
160 | 160 | else false) | |
161 | 161 | then "confirmation" | |
162 | 162 | else if ((height > finishAt)) | |
163 | 163 | then "finished" | |
164 | 164 | else throw("unknown status") | |
165 | 165 | } | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func registerEvent (txid,desc,startBlock,endBlock,finishAt,assetStr) = { | |
170 | 170 | let eventId = txid | |
171 | 171 | let insert = invoke(this, "insertToList", [eventId, true], nil) | |
172 | 172 | if ((insert == insert)) | |
173 | 173 | then { | |
174 | 174 | let concat = invoke(this, "concatLists", nil, nil) | |
175 | 175 | if ((concat == concat)) | |
176 | 176 | then { | |
177 | 177 | let $t048674920 = getAssetInfo(assetStr) | |
178 | 178 | let assetId = $t048674920._1 | |
179 | 179 | let assetDecimals = $t048674920._2 | |
180 | 180 | [IntegerEntry(getStartBlockKey(eventId), startBlock), IntegerEntry(getEndBlockKey(eventId), endBlock), IntegerEntry(getFinishAtKey(eventId), finishAt), StringEntry(getDescKey(eventId), desc), StringEntry(getStatusKey(eventId), "new"), StringEntry(getIdKey(eventId), eventId), StringEntry(getAssetIdKey(eventId), assetId)] | |
181 | 181 | } | |
182 | 182 | else throw("Strict value is not equal to itself.") | |
183 | 183 | } | |
184 | 184 | else throw("Strict value is not equal to itself.") | |
185 | 185 | } | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | @Callable(i) | |
189 | 189 | func init (config) = if ((i.caller != this)) | |
190 | 190 | then throw("only main can do") | |
191 | 191 | else { | |
192 | 192 | let isExists = isDefined(getString(this, configAddressKey)) | |
193 | 193 | if (!(isExists)) | |
194 | 194 | then [StringEntry(configAddressKey, config)] | |
195 | 195 | else throw("already inited") | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | ||
200 | 200 | @Callable(i) | |
201 | 201 | func appendEventer (desc) = if (!(isAdmin(i.caller))) | |
202 | 202 | then throw("only admin can do") | |
203 | 203 | else { | |
204 | 204 | let inv = invoke(configAddress, "setEventer", [toString(this), desc], nil) | |
205 | 205 | if ((inv == inv)) | |
206 | 206 | then nil | |
207 | 207 | else throw("Strict value is not equal to itself.") | |
208 | 208 | } | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | ||
212 | 212 | @Callable(i) | |
213 | 213 | func fullRegisterEvent (desc,startBlock,duration,assetStr) = { | |
214 | 214 | let newStartBlock = if ((startBlock == 0)) | |
215 | 215 | then height | |
216 | 216 | else startBlock | |
217 | 217 | let endBlock = (newStartBlock + duration) | |
218 | 218 | let finishAt = (endBlock + 1440) | |
219 | 219 | if (!(isAdmin(i.caller))) | |
220 | 220 | then throw("only admin can do") | |
221 | 221 | else { | |
222 | 222 | let txid = toBase58String(i.transactionId) | |
223 | 223 | registerEvent(txid, desc, newStartBlock, endBlock, finishAt, assetStr) | |
224 | 224 | } | |
225 | 225 | } | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | ||
229 | 229 | @Callable(i) | |
230 | 230 | func choice (eventId,price,address) = { | |
231 | 231 | let status = getStatus(eventId) | |
232 | 232 | if ((status == "active")) | |
233 | 233 | then { | |
234 | 234 | let neededAmount = 10000000 | |
235 | 235 | let neededAsset = USDN | |
236 | 236 | if (if (if ((size(i.payments) == 1)) | |
237 | 237 | then (i.payments[0].assetId == neededAsset) | |
238 | 238 | else false) | |
239 | 239 | then (i.payments[0].amount == neededAmount) | |
240 | 240 | else false) | |
241 | 241 | then { | |
242 | 242 | let invAppend = invoke(this, "appendBetsList", [eventId, address, price], nil) | |
243 | 243 | if ((invAppend == invAppend)) | |
244 | 244 | then { | |
245 | 245 | let currentTotal = valueOrElse(getInteger(this, getTotalAmountKey(eventId)), 0) | |
246 | 246 | [IntegerEntry(getTotalAmountKey(eventId), (currentTotal + i.payments[0].amount))] | |
247 | 247 | } | |
248 | 248 | else throw("Strict value is not equal to itself.") | |
249 | 249 | } | |
250 | 250 | else throw("Bad payment") | |
251 | 251 | } | |
252 | 252 | else throw("You can`t do it") | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | ||
257 | 257 | @Callable(i) | |
258 | 258 | func appendBetsList (eventId,addressStr,price) = if ((i.caller != this)) | |
259 | 259 | then throw("only main can do") | |
260 | 260 | else if (isDefined(getString(this, getPriceAddressKey(eventId, addressStr)))) | |
261 | 261 | then throw("betting from this address is exists") | |
262 | 262 | else { | |
263 | 263 | let countBetsPrice = valueOrElse(getInteger(this, getPriceBetsCount(eventId, price)), 0) | |
264 | 264 | if ((countBetsPrice >= maxBetsOnPrice)) | |
265 | 265 | then throw("to many bets") | |
266 | 266 | else { | |
267 | 267 | let listIndex = valueOrElse(getInteger(this, getPricesListsCountKey(eventId)), 1) | |
268 | 268 | let currentPrices = valueOrElse(getString(this, getPricesListNKey(eventId, listIndex)), "") | |
269 | 269 | let currentPricesList = split_4C(currentPrices, separator) | |
270 | 270 | let listSize = size(currentPricesList) | |
271 | 271 | let newPrices = if ((countBetsPrice == 0)) | |
272 | 272 | then if ((100 > listSize)) | |
273 | 273 | then if ((size(currentPrices) == 0)) | |
274 | 274 | then toString(price) | |
275 | 275 | else ((currentPrices + separator) + toString(price)) | |
276 | 276 | else toString(price) | |
277 | 277 | else currentPrices | |
278 | 278 | let newListIndex = if (if ((listSize >= 100)) | |
279 | 279 | then (countBetsPrice == 0) | |
280 | 280 | else false) | |
281 | - | then listIndex | |
282 | - | else | |
281 | + | then (listIndex + 1) | |
282 | + | else listIndex | |
283 | 283 | let newGroupsCount = (((newListIndex - 1) / 10) + 1) | |
284 | 284 | [IntegerEntry(getPriceAddressKey(eventId, addressStr), price), IntegerEntry(getPricesListsCountKey(eventId), newListIndex), IntegerEntry(getPricesGroupsCountKey(eventId), newGroupsCount), StringEntry(getPricesListNKey(eventId, newListIndex), newPrices)] | |
285 | 285 | } | |
286 | 286 | } | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | ||
290 | 290 | @Callable(i) | |
291 | 291 | func resetList () = if (!(isAdmin(i.caller))) | |
292 | 292 | then throw("only admin can do") | |
293 | 293 | else [StringEntry(firstEventKey, undefined), StringEntry(lastEventKey, undefined), StringEntry(fisrtActiveEventKey, undefined), StringEntry(lastActiveEventKey, undefined), StringEntry(fisrtFinishedEventKey, undefined), StringEntry(lastFinishedEventKey, undefined)] | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | ||
297 | 297 | @Callable(i) | |
298 | 298 | func insertToList (eventId,isActive) = if ((this != i.caller)) | |
299 | 299 | then throw("only main can do") | |
300 | 300 | else { | |
301 | 301 | let lastKey = if (isActive) | |
302 | 302 | then lastActiveEventKey | |
303 | 303 | else lastFinishedEventKey | |
304 | 304 | let firstKey = if (isActive) | |
305 | 305 | then fisrtActiveEventKey | |
306 | 306 | else fisrtFinishedEventKey | |
307 | 307 | let firstEvent = valueOrElse(getString(this, firstKey), undefined) | |
308 | 308 | let lastEvent = valueOrElse(getString(this, lastKey), undefined) | |
309 | 309 | let newLastOrPrevKey = if ((lastEvent == undefined)) | |
310 | 310 | then lastKey | |
311 | 311 | else getPrevEventKey(firstEvent) | |
312 | 312 | [StringEntry(firstKey, eventId), StringEntry(newLastOrPrevKey, eventId), StringEntry(getNextEventKey(eventId), firstEvent)] | |
313 | 313 | } | |
314 | 314 | ||
315 | 315 | ||
316 | 316 | ||
317 | 317 | @Callable(i) | |
318 | 318 | func deleteFromList (eventId,isActive) = if ((this != i.caller)) | |
319 | 319 | then throw("only main can do") | |
320 | 320 | else { | |
321 | 321 | let lastKey = if (isActive) | |
322 | 322 | then lastActiveEventKey | |
323 | 323 | else lastFinishedEventKey | |
324 | 324 | let firstKey = if (isActive) | |
325 | 325 | then fisrtActiveEventKey | |
326 | 326 | else fisrtFinishedEventKey | |
327 | 327 | let firstEvent = valueOrElse(getString(this, firstKey), undefined) | |
328 | 328 | let lastEvent = valueOrElse(getString(this, lastKey), undefined) | |
329 | 329 | let prevEventTemp = valueOrElse(getString(this, getPrevEventKey(eventId)), undefined) | |
330 | 330 | let nextEventTemp = valueOrElse(getString(this, getNextEventKey(eventId)), undefined) | |
331 | 331 | let prevEvent = if ((eventId == firstEvent)) | |
332 | 332 | then undefined | |
333 | 333 | else prevEventTemp | |
334 | 334 | let nextEvent = if ((eventId == lastEvent)) | |
335 | 335 | then undefined | |
336 | 336 | else nextEventTemp | |
337 | 337 | if (if ((prevEvent == undefined)) | |
338 | 338 | then (nextEvent == undefined) | |
339 | 339 | else false) | |
340 | 340 | then [StringEntry(firstKey, undefined), StringEntry(lastKey, undefined)] | |
341 | 341 | else if (if ((prevEvent != undefined)) | |
342 | 342 | then (nextEvent != undefined) | |
343 | 343 | else false) | |
344 | 344 | then [StringEntry(getPrevEventKey(nextEvent), prevEvent), StringEntry(getNextEventKey(prevEvent), nextEvent)] | |
345 | 345 | else if ((prevEvent != undefined)) | |
346 | 346 | then [StringEntry(lastKey, prevEvent), StringEntry(getNextEventKey(prevEvent), undefined)] | |
347 | 347 | else [StringEntry(firstKey, nextEvent), StringEntry(getPrevEventKey(nextEvent), undefined)] | |
348 | 348 | } | |
349 | 349 | ||
350 | 350 | ||
351 | 351 | ||
352 | 352 | @Callable(i) | |
353 | 353 | func concatLists () = if (!(isAdmin(i.caller))) | |
354 | 354 | then throw("only admin can do") | |
355 | 355 | else { | |
356 | 356 | let firstActiveEvent = valueOrElse(getString(this, fisrtActiveEventKey), undefined) | |
357 | 357 | let lastActiveEvent = valueOrElse(getString(this, lastActiveEventKey), undefined) | |
358 | 358 | let firstFinishedEvent = valueOrElse(getString(this, fisrtFinishedEventKey), undefined) | |
359 | 359 | let lastFinishedEvent = valueOrElse(getString(this, lastFinishedEventKey), undefined) | |
360 | 360 | let firstEvent = if ((firstActiveEvent != undefined)) | |
361 | 361 | then firstActiveEvent | |
362 | 362 | else firstFinishedEvent | |
363 | 363 | let lastEvent = if ((lastFinishedEvent != undefined)) | |
364 | 364 | then lastFinishedEvent | |
365 | 365 | else lastActiveEvent | |
366 | 366 | if (if ((firstFinishedEvent != undefined)) | |
367 | 367 | then (lastActiveEvent != undefined) | |
368 | 368 | else false) | |
369 | 369 | then [StringEntry(firstEventKey, firstEvent), StringEntry(lastEventKey, lastEvent), StringEntry(getNextEventKey(lastActiveEvent), firstFinishedEvent), StringEntry(getPrevEventKey(firstFinishedEvent), lastActiveEvent)] | |
370 | 370 | else [StringEntry(firstEventKey, firstEvent), StringEntry(lastEventKey, lastEvent)] | |
371 | 371 | } | |
372 | 372 | ||
373 | 373 |
github/deemru/w8io/026f985 55.55 ms ◑