tx · 4yHZxViL38PS4scYUuX1wJAKy2ubP5VUVsbjBXsDnYBF

3N2HGnBgfp7smNh1ok2kSwGigcsLcvb5pRU:  -0.01900000 Waves

2023.03.16 13:47 [2492480] smart account 3N2HGnBgfp7smNh1ok2kSwGigcsLcvb5pRU > SELF 0.00000000 Waves

{ "type": 13, "id": "4yHZxViL38PS4scYUuX1wJAKy2ubP5VUVsbjBXsDnYBF", "fee": 1900000, "feeAssetId": null, "timestamp": 1678963686874, "version": 2, "chainId": 84, "sender": "3N2HGnBgfp7smNh1ok2kSwGigcsLcvb5pRU", "senderPublicKey": "HJWUBG6MGSbzNyQ7ypsGrtyBMEEihMcySK6RX9m5fwuj", "proofs": [ "22gV8wcpa62iEgHr75A3fHd8J7UNVLTHYt3wh3VzoEZW9DGZqxddLH7H7xnq53kgaSVSwHm5kwei57UY5JvNNQZL" ], "script": "base64:AAIFAAAAAAAAAC0IAhIJCgcICAgYAQgBEgASCAoGCAgICAgIEgMKARgSAwoBCBIAEgASBAoCCAgAAAA2AAAAAANTRVACAAAAAl9fAAAAAAx3YXZlc0Fzc2V0SWQCAAAABVdBVkVTAAAAABFpbnZhbGlkUHJpY2VBc3NldAIAAAATSW52YWxpZCBwcmljZSBhc3NldAEAAAAIdGhyb3dFcnIAAAABAAAAA21zZwkAAAIAAAABCQAEuQAAAAIJAARMAAAAAgIAAAAQdXNlcl9wb29scy5yaWRlOgkABEwAAAACBQAAAANtc2cFAAAAA25pbAIAAAABIAEAAAAHdGhyb3dQRAAAAAAJAQAAAAh0aHJvd0VycgAAAAECAAAAEVBlcm1pc3Npb24gZGVuaWVkAQAAABR0aHJvd0NyZWF0ZU5vdENhbGxlZAAAAAAJAQAAAAh0aHJvd0VycgAAAAECAAAAJENyZWF0ZSBpcyBub3QgY2FsbGVkIGZvciBhc3NldHMgcGFpcgEAAAARdGhyb3dZb3VOb3RJc3N1ZXIAAAAACQEAAAAIdGhyb3dFcnIAAAABAgAAAB5Zb3UgYXJlIG5vdCBhbW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3NldElkCQAETAAAAAIFAAAADHByaWNlQXNzZXRJZAUAAAADbmlsBQAAAANTRVABAAAAE2tleVByaWNlQXNzZXRBbW91bnQAAAACAAAADWFtb3VudEFzc2V0SWQAAAAMcHJpY2VBc3NldElkCQAEuQAAAAIJAARMAAAAAgIAAAAGJXMlcyVzCQAETAAAAAICAAAAEHByaWNlQXNzZXRBbW91bnQJAARMAAAAAgUAAAANYW1vdW50QXNzZXRJZAkABEwAAAACBQAAAAxwcmljZUFzc2V0SWQFAAAAA25pbAUAAAADU0VQAQAAAAlrZXlIZWlnaHQAAAACAAAADWFtb3VudEFzc2V0SWQAAAAMcHJpY2VBc3NldElkCQAEuQAAAAIJAARMAAAAAgIAAAAGJXMlcyVzCQAETAAAAAICAAAABmhlaWdodAkABEwAAAACBQAAAA1hbW91bnRBc3NldElkCQAETAAAAAIFAAAADHByaWNlQXNzZXRJZAUAAAADbmlsBQAAAANTRVABAAAADWtleUZlZUFzc2V0SWQAAAAACQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAKZmVlQXNzZXRJZAUAAAADbmlsBQAAAANTRVABAAAADGtleUZlZUFtb3VudAAAAAAJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAlmZWVBbW91bnQFAAAAA25pbAUAAAADU0VQAQAAABdrZXlBbW91bnRBc3NldE1pbkFtb3VudAAAAAAJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAABRhbW91bnRBc3NldE1pbkFtb3VudAUAAAADbmlsBQAAAANTRVABAAAAF2tleVByaWNlQXNzZXRzTWluQW1vdW50AAAAAAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAAFHByaWNlQXNzZXRzTWluQW1vdW50BQAAAANuaWwFAAAAA1NFUAEAAAAOa2V5UHJpY2VBc3NldHMAAAAACQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAALcHJpY2VBc3NldHMFAAAAA25pbAU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ZAAAAAxwcmljZUFzc2V0SWQEAAAABnN0YXR1cwQAAAAHJG1hdGNoMAkABCIAAAABCQEAAAAJa2V5U3RhdHVzAAAAAgUAAAANYW1vdW50QXNzZXRJZAUAAAAMcHJpY2VBc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAXMFAAAAByRtYXRjaDAFAAAAAXMFAAAABHVuaXQJAAUUAAAAAgUAAAADbmlsBQAAAAZzdGF0dXMAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAA90YXJnZXRQdWJsaWNLZXkEAAAAByRtYXRjaDAJAQAAABZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAAAAAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAACcGsFAAAAByRtYXRjaDAFAAAAAnBrAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0CAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V5frrgCA==", "height": 2492480, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3nqQKZn2Nv1sgkXMrXPv38cXa4uz2sRifZn1At2HPNyT Next: BzDiaaA3hfTPrHyFS2ZxPtDF1Azey3nbZ2KzQLdVpUn3 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let wavesAssetId = "WAVES"
77
88 let invalidPriceAsset = "Invalid price asset"
99
1010 func throwErr (msg) = throw(makeString(["user_pools.ride:", msg], " "))
1111
1212
1313 func throwPD () = throwErr("Permission denied")
1414
1515
1616 func throwCreateNotCalled () = throwErr("Create is not called for assets pair")
1717
1818
1919 func throwYouNotIssuer () = throwErr("You are not amountAsset issuer")
2020
2121
2222 func throwPoolExists () = throwErr("Pool with such assets already exists")
2323
2424
2525 func throwAssetNotVerified () = throwErr("Asset is not verified")
2626
2727
2828 func throwInvalidPriceAsset () = throwErr(invalidPriceAsset)
2929
3030
3131 func throwInvalidFeeAsset () = throwErr("Invalid fee asset")
3232
3333
3434 func throwInvalidAmountAsset () = throwErr("Invalid amount asset attached")
3535
3636
3737 func throwInvalidStatus () = throwErr("Invalid status")
3838
3939
4040 func throwCanActivateOnlyPendingPool () = throwErr("Can activate pool only in 'pending' status")
4141
4242
4343 func throwFactoryReturnedNotString () = throwErr("FactoryV2 returned not string")
4444
4545
4646 func throwInvalidPriceAssetAmount () = throwErr("invalid price asset amount")
4747
4848
4949 func throwInvalidFee () = throwErr("invalid fee")
5050
5151
5252 func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
5353
5454
5555 func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP)
5656
5757
5858 func keyAdminPubKeys () = makeString(["%s", "adminPubKeys"], SEP)
5959
6060
6161 func keyStatus (amountAssetId,priceAssetId) = makeString(["%s%s%s", "status", amountAssetId, priceAssetId], SEP)
6262
6363
6464 func keyFactoryContract () = makeString(["%s", "factoryContract"], SEP)
6565
6666
6767 func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], SEP)
6868
6969
7070 func keyEmissionContract () = makeString(["%s", "emissionContract"], SEP)
7171
7272
7373 func keySuffix (amountAssetId,priceAssetId) = makeString(["%s%s%s", "suffix", amountAssetId, priceAssetId], SEP)
7474
7575
7676 func keyLastIndex () = makeString(["%s", "lastIndex"], SEP)
7777
7878
7979 let indexSuffix = "u"
8080
8181 let statusPending = "pending"
8282
8383 let statusDeclined = "declined"
8484
8585 let statusActive = "active"
8686
8787 let statuses = [statusPending, statusDeclined, statusActive]
8888
8989 func keyCreateCalled (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCalled", amountAssetId, priceAssetId], SEP)
9090
9191
9292 func keyCreateCaller (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCaller", amountAssetId, priceAssetId], SEP)
9393
9494
9595 func keyAmountAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "amountAssetAmount", amountAssetId, priceAssetId], SEP)
9696
9797
9898 func keyPriceAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "priceAssetAmount", amountAssetId, priceAssetId], SEP)
9999
100100
101101 func keyHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "height", amountAssetId, priceAssetId], SEP)
102102
103103
104104 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
105105
106106
107107 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
108108
109109
110110 func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
111111
112112
113113 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
114114
115115
116116 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
117117
118118
119119 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
120120
121121
122122 func stringOptionToList (stringOrUnit) = match stringOrUnit {
123123 case s: String =>
124124 if ((size(s) == 0))
125125 then nil
126126 else split(s, SEP)
127127 case _: Unit =>
128128 nil
129129 case _ =>
130130 throw("Match error")
131131 }
132132
133133
134134 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
135135
136136 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
137137
138138
139139 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
140140 then true
141141 else throwCreateNotCalled()
142142
143143
144144 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
145145 case s: String =>
146146 fromBase58String(s)
147147 case _: Unit =>
148148 unit
149149 case _ =>
150150 throw("Match error")
151151 }
152152
153153
154154 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
155155 case s: String =>
156156 fromBase58String(s)
157157 case _: Unit =>
158158 unit
159159 case _ =>
160160 throw("Match error")
161161 }
162162
163163
164164 func isManager (i) = match managerPublicKeyOrUnit() {
165165 case pk: ByteVector =>
166166 (i.callerPublicKey == pk)
167167 case _: Unit =>
168168 (i.caller == this)
169169 case _ =>
170170 throw("Match error")
171171 }
172172
173173
174174 func mustManager (i) = if (isManager(i))
175175 then true
176176 else throwPD()
177177
178178
179179 func mustAdmin (i) = {
180180 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
181181 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
182182 then true
183183 else mustManager(i)
184184 }
185185
186186
187187 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
188188
189189
190190 func getIdAndInfo (payment) = match payment.assetId {
191191 case id: ByteVector =>
192192 let info = value(assetInfo(id))
193193 $Tuple2(toBase58String(id), info)
194194 case _: Unit =>
195195 $Tuple2(wavesAssetId, unit)
196196 case _ =>
197197 throw("Match error")
198198 }
199199
200200
201201 func validStatus (status) = containsElement(statuses, status)
202202
203203
204204 @Callable(i)
205205 func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
206206 let checkCaller = mustManager(i)
207207 if ((checkCaller == checkCaller))
208208 then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
209209 else throw("Strict value is not equal to itself.")
210210 }
211211
212212
213213
214214 @Callable(i)
215215 func create () = {
216216 let amountAssetPayment = value(i.payments[0])
217217 let priceAssetPayment = value(i.payments[1])
218218 let feeAssetPayment = value(i.payments[2])
219219 let $t067946866 = getIdAndInfo(amountAssetPayment)
220220 let amountAssetId = $t067946866._1
221221 let amountAssetInfo = $t067946866._2
222222 let $t068706939 = getIdAndInfo(priceAssetPayment)
223223 let priceAssetId = $t068706939._1
224224 let priceAssetInfo = $t068706939._2
225225 let $t069437006 = getIdAndInfo(feeAssetPayment)
226226 let feeAssetId = $t069437006._1
227227 let feeAssetInfo = $t069437006._2
228228 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
229229 let managerPriceAssetMinAmount = 1
230230 let priceAssetMinAmount = if (isManager(i))
231231 then managerPriceAssetMinAmount
232232 else {
233233 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
234234 value(parseInt(stringOptionToList(getString(keyPriceAssetsMinAmount()))[priceAssetsIndex]))
235235 }
236236 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
237237 let curIndex = (lastIndex + 1)
238238 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract()))
239239 let poolExists = {
240240 let @ = invoke(factoryContract, "poolExistsREADONLY", [amountAssetId, priceAssetId], nil)
241241 if ($isInstanceOf(@, "Boolean"))
242242 then @
243243 else throw("Couldn't cast Any to Boolean")
244244 }
245245 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
246246 then true
247247 else throwPoolExists(), if (!(poolExists))
248248 then true
249249 else throwPoolExists(), if (if (isManager(i))
250250 then true
251251 else isVerified(amountAssetId))
252252 then true
253253 else throwAssetNotVerified(), if ((getString(keyFeeAssetId()) == feeAssetId))
254254 then true
255255 else throwInvalidFeeAsset(), if (if (isManager(i))
256256 then true
257257 else (amountAssetPayment.amount >= getIntegerValue(keyAmountAssetMinAmount())))
258258 then true
259259 else throwInvalidAmountAsset(), if (if (isManager(i))
260260 then true
261261 else (priceAssetPayment.amount >= priceAssetMinAmount))
262262 then true
263263 else throwInvalidPriceAssetAmount(), if ((feeAssetPayment.amount == getInteger(keyFeeAmount())))
264264 then true
265265 else throwInvalidFee()]
266266 if ((checks == checks))
267267 then {
268268 let burnEmissionInv = invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetPayment.amount)])
269269 if ((burnEmissionInv == burnEmissionInv))
270270 then [BooleanEntry(keyCreateCalled(amountAssetId, priceAssetId), true), StringEntry(keyCreateCaller(amountAssetId, priceAssetId), toString(i.caller)), IntegerEntry(keyLastIndex(), curIndex), StringEntry(keySuffix(amountAssetId, priceAssetId), (toString(curIndex) + indexSuffix)), IntegerEntry(keyHeight(amountAssetId, priceAssetId), height), StringEntry(keyStatus(amountAssetId, priceAssetId), statusPending), IntegerEntry(keyAmountAssetAmount(amountAssetId, priceAssetId), amountAssetPayment.amount), IntegerEntry(keyPriceAssetAmount(amountAssetId, priceAssetId), priceAssetPayment.amount)]
271271 else throw("Strict value is not equal to itself.")
272272 }
273273 else throw("Strict value is not equal to itself.")
274274 }
275275
276276
277277
278278 @Callable(i)
279279 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
280280 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
281281 then true
282282 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
283283 then true
284284 else throwCanActivateOnlyPendingPool()]
285285 if ((checks == checks))
286286 then {
287287 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, "VLTPOOL", logo], nil)
288288 if ((activateNewPoolInv == activateNewPoolInv))
289289 then {
290290 let lpAssetId = match activateNewPoolInv {
291291 case id: String =>
292292 id
293293 case _ =>
294294 throwFactoryReturnedNotString()
295295 }
296296 if ((lpAssetId == lpAssetId))
297297 then {
298298 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
299299 if ((beforePut == beforePut))
300300 then {
301301 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(if ((amountAssetId == "WAVES"))
302302 then unit
303303 else fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
304304 then unit
305305 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
306306 if ((put == put))
307307 then {
308308 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
309309 if ((afterPut == afterPut))
310310 then {
311311 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
312312 [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
313313 }
314314 else throw("Strict value is not equal to itself.")
315315 }
316316 else throw("Strict value is not equal to itself.")
317317 }
318318 else throw("Strict value is not equal to itself.")
319319 }
320320 else throw("Strict value is not equal to itself.")
321321 }
322322 else throw("Strict value is not equal to itself.")
323323 }
324324 else throw("Strict value is not equal to itself.")
325325 }
326326
327327
328328
329329 @Callable(i)
330330 func setAdmins (adminPubKeys) = {
331331 let checkCaller = mustManager(i)
332332 if ((checkCaller == checkCaller))
333333 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
334334 else throw("Strict value is not equal to itself.")
335335 }
336336
337337
338338
339339 @Callable(i)
340340 func setManager (pendingManagerPublicKey) = {
341341 let checkCaller = mustManager(i)
342342 if ((checkCaller == checkCaller))
343343 then {
344344 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
345345 if ((checkManagerPublicKey == checkManagerPublicKey))
346346 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
347347 else throw("Strict value is not equal to itself.")
348348 }
349349 else throw("Strict value is not equal to itself.")
350350 }
351351
352352
353353
354354 @Callable(i)
355355 func confirmManager () = {
356356 let pm = pendingManagerPublicKeyOrUnit()
357357 let hasPM = if (isDefined(pm))
358358 then true
359359 else throw("No pending manager")
360360 if ((hasPM == hasPM))
361361 then {
362362 let checkPM = if ((i.callerPublicKey == value(pm)))
363363 then true
364364 else throw("You are not pending manager")
365365 if ((checkPM == checkPM))
366366 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
367367 else throw("Strict value is not equal to itself.")
368368 }
369369 else throw("Strict value is not equal to itself.")
370370 }
371371
372372
373373
374374 @Callable(i)
375375 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
376376
377377
378378
379379 @Callable(i)
380380 func statusREADONLY (amountAssetId,priceAssetId) = {
381381 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
382382 case s: String =>
383383 s
384384 case _ =>
385385 unit
386386 }
387387 $Tuple2(nil, status)
388388 }
389389
390390
391391 @Verifier(tx)
392392 func verify () = {
393393 let targetPublicKey = match managerPublicKeyOrUnit() {
394394 case pk: ByteVector =>
395395 pk
396396 case _: Unit =>
397397 tx.senderPublicKey
398398 case _ =>
399399 throw("Match error")
400400 }
401401 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
402402 }
403403

github/deemru/w8io/026f985 
35.89 ms