tx · 7APSBV9a9UhkRmaJaWf8hoSerauUG4NZQML86EhxMMEs

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01400000 Waves

2022.05.06 11:34 [2039592] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "7APSBV9a9UhkRmaJaWf8hoSerauUG4NZQML86EhxMMEs", "fee": 1400000, "feeAssetId": null, "timestamp": 1651826068988, "version": 1, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "5awr1NZbggprmB52J9QmoJQQ3kmUdMX5ywgyCwwg5Uq5JbMmavbKEboDNusZpJX2g2kvK6fZPAgghEdmECebm1d8" ], "script": "base64:AAIFAAAAAAAAAGUIAhIECgIIGBIFCgMICAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIFCgMICAQSBAoCCAgSBAoCCAQSAwoBCBIDCgEYEgUKAwgICBIDCgEIEgASAwoBCAAAACgAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADnN0YXR1c1ZlcmlmaWVkAAAAAAAAAAACAAAAABBzdGF0dXNVbnZlcmlmaWVkAAAAAAAAAAAAAAAAABZsYWJlbENvbW11bml0eVZlcmlmaWVkAgAAABJDT01NVU5JVFlfVkVSSUZJRUQAAAAADGxhYmVsUG9vbHNMcAIAAAAIUE9PTFNfTFAAAAAADWRlZmF1bHRMYWJlbHMJAARMAAAAAgUAAAAWbGFiZWxDb21tdW5pdHlWZXJpZmllZAkABEwAAAACBQAAAAxsYWJlbFBvb2xzTHAFAAAAA25pbAAAAAATcG9vbExhYmVsV3hFbWlzc2lvbgIAAAALV1hfRU1JU1NJT04AAAAAD3ZhbGlkUG9vbExhYmVscwkABEwAAAACBQAAABNwb29sTGFiZWxXeEVtaXNzaW9uBQAAAANuaWw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VyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V52jhyYQ==", "chainId": 84, "height": 2039592, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HTwov71MDQVWWb5yG5ppVGDynw23CFJ3VtAyZhHMfPhs Next: 5sdHd8R5uGP8sGMX1wXq19bgGrzWsUFN34z4bQnN13GC Diff:
OldNewDifferences
1414 let labelPoolsLp = "POOLS_LP"
1515
1616 let defaultLabels = [labelCommunityVerified, labelPoolsLp]
17+
18+let poolLabelWxEmission = "WX_EMISSION"
19+
20+let validPoolLabels = [poolLabelWxEmission]
1721
1822 func throwPD () = throw("Permission denied")
1923
6468
6569
6670 func keyLabels () = makeString(["%s", "labels"], SEP)
71+
72+
73+func keyPoolLabels (amountAssetId,priceAssetId) = makeString(["%s%s%s", amountAssetId, priceAssetId], SEP)
6774
6875
6976 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
393400
394401
395402 @Callable(i)
403+func setPoolLabels (amountAssetId,priceAssetId,label) = {
404+ let checkCaller = mustAdmin(i)
405+ if ((checkCaller == checkCaller))
406+ then {
407+ let isValidLabel = if (containsElement(validPoolLabels, label))
408+ then true
409+ else throw("label is not valid")
410+ if ((isValidLabel == isValidLabel))
411+ then $Tuple2([StringEntry(keyPoolLabels(amountAssetId, priceAssetId), label)], unit)
412+ else throw("Strict value is not equal to itself.")
413+ }
414+ else throw("Strict value is not equal to itself.")
415+ }
416+
417+
418+
419+@Callable(i)
396420 func setManager (pendingManagerPublicKey) = {
397421 let checkCaller = mustManager(i)
398422 if ((checkCaller == checkCaller))
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]
17+
18+let poolLabelWxEmission = "WX_EMISSION"
19+
20+let validPoolLabels = [poolLabelWxEmission]
1721
1822 func throwPD () = throw("Permission denied")
1923
2024
2125 func throwNoAsset () = throw("Asset doesn't exists")
2226
2327
2428 func keyManagerPublicKey () = "%s__managerPublicKey"
2529
2630
2731 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
2832
2933
3034 func keyAdminPubKeys () = "%s__adminPubKeys"
3135
3236
3337 func keyUserPoolsContract () = "%s__userPoolsContract"
3438
3539
3640 func keyCreated (assetId) = (("created_<" + assetId) + ">")
3741
3842
3943 func keyLogo (assetId) = (("logo_<" + assetId) + ">")
4044
4145
4246 func keyTicker (assetId) = (("ticker_<" + assetId) + ">")
4347
4448
4549 func keyStatus (assetId) = (("status_<" + assetId) + ">")
4650
4751
4852 func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP)
4953
5054
5155 func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP)
5256
5357
5458 func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP)
5559
5660
5761 func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP)
5862
5963
6064 func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP)
6165
6266
6367 func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP)
6468
6569
6670 func keyLabels () = makeString(["%s", "labels"], SEP)
71+
72+
73+func keyPoolLabels (amountAssetId,priceAssetId) = makeString(["%s%s%s", amountAssetId, priceAssetId], SEP)
6774
6875
6976 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
7077
7178
7279 func getLabels () = match getString(keyLabels()) {
7380 case s: String =>
7481 if ((size(s) == 0))
7582 then nil
7683 else split(s, SEP)
7784 case _ =>
7885 nil
7986 }
8087
8188
8289 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
8390 case s: String =>
8491 if ((size(s) == 0))
8592 then nil
8693 else split(s, SEP)
8794 case _ =>
8895 nil
8996 }
9097
9198
9299 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
93100 case s: String =>
94101 fromBase58String(s)
95102 case _: Unit =>
96103 unit
97104 case _ =>
98105 throw("Match error")
99106 }
100107
101108
102109 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
103110 case s: String =>
104111 fromBase58String(s)
105112 case _: Unit =>
106113 unit
107114 case _ =>
108115 throw("Match error")
109116 }
110117
111118
112119 func mustManager (i) = match managerPublicKeyOrUnit() {
113120 case pk: ByteVector =>
114121 if ((i.callerPublicKey == pk))
115122 then true
116123 else throwPD()
117124 case _: Unit =>
118125 if ((i.caller == this))
119126 then true
120127 else throwPD()
121128 case _ =>
122129 throw("Match error")
123130 }
124131
125132
126133 func mustAdmin (i) = {
127134 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
128135 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
129136 then true
130137 else {
131138 let isManager = mustManager(i)
132139 if ((isManager == isManager))
133140 then true
134141 else throw("Strict value is not equal to itself.")
135142 }
136143 }
137144
138145
139146 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
140147
141148
142149 func verifiedToStatus (verified) = if (verified)
143150 then statusVerified
144151 else statusUnverified
145152
146153
147154 func addLabelActions (assetId,label,throwOnError) = {
148155 let labels = getLabels()
149156 let assetLabels = getAssetLabels(assetId)
150157 let checkLabel = if (containsElement(labels, label))
151158 then true
152159 else throw("Label doesn't exist")
153160 if ((checkLabel == checkLabel))
154161 then {
155162 let newAssetLabels = if (containsElement(assetLabels, label))
156163 then if (throwOnError)
157164 then throw("Label has already been added")
158165 else assetLabels
159166 else (assetLabels :+ label)
160167 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
161168 }
162169 else throw("Strict value is not equal to itself.")
163170 }
164171
165172
166173 func deleteLabelActions (assetId,label,throwOnError) = {
167174 let assetLabels = getAssetLabels(assetId)
168175 let newAssetLabels = if (containsElement(assetLabels, label))
169176 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
170177 else if (throwOnError)
171178 then throw("Label wasn't added")
172179 else assetLabels
173180 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
174181 }
175182
176183
177184 func setVerifiedActions (assetId,verified) = {
178185 let labelCommunityVerifiedActions = if (verified)
179186 then addLabelActions(assetId, labelCommunityVerified, false)
180187 else deleteLabelActions(assetId, labelCommunityVerified, false)
181188 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
182189 }
183190
184191
185192 func updateTickerActions (assetId,ticker) = {
186193 let checkTicker = {
187194 let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
188195 let tickerIsValid = if ((ticker != ""))
189196 then if ((linkedAssetIdOrUnit == unit))
190197 then true
191198 else (value(linkedAssetIdOrUnit) == assetId)
192199 else false
193200 if (tickerIsValid)
194201 then true
195202 else throw("Invalid ticker")
196203 }
197204 if ((checkTicker == checkTicker))
198205 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
199206 else throw("Strict value is not equal to itself.")
200207 }
201208
202209
203210 @Callable(i)
204211 func constructor (userPoolsContract,labels) = {
205212 let checkCaller = mustManager(i)
206213 if ((checkCaller == checkCaller))
207214 then {
208215 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
209216 if ((checksAddress == checksAddress))
210217 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
211218 else throw("Strict value is not equal to itself.")
212219 }
213220 else throw("Strict value is not equal to itself.")
214221 }
215222
216223
217224
218225 @Callable(i)
219226 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
220227 let checkCaller = mustAdmin(i)
221228 if ((checkCaller == checkCaller))
222229 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
223230 else throw("Strict value is not equal to itself.")
224231 }
225232
226233
227234
228235 @Callable(i)
229236 func increaseAssetPoolsNumber (assetId) = {
230237 let checkCaller = mustAdmin(i)
231238 if ((checkCaller == checkCaller))
232239 then {
233240 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
234241 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
235242 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
236243 }
237244 else throw("Strict value is not equal to itself.")
238245 }
239246
240247
241248
242249 @Callable(i)
243250 func createLabel (label) = {
244251 let labels = getLabels()
245252 let checkCaller = mustManager(i)
246253 if ((checkCaller == checkCaller))
247254 then {
248255 let checkLabel = [if (!(contains(label, SEP)))
249256 then true
250257 else throw("Invalid label name"), if (!(containsElement(labels, label)))
251258 then true
252259 else throw("Label exists")]
253260 if ((checkLabel == checkLabel))
254261 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
255262 else throw("Strict value is not equal to itself.")
256263 }
257264 else throw("Strict value is not equal to itself.")
258265 }
259266
260267
261268
262269 @Callable(i)
263270 func dropLabel (label) = {
264271 let labels = getLabels()
265272 let checkCaller = mustManager(i)
266273 if ((checkCaller == checkCaller))
267274 then {
268275 let checkLabel = if (containsElement(labels, label))
269276 then true
270277 else throw("Label doesn't exist")
271278 if ((checkLabel == checkLabel))
272279 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
273280 else throw("Strict value is not equal to itself.")
274281 }
275282 else throw("Strict value is not equal to itself.")
276283 }
277284
278285
279286
280287 @Callable(i)
281288 func addLabel (assetId,label) = {
282289 let checkCaller = mustAdmin(i)
283290 if ((checkCaller == checkCaller))
284291 then addLabelActions(assetId, label, true)
285292 else throw("Strict value is not equal to itself.")
286293 }
287294
288295
289296
290297 @Callable(i)
291298 func deleteLabel (assetId,label) = {
292299 let checkCaller = mustAdmin(i)
293300 if ((checkCaller == checkCaller))
294301 then deleteLabelActions(assetId, label, true)
295302 else throw("Strict value is not equal to itself.")
296303 }
297304
298305
299306
300307 @Callable(i)
301308 func updateTicker (assetId,ticker) = {
302309 let checkCaller = mustAdmin(i)
303310 if ((checkCaller == checkCaller))
304311 then {
305312 let checkAsset = if (isCreated(assetId))
306313 then true
307314 else throwNoAsset()
308315 if ((checkAsset == checkAsset))
309316 then updateTickerActions(assetId, ticker)
310317 else throw("Strict value is not equal to itself.")
311318 }
312319 else throw("Strict value is not equal to itself.")
313320 }
314321
315322
316323
317324 @Callable(i)
318325 func deleteTicker (assetId) = {
319326 let checkCaller = mustAdmin(i)
320327 if ((checkCaller == checkCaller))
321328 then {
322329 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
323330 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
324331 }
325332 else throw("Strict value is not equal to itself.")
326333 }
327334
328335
329336
330337 @Callable(i)
331338 func createOrUpdate (assetId,logo,verified) = {
332339 let checkCaller = mustAdmin(i)
333340 if ((checkCaller == checkCaller))
334341 then {
335342 let isCreatedNow = !(isCreated(assetId))
336343 if ((isCreatedNow == isCreatedNow))
337344 then {
338345 let setLogoActions = if ((logo == ""))
339346 then nil
340347 else [StringEntry(keyLogo(assetId), logo)]
341348 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
342349 }
343350 else throw("Strict value is not equal to itself.")
344351 }
345352 else throw("Strict value is not equal to itself.")
346353 }
347354
348355
349356
350357 @Callable(i)
351358 func setLogo (assetId,logo) = {
352359 let checks = [mustAdmin(i), if (isCreated(assetId))
353360 then true
354361 else throwNoAsset()]
355362 if ((checks == checks))
356363 then [StringEntry(keyLogo(assetId), logo)]
357364 else throw("Strict value is not equal to itself.")
358365 }
359366
360367
361368
362369 @Callable(i)
363370 func setVerified (assetId,verified) = {
364371 let checks = [mustAdmin(i), if (isCreated(assetId))
365372 then true
366373 else throwNoAsset()]
367374 if ((checks == checks))
368375 then $Tuple2(setVerifiedActions(assetId, verified), unit)
369376 else throw("Strict value is not equal to itself.")
370377 }
371378
372379
373380
374381 @Callable(i)
375382 func onEliminate (assetId) = {
376383 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
377384 let actions = if ((poolsNumber > 0))
378385 then nil
379386 else [DeleteEntry(keyLogo(assetId))]
380387 $Tuple2(actions, unit)
381388 }
382389
383390
384391
385392 @Callable(i)
386393 func setAdmins (adminPubKeys) = {
387394 let checkCaller = mustManager(i)
388395 if ((checkCaller == checkCaller))
389396 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
390397 else throw("Strict value is not equal to itself.")
391398 }
392399
393400
394401
395402 @Callable(i)
403+func setPoolLabels (amountAssetId,priceAssetId,label) = {
404+ let checkCaller = mustAdmin(i)
405+ if ((checkCaller == checkCaller))
406+ then {
407+ let isValidLabel = if (containsElement(validPoolLabels, label))
408+ then true
409+ else throw("label is not valid")
410+ if ((isValidLabel == isValidLabel))
411+ then $Tuple2([StringEntry(keyPoolLabels(amountAssetId, priceAssetId), label)], unit)
412+ else throw("Strict value is not equal to itself.")
413+ }
414+ else throw("Strict value is not equal to itself.")
415+ }
416+
417+
418+
419+@Callable(i)
396420 func setManager (pendingManagerPublicKey) = {
397421 let checkCaller = mustManager(i)
398422 if ((checkCaller == checkCaller))
399423 then {
400424 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
401425 if ((checkManagerPublicKey == checkManagerPublicKey))
402426 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
403427 else throw("Strict value is not equal to itself.")
404428 }
405429 else throw("Strict value is not equal to itself.")
406430 }
407431
408432
409433
410434 @Callable(i)
411435 func confirmManager () = {
412436 let pm = pendingManagerPublicKeyOrUnit()
413437 let hasPM = if (isDefined(pm))
414438 then true
415439 else throw("No pending manager")
416440 if ((hasPM == hasPM))
417441 then {
418442 let checkPM = if ((i.callerPublicKey == value(pm)))
419443 then true
420444 else throw("You are not pending manager")
421445 if ((checkPM == checkPM))
422446 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
423447 else throw("Strict value is not equal to itself.")
424448 }
425449 else throw("Strict value is not equal to itself.")
426450 }
427451
428452
429453
430454 @Callable(i)
431455 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
432456
433457
434458 @Verifier(tx)
435459 func verify () = {
436460 let targetPublicKey = match managerPublicKeyOrUnit() {
437461 case pk: ByteVector =>
438462 pk
439463 case _: Unit =>
440464 tx.senderPublicKey
441465 case _ =>
442466 throw("Match error")
443467 }
444468 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
445469 }
446470

github/deemru/w8io/026f985 
63.84 ms