tx · EV5YW1beov4z2RbLv43sHGzkXaLY4NP94ukUEubTz7Np 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh: -0.01000000 Waves 2023.04.19 10:58 [2541177] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves
{ "type": 13, "id": "EV5YW1beov4z2RbLv43sHGzkXaLY4NP94ukUEubTz7Np", "fee": 1000000, "feeAssetId": null, "timestamp": 1681891116394, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "3uGFL35wv6UeqXXTQNUF9ZCie5D2unowtywep2EAnMLS3xXLbkRvKLkaaqT6zqXgracFppo4HSopLVykjAyXboKC" ], "script": "base64:BgIZCAISABIDCgEIEgASABIDCgEIEgMKAQgSACMAA1NFUAICX18AEGNvbnRyYWN0RmlsZW5hbWUCEm1hbmFnZXJfdmF1bHQucmlkZQEIdGhyb3dFcnIBAXMJAAIBCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBGWtleUFjdGl2ZU1hbmFnZXJQdWJsaWNLZXkACQC5CQIJAMwIAgICJXMJAMwIAgIQbWFuYWdlclB1YmxpY0tleQUDbmlsBQNTRVABGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAkAuQkCCQDMCAICAiVzCQDMCAICF3BlbmRpbmdNYW5hZ2VyUHVibGljS2V5BQNuaWwFA1NFUAEaa2V5Q3VycmVudE1hbmFnZXJQdWJsaWNLZXkACQC5CQIJAMwIAgICJXMJAMwIAgIXY3VycmVudE1hbmFnZXJQdWJsaWNLZXkFA25pbAUDU0VQARprZXlTZXROZXdNYW5hZ2VyVm90ZVByZWZpeAEQbWFuYWdlclB1YmxpY0tleQkAuQkCCQDMCAICBiVzJXMlcwkAzAgCAgpzZXRNYW5hZ2VyCQDMCAIFEG1hb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0cmluZ0VudHJ5AgkBGWtleUFjdGl2ZU1hbmFnZXJQdWJsaWNLZXkABRRwZW5kaW5nTWFuYWdlclN0cmluZwUDbmlsCQEMdm90ZUlOVEVSTkFMBQUTY2FsbGVyQWRkcmVzc1N0cmluZwUQYWRtaW5DdXJyZW50Vm90ZQUJa2V5UHJlZml4BQhtaW5Wb3RlcwUGcmVzdWx0AEg9Fpw=", "height": 2541177, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 14mZMMtP6knjarfWVxSygk3Pb7U1kuhq9VVFQxMx1ibh Next: 2QF3YFjKo3NFapttqniLW3RFvHWQ5bNs2co4kzeT9cEk Diff:
Old | New | Differences | |
---|---|---|---|
12 | 12 | ||
13 | 13 | ||
14 | 14 | func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP) | |
15 | + | ||
16 | + | ||
17 | + | func keyCurrentManagerPublicKey () = makeString(["%s", "currentManagerPublicKey"], SEP) | |
15 | 18 | ||
16 | 19 | ||
17 | 20 | func keySetNewManagerVotePrefix (managerPublicKey) = makeString(["%s%s%s", "setManager", managerPublicKey], SEP) | |
59 | 62 | func getRemoveAdminVote (removeCandidate,admin) = valueOrElse(getInteger(keyRemoveAdminVote(removeCandidate, admin)), 0) | |
60 | 63 | ||
61 | 64 | ||
65 | + | func keyUnlockVerifierVotePrefix () = makeString(["%s%s", "activateManager"], SEP) | |
66 | + | ||
67 | + | ||
68 | + | func keyUnlockVerifierVote (admin) = makeString([keyUnlockVerifierVotePrefix(), admin], SEP) | |
69 | + | ||
70 | + | ||
71 | + | func getUnlockVerifierVote (admin) = valueOrElse(getInteger(keyUnlockVerifierVote(admin)), 0) | |
72 | + | ||
73 | + | ||
62 | 74 | func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP) | |
63 | 75 | ||
64 | 76 | ||
84 | 96 | ||
85 | 97 | ||
86 | 98 | func genVotesKeysHelper (a,adminAddress) = { | |
87 | - | let $ | |
88 | - | let result = $ | |
89 | - | let prefix = $ | |
99 | + | let $t033583382 = a | |
100 | + | let result = $t033583382._1 | |
101 | + | let prefix = $t033583382._2 | |
90 | 102 | $Tuple2((result :+ makeString([prefix, adminAddress], SEP)), prefix) | |
91 | 103 | } | |
92 | 104 | ||
178 | 190 | then true | |
179 | 191 | else throwErr("you are not pending manager") | |
180 | 192 | if ((checkPM == checkPM)) | |
181 | - | then [StringEntry( | |
193 | + | then [StringEntry(keyCurrentManagerPublicKey(), toBase58String(value(pm)))] | |
182 | 194 | else throw("Strict value is not equal to itself.") | |
183 | 195 | } | |
184 | 196 | else throw("Strict value is not equal to itself.") | |
204 | 216 | let keyPrefix = keyDeactivateManagerVotePrefix() | |
205 | 217 | let adminCurrentVote = getDeactivateManagerVote(callerAddressString) | |
206 | 218 | let minVotes = 1 | |
207 | - | let result = [ | |
219 | + | let result = [StringEntry(keyActiveManagerPublicKey(), "disabled")] | |
208 | 220 | voteINTERNAL(callerAddressString, adminCurrentVote, keyPrefix, minVotes, result) | |
209 | 221 | } | |
210 | 222 | ||
216 | 228 | let keyPrefix = keyActivateManagerVotePrefix() | |
217 | 229 | let adminCurrentVote = getActivateManagerVote(callerAddressString) | |
218 | 230 | let minVotes = 2 | |
219 | - | let | |
220 | - | let result = [StringEntry(keyActiveManagerPublicKey(), | |
231 | + | let currentManagerString = getStringValue(keyCurrentManagerPublicKey()) | |
232 | + | let result = [StringEntry(keyActiveManagerPublicKey(), currentManagerString)] | |
221 | 233 | voteINTERNAL(callerAddressString, adminCurrentVote, keyPrefix, minVotes, result) | |
222 | 234 | } | |
223 | 235 | ||
260 | 272 | } | |
261 | 273 | ||
262 | 274 | ||
275 | + | ||
276 | + | @Callable(i) | |
277 | + | func unlockVarifier () = { | |
278 | + | let callerAddressString = toBase58String(i.caller.bytes) | |
279 | + | let keyPrefix = keyActivateManagerVotePrefix() | |
280 | + | let adminCurrentVote = getActivateManagerVote(callerAddressString) | |
281 | + | let minVotes = 2 | |
282 | + | let pendingManagerString = getStringValue(keyPendingManagerPublicKey()) | |
283 | + | let result = [StringEntry(keyActiveManagerPublicKey(), pendingManagerString)] | |
284 | + | voteINTERNAL(callerAddressString, adminCurrentVote, keyPrefix, minVotes, result) | |
285 | + | } | |
286 | + | ||
287 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let contractFilename = "manager_vault.ride" | |
7 | 7 | ||
8 | 8 | func throwErr (s) = throw(((contractFilename + ": ") + s)) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func keyActiveManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP) | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP) | |
15 | + | ||
16 | + | ||
17 | + | func keyCurrentManagerPublicKey () = makeString(["%s", "currentManagerPublicKey"], SEP) | |
15 | 18 | ||
16 | 19 | ||
17 | 20 | func keySetNewManagerVotePrefix (managerPublicKey) = makeString(["%s%s%s", "setManager", managerPublicKey], SEP) | |
18 | 21 | ||
19 | 22 | ||
20 | 23 | func keySetNewManagerVote (managerPublicKey,admin) = makeString([keySetNewManagerVotePrefix(managerPublicKey), admin], SEP) | |
21 | 24 | ||
22 | 25 | ||
23 | 26 | func getSetNewManagerVote (managerPublicKey,admin) = valueOrElse(getInteger(keySetNewManagerVote(managerPublicKey, admin)), 0) | |
24 | 27 | ||
25 | 28 | ||
26 | 29 | func keyDeactivateManagerVotePrefix () = makeString(["%s%s", "deactivateManager"], SEP) | |
27 | 30 | ||
28 | 31 | ||
29 | 32 | func keyDeactivateManagerVote (admin) = makeString([keyDeactivateManagerVotePrefix(), admin], SEP) | |
30 | 33 | ||
31 | 34 | ||
32 | 35 | func getDeactivateManagerVote (admin) = valueOrElse(getInteger(keyDeactivateManagerVote(admin)), 0) | |
33 | 36 | ||
34 | 37 | ||
35 | 38 | func keyActivateManagerVotePrefix () = makeString(["%s%s", "activateManager"], SEP) | |
36 | 39 | ||
37 | 40 | ||
38 | 41 | func keyActivateManagerVote (admin) = makeString([keyActivateManagerVotePrefix(), admin], SEP) | |
39 | 42 | ||
40 | 43 | ||
41 | 44 | func getActivateManagerVote (admin) = valueOrElse(getInteger(keyActivateManagerVote(admin)), 0) | |
42 | 45 | ||
43 | 46 | ||
44 | 47 | func keyAddNewAdminVotePrefix (adminCandidate) = makeString(["%s%s%s", "addAdmin", adminCandidate], SEP) | |
45 | 48 | ||
46 | 49 | ||
47 | 50 | func keyAddNewAdminVote (adminCandidate,admin) = makeString([keyAddNewAdminVotePrefix(adminCandidate), admin], SEP) | |
48 | 51 | ||
49 | 52 | ||
50 | 53 | func getAddNewAdminVote (adminCandidate,admin) = valueOrElse(getInteger(keyAddNewAdminVote(adminCandidate, admin)), 0) | |
51 | 54 | ||
52 | 55 | ||
53 | 56 | func keyRemoveAdminVotePrefix (removeCandidate) = makeString(["%s%s%s", "removeAdmin", removeCandidate], SEP) | |
54 | 57 | ||
55 | 58 | ||
56 | 59 | func keyRemoveAdminVote (removeCandidate,admin) = makeString([keyRemoveAdminVotePrefix(removeCandidate), admin], SEP) | |
57 | 60 | ||
58 | 61 | ||
59 | 62 | func getRemoveAdminVote (removeCandidate,admin) = valueOrElse(getInteger(keyRemoveAdminVote(removeCandidate, admin)), 0) | |
60 | 63 | ||
61 | 64 | ||
65 | + | func keyUnlockVerifierVotePrefix () = makeString(["%s%s", "activateManager"], SEP) | |
66 | + | ||
67 | + | ||
68 | + | func keyUnlockVerifierVote (admin) = makeString([keyUnlockVerifierVotePrefix(), admin], SEP) | |
69 | + | ||
70 | + | ||
71 | + | func getUnlockVerifierVote (admin) = valueOrElse(getInteger(keyUnlockVerifierVote(admin)), 0) | |
72 | + | ||
73 | + | ||
62 | 74 | func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP) | |
63 | 75 | ||
64 | 76 | ||
65 | 77 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
66 | 78 | case s: String => | |
67 | 79 | fromBase58String(s) | |
68 | 80 | case _: Unit => | |
69 | 81 | unit | |
70 | 82 | case _ => | |
71 | 83 | throw("Match error") | |
72 | 84 | } | |
73 | 85 | ||
74 | 86 | ||
75 | 87 | func getAdminsList () = split(valueOrElse(getString(this, keyAdminAddressList()), ""), SEP) | |
76 | 88 | ||
77 | 89 | ||
78 | 90 | func isInAdminList (address) = match indexOf(getAdminsList(), address) { | |
79 | 91 | case t: Int => | |
80 | 92 | true | |
81 | 93 | case _ => | |
82 | 94 | false | |
83 | 95 | } | |
84 | 96 | ||
85 | 97 | ||
86 | 98 | func genVotesKeysHelper (a,adminAddress) = { | |
87 | - | let $ | |
88 | - | let result = $ | |
89 | - | let prefix = $ | |
99 | + | let $t033583382 = a | |
100 | + | let result = $t033583382._1 | |
101 | + | let prefix = $t033583382._2 | |
90 | 102 | $Tuple2((result :+ makeString([prefix, adminAddress], SEP)), prefix) | |
91 | 103 | } | |
92 | 104 | ||
93 | 105 | ||
94 | 106 | func genVotesKeys (keyPrefix) = { | |
95 | 107 | let adminList = keyAdminAddressList() | |
96 | 108 | let $l = getAdminsList() | |
97 | 109 | let $s = size($l) | |
98 | 110 | let $acc0 = $Tuple2(nil, keyPrefix) | |
99 | 111 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
100 | 112 | then $a | |
101 | 113 | else genVotesKeysHelper($a, $l[$i]) | |
102 | 114 | ||
103 | 115 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
104 | 116 | then $a | |
105 | 117 | else throw("List size exceeds 10") | |
106 | 118 | ||
107 | 119 | $f0_2($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) | |
108 | 120 | } | |
109 | 121 | ||
110 | 122 | ||
111 | 123 | func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0)) | |
112 | 124 | ||
113 | 125 | ||
114 | 126 | func countVotes (prefix) = { | |
115 | 127 | let votes = genVotesKeys(prefix)._1 | |
116 | 128 | let $l = votes | |
117 | 129 | let $s = size($l) | |
118 | 130 | let $acc0 = 0 | |
119 | 131 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
120 | 132 | then $a | |
121 | 133 | else countVotesHelper($a, $l[$i]) | |
122 | 134 | ||
123 | 135 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
124 | 136 | then $a | |
125 | 137 | else throw("List size exceeds 10") | |
126 | 138 | ||
127 | 139 | $f0_2($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) | |
128 | 140 | } | |
129 | 141 | ||
130 | 142 | ||
131 | 143 | func clearVotesHelper (result,key) = (result :+ DeleteEntry(key)) | |
132 | 144 | ||
133 | 145 | ||
134 | 146 | func getClearVotesEntries (prefix) = { | |
135 | 147 | let votes = genVotesKeys(prefix)._1 | |
136 | 148 | let $l = votes | |
137 | 149 | let $s = size($l) | |
138 | 150 | let $acc0 = nil | |
139 | 151 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
140 | 152 | then $a | |
141 | 153 | else clearVotesHelper($a, $l[$i]) | |
142 | 154 | ||
143 | 155 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
144 | 156 | then $a | |
145 | 157 | else throw("List size exceeds 10") | |
146 | 158 | ||
147 | 159 | $f0_2($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) | |
148 | 160 | } | |
149 | 161 | ||
150 | 162 | ||
151 | 163 | func voteINTERNAL (callerAddressString,adminCurrentVote,keyPrefix,minVotes,voteResult) = { | |
152 | 164 | let voteKey = makeString([keyPrefix, callerAddressString], SEP) | |
153 | 165 | if (isInAdminList(callerAddressString)) | |
154 | 166 | then if ((adminCurrentVote == 1)) | |
155 | 167 | then throwErr((voteKey + " you already voted")) | |
156 | 168 | else { | |
157 | 169 | let votes = countVotes(keyPrefix) | |
158 | 170 | if (((votes + 1) >= minVotes)) | |
159 | 171 | then { | |
160 | 172 | let clearVotesEntries = getClearVotesEntries(keyPrefix) | |
161 | 173 | (clearVotesEntries ++ voteResult) | |
162 | 174 | } | |
163 | 175 | else [IntegerEntry(voteKey, 1)] | |
164 | 176 | } | |
165 | 177 | else throwErr((("Address: " + callerAddressString) + " not in Admin list")) | |
166 | 178 | } | |
167 | 179 | ||
168 | 180 | ||
169 | 181 | @Callable(i) | |
170 | 182 | func confirmManager () = { | |
171 | 183 | let pm = pendingManagerPublicKeyOrUnit() | |
172 | 184 | let hasPM = if (isDefined(pm)) | |
173 | 185 | then true | |
174 | 186 | else throwErr("no pending manager") | |
175 | 187 | if ((hasPM == hasPM)) | |
176 | 188 | then { | |
177 | 189 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
178 | 190 | then true | |
179 | 191 | else throwErr("you are not pending manager") | |
180 | 192 | if ((checkPM == checkPM)) | |
181 | - | then [StringEntry( | |
193 | + | then [StringEntry(keyCurrentManagerPublicKey(), toBase58String(value(pm)))] | |
182 | 194 | else throw("Strict value is not equal to itself.") | |
183 | 195 | } | |
184 | 196 | else throw("Strict value is not equal to itself.") | |
185 | 197 | } | |
186 | 198 | ||
187 | 199 | ||
188 | 200 | ||
189 | 201 | @Callable(i) | |
190 | 202 | func voteForNewManger (newManagerPublicKey) = { | |
191 | 203 | let callerAddressString = toBase58String(i.caller.bytes) | |
192 | 204 | let keyPrefix = keySetNewManagerVotePrefix(newManagerPublicKey) | |
193 | 205 | let adminCurrentVote = getSetNewManagerVote(newManagerPublicKey, callerAddressString) | |
194 | 206 | let minVotes = 2 | |
195 | 207 | let result = [StringEntry(keyPendingManagerPublicKey(), newManagerPublicKey)] | |
196 | 208 | voteINTERNAL(callerAddressString, adminCurrentVote, keyPrefix, minVotes, result) | |
197 | 209 | } | |
198 | 210 | ||
199 | 211 | ||
200 | 212 | ||
201 | 213 | @Callable(i) | |
202 | 214 | func deactivateManager () = { | |
203 | 215 | let callerAddressString = toBase58String(i.caller.bytes) | |
204 | 216 | let keyPrefix = keyDeactivateManagerVotePrefix() | |
205 | 217 | let adminCurrentVote = getDeactivateManagerVote(callerAddressString) | |
206 | 218 | let minVotes = 1 | |
207 | - | let result = [ | |
219 | + | let result = [StringEntry(keyActiveManagerPublicKey(), "disabled")] | |
208 | 220 | voteINTERNAL(callerAddressString, adminCurrentVote, keyPrefix, minVotes, result) | |
209 | 221 | } | |
210 | 222 | ||
211 | 223 | ||
212 | 224 | ||
213 | 225 | @Callable(i) | |
214 | 226 | func activateManager () = { | |
215 | 227 | let callerAddressString = toBase58String(i.caller.bytes) | |
216 | 228 | let keyPrefix = keyActivateManagerVotePrefix() | |
217 | 229 | let adminCurrentVote = getActivateManagerVote(callerAddressString) | |
218 | 230 | let minVotes = 2 | |
219 | - | let | |
220 | - | let result = [StringEntry(keyActiveManagerPublicKey(), | |
231 | + | let currentManagerString = getStringValue(keyCurrentManagerPublicKey()) | |
232 | + | let result = [StringEntry(keyActiveManagerPublicKey(), currentManagerString)] | |
221 | 233 | voteINTERNAL(callerAddressString, adminCurrentVote, keyPrefix, minVotes, result) | |
222 | 234 | } | |
223 | 235 | ||
224 | 236 | ||
225 | 237 | ||
226 | 238 | @Callable(i) | |
227 | 239 | func addNewAdmin (newAdminAddress) = { | |
228 | 240 | let callerAddressString = toBase58String(i.caller.bytes) | |
229 | 241 | let keyPrefix = keyAddNewAdminVotePrefix(newAdminAddress) | |
230 | 242 | let adminCurrentVote = getAddNewAdminVote(newAdminAddress, callerAddressString) | |
231 | 243 | let minVotes = 2 | |
232 | 244 | let currentAdminList = getAdminsList() | |
233 | 245 | match indexOf(currentAdminList, newAdminAddress) { | |
234 | 246 | case a: Int => | |
235 | 247 | throwErr((newAdminAddress + " already in Admin List")) | |
236 | 248 | case _ => | |
237 | 249 | let newAdminList = (currentAdminList :+ newAdminAddress) | |
238 | 250 | let result = [StringEntry(keyAdminAddressList(), makeString(newAdminList, SEP))] | |
239 | 251 | voteINTERNAL(callerAddressString, adminCurrentVote, keyPrefix, minVotes, result) | |
240 | 252 | } | |
241 | 253 | } | |
242 | 254 | ||
243 | 255 | ||
244 | 256 | ||
245 | 257 | @Callable(i) | |
246 | 258 | func removeAdmin (removeCandidate) = { | |
247 | 259 | let callerAddressString = toBase58String(i.caller.bytes) | |
248 | 260 | let keyPrefix = keyRemoveAdminVotePrefix(removeCandidate) | |
249 | 261 | let adminCurrentVote = getRemoveAdminVote(removeCandidate, callerAddressString) | |
250 | 262 | let minVotes = 2 | |
251 | 263 | let currentAdminList = getAdminsList() | |
252 | 264 | match indexOf(currentAdminList, removeCandidate) { | |
253 | 265 | case index: Int => | |
254 | 266 | let newAdminList = removeByIndex(currentAdminList, index) | |
255 | 267 | let result = [StringEntry(keyAdminAddressList(), makeString(newAdminList, SEP))] | |
256 | 268 | voteINTERNAL(callerAddressString, adminCurrentVote, keyPrefix, minVotes, result) | |
257 | 269 | case _ => | |
258 | 270 | throwErr((removeCandidate + " not found in Admin List")) | |
259 | 271 | } | |
260 | 272 | } | |
261 | 273 | ||
262 | 274 | ||
275 | + | ||
276 | + | @Callable(i) | |
277 | + | func unlockVarifier () = { | |
278 | + | let callerAddressString = toBase58String(i.caller.bytes) | |
279 | + | let keyPrefix = keyActivateManagerVotePrefix() | |
280 | + | let adminCurrentVote = getActivateManagerVote(callerAddressString) | |
281 | + | let minVotes = 2 | |
282 | + | let pendingManagerString = getStringValue(keyPendingManagerPublicKey()) | |
283 | + | let result = [StringEntry(keyActiveManagerPublicKey(), pendingManagerString)] | |
284 | + | voteINTERNAL(callerAddressString, adminCurrentVote, keyPrefix, minVotes, result) | |
285 | + | } | |
286 | + | ||
287 | + |
github/deemru/w8io/026f985 39.12 ms ◑