tx · E6fTFYGVFTrt8D83bs17eBT3fq9Sehqd6tWYT2c8VDyi

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01900000 Waves

2022.09.09 15:45 [2221579] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "E6fTFYGVFTrt8D83bs17eBT3fq9Sehqd6tWYT2c8VDyi", "fee": 1900000, "feeAssetId": null, "timestamp": 1662727576638, "version": 1, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "5o32VYLZLGjodL2KRWoVzmBkZ3FCRZkZM2zNSzDCY82ANQEVM7UMyJi4QkjFvp6gXBwnAJvWT2wMvXw7S2Dd8Q6F" ], "script": "base64:AAIFAAAAAAAAACwIAhIICgYICBgBCAESABIICgYICAgICAgSAwoBGBIDCgEIEgASABIECgIICAAAADUAAAAAA1NFUAIAAAACX18AAAAADHdhdmVzQXNzZXRJZAIAAAAFV0FWRVMAAAAAEWludmFsaWRQcmljZUFzc2V0AgAAABNJbnZhbGlkIHByaWNlIGFzc2V0AQAAAAh0aHJvd0VycgAAAAEAAAADbXNnCQAAAgAAAAEJAAS5AAAAAgkABEwAAAACAgAAABB1c2VyX3Bvb2xzLnJpZGU6CQAETAAAAAIFAAAAA21zZwUAAAADbmlsAgAAAAEgAQAAAAd0aHJvd1BEAAAAAAkBAAAACHRocm93RXJyAAAAAQIAAAARUGVybWlzc2lvbiBkZW5pZWQBAAAAFHRocm93Q3JlYXRlTm90Q2FsbGVkAAAAAAkBAAAACHRocm93RXJyAAAAAQIAAAAkQ3JlYXRlIGlzIG5vdCBjYWxsZWQgZm9yIGFzc2V0cyBwYWlyAQAAABF0aHJvd1lvdU5vdElzc3VlcgAAAAAJAQAAAAh0aHJvd0VycgAAAAECAAAAHllvdSBhcmUgbm90IGFtb3VudEF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AxwcmljZUFzc2V0SWQEAAAABnN0YXR1cwQAAAAHJG1hdGNoMAkABCIAAAABCQEAAAAJa2V5U3RhdHVzAAAAAgUAAAANYW1vdW50QXNzZXRJZAUAAAAMcHJpY2VBc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAXMFAAAAByRtYXRjaDAFAAAAAXMFAAAABHVuaXQJAAUUAAAAAgUAAAADbmlsBQAAAAZzdGF0dXMAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAA90YXJnZXRQdWJsaWNLZXkEAAAAByRtYXRjaDAJAQAAABZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAAAAAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAACcGsFAAAAByRtYXRjaDAFAAAAAnBrAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0CAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V5q91/Dg==", "chainId": 84, "height": 2221579, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6csLhFmjMwSie8E2HXQUoeb7AoghQ6bwYcqgvTGEapPo Next: FUA7PhACYC7M5uqTsFWxKN1bzPZ3hNEjcn1342abDsSV Diff:
OldNewDifferences
199199
200200
201201 @Callable(i)
202-func constructor (factoryV2Address,assetsStoreAddress,priceAssetIds,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
202+func constructor (factoryV2Address,assetsStoreAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
203203 let checkCaller = mustManager(i)
204204 if ((checkCaller == checkCaller))
205- then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssets(), makeString(priceAssetIds, SEP)), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
205+ then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
206206 else throw("Strict value is not equal to itself.")
207207 }
208208
213213 let amountAssetPayment = value(i.payments[0])
214214 let priceAssetPayment = value(i.payments[1])
215215 let feeAssetPayment = value(i.payments[2])
216- let $t065876659 = getIdAndInfo(amountAssetPayment)
217- let amountAssetId = $t065876659._1
218- let amountAssetInfo = $t065876659._2
219- let $t066626731 = getIdAndInfo(priceAssetPayment)
220- let priceAssetId = $t066626731._1
221- let priceAssetInfo = $t066626731._2
222- let $t067346797 = getIdAndInfo(feeAssetPayment)
223- let feeAssetId = $t067346797._1
224- let feeAssetInfo = $t067346797._2
216+ let $t064926564 = getIdAndInfo(amountAssetPayment)
217+ let amountAssetId = $t064926564._1
218+ let amountAssetInfo = $t064926564._2
219+ let $t065676636 = getIdAndInfo(priceAssetPayment)
220+ let priceAssetId = $t065676636._1
221+ let priceAssetInfo = $t065676636._2
222+ let $t066396702 = getIdAndInfo(feeAssetPayment)
223+ let feeAssetId = $t066396702._1
224+ let feeAssetInfo = $t066396702._2
225225 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
226226 let managerPriceAssetMinAmount = 1
227227 let priceAssetMinAmount = if (isManager(i))
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 keySuffix (amountAssetId,priceAssetId) = makeString(["%s%s%s", "suffix", amountAssetId, priceAssetId], SEP)
7171
7272
7373 func keyLastIndex () = makeString(["%s", "lastIndex"], SEP)
7474
7575
7676 let indexSuffix = "u"
7777
7878 let statusPending = "pending"
7979
8080 let statusDeclined = "declined"
8181
8282 let statusActive = "active"
8383
8484 let statuses = [statusPending, statusDeclined, statusActive]
8585
8686 func keyCreateCalled (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCalled", amountAssetId, priceAssetId], SEP)
8787
8888
8989 func keyCreateCaller (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCaller", amountAssetId, priceAssetId], SEP)
9090
9191
9292 func keyAmountAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "amountAssetAmount", amountAssetId, priceAssetId], SEP)
9393
9494
9595 func keyPriceAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "priceAssetAmount", amountAssetId, priceAssetId], SEP)
9696
9797
9898 func keyHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "height", amountAssetId, priceAssetId], SEP)
9999
100100
101101 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
102102
103103
104104 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
105105
106106
107107 func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
108108
109109
110110 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
111111
112112
113113 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
114114
115115
116116 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
117117
118118
119119 func stringOptionToList (stringOrUnit) = match stringOrUnit {
120120 case s: String =>
121121 if ((size(s) == 0))
122122 then nil
123123 else split(s, SEP)
124124 case _: Unit =>
125125 nil
126126 case _ =>
127127 throw("Match error")
128128 }
129129
130130
131131 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
132132
133133 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
134134
135135
136136 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
137137 then true
138138 else throwCreateNotCalled()
139139
140140
141141 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
142142 case s: String =>
143143 fromBase58String(s)
144144 case _: Unit =>
145145 unit
146146 case _ =>
147147 throw("Match error")
148148 }
149149
150150
151151 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
152152 case s: String =>
153153 fromBase58String(s)
154154 case _: Unit =>
155155 unit
156156 case _ =>
157157 throw("Match error")
158158 }
159159
160160
161161 func isManager (i) = match managerPublicKeyOrUnit() {
162162 case pk: ByteVector =>
163163 (i.callerPublicKey == pk)
164164 case _: Unit =>
165165 (i.caller == this)
166166 case _ =>
167167 throw("Match error")
168168 }
169169
170170
171171 func mustManager (i) = if (isManager(i))
172172 then true
173173 else throwPD()
174174
175175
176176 func mustAdmin (i) = {
177177 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
178178 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
179179 then true
180180 else mustManager(i)
181181 }
182182
183183
184184 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
185185
186186
187187 func getIdAndInfo (payment) = match payment.assetId {
188188 case id: ByteVector =>
189189 let info = value(assetInfo(id))
190190 $Tuple2(toBase58String(id), info)
191191 case _: Unit =>
192192 $Tuple2(wavesAssetId, unit)
193193 case _ =>
194194 throw("Match error")
195195 }
196196
197197
198198 func validStatus (status) = containsElement(statuses, status)
199199
200200
201201 @Callable(i)
202-func constructor (factoryV2Address,assetsStoreAddress,priceAssetIds,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
202+func constructor (factoryV2Address,assetsStoreAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
203203 let checkCaller = mustManager(i)
204204 if ((checkCaller == checkCaller))
205- then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssets(), makeString(priceAssetIds, SEP)), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
205+ then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
206206 else throw("Strict value is not equal to itself.")
207207 }
208208
209209
210210
211211 @Callable(i)
212212 func create () = {
213213 let amountAssetPayment = value(i.payments[0])
214214 let priceAssetPayment = value(i.payments[1])
215215 let feeAssetPayment = value(i.payments[2])
216- let $t065876659 = getIdAndInfo(amountAssetPayment)
217- let amountAssetId = $t065876659._1
218- let amountAssetInfo = $t065876659._2
219- let $t066626731 = getIdAndInfo(priceAssetPayment)
220- let priceAssetId = $t066626731._1
221- let priceAssetInfo = $t066626731._2
222- let $t067346797 = getIdAndInfo(feeAssetPayment)
223- let feeAssetId = $t067346797._1
224- let feeAssetInfo = $t067346797._2
216+ let $t064926564 = getIdAndInfo(amountAssetPayment)
217+ let amountAssetId = $t064926564._1
218+ let amountAssetInfo = $t064926564._2
219+ let $t065676636 = getIdAndInfo(priceAssetPayment)
220+ let priceAssetId = $t065676636._1
221+ let priceAssetInfo = $t065676636._2
222+ let $t066396702 = getIdAndInfo(feeAssetPayment)
223+ let feeAssetId = $t066396702._1
224+ let feeAssetInfo = $t066396702._2
225225 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
226226 let managerPriceAssetMinAmount = 1
227227 let priceAssetMinAmount = if (isManager(i))
228228 then managerPriceAssetMinAmount
229229 else {
230230 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
231231 value(parseInt(stringOptionToList(getString(keyPriceAssetsMinAmount()))[priceAssetsIndex]))
232232 }
233233 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
234234 let curIndex = (lastIndex + 1)
235235 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
236236 then true
237237 else throwPoolExists(), if (if (isManager(i))
238238 then true
239239 else isVerified(amountAssetId))
240240 then true
241241 else throwAssetNotVerified(), if ((getString(keyFeeAssetId()) == feeAssetId))
242242 then true
243243 else throwInvalidFeeAsset(), if (if (isManager(i))
244244 then true
245245 else (amountAssetPayment.amount >= getIntegerValue(keyAmountAssetMinAmount())))
246246 then true
247247 else throwInvalidAmountAsset(), if (if (isManager(i))
248248 then true
249249 else (priceAssetPayment.amount >= priceAssetMinAmount))
250250 then true
251251 else throwInvalidPriceAssetAmount(), if ((feeAssetPayment.amount == getInteger(keyFeeAmount())))
252252 then true
253253 else throwInvalidFee()]
254254 if ((checks == checks))
255255 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)]
256256 else throw("Strict value is not equal to itself.")
257257 }
258258
259259
260260
261261 @Callable(i)
262262 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
263263 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
264264 then true
265265 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
266266 then true
267267 else throwCanActivateOnlyPendingPool()]
268268 if ((checks == checks))
269269 then {
270270 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, "VLTPOOL", logo], nil)
271271 if ((activateNewPoolInv == activateNewPoolInv))
272272 then {
273273 let lpAssetId = match activateNewPoolInv {
274274 case id: String =>
275275 id
276276 case _ =>
277277 throwFactoryReturnedNotString()
278278 }
279279 if ((lpAssetId == lpAssetId))
280280 then {
281281 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
282282 if ((beforePut == beforePut))
283283 then {
284284 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
285285 then unit
286286 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
287287 if ((put == put))
288288 then {
289289 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
290290 if ((afterPut == afterPut))
291291 then {
292292 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
293293 [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
294294 }
295295 else throw("Strict value is not equal to itself.")
296296 }
297297 else throw("Strict value is not equal to itself.")
298298 }
299299 else throw("Strict value is not equal to itself.")
300300 }
301301 else throw("Strict value is not equal to itself.")
302302 }
303303 else throw("Strict value is not equal to itself.")
304304 }
305305 else throw("Strict value is not equal to itself.")
306306 }
307307
308308
309309
310310 @Callable(i)
311311 func setAdmins (adminPubKeys) = {
312312 let checkCaller = mustManager(i)
313313 if ((checkCaller == checkCaller))
314314 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
315315 else throw("Strict value is not equal to itself.")
316316 }
317317
318318
319319
320320 @Callable(i)
321321 func setManager (pendingManagerPublicKey) = {
322322 let checkCaller = mustManager(i)
323323 if ((checkCaller == checkCaller))
324324 then {
325325 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
326326 if ((checkManagerPublicKey == checkManagerPublicKey))
327327 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
328328 else throw("Strict value is not equal to itself.")
329329 }
330330 else throw("Strict value is not equal to itself.")
331331 }
332332
333333
334334
335335 @Callable(i)
336336 func confirmManager () = {
337337 let pm = pendingManagerPublicKeyOrUnit()
338338 let hasPM = if (isDefined(pm))
339339 then true
340340 else throw("No pending manager")
341341 if ((hasPM == hasPM))
342342 then {
343343 let checkPM = if ((i.callerPublicKey == value(pm)))
344344 then true
345345 else throw("You are not pending manager")
346346 if ((checkPM == checkPM))
347347 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
348348 else throw("Strict value is not equal to itself.")
349349 }
350350 else throw("Strict value is not equal to itself.")
351351 }
352352
353353
354354
355355 @Callable(i)
356356 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
357357
358358
359359
360360 @Callable(i)
361361 func statusREADONLY (amountAssetId,priceAssetId) = {
362362 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
363363 case s: String =>
364364 s
365365 case _ =>
366366 unit
367367 }
368368 $Tuple2(nil, status)
369369 }
370370
371371
372372 @Verifier(tx)
373373 func verify () = {
374374 let targetPublicKey = match managerPublicKeyOrUnit() {
375375 case pk: ByteVector =>
376376 pk
377377 case _: Unit =>
378378 tx.senderPublicKey
379379 case _ =>
380380 throw("Match error")
381381 }
382382 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
383383 }
384384

github/deemru/w8io/026f985 
47.61 ms