tx · 9EduTHtEjczMrDzN1FyDBGVk7JUNR3VVbw7xYQ7oA9hE 3NApQZND35BcskVdo5Ukk7gSyP1148wtktt: -0.01400000 Waves 2019.09.14 15:58 [675900] smart account 3NApQZND35BcskVdo5Ukk7gSyP1148wtktt > SELF 0.00000000 Waves
{ "type": 13, "id": "9EduTHtEjczMrDzN1FyDBGVk7JUNR3VVbw7xYQ7oA9hE", "fee": 1400000, "feeAssetId": null, "timestamp": 1568465920752, "version": 1, "sender": "3NApQZND35BcskVdo5Ukk7gSyP1148wtktt", "senderPublicKey": "Hf6mTifVmE4QjnGG5MrTpZxwegLPYVUkrUnGYGE1hrVh", "proofs": [ "zavSL2i418n783K4cwLW2KbqFM4tyt6S113YnLzfDfUmaSUef68EqeJ9KeWeniLK6cbeu5wEZEYuPNMkpLmStYA" ], "script": "base64:AAIDAAAAAAAAAAAAAAAXAAAAAAtiZXRBc3NldElkcwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAGc3BvcnRyAgAAACxBY1R6VGdXMVFiSks0UXU2aENzVUNManB4VXlEM2RvZnY4eHEyQ0FQYnpLSgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAADZGV4AgAAAAVXQVZFUwUAAAADbmlsAAAAAAZtYXhGZWUAAAAAAABMS0AAAAAABm1pbkJldAAAAAAAAExLQAAAAAAObWluQ3JlYXRlRXZlbnQAAAAAAAHJw4AAAAAAD21pbk1hdGNoTm9taW5hbAAAAAAAAExLQAAAAAAGbGV2ZWwxAAAAAAAAAAD6AAAAAAZsZXZlbDIAAAAAAAAAAJYAAAAABmxldmVsMwAAAAAAAAAAZAAAAAAIY2FzaEJhY2sAAAAAAAAAAfQAAAAACHRvdGFsUmVmAAAAAAAAAAAKAAAAAA1jaGFuZ2VBZGRyZXNzAgAAACMzTkF4c2JIeFM2M2F6ZEFpY1Z2TEdzeGpBUTlEc0s2TDROTAAAAAALbWluV2l0aGRyYXcAAAAAAAAPQkABAAAAE2dldENh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AAAAIAAAAHcmVmZXJlcgAAAARzYWx0AwkBAAAAASEAAAABCQEAAAAIY2hlY2tGZWUAAAABBQAAAAFpCQAAAgAAAAECAAAABWVycm9yAwkBAAAAAiE9AAAAAgkAAS8AAAACCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQAAAAAAAAAAAMCAAAAAzEyMwkAAAIAAAABAgAAABRwcm9vZiBvZiB3b3JrIGZhaWxlZAQAAAAFb3duZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwMJAQAAAAlpc0RlZmluZWQAAAABCQEAAAAKZ2V0UmVmZXJlcgAAAAEFAAAABW93bmVyCQAAAgAAAAECAAAAEkFscmVhZHkgcmVnaXN0ZXJlZAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAFb3duZXICAAAACF9yZWZlcmVyBQAAAAdyZWZlcmVyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAHcmVmZXJlcgIAAAAKX3JlZmVycmFsXwUAAAAFb3duZXIFAAAABW93bmVyBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCAUAAAABaQAAAANmZWUFAAAABHVuaXQFAAAAA25pbAAAAADziqbV", "chainId": 84, "height": 675900, "spentComplexity": 0 } View: original | compacted Prev: 74FDcwyMQsy9z1uTjxeuj75Z2rz83gELgrBL9LjZAJcu Next: FZU3x2ej42T7QXdfRqysebUgF2r5VGBVpLpPLzyXRUCv Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let minBet = 5000000 | |
9 | 9 | ||
10 | - | let minCreateEvent = | |
10 | + | let minCreateEvent = 30000000 | |
11 | 11 | ||
12 | 12 | let minMatchNominal = 5000000 | |
13 | 13 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let betAssetIds = [DataEntry("sportr", "AcTzTgW1QbJK4Qu6hCsUCLjpxUyD3dofv8xq2CAPbzKJ"), DataEntry("dex", "WAVES")] | |
5 | 5 | ||
6 | 6 | let maxFee = 5000000 | |
7 | 7 | ||
8 | 8 | let minBet = 5000000 | |
9 | 9 | ||
10 | - | let minCreateEvent = | |
10 | + | let minCreateEvent = 30000000 | |
11 | 11 | ||
12 | 12 | let minMatchNominal = 5000000 | |
13 | 13 | ||
14 | 14 | let level1 = 250 | |
15 | 15 | ||
16 | 16 | let level2 = 150 | |
17 | 17 | ||
18 | 18 | let level3 = 100 | |
19 | 19 | ||
20 | 20 | let cashBack = 500 | |
21 | 21 | ||
22 | 22 | let totalRef = 10 | |
23 | 23 | ||
24 | 24 | let changeAddress = "3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL" | |
25 | 25 | ||
26 | 26 | let minWithdraw = 1000000 | |
27 | 27 | ||
28 | 28 | func getCallerByDelegate (i,function) = { | |
29 | 29 | let caller = toBase58String(i.caller.bytes) | |
30 | 30 | let callerPrefix = ("delegate_" + caller) | |
31 | 31 | if ((getBoolean(this, ((callerPrefix + "_") + function)) == true)) | |
32 | 32 | then match getString(this, (callerPrefix + "_address")) { | |
33 | 33 | case s: String => | |
34 | 34 | s | |
35 | 35 | case _ => | |
36 | 36 | caller | |
37 | 37 | } | |
38 | 38 | else caller | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func checkFee (i) = if ((i.fee > maxFee)) | |
43 | 43 | then throw("unreasonable large fee") | |
44 | 44 | else if ((i.feeAssetId != unit)) | |
45 | 45 | then throw("fee must be in WAVES") | |
46 | 46 | else true | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func repayFee (i,ws,amount,recipient,betAssetId) = if (checkFee(i)) | |
50 | 50 | then if (if ((amount > 0)) | |
51 | 51 | then isDefined(recipient) | |
52 | 52 | else false) | |
53 | 53 | then ScriptResult(ws, TransferSet([ScriptTransfer(i.caller, i.fee, unit), ScriptTransfer(extract(recipient), amount, betAssetId)])) | |
54 | 54 | else ScriptResult(ws, TransferSet([ScriptTransfer(i.caller, i.fee, unit)])) | |
55 | 55 | else throw("error") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func checkOwner (i,betid) = (getString(this, (betid + "_owner")) == toBase58String(i.caller.bytes)) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getUnspent (betid) = (extract(getInteger(this, (betid + "_amount"))) - extract(getInteger(this, (betid + "_spent")))) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func isDefeated (betid) = { | |
65 | 65 | let defeatStatus = getInteger(this, (betid + "_defeat")) | |
66 | 66 | if ((defeatStatus == 1)) | |
67 | 67 | then true | |
68 | 68 | else (defeatStatus == 3) | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getReferer (user) = getString(this, (user + "_referer")) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func balanceIncrement (address,inc) = { | |
76 | 76 | let balanceKey = (address + "_balance") | |
77 | 77 | DataEntry(balanceKey, (inc + match getInteger(this, balanceKey) { | |
78 | 78 | case b: Int => | |
79 | 79 | b | |
80 | 80 | case _ => | |
81 | 81 | 0 | |
82 | 82 | })) | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func recordBalanceIncrement (address,owner,inc,level,txId,timestamp) = DataEntry(((("fund_" + address) + "_") + txId), ((((((owner + ":") + toString(inc)) + ":") + level) + ":") + timestamp)) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func getAssetByAdapter (adapter) = { | |
90 | 90 | let assetString = getStringValue(betAssetIds, adapter) | |
91 | 91 | if ((assetString == "WAVES")) | |
92 | 92 | then unit | |
93 | 93 | else fromBase58String(assetString) | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getAssetMnemonic (asset) = if ((asset == unit)) | |
98 | 98 | then "WAVES" | |
99 | 99 | else toBase58String(extract(asset)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | @Callable(i) | |
103 | 103 | func bet (event,subevent,side,odds,adapter) = { | |
104 | 104 | let marketKey = ("market_" + event) | |
105 | 105 | let betAssetId = getAssetByAdapter(adapter) | |
106 | 106 | let owner = toBase58String(i.caller.bytes) | |
107 | 107 | let payment = extract(i.payment) | |
108 | 108 | if ((payment.assetId != betAssetId)) | |
109 | 109 | then throw(((("bet must be in asset " + getAssetMnemonic(betAssetId)) + " for adapter ") + adapter)) | |
110 | 110 | else if ((minBet > payment.amount)) | |
111 | 111 | then throw(("minimum allowed bet is " + toString(minBet))) | |
112 | 112 | else if (if (if ((adapter == "dex")) | |
113 | 113 | then (minCreateEvent > payment.amount) | |
114 | 114 | else false) | |
115 | 115 | then (getBoolean(this, marketKey) == unit) | |
116 | 116 | else false) | |
117 | 117 | then throw(("min amount to create first bet is " + toString(minCreateEvent))) | |
118 | 118 | else if (if ((side != "for")) | |
119 | 119 | then (side != "against") | |
120 | 120 | else false) | |
121 | 121 | then throw("unexpected side") | |
122 | 122 | else { | |
123 | 123 | let betid = (((((("bet_" + event) + "_") + toBase58String(i.caller.bytes)) + "_") + take(toBase58String(i.transactionId), 15)) + "_") | |
124 | 124 | let sequenceKey = ((("seq_" + event) + "_") + subevent) | |
125 | 125 | let sequence = match getInteger(this, sequenceKey) { | |
126 | 126 | case prevS: Int => | |
127 | 127 | (prevS + 1) | |
128 | 128 | case _ => | |
129 | 129 | 1 | |
130 | 130 | } | |
131 | 131 | repayFee(i, WriteSet([DataEntry((betid + "owner"), owner), DataEntry((betid + "event"), event), DataEntry((betid + "subevent"), subevent), DataEntry((betid + "side"), side), DataEntry((betid + "odds"), odds), DataEntry((betid + "amount"), payment.amount), DataEntry((betid + "spent"), 0), DataEntry((betid + "adapter"), adapter), DataEntry((betid + "timestamp"), lastBlock.timestamp), DataEntry((betid + "sequence"), sequence), DataEntry(marketKey, true), DataEntry(sequenceKey, sequence)]), 0, unit, unit) | |
132 | 132 | } | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | ||
137 | 137 | @Callable(i) | |
138 | 138 | func cancel (betid) = if ((getString(this, (betid + "_owner")) != getCallerByDelegate(i, "autocancel"))) | |
139 | 139 | then throw("must be owner or its delegate to cancel") | |
140 | 140 | else { | |
141 | 141 | let adapter = getStringValue(this, (betid + "_adapter")) | |
142 | 142 | let amount = getIntegerValue(this, (betid + "_amount")) | |
143 | 143 | let spent = getIntegerValue(this, (betid + "_spent")) | |
144 | 144 | let cancelAmount = (amount - spent) | |
145 | 145 | repayFee(i, WriteSet([DataEntry((betid + "_spent"), amount), DataEntry((betid + "_cancel_amount"), cancelAmount), DataEntry((betid + "_cancel_tx"), toBase58String(i.transactionId))]), cancelAmount, i.caller, getAssetByAdapter(adapter)) | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | ||
150 | 150 | @Callable(i) | |
151 | 151 | func betMatch (betFor,betAgainst) = if ((getString(this, (betFor + "_event")) != getString(this, (betAgainst + "_event")))) | |
152 | 152 | then throw("event id must match") | |
153 | 153 | else if ((getString(this, (betFor + "_subevent")) != getString(this, (betAgainst + "_subevent")))) | |
154 | 154 | then throw("subevent id must match") | |
155 | 155 | else if ((getString(this, (betFor + "_side")) != "for")) | |
156 | 156 | then throw("invalid *for* bet") | |
157 | 157 | else if ((getString(this, (betAgainst + "_side")) != "against")) | |
158 | 158 | then throw("invalid *against* bet") | |
159 | 159 | else { | |
160 | 160 | let adapter = getStringValue(this, (betFor + "_adapter")) | |
161 | 161 | if ((adapter != getStringValue(this, (betAgainst + "_adapter")))) | |
162 | 162 | then throw("bets has different adapters") | |
163 | 163 | else { | |
164 | 164 | let betForOwner = getStringValue(this, (betFor + "_owner")) | |
165 | 165 | let betAgainstOwner = getStringValue(this, (betAgainst + "_owner")) | |
166 | 166 | let eventid = extract(getString(this, (betFor + "_event"))) | |
167 | 167 | let matchid = (((((((("match_" + eventid) + "_") + takeRight(betForOwner, 10)) + "_") + takeRight(betAgainstOwner, 10)) + "_") + toBase58String(i.transactionId)) + "_") | |
168 | 168 | let odds = extract(getInteger(this, (betFor + "_odds"))) | |
169 | 169 | let unspentFor = getUnspent(betFor) | |
170 | 170 | let unspentAgainst = getUnspent(betAgainst) | |
171 | 171 | let maxForNominal = unspentFor | |
172 | 172 | let maxAgainstNominal = ((unspentAgainst * 100) / (odds - 100)) | |
173 | 173 | let matchNominal = if ((maxForNominal > maxAgainstNominal)) | |
174 | 174 | then maxAgainstNominal | |
175 | 175 | else maxForNominal | |
176 | 176 | if ((minMatchNominal > matchNominal)) | |
177 | 177 | then throw("match nominal too low") | |
178 | 178 | else { | |
179 | 179 | let spendFor = matchNominal | |
180 | 180 | let spendAgainst = ((matchNominal * (odds - 100)) / 100) | |
181 | 181 | let newSpentFor = (spendFor + extract(getInteger(this, (betFor + "_spent")))) | |
182 | 182 | let newSpentAgainst = (spendAgainst + extract(getInteger(this, (betAgainst + "_spent")))) | |
183 | 183 | if ((newSpentFor > extract(getInteger(this, (betFor + "_amount"))))) | |
184 | 184 | then throw("invalid match") | |
185 | 185 | else if ((newSpentAgainst > extract(getInteger(this, (betAgainst + "_amount"))))) | |
186 | 186 | then throw("invalid match") | |
187 | 187 | else repayFee(i, WriteSet([DataEntry((matchid + "amount"), (spendFor + spendAgainst)), DataEntry((matchid + "adapter"), adapter), DataEntry((matchid + "for"), betFor), DataEntry((matchid + "against"), betAgainst), DataEntry((betFor + "_spent"), newSpentFor), DataEntry((betAgainst + "_spent"), newSpentAgainst)]), 0, unit, unit) | |
188 | 188 | } | |
189 | 189 | } | |
190 | 190 | } | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | ||
194 | 194 | @Callable(i) | |
195 | 195 | func approveDefeat (betId,defeat) = if (if (isDefined(getInteger(this, (betId + "_defeat")))) | |
196 | 196 | then (defeat == 2) | |
197 | 197 | else false) | |
198 | 198 | then throw("can't dispute after approve") | |
199 | 199 | else if ((getString(this, (betId + "_owner")) != getCallerByDelegate(i, "autoapprove"))) | |
200 | 200 | then throw("must be owner or its delegate to approve") | |
201 | 201 | else repayFee(i, WriteSet([DataEntry((betId + "_defeat"), defeat)]), 0, unit, unit) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | ||
205 | 205 | @Callable(i) | |
206 | 206 | func payWinner (matchId) = if (!(checkFee(i))) | |
207 | 207 | then throw("error") | |
208 | 208 | else if (isDefined(getInteger(this, (matchId + "_paid")))) | |
209 | 209 | then throw("already paid") | |
210 | 210 | else { | |
211 | 211 | let adapter = getStringValue(this, (matchId + "_adapter")) | |
212 | 212 | let betAssetId = getAssetByAdapter(adapter) | |
213 | 213 | let betForId = extract(getString(this, (matchId + "_for"))) | |
214 | 214 | let betAgainstId = extract(getString(this, (matchId + "_against"))) | |
215 | 215 | let betForDefeated = isDefeated(betForId) | |
216 | 216 | let betAgainstDefeated = isDefeated(betAgainstId) | |
217 | 217 | if (if (!(betForDefeated)) | |
218 | 218 | then !(betAgainstDefeated) | |
219 | 219 | else false) | |
220 | 220 | then throw("no side approved defeat") | |
221 | 221 | else { | |
222 | 222 | let winnerId = if (betForDefeated) | |
223 | 223 | then betAgainstId | |
224 | 224 | else betForId | |
225 | 225 | let winnerAddress = getStringValue(this, (winnerId + "_owner")) | |
226 | 226 | let amount = extract(getInteger(this, (matchId + "_amount"))) | |
227 | 227 | let txid = toBase58String(i.transactionId) | |
228 | 228 | let timestamp = toString(lastBlock.timestamp) | |
229 | 229 | let refAmount = ((amount * totalRef) / 1000) | |
230 | 230 | ScriptResult(WriteSet([DataEntry((matchId + "_paid"), toBase58String(i.transactionId)), match getReferer(winnerAddress) { | |
231 | 231 | case ref1: String => | |
232 | 232 | let incLevel1 = ((refAmount * level1) / 1000) | |
233 | 233 | let incCashBack = ((refAmount * cashBack) / 1000) | |
234 | 234 | [balanceIncrement(winnerAddress, incCashBack), recordBalanceIncrement(winnerAddress, winnerAddress, incCashBack, "cashback", txid, timestamp), balanceIncrement(ref1, incLevel1), recordBalanceIncrement(ref1, winnerAddress, incLevel1, "l1", txid, timestamp), match getReferer(ref1) { | |
235 | 235 | case ref2: String => | |
236 | 236 | let incLevel2 = ((refAmount * level2) / 1000) | |
237 | 237 | [balanceIncrement(ref2, incLevel2), recordBalanceIncrement(ref2, winnerAddress, incLevel2, "l2", txid, timestamp), match getReferer(ref2) { | |
238 | 238 | case ref3: String => | |
239 | 239 | let incLevel3 = ((refAmount * level3) / 1000) | |
240 | 240 | [balanceIncrement(ref3, incLevel3), recordBalanceIncrement(ref3, winnerAddress, incLevel3, "l3", txid, timestamp), balanceIncrement(changeAddress, (((refAmount - incLevel1) - incLevel2) - incLevel3)), recordBalanceIncrement(changeAddress, winnerAddress, (((refAmount - incLevel1) - incLevel2) - incLevel3), "change", txid, timestamp)] | |
241 | 241 | case _ => | |
242 | 242 | [balanceIncrement(changeAddress, ((refAmount - incLevel1) - incLevel2)), recordBalanceIncrement(changeAddress, winnerAddress, ((refAmount - incLevel1) - incLevel2), "change", txid, timestamp)] | |
243 | 243 | }] | |
244 | 244 | case _ => | |
245 | 245 | [balanceIncrement(changeAddress, (refAmount - incLevel1)), recordBalanceIncrement(changeAddress, winnerAddress, (refAmount - incLevel1), "change", txid, timestamp)] | |
246 | 246 | }] | |
247 | 247 | case _ => | |
248 | 248 | [balanceIncrement(changeAddress, refAmount), recordBalanceIncrement(changeAddress, winnerAddress, refAmount, "change", txid, timestamp)] | |
249 | 249 | }]), TransferSet([ScriptTransfer(i.caller, i.fee, unit), ScriptTransfer(addressFromStringValue(winnerAddress), (amount - refAmount), betAssetId)])) | |
250 | 250 | } | |
251 | 251 | } | |
252 | 252 | ||
253 | 253 | ||
254 | 254 | ||
255 | 255 | @Callable(i) | |
256 | 256 | func delegate (delegateTo,enableAutoApprove,enableAutoCancel) = repayFee(i, WriteSet([DataEntry((("delegate_" + delegateTo) + "_address"), toBase58String(i.caller.bytes)), DataEntry((("delegate_" + delegateTo) + "_autoapprove"), enableAutoApprove), DataEntry((("delegate_" + delegateTo) + "_autocancel"), enableAutoCancel)]), 0, unit, unit) | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | ||
260 | 260 | @Callable(i) | |
261 | 261 | func withdraw () = if (!(checkFee(i))) | |
262 | 262 | then throw("error") | |
263 | 263 | else { | |
264 | 264 | let owner = toBase58String(i.caller.bytes) | |
265 | 265 | let txid = toBase58String(i.transactionId) | |
266 | 266 | let balanceKey = (owner + "_balance") | |
267 | 267 | let amount = match getInteger(this, balanceKey) { | |
268 | 268 | case b: Int => | |
269 | 269 | b | |
270 | 270 | case _ => | |
271 | 271 | 0 | |
272 | 272 | } | |
273 | 273 | if ((minWithdraw > amount)) | |
274 | 274 | then throw(("Min withdraw amount is" + toString(minWithdraw))) | |
275 | 275 | else ScriptResult(WriteSet([DataEntry(balanceKey, 0), DataEntry(((("withdraw_" + owner) + "_") + txid), ((toString(amount) + ":") + toString(lastBlock.timestamp)))]), TransferSet([ScriptTransfer(i.caller, (amount + i.fee), unit)])) | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | ||
280 | 280 | @Callable(i) | |
281 | 281 | func register (referer,salt) = if (!(checkFee(i))) | |
282 | 282 | then throw("error") | |
283 | 283 | else if ((take(toBase58String(i.transactionId), 3) != "123")) | |
284 | 284 | then throw("proof of work failed") | |
285 | 285 | else { | |
286 | 286 | let owner = toBase58String(i.caller.bytes) | |
287 | 287 | if (isDefined(getReferer(owner))) | |
288 | 288 | then throw("Already registered") | |
289 | 289 | else ScriptResult(WriteSet([DataEntry((owner + "_referer"), referer), DataEntry(((referer + "_referral_") + owner), owner)]), TransferSet([ScriptTransfer(i.caller, i.fee, unit)])) | |
290 | 290 | } | |
291 | 291 | ||
292 | 292 |
github/deemru/w8io/169f3d6 64.51 ms ◑