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