tx · DxuVsDH6QDqA6gQ6KZk8Wb8mT3fkZhksscK9YHbp1JNk 3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ: -0.01000000 Waves 2022.06.29 18:19 [2117896] smart account 3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ > SELF 0.00000000 Waves
{ "type": 13, "id": "DxuVsDH6QDqA6gQ6KZk8Wb8mT3fkZhksscK9YHbp1JNk", "fee": 1000000, "feeAssetId": null, "timestamp": 1656516012088, "version": 2, "chainId": 84, "sender": "3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ", "senderPublicKey": "BhRnrwd6wVHSkSaWXCjQRjaoXcpCdUW2hkJD6V7uVDxN", "proofs": [ "5bykQTCk4ypMj2iotyVjSFRvKQ9tTckhZBmVGcEEKguKwcScs1A4XWFzpZTnbiDujaRSFC48Gx8gXbBmcCjKWnxV" ], "script": "base64:AAIFAAAAAAAAAEwIAhIAEgQKAggBEgQKAggBEgMKAQESBQoDCAgBEgQKAggBEgQKAggBEgASBAoCCAESAwoBCBIECgIIARIECgIIARIECgIIARIDCgEBAAAAHAAAAAAKc2hpbnl3Z2dpZAEAAAAgiWnPAv+2urnUcZbXebiZdiawdNB3efRzbobw9HOfBiYAAAAAD3RyZWFzdXJ5QWRkcmVzcwEAAAAaAVRl+PAWCwTAWUJwGp5IjJf/ftwcYvLdu/0AAAAADWFzc2V0c0FkZHJlc3MBAAAAGgFUy+a0wXfXHSctaxYQS8qRSOspiwoalaeaAAAAABJtYXJrZXRwbGFjZUFkZHJlc3MBAAAAGgFUHSG5k/H8GMOnG0lxFkOWUXTrrFQuJbzvAAAAABRjb25maWd1cmF0aW9uQWRkcmVzcwEAAAAaAVTbIMuXkVY/Qg5sp2U1gothv7V0cji00C4AAAAADm5hdGlvbnNBZGRyZXNzAQAAABoBVE2F6N70+ERrWRA7cF/Dt7llDlH1REZtoAAAAAALYWRtaW5XYWxsZXQJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQA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3YXJkc1dhbGxldAkAAGkAAAACCQAAaAAAAAIFAAAADmFzc2V0QnVpbGRDb3N0AAAAAAAAAABBAAAAAAAAAABkCQAFFAAAAAIJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAALYWRtaW5XYWxsZXQFAAAADVRvQWRtaW5XYWxsZXQFAAAACnNoaW55d2dnaWQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAWZGFpbHlHYW1lUmV3YXJkc1dhbGxldAUAAAATVG9HYW1lUmV3YXJkc1dhbGxldAUAAAAKc2hpbnl3Z2dpZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABlkYWlseVN0YWtpbmdSZXdhcmRzV2FsbGV0BQAAABZUb1N0YWtpbmdSZXdhcmRzV2FsbGV0BQAAAApzaGlueXdnZ2lkBQAAAANuaWwFAAAADmFzc2V0QnVpbGRDb3N0AAAAALrsX2M=", "height": 2117896, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H36j4z1WCLEZafwLLMLhDXRkzUSRgiw9ktpJjUGe8ZBt Next: DZVd4ggu1TiyRX38qv6o3wgMm1tvWGSqQFSFgzQZeyom Diff:
Old | New | Differences | |
---|---|---|---|
248 | 248 | ||
249 | 249 | ||
250 | 250 | @Callable(i) | |
251 | - | func addRewards (addr) = if (!(checkAdmin(i.caller))) | |
252 | - | then throw("you are not authorized to perform this operation") | |
253 | - | else { | |
254 | - | let $l = addr | |
255 | - | let $s = size($l) | |
256 | - | let $acc0 = nil | |
257 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
258 | - | then $a | |
259 | - | else insertRedeem($a, $l[$i]) | |
251 | + | func addRewards (addr) = { | |
252 | + | let chunks = split(addr, "#") | |
253 | + | if (!(checkAdmin(i.caller))) | |
254 | + | then throw("you are not authorized to perform this operation") | |
255 | + | else { | |
256 | + | let $l = chunks | |
257 | + | let $s = size($l) | |
258 | + | let $acc0 = nil | |
259 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
260 | + | then $a | |
261 | + | else insertRedeem($a, $l[$i]) | |
260 | 262 | ||
261 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
262 | - | then $a | |
263 | - | else throw("List size exceeds 30") | |
263 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
264 | + | then $a | |
265 | + | else throw("List size exceeds 30") | |
264 | 266 | ||
265 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
266 | - | } | |
267 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
268 | + | } | |
269 | + | } | |
267 | 270 | ||
268 | 271 | ||
269 | 272 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let shinywggid = base58'AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf' | |
5 | 5 | ||
6 | 6 | let treasuryAddress = base58'3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ' | |
7 | 7 | ||
8 | 8 | let assetsAddress = base58'3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb' | |
9 | 9 | ||
10 | 10 | let marketplaceAddress = base58'3Mra7mjPipcQd5sJaRmXK8xgS4scb8gPF4A' | |
11 | 11 | ||
12 | 12 | let configurationAddress = base58'3N9tj3b2djcaZozn97VkYchL9S1i6cdEbC1' | |
13 | 13 | ||
14 | 14 | let nationsAddress = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy' | |
15 | 15 | ||
16 | 16 | let adminWallet = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
17 | 17 | ||
18 | 18 | let dailyGameRewardsWallet = addressFromStringValue("3MuSrXTTiwo9bdoD6FeaBpMUYMiU5saDv2U") | |
19 | 19 | ||
20 | 20 | let dailyStakingRewardsWallet = addressFromStringValue("3Mv3mr3uNXdpgkVPApbGEJjMQXqau37DY5i") | |
21 | 21 | ||
22 | 22 | func checkAdmin (caller) = if (if (if (if (if ((caller == adminWallet)) | |
23 | 23 | then true | |
24 | 24 | else (caller == this)) | |
25 | 25 | then true | |
26 | 26 | else (caller.bytes == assetsAddress)) | |
27 | 27 | then true | |
28 | 28 | else (caller.bytes == treasuryAddress)) | |
29 | 29 | then true | |
30 | 30 | else (caller.bytes == marketplaceAddress)) | |
31 | 31 | then true | |
32 | 32 | else (caller.bytes == nationsAddress) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func tryGetInteger (key) = match getInteger(this, key) { | |
36 | 36 | case b: Int => | |
37 | 37 | b | |
38 | 38 | case _ => | |
39 | 39 | 0 | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
44 | 44 | case b: Boolean => | |
45 | 45 | b | |
46 | 46 | case _ => | |
47 | 47 | false | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func tryGetString (key) = match getString(this, key) { | |
52 | 52 | case b: String => | |
53 | 53 | b | |
54 | 54 | case _ => | |
55 | 55 | "" | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getALKey (Name,Level) = ((Name + "_lvl") + toString(Level)) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func confTryGetInteger (key) = match getInteger(Address(configurationAddress), key) { | |
63 | 63 | case b: Int => | |
64 | 64 | b | |
65 | 65 | case _ => | |
66 | 66 | 0 | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func confTryGetString (key) = match getString(Address(configurationAddress), key) { | |
71 | 71 | case b: String => | |
72 | 72 | b | |
73 | 73 | case _ => | |
74 | 74 | "" | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func confTryGetBoolean (key) = match getBoolean(Address(configurationAddress), key) { | |
79 | 79 | case b: Boolean => | |
80 | 80 | b | |
81 | 81 | case _ => | |
82 | 82 | false | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getTreasuryKey (nationid) = (nationid + "_Treasury") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func treasuryTryGetInteger (key) = match getInteger(Address(treasuryAddress), key) { | |
90 | 90 | case b: Int => | |
91 | 91 | b | |
92 | 92 | case _ => | |
93 | 93 | 0 | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func nationsTryGetInteger (key) = match getInteger(Address(nationsAddress), key) { | |
98 | 98 | case b: Int => | |
99 | 99 | b | |
100 | 100 | case _ => | |
101 | 101 | 0 | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func nationsTryGetBoolean (key) = match getBoolean(Address(nationsAddress), key) { | |
106 | 106 | case b: Boolean => | |
107 | 107 | b | |
108 | 108 | case _ => | |
109 | 109 | false | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func nationsTryGetString (key) = match getString(Address(nationsAddress), key) { | |
114 | 114 | case b: String => | |
115 | 115 | b | |
116 | 116 | case _ => | |
117 | 117 | "" | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func getAssetOwnerKeyString (assetId) = (assetId + "_Owner") | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func internalDeposit (addressStr,amountIn) = { | |
125 | 125 | let amount = tryGetInteger((addressStr + "_Deposit")) | |
126 | 126 | [IntegerEntry((addressStr + "_Deposit"), (amount + amountIn))] | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func internalPay (addressStr,amount) = { | |
131 | 131 | let deposited = tryGetInteger((addressStr + "_Deposit")) | |
132 | 132 | if ((0 > (deposited - amount))) | |
133 | 133 | then throw("Not enough deposit.") | |
134 | 134 | else if (((deposited - amount) == 0)) | |
135 | 135 | then [DeleteEntry((addressStr + "_Deposit"))] | |
136 | 136 | else [IntegerEntry((addressStr + "_Deposit"), (deposited - amount))] | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func internalReserve (addressStr,amount) = { | |
141 | 141 | let reservedAmount = tryGetInteger((addressStr + "_Reserved")) | |
142 | 142 | IntegerEntry((addressStr + "_Reserved"), (reservedAmount + amount)) | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func internalTransfer (fromAddress,toAddress,amount) = (internalPay(fromAddress, amount) ++ internalDeposit(toAddress, amount)) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func insertRedeem (accum,nextValue) = { | |
150 | 150 | let val = split(nextValue, "_") | |
151 | 151 | let addr = val[0] | |
152 | 152 | let amnt = val[1] | |
153 | 153 | (accum :+ internalReserve(addr, parseIntValue(amnt))) | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | @Callable(i) | |
158 | 158 | func Deposit () = { | |
159 | 159 | let addressStr = toString(i.originCaller) | |
160 | 160 | let pmt = i.payments[0] | |
161 | 161 | if ((pmt == pmt)) | |
162 | 162 | then { | |
163 | 163 | let amountIn = value(i.payments[0].amount) | |
164 | 164 | if ((amountIn == amountIn)) | |
165 | 165 | then { | |
166 | 166 | let assetIn = pmt.assetId | |
167 | 167 | if ((assetIn == assetIn)) | |
168 | 168 | then if ((assetIn != shinywggid)) | |
169 | 169 | then throw("Only $HEG payments allowed") | |
170 | 170 | else { | |
171 | 171 | let amount = tryGetInteger((addressStr + "_Deposit")) | |
172 | 172 | $Tuple2(internalDeposit(addressStr, (amount + amountIn)), (amount + amountIn)) | |
173 | 173 | } | |
174 | 174 | else throw("Strict value is not equal to itself.") | |
175 | 175 | } | |
176 | 176 | else throw("Strict value is not equal to itself.") | |
177 | 177 | } | |
178 | 178 | else throw("Strict value is not equal to itself.") | |
179 | 179 | } | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | ||
183 | 183 | @Callable(i) | |
184 | 184 | func NoPaymentDeposit (addressStr,amountIn) = if (!(checkAdmin(i.caller))) | |
185 | 185 | then throw("") | |
186 | 186 | else { | |
187 | 187 | let amount = tryGetInteger((addressStr + "_Deposit")) | |
188 | 188 | $Tuple2(internalDeposit(addressStr, (amount + amountIn)), (amount + amountIn)) | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | ||
193 | 193 | @Callable(i) | |
194 | 194 | func Pay (addressStr,amount) = if (!(checkAdmin(i.caller))) | |
195 | 195 | then throw("you are not authorized to perform this operation") | |
196 | 196 | else $Tuple2(internalPay(addressStr, amount), amount) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | ||
200 | 200 | @Callable(i) | |
201 | 201 | func CallerPay (amount) = { | |
202 | 202 | let callerAddr = toString(i.caller) | |
203 | 203 | internalPay(callerAddr, amount) | |
204 | 204 | } | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | ||
208 | 208 | @Callable(i) | |
209 | 209 | func transferCoins (fromAddress,toAddress,amount) = if (if ((i.caller != adminWallet)) | |
210 | 210 | then (i.caller.bytes != assetsAddress) | |
211 | 211 | else false) | |
212 | 212 | then throw("you are not authorized to perform this operation") | |
213 | 213 | else $Tuple2(internalTransfer(fromAddress, toAddress, amount), amount) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | ||
217 | 217 | @Callable(i) | |
218 | 218 | func callerTransferCoins (toAddress,amount) = internalTransfer(toString(i.caller), toAddress, amount) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(i) | |
223 | 223 | func arbitraryAddCoins (toAddress,amount) = if (!(checkAdmin(i.caller))) | |
224 | 224 | then throw("you are not authorized to perform this operation") | |
225 | 225 | else $Tuple2(internalDeposit(toAddress, amount), amount) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | ||
229 | 229 | @Callable(i) | |
230 | 230 | func Redeem () = { | |
231 | 231 | let addressStr = toString(i.caller) | |
232 | 232 | let reservedAmount = tryGetInteger((addressStr + "_Reserved")) | |
233 | 233 | if ((reservedAmount == 0)) | |
234 | 234 | then throw("Nothing to redeem") | |
235 | 235 | else [DeleteEntry((addressStr + "_Reserved")), ScriptTransfer(i.caller, reservedAmount, shinywggid)] | |
236 | 236 | } | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | ||
240 | 240 | @Callable(i) | |
241 | 241 | func addReward (addressStr,amount) = if (!(checkAdmin(i.caller))) | |
242 | 242 | then throw("you are not authorized to perform this operation") | |
243 | 243 | else { | |
244 | 244 | let reservedAmount = tryGetInteger((addressStr + "_Reserved")) | |
245 | 245 | $Tuple2([IntegerEntry((addressStr + "_Reserved"), (reservedAmount + amount))], (reservedAmount + amount)) | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | ||
250 | 250 | @Callable(i) | |
251 | - | func addRewards (addr) = if (!(checkAdmin(i.caller))) | |
252 | - | then throw("you are not authorized to perform this operation") | |
253 | - | else { | |
254 | - | let $l = addr | |
255 | - | let $s = size($l) | |
256 | - | let $acc0 = nil | |
257 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
258 | - | then $a | |
259 | - | else insertRedeem($a, $l[$i]) | |
251 | + | func addRewards (addr) = { | |
252 | + | let chunks = split(addr, "#") | |
253 | + | if (!(checkAdmin(i.caller))) | |
254 | + | then throw("you are not authorized to perform this operation") | |
255 | + | else { | |
256 | + | let $l = chunks | |
257 | + | let $s = size($l) | |
258 | + | let $acc0 = nil | |
259 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
260 | + | then $a | |
261 | + | else insertRedeem($a, $l[$i]) | |
260 | 262 | ||
261 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
262 | - | then $a | |
263 | - | else throw("List size exceeds 30") | |
263 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
264 | + | then $a | |
265 | + | else throw("List size exceeds 30") | |
264 | 266 | ||
265 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
266 | - | } | |
267 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
268 | + | } | |
269 | + | } | |
267 | 270 | ||
268 | 271 | ||
269 | 272 | ||
270 | 273 | @Callable(i) | |
271 | 274 | func increaseNationWallet (NationKey,amount) = if (!(checkAdmin(i.caller))) | |
272 | 275 | then throw("you are not authorized to perform this operation") | |
273 | 276 | else { | |
274 | 277 | let key = getTreasuryKey(NationKey) | |
275 | 278 | let reservedAmount = tryGetInteger(key) | |
276 | 279 | $Tuple2([IntegerEntry(key, (reservedAmount + amount))], (reservedAmount + amount)) | |
277 | 280 | } | |
278 | 281 | ||
279 | 282 | ||
280 | 283 | ||
281 | 284 | @Callable(i) | |
282 | 285 | func decreaseNationWallet (NationKey,amount) = if (!(checkAdmin(i.caller))) | |
283 | 286 | then throw("you are not authorized to perform this operation") | |
284 | 287 | else { | |
285 | 288 | let key = getTreasuryKey(NationKey) | |
286 | 289 | let reservedAmount = tryGetInteger(key) | |
287 | 290 | $Tuple2([IntegerEntry(key, (reservedAmount - amount))], amount) | |
288 | 291 | } | |
289 | 292 | ||
290 | 293 | ||
291 | 294 | ||
292 | 295 | @Callable(i) | |
293 | 296 | func adminTransfer (toaddr,amount) = if (!(checkAdmin(i.caller))) | |
294 | 297 | then throw("you are not authorized to perform this operation") | |
295 | 298 | else $Tuple2([ScriptTransfer(addressFromStringValue(toaddr), amount, shinywggid)], amount) | |
296 | 299 | ||
297 | 300 | ||
298 | 301 | ||
299 | 302 | @Callable(i) | |
300 | 303 | func distributeNationPayRewards (assetBuildCost) = if (!(checkAdmin(i.caller))) | |
301 | 304 | then throw("you are not authorized to perform this operation") | |
302 | 305 | else { | |
303 | 306 | let ToAdminWallet = ((assetBuildCost * 5) / 100) | |
304 | 307 | let ToGameRewardsWallet = ((assetBuildCost * 10) / 100) | |
305 | 308 | let ToStakingRewardsWallet = ((assetBuildCost * 65) / 100) | |
306 | 309 | $Tuple2([ScriptTransfer(adminWallet, ToAdminWallet, shinywggid), ScriptTransfer(dailyGameRewardsWallet, ToGameRewardsWallet, shinywggid), ScriptTransfer(dailyStakingRewardsWallet, ToStakingRewardsWallet, shinywggid)], assetBuildCost) | |
307 | 310 | } | |
308 | 311 | ||
309 | 312 |
github/deemru/w8io/026f985 48.05 ms ◑