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