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