tx · 5iYGjuRjNvhCjwBSmXNjwXxdXEQj1uL4BLBsBUxS1kdu

3NBhYgCW33Nkv8wAZHG91WYrKtUD7NGxXmR:  -0.01600000 Waves

2023.05.04 11:13 [2562761] smart account 3NBhYgCW33Nkv8wAZHG91WYrKtUD7NGxXmR > SELF 0.00000000 Waves

{ "type": 13, "id": "5iYGjuRjNvhCjwBSmXNjwXxdXEQj1uL4BLBsBUxS1kdu", "fee": 1600000, "feeAssetId": null, "timestamp": 1683188017200, "version": 2, "chainId": 84, "sender": "3NBhYgCW33Nkv8wAZHG91WYrKtUD7NGxXmR", "senderPublicKey": "5SiNHdozHD7jVZEwt9QPPzDX7LTAhpyQC2CjRJQqa2LP", "proofs": [ "3j1svkoRRPGx7d2hGzrTaVEKyBZvQcA2aiZmdHHziacyxxReY3RyG8GXbFfNd67WL7f4fU3QuV9yej8LWZ6Ey8bZ" ], "script": "base64:AAIFAAAAAAAABbYIAhIECgIICBIECgIICBIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCCIDU0VQIgVFTVBUWSIOc3RhdHVzVmVyaWZpZWQiEHN0YXR1c1VudmVyaWZpZWQiFmxhYmVsQ29tbXVuaXR5VmVyaWZpZWQiDGxhYmVsUG9vbHNMcCINZGVmYXVsdExhYmVscyIHdGhyb3dQRCIMdGhyb3dOb0Fzc2V0IhJ0aHJvd0ludmFsaWRUaWNrZXIiD2tleUFkbWluUHViS2V5cyIUa2V5VXNlclBvb2xzQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCIKa2V5Q3JlYXRlZCIHYXNzZXRJZCIHa2V5TG9nbyIJa2V5VGlja2VyIglrZXlTdGF0dXMiE2tleUFzc2V0UG9vbHNOdW1iZXIiEmtleVRpY2tlclRvQXNzZXRJZCIGdGlja2VyIhJrZXlBc3NldElkVG9UaWNrZXIiIGtleUFtb3V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AAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmFUrPj5WA==", "height": 2562761, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let SEP = "__"
5+
6+let EMPTY = ""
7+
8+let statusVerified = 2
9+
10+let statusUnverified = 0
11+
12+let labelCommunityVerified = "COMMUNITY_VERIFIED"
13+
14+let labelPoolsLp = "POOLS_LP"
15+
16+let defaultLabels = [labelCommunityVerified, labelPoolsLp]
17+
18+func throwPD () = throw("Permission denied")
19+
20+
21+func throwNoAsset () = throw("Asset doesn't exists")
22+
23+
24+func throwInvalidTicker () = throw("Invalid ticker")
25+
26+
27+func keyAdminPubKeys () = "%s__adminPubKeys"
28+
29+
30+func keyUserPoolsContract () = "%s__userPoolsContract"
31+
32+
33+func keyFactoryContract () = "%s__factoryContract"
34+
35+
36+func keyCreated (assetId) = (("created_<" + assetId) + ">")
37+
38+
39+func keyLogo (assetId) = (("logo_<" + assetId) + ">")
40+
41+
42+func keyTicker (assetId) = (("ticker_<" + assetId) + ">")
43+
44+
45+func keyStatus (assetId) = (("status_<" + assetId) + ">")
46+
47+
48+func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP)
49+
50+
51+func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP)
52+
53+
54+func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP)
55+
56+
57+func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP)
58+
59+
60+func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP)
61+
62+
63+func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP)
64+
65+
66+func keyLabels () = makeString(["%s", "labels"], SEP)
67+
68+
69+func keyAssetName (assetId) = makeString(["%s%s", "assetName", assetId], SEP)
70+
71+
72+func keyManagerVaultAddress () = "%s__managerVaultAddress"
73+
74+
75+func keyManagerPublicKey () = "%s__managerPublicKey"
76+
77+
78+func keyAssetDescription (assetId) = makeString(["%s%s", "assetDescription", assetId], SEP)
79+
80+
81+func getValueOrFail (address,key,type) = {
82+ let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
83+ valueOrErrorMessage( match type {
84+ case str: String =>
85+ getString(address, key)
86+ case int: Int =>
87+ getInteger(address, key)
88+ case _ =>
89+ throw("invalid entry type")
90+ }, error)
91+ }
92+
93+
94+func getStrOrFail (address,key) = {
95+ let @ = getValueOrFail(address, key, "")
96+ if ($isInstanceOf(@, "String"))
97+ then @
98+ else throw("Couldn't cast Int|String to String")
99+ }
100+
101+
102+func getIntOrFail (address,key) = {
103+ let @ = getValueOrFail(address, key, 0)
104+ if ($isInstanceOf(@, "Int"))
105+ then @
106+ else throw("Couldn't cast Int|String to Int")
107+ }
108+
109+
110+func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
111+
112+
113+func getLabels () = match getString(keyLabels()) {
114+ case s: String =>
115+ if ((size(s) == 0))
116+ then nil
117+ else split(s, SEP)
118+ case _ =>
119+ nil
120+}
121+
122+
123+func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
124+ case s: String =>
125+ if ((size(s) == 0))
126+ then nil
127+ else split(s, SEP)
128+ case _ =>
129+ nil
130+}
131+
132+
133+func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress()))
134+
135+
136+func managerPublicKeyOrUnit () = {
137+ let managerVaultAddress = getManagerAddressOrFail()
138+ match getString(managerVaultAddress, keyManagerPublicKey()) {
139+ case s: String =>
140+ fromBase58String(s)
141+ case _: Unit =>
142+ unit
143+ case _ =>
144+ throw("Match error")
145+ }
146+ }
147+
148+
149+func isManager (i) = match managerPublicKeyOrUnit() {
150+ case pk: ByteVector =>
151+ (i.callerPublicKey == pk)
152+ case _: Unit =>
153+ (i.caller == this)
154+ case _ =>
155+ throw("Match error")
156+}
157+
158+
159+func mustManager (i) = if (isManager(i))
160+ then true
161+ else throw("permission denied")
162+
163+
164+func mustAdmin (i) = {
165+ let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
166+ if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
167+ then true
168+ else mustManager(i)
169+ }
170+
171+
172+func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
173+
174+
175+func verifiedToStatus (verified) = if (verified)
176+ then statusVerified
177+ else statusUnverified
178+
179+
180+func addLabelActions (assetId,label,throwOnError) = {
181+ let labels = getLabels()
182+ let assetLabels = getAssetLabels(assetId)
183+ let checkLabel = if (containsElement(labels, label))
184+ then true
185+ else throw("Label doesn't exist")
186+ if ((checkLabel == checkLabel))
187+ then {
188+ let newAssetLabels = if (containsElement(assetLabels, label))
189+ then if (throwOnError)
190+ then throw("Label has already been added")
191+ else assetLabels
192+ else (assetLabels :+ label)
193+[StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
194+ }
195+ else throw("Strict value is not equal to itself.")
196+ }
197+
198+
199+func deleteLabelActions (assetId,label,throwOnError) = {
200+ let assetLabels = getAssetLabels(assetId)
201+ let newAssetLabels = if (containsElement(assetLabels, label))
202+ then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
203+ else if (throwOnError)
204+ then throw("Label wasn't added")
205+ else assetLabels
206+[StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
207+ }
208+
209+
210+func setVerifiedActions (assetId,verified) = {
211+ let labelCommunityVerifiedActions = if (verified)
212+ then addLabelActions(assetId, labelCommunityVerified, false)
213+ else deleteLabelActions(assetId, labelCommunityVerified, false)
214+ ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
215+ }
216+
217+
218+@Callable(i)
219+func setAssetName (assetID,assetName) = {
220+ let checkCaller = mustAdmin(i)
221+ if ((checkCaller == checkCaller))
222+ then [StringEntry(keyAssetName(assetID), assetName)]
223+ else throw("Strict value is not equal to itself.")
224+ }
225+
226+
227+
228+@Callable(i)
229+func setAssetDescription (assetID,assetDescription) = {
230+ let checkCaller = mustAdmin(i)
231+ if ((checkCaller == checkCaller))
232+ then [StringEntry(keyAssetDescription(assetID), assetDescription)]
233+ else throw("Strict value is not equal to itself.")
234+ }
235+
236+
237+
238+@Callable(i)
239+func constructor (userPoolsContract,labels) = {
240+ let checkCaller = mustManager(i)
241+ if ((checkCaller == checkCaller))
242+ then {
243+ let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
244+ if ((checksAddress == checksAddress))
245+ then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
246+ else throw("Strict value is not equal to itself.")
247+ }
248+ else throw("Strict value is not equal to itself.")
249+ }
250+
251+
252+
253+@Callable(i)
254+func constructorV2 (factoryContract) = {
255+ let checkCaller = mustManager(i)
256+ if ((checkCaller == checkCaller))
257+ then {
258+ let checkAddress = valueOrErrorMessage(addressFromString(factoryContract), "invalid factory contract address")
259+ if ((checkAddress == checkAddress))
260+ then [StringEntry(keyFactoryContract(), factoryContract)]
261+ else throw("Strict value is not equal to itself.")
262+ }
263+ else throw("Strict value is not equal to itself.")
264+ }
265+
266+
267+
268+@Callable(i)
269+func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
270+ let checkCaller = mustAdmin(i)
271+ if ((checkCaller == checkCaller))
272+ then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
273+ else throw("Strict value is not equal to itself.")
274+ }
275+
276+
277+
278+@Callable(i)
279+func increaseAssetPoolsNumber (assetId) = {
280+ let checkCaller = mustAdmin(i)
281+ if ((checkCaller == checkCaller))
282+ then {
283+ let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
284+ let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
285+[IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
286+ }
287+ else throw("Strict value is not equal to itself.")
288+ }
289+
290+
291+
292+@Callable(i)
293+func createLabel (label) = {
294+ let labels = getLabels()
295+ let checkCaller = mustAdmin(i)
296+ if ((checkCaller == checkCaller))
297+ then {
298+ let checkLabel = [if (!(contains(label, SEP)))
299+ then true
300+ else throw("Invalid label name"), if (!(containsElement(labels, label)))
301+ then true
302+ else throw("Label exists")]
303+ if ((checkLabel == checkLabel))
304+ then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
305+ else throw("Strict value is not equal to itself.")
306+ }
307+ else throw("Strict value is not equal to itself.")
308+ }
309+
310+
311+
312+@Callable(i)
313+func dropLabel (label) = {
314+ let labels = getLabels()
315+ let checkCaller = mustManager(i)
316+ if ((checkCaller == checkCaller))
317+ then {
318+ let checkLabel = if (containsElement(labels, label))
319+ then true
320+ else throw("Label doesn't exist")
321+ if ((checkLabel == checkLabel))
322+ then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
323+ else throw("Strict value is not equal to itself.")
324+ }
325+ else throw("Strict value is not equal to itself.")
326+ }
327+
328+
329+
330+@Callable(i)
331+func addLabel (assetId,label) = {
332+ let checkCaller = mustAdmin(i)
333+ if ((checkCaller == checkCaller))
334+ then addLabelActions(assetId, label, true)
335+ else throw("Strict value is not equal to itself.")
336+ }
337+
338+
339+
340+@Callable(i)
341+func deleteLabel (assetId,label) = {
342+ let checkCaller = mustAdmin(i)
343+ if ((checkCaller == checkCaller))
344+ then deleteLabelActions(assetId, label, true)
345+ else throw("Strict value is not equal to itself.")
346+ }
347+
348+
349+
350+@Callable(i)
351+func updateTicker (assetId,ticker) = {
352+ let checkCaller = mustAdmin(i)
353+ if ((checkCaller == checkCaller))
354+ then {
355+ let checkAsset = if (isCreated(assetId))
356+ then true
357+ else throwNoAsset()
358+ if ((checkAsset == checkAsset))
359+ then {
360+ let checkTicker = if ((ticker != ""))
361+ then true
362+ else throwInvalidTicker()
363+ if ((checkTicker == checkTicker))
364+ then {
365+ let deleteActions = ( match getString(keyTickerToAssetId(ticker)) {
366+ case assetIdOld: String =>
367+[DeleteEntry(keyAssetIdToTicker(assetIdOld))]
368+ case _: Unit =>
369+ nil
370+ case _ =>
371+ throw("Match error")
372+ } ++ match getString(keyAssetIdToTicker(assetId)) {
373+ case tickerOld: String =>
374+[DeleteEntry(keyTickerToAssetId(tickerOld))]
375+ case _: Unit =>
376+ nil
377+ case _ =>
378+ throw("Match error")
379+ })
380+ let updateActions = [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
381+ (deleteActions ++ updateActions)
382+ }
383+ else throw("Strict value is not equal to itself.")
384+ }
385+ else throw("Strict value is not equal to itself.")
386+ }
387+ else throw("Strict value is not equal to itself.")
388+ }
389+
390+
391+
392+@Callable(i)
393+func deleteTicker (assetId) = {
394+ let checkCaller = mustAdmin(i)
395+ if ((checkCaller == checkCaller))
396+ then {
397+ let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
398+[DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
399+ }
400+ else throw("Strict value is not equal to itself.")
401+ }
402+
403+
404+
405+@Callable(i)
406+func createOrUpdate (assetId,logo,verified) = {
407+ let checkCaller = mustAdmin(i)
408+ if ((checkCaller == checkCaller))
409+ then {
410+ let isCreatedNow = !(isCreated(assetId))
411+ if ((isCreatedNow == isCreatedNow))
412+ then {
413+ let setLogoActions = if ((logo == ""))
414+ then nil
415+ else [StringEntry(keyLogo(assetId), logo)]
416+ $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
417+ }
418+ else throw("Strict value is not equal to itself.")
419+ }
420+ else throw("Strict value is not equal to itself.")
421+ }
422+
423+
424+
425+@Callable(i)
426+func setLogo (assetId,logo) = {
427+ let checks = [mustAdmin(i), if (isCreated(assetId))
428+ then true
429+ else throwNoAsset()]
430+ if ((checks == checks))
431+ then {
432+ let action = if ((logo == ""))
433+ then DeleteEntry(keyLogo(assetId))
434+ else StringEntry(keyLogo(assetId), logo)
435+[action]
436+ }
437+ else throw("Strict value is not equal to itself.")
438+ }
439+
440+
441+
442+@Callable(i)
443+func setVerified (assetId,verified) = {
444+ let checks = [mustAdmin(i), if (isCreated(assetId))
445+ then true
446+ else throwNoAsset()]
447+ if ((checks == checks))
448+ then {
449+ let onVerificationLossInv = if (!(verified))
450+ then {
451+ let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
452+ invoke(factoryContract, "onVerificationLoss", [assetId], nil)
453+ }
454+ else unit
455+ if ((onVerificationLossInv == onVerificationLossInv))
456+ then $Tuple2(setVerifiedActions(assetId, verified), unit)
457+ else throw("Strict value is not equal to itself.")
458+ }
459+ else throw("Strict value is not equal to itself.")
460+ }
461+
462+
463+
464+@Callable(i)
465+func onEliminate (assetId) = {
466+ let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
467+ let actions = if ((poolsNumber > 0))
468+ then nil
469+ else [DeleteEntry(keyLogo(assetId))]
470+ $Tuple2(actions, unit)
471+ }
472+
473+
474+
475+@Callable(i)
476+func setAdmins (adminPubKeys) = {
477+ let checkCaller = mustManager(i)
478+ if ((checkCaller == checkCaller))
479+ then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
480+ else throw("Strict value is not equal to itself.")
481+ }
482+
483+
484+
485+@Callable(i)
486+func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
487+
488+
489+@Verifier(tx)
490+func verify () = {
491+ let targetPublicKey = match managerPublicKeyOrUnit() {
492+ case pk: ByteVector =>
493+ pk
494+ case _: Unit =>
495+ tx.senderPublicKey
496+ case _ =>
497+ throw("Match error")
498+ }
499+ sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
500+ }
501+

github/deemru/w8io/026f985 
32.71 ms