tx · 5sdHd8R5uGP8sGMX1wXq19bgGrzWsUFN34z4bQnN13GC

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01400000 Waves

2022.05.12 15:23 [2048451] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "5sdHd8R5uGP8sGMX1wXq19bgGrzWsUFN34z4bQnN13GC", "fee": 1400000, "feeAssetId": null, "timestamp": 1652358274537, "version": 1, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "4jEDYDWu1CqaHBeJME5eXSDhz8roNxwNRGUmtUd4WeSXLqj7Pdd7bbdG2THCyKv77sByUxr1nDn8ojUiQmAkpoq8" ], "script": "base64:AAIFAAAAAAAAAGUIAhIECgIIGBIFCgMICAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIFCgMICAQSBAoCCAgSBAoCCAQSAwoBCBIDCgEYEgUKAwgICBIDCgEIEgASAwoBCAAAACgAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADnN0YXR1c1ZlcmlmaWVkAAAAAAAAAAACAAAAABBzdGF0dXNVbnZlcmlmaWVkAAAAAAAAAAAAAAAAABZsYWJlbENvbW11bml0eVZlcmlmaWVkAgAAABJDT01NVU5JVFlfVkVSSUZJRUQAAAAADGxhYmVsUG9vbHNMcAIAAAAIUE9PTFNfTFAAAAAADWRlZmF1bHRMYWJlbHMJAARMAAAAAgUAAAAWbGFiZWxDb21tdW5pdHlWZXJpZmllZAkABEwAAAACBQAAAAxsYWJlbFBvb2xzTHAFAAAAA25pbAAAAAATcG9vbExhYmVsV3hFbWlzc2lvbgIAAAALV1hfRU1JU1NJT04AAAAAD3ZhbGlkUG9vbExhYmVscwkABEwAAAACBQAAABNwb29sTGFiZWxXeEVtaXNzaW9uBQ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AAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXkfocZl", "chainId": 84, "height": 2048451, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7APSBV9a9UhkRmaJaWf8hoSerauUG4NZQML86EhxMMEs Next: 99wmeESAQgAqHa6i5dsxt5mEaXye1sK7nHhdzUgNC3Pc Diff:
OldNewDifferences
7070 func keyLabels () = makeString(["%s", "labels"], SEP)
7171
7272
73-func keyPoolLabels (amountAssetId,priceAssetId) = makeString(["%s%s%s", amountAssetId, priceAssetId], SEP)
73+func keyPoolLabels (amountAssetId,priceAssetId) = makeString(["%s%s%s", "poolLabels", amountAssetId, priceAssetId], SEP)
7474
7575
7676 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let EMPTY = ""
77
88 let statusVerified = 2
99
1010 let statusUnverified = 0
1111
1212 let labelCommunityVerified = "COMMUNITY_VERIFIED"
1313
1414 let labelPoolsLp = "POOLS_LP"
1515
1616 let defaultLabels = [labelCommunityVerified, labelPoolsLp]
1717
1818 let poolLabelWxEmission = "WX_EMISSION"
1919
2020 let validPoolLabels = [poolLabelWxEmission]
2121
2222 func throwPD () = throw("Permission denied")
2323
2424
2525 func throwNoAsset () = throw("Asset doesn't exists")
2626
2727
2828 func keyManagerPublicKey () = "%s__managerPublicKey"
2929
3030
3131 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
3232
3333
3434 func keyAdminPubKeys () = "%s__adminPubKeys"
3535
3636
3737 func keyUserPoolsContract () = "%s__userPoolsContract"
3838
3939
4040 func keyCreated (assetId) = (("created_<" + assetId) + ">")
4141
4242
4343 func keyLogo (assetId) = (("logo_<" + assetId) + ">")
4444
4545
4646 func keyTicker (assetId) = (("ticker_<" + assetId) + ">")
4747
4848
4949 func keyStatus (assetId) = (("status_<" + assetId) + ">")
5050
5151
5252 func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP)
5353
5454
5555 func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP)
5656
5757
5858 func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP)
5959
6060
6161 func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP)
6262
6363
6464 func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP)
6565
6666
6767 func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP)
6868
6969
7070 func keyLabels () = makeString(["%s", "labels"], SEP)
7171
7272
73-func keyPoolLabels (amountAssetId,priceAssetId) = makeString(["%s%s%s", amountAssetId, priceAssetId], SEP)
73+func keyPoolLabels (amountAssetId,priceAssetId) = makeString(["%s%s%s", "poolLabels", amountAssetId, priceAssetId], SEP)
7474
7575
7676 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
7777
7878
7979 func getLabels () = match getString(keyLabels()) {
8080 case s: String =>
8181 if ((size(s) == 0))
8282 then nil
8383 else split(s, SEP)
8484 case _ =>
8585 nil
8686 }
8787
8888
8989 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
9090 case s: String =>
9191 if ((size(s) == 0))
9292 then nil
9393 else split(s, SEP)
9494 case _ =>
9595 nil
9696 }
9797
9898
9999 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
100100 case s: String =>
101101 fromBase58String(s)
102102 case _: Unit =>
103103 unit
104104 case _ =>
105105 throw("Match error")
106106 }
107107
108108
109109 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
110110 case s: String =>
111111 fromBase58String(s)
112112 case _: Unit =>
113113 unit
114114 case _ =>
115115 throw("Match error")
116116 }
117117
118118
119119 func mustManager (i) = match managerPublicKeyOrUnit() {
120120 case pk: ByteVector =>
121121 if ((i.callerPublicKey == pk))
122122 then true
123123 else throwPD()
124124 case _: Unit =>
125125 if ((i.caller == this))
126126 then true
127127 else throwPD()
128128 case _ =>
129129 throw("Match error")
130130 }
131131
132132
133133 func mustAdmin (i) = {
134134 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
135135 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
136136 then true
137137 else {
138138 let isManager = mustManager(i)
139139 if ((isManager == isManager))
140140 then true
141141 else throw("Strict value is not equal to itself.")
142142 }
143143 }
144144
145145
146146 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
147147
148148
149149 func verifiedToStatus (verified) = if (verified)
150150 then statusVerified
151151 else statusUnverified
152152
153153
154154 func addLabelActions (assetId,label,throwOnError) = {
155155 let labels = getLabels()
156156 let assetLabels = getAssetLabels(assetId)
157157 let checkLabel = if (containsElement(labels, label))
158158 then true
159159 else throw("Label doesn't exist")
160160 if ((checkLabel == checkLabel))
161161 then {
162162 let newAssetLabels = if (containsElement(assetLabels, label))
163163 then if (throwOnError)
164164 then throw("Label has already been added")
165165 else assetLabels
166166 else (assetLabels :+ label)
167167 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
168168 }
169169 else throw("Strict value is not equal to itself.")
170170 }
171171
172172
173173 func deleteLabelActions (assetId,label,throwOnError) = {
174174 let assetLabels = getAssetLabels(assetId)
175175 let newAssetLabels = if (containsElement(assetLabels, label))
176176 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
177177 else if (throwOnError)
178178 then throw("Label wasn't added")
179179 else assetLabels
180180 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
181181 }
182182
183183
184184 func setVerifiedActions (assetId,verified) = {
185185 let labelCommunityVerifiedActions = if (verified)
186186 then addLabelActions(assetId, labelCommunityVerified, false)
187187 else deleteLabelActions(assetId, labelCommunityVerified, false)
188188 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
189189 }
190190
191191
192192 func updateTickerActions (assetId,ticker) = {
193193 let checkTicker = {
194194 let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
195195 let tickerIsValid = if ((ticker != ""))
196196 then if ((linkedAssetIdOrUnit == unit))
197197 then true
198198 else (value(linkedAssetIdOrUnit) == assetId)
199199 else false
200200 if (tickerIsValid)
201201 then true
202202 else throw("Invalid ticker")
203203 }
204204 if ((checkTicker == checkTicker))
205205 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
206206 else throw("Strict value is not equal to itself.")
207207 }
208208
209209
210210 @Callable(i)
211211 func constructor (userPoolsContract,labels) = {
212212 let checkCaller = mustManager(i)
213213 if ((checkCaller == checkCaller))
214214 then {
215215 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
216216 if ((checksAddress == checksAddress))
217217 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
218218 else throw("Strict value is not equal to itself.")
219219 }
220220 else throw("Strict value is not equal to itself.")
221221 }
222222
223223
224224
225225 @Callable(i)
226226 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
227227 let checkCaller = mustAdmin(i)
228228 if ((checkCaller == checkCaller))
229229 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
230230 else throw("Strict value is not equal to itself.")
231231 }
232232
233233
234234
235235 @Callable(i)
236236 func increaseAssetPoolsNumber (assetId) = {
237237 let checkCaller = mustAdmin(i)
238238 if ((checkCaller == checkCaller))
239239 then {
240240 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
241241 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
242242 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
243243 }
244244 else throw("Strict value is not equal to itself.")
245245 }
246246
247247
248248
249249 @Callable(i)
250250 func createLabel (label) = {
251251 let labels = getLabels()
252252 let checkCaller = mustManager(i)
253253 if ((checkCaller == checkCaller))
254254 then {
255255 let checkLabel = [if (!(contains(label, SEP)))
256256 then true
257257 else throw("Invalid label name"), if (!(containsElement(labels, label)))
258258 then true
259259 else throw("Label exists")]
260260 if ((checkLabel == checkLabel))
261261 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
262262 else throw("Strict value is not equal to itself.")
263263 }
264264 else throw("Strict value is not equal to itself.")
265265 }
266266
267267
268268
269269 @Callable(i)
270270 func dropLabel (label) = {
271271 let labels = getLabels()
272272 let checkCaller = mustManager(i)
273273 if ((checkCaller == checkCaller))
274274 then {
275275 let checkLabel = if (containsElement(labels, label))
276276 then true
277277 else throw("Label doesn't exist")
278278 if ((checkLabel == checkLabel))
279279 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
280280 else throw("Strict value is not equal to itself.")
281281 }
282282 else throw("Strict value is not equal to itself.")
283283 }
284284
285285
286286
287287 @Callable(i)
288288 func addLabel (assetId,label) = {
289289 let checkCaller = mustAdmin(i)
290290 if ((checkCaller == checkCaller))
291291 then addLabelActions(assetId, label, true)
292292 else throw("Strict value is not equal to itself.")
293293 }
294294
295295
296296
297297 @Callable(i)
298298 func deleteLabel (assetId,label) = {
299299 let checkCaller = mustAdmin(i)
300300 if ((checkCaller == checkCaller))
301301 then deleteLabelActions(assetId, label, true)
302302 else throw("Strict value is not equal to itself.")
303303 }
304304
305305
306306
307307 @Callable(i)
308308 func updateTicker (assetId,ticker) = {
309309 let checkCaller = mustAdmin(i)
310310 if ((checkCaller == checkCaller))
311311 then {
312312 let checkAsset = if (isCreated(assetId))
313313 then true
314314 else throwNoAsset()
315315 if ((checkAsset == checkAsset))
316316 then updateTickerActions(assetId, ticker)
317317 else throw("Strict value is not equal to itself.")
318318 }
319319 else throw("Strict value is not equal to itself.")
320320 }
321321
322322
323323
324324 @Callable(i)
325325 func deleteTicker (assetId) = {
326326 let checkCaller = mustAdmin(i)
327327 if ((checkCaller == checkCaller))
328328 then {
329329 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
330330 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
331331 }
332332 else throw("Strict value is not equal to itself.")
333333 }
334334
335335
336336
337337 @Callable(i)
338338 func createOrUpdate (assetId,logo,verified) = {
339339 let checkCaller = mustAdmin(i)
340340 if ((checkCaller == checkCaller))
341341 then {
342342 let isCreatedNow = !(isCreated(assetId))
343343 if ((isCreatedNow == isCreatedNow))
344344 then {
345345 let setLogoActions = if ((logo == ""))
346346 then nil
347347 else [StringEntry(keyLogo(assetId), logo)]
348348 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
349349 }
350350 else throw("Strict value is not equal to itself.")
351351 }
352352 else throw("Strict value is not equal to itself.")
353353 }
354354
355355
356356
357357 @Callable(i)
358358 func setLogo (assetId,logo) = {
359359 let checks = [mustAdmin(i), if (isCreated(assetId))
360360 then true
361361 else throwNoAsset()]
362362 if ((checks == checks))
363363 then [StringEntry(keyLogo(assetId), logo)]
364364 else throw("Strict value is not equal to itself.")
365365 }
366366
367367
368368
369369 @Callable(i)
370370 func setVerified (assetId,verified) = {
371371 let checks = [mustAdmin(i), if (isCreated(assetId))
372372 then true
373373 else throwNoAsset()]
374374 if ((checks == checks))
375375 then $Tuple2(setVerifiedActions(assetId, verified), unit)
376376 else throw("Strict value is not equal to itself.")
377377 }
378378
379379
380380
381381 @Callable(i)
382382 func onEliminate (assetId) = {
383383 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
384384 let actions = if ((poolsNumber > 0))
385385 then nil
386386 else [DeleteEntry(keyLogo(assetId))]
387387 $Tuple2(actions, unit)
388388 }
389389
390390
391391
392392 @Callable(i)
393393 func setAdmins (adminPubKeys) = {
394394 let checkCaller = mustManager(i)
395395 if ((checkCaller == checkCaller))
396396 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
397397 else throw("Strict value is not equal to itself.")
398398 }
399399
400400
401401
402402 @Callable(i)
403403 func setPoolLabels (amountAssetId,priceAssetId,label) = {
404404 let checkCaller = mustAdmin(i)
405405 if ((checkCaller == checkCaller))
406406 then {
407407 let isValidLabel = if (containsElement(validPoolLabels, label))
408408 then true
409409 else throw("label is not valid")
410410 if ((isValidLabel == isValidLabel))
411411 then $Tuple2([StringEntry(keyPoolLabels(amountAssetId, priceAssetId), label)], unit)
412412 else throw("Strict value is not equal to itself.")
413413 }
414414 else throw("Strict value is not equal to itself.")
415415 }
416416
417417
418418
419419 @Callable(i)
420420 func setManager (pendingManagerPublicKey) = {
421421 let checkCaller = mustManager(i)
422422 if ((checkCaller == checkCaller))
423423 then {
424424 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
425425 if ((checkManagerPublicKey == checkManagerPublicKey))
426426 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
427427 else throw("Strict value is not equal to itself.")
428428 }
429429 else throw("Strict value is not equal to itself.")
430430 }
431431
432432
433433
434434 @Callable(i)
435435 func confirmManager () = {
436436 let pm = pendingManagerPublicKeyOrUnit()
437437 let hasPM = if (isDefined(pm))
438438 then true
439439 else throw("No pending manager")
440440 if ((hasPM == hasPM))
441441 then {
442442 let checkPM = if ((i.callerPublicKey == value(pm)))
443443 then true
444444 else throw("You are not pending manager")
445445 if ((checkPM == checkPM))
446446 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
447447 else throw("Strict value is not equal to itself.")
448448 }
449449 else throw("Strict value is not equal to itself.")
450450 }
451451
452452
453453
454454 @Callable(i)
455455 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
456456
457457
458458 @Verifier(tx)
459459 func verify () = {
460460 let targetPublicKey = match managerPublicKeyOrUnit() {
461461 case pk: ByteVector =>
462462 pk
463463 case _: Unit =>
464464 tx.senderPublicKey
465465 case _ =>
466466 throw("Match error")
467467 }
468468 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
469469 }
470470

github/deemru/w8io/026f985 
50.82 ms