tx · FUA7PhACYC7M5uqTsFWxKN1bzPZ3hNEjcn1342abDsSV

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01900000 Waves

2022.09.19 11:57 [2235801] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "FUA7PhACYC7M5uqTsFWxKN1bzPZ3hNEjcn1342abDsSV", "fee": 1900000, "feeAssetId": null, "timestamp": 1663577879262, "version": 1, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "twvnezy8PhL6G4Dnr3rUnNt5pUtM5ia26A3LADjmewy4xgJnJiBHEjskgBLt443qEWQv5XYzBwsTb9G7fxEoASw" ], "script": "base64:AAIFAAAAAAAAACwIAhIICgYICBgBCAESABIICgYICAgICAgSAwoBGBIDCgEIEgASABIECgIICAAAADYAAAAAA1NFUAIAAAACX18AAAAADHdhdmVzQXNzZXRJZAIAAAAFV0FWRVMAAAAAEWludmFsaWRQcmljZUFzc2V0AgAAABNJbnZhbGlkIHByaWNlIGFzc2V0AQAAAAh0aHJvd0VycgAAAAEAAAADbXNnCQAAAgAAAAEJAAS5AAAAAgkABEwAAAACAgAAABB1c2VyX3Bvb2xzLnJpZGU6CQAETAAAAAIFAAAAA21zZwUAAAADbmlsAgAAAAEgAQAAAAd0aHJvd1BEAAAAAAkBAAAACHRocm93RXJyAAAAAQIAAAARUGVybWlzc2lvbiBkZW5pZWQBAAAAFHRocm93Q3JlYXRlTm90Q2FsbGVkAAAAAAkBAAAACHRocm93RXJyAAAAAQIAAAAkQ3JlYXRlIGlzIG5vdCBjYWxsZWQgZm9yIGFzc2V0cyBwYWlyAQAAABF0aHJvd1lvdU5vdElzc3VlcgAAAAAJAQAAAAh0aHJvd0VycgAAAAECAAAAHllvdSBhcmUgbm90IGFtb3VudEFzc2V0IGlzc3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exity": 0 } View: original | compacted Prev: E6fTFYGVFTrt8D83bs17eBT3fq9Sehqd6tWYT2c8VDyi Next: 4cp5ScUehZXBHKV1vyDdHvnFHvK6tKJCUHmNQ48C3TqH Diff:
OldNewDifferences
9696
9797
9898 func keyHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "height", amountAssetId, priceAssetId], SEP)
99+
100+
101+func keyActivationHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "activationHeight", amountAssetId, priceAssetId], SEP)
99102
100103
101104 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
213216 let amountAssetPayment = value(i.payments[0])
214217 let priceAssetPayment = value(i.payments[1])
215218 let feeAssetPayment = value(i.payments[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
219+ let $t066406712 = getIdAndInfo(amountAssetPayment)
220+ let amountAssetId = $t066406712._1
221+ let amountAssetInfo = $t066406712._2
222+ let $t067156784 = getIdAndInfo(priceAssetPayment)
223+ let priceAssetId = $t067156784._1
224+ let priceAssetInfo = $t067156784._2
225+ let $t067876850 = getIdAndInfo(feeAssetPayment)
226+ let feeAssetId = $t067876850._1
227+ let feeAssetInfo = $t067876850._2
225228 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
226229 let managerPriceAssetMinAmount = 1
227230 let priceAssetMinAmount = if (isManager(i))
290293 if ((afterPut == afterPut))
291294 then {
292295 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
293-[StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
296+[StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), IntegerEntry(keyActivationHeight(amountAssetId, priceAssetId), height), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
294297 }
295298 else throw("Strict value is not equal to itself.")
296299 }
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)
99+
100+
101+func keyActivationHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "activationHeight", amountAssetId, priceAssetId], SEP)
99102
100103
101104 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
102105
103106
104107 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
105108
106109
107110 func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
108111
109112
110113 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
111114
112115
113116 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
114117
115118
116119 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
117120
118121
119122 func stringOptionToList (stringOrUnit) = match stringOrUnit {
120123 case s: String =>
121124 if ((size(s) == 0))
122125 then nil
123126 else split(s, SEP)
124127 case _: Unit =>
125128 nil
126129 case _ =>
127130 throw("Match error")
128131 }
129132
130133
131134 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
132135
133136 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
134137
135138
136139 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
137140 then true
138141 else throwCreateNotCalled()
139142
140143
141144 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
142145 case s: String =>
143146 fromBase58String(s)
144147 case _: Unit =>
145148 unit
146149 case _ =>
147150 throw("Match error")
148151 }
149152
150153
151154 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
152155 case s: String =>
153156 fromBase58String(s)
154157 case _: Unit =>
155158 unit
156159 case _ =>
157160 throw("Match error")
158161 }
159162
160163
161164 func isManager (i) = match managerPublicKeyOrUnit() {
162165 case pk: ByteVector =>
163166 (i.callerPublicKey == pk)
164167 case _: Unit =>
165168 (i.caller == this)
166169 case _ =>
167170 throw("Match error")
168171 }
169172
170173
171174 func mustManager (i) = if (isManager(i))
172175 then true
173176 else throwPD()
174177
175178
176179 func mustAdmin (i) = {
177180 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
178181 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
179182 then true
180183 else mustManager(i)
181184 }
182185
183186
184187 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
185188
186189
187190 func getIdAndInfo (payment) = match payment.assetId {
188191 case id: ByteVector =>
189192 let info = value(assetInfo(id))
190193 $Tuple2(toBase58String(id), info)
191194 case _: Unit =>
192195 $Tuple2(wavesAssetId, unit)
193196 case _ =>
194197 throw("Match error")
195198 }
196199
197200
198201 func validStatus (status) = containsElement(statuses, status)
199202
200203
201204 @Callable(i)
202205 func constructor (factoryV2Address,assetsStoreAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
203206 let checkCaller = mustManager(i)
204207 if ((checkCaller == checkCaller))
205208 then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
206209 else throw("Strict value is not equal to itself.")
207210 }
208211
209212
210213
211214 @Callable(i)
212215 func create () = {
213216 let amountAssetPayment = value(i.payments[0])
214217 let priceAssetPayment = value(i.payments[1])
215218 let feeAssetPayment = value(i.payments[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
219+ let $t066406712 = getIdAndInfo(amountAssetPayment)
220+ let amountAssetId = $t066406712._1
221+ let amountAssetInfo = $t066406712._2
222+ let $t067156784 = getIdAndInfo(priceAssetPayment)
223+ let priceAssetId = $t067156784._1
224+ let priceAssetInfo = $t067156784._2
225+ let $t067876850 = getIdAndInfo(feeAssetPayment)
226+ let feeAssetId = $t067876850._1
227+ let feeAssetInfo = $t067876850._2
225228 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
226229 let managerPriceAssetMinAmount = 1
227230 let priceAssetMinAmount = if (isManager(i))
228231 then managerPriceAssetMinAmount
229232 else {
230233 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
231234 value(parseInt(stringOptionToList(getString(keyPriceAssetsMinAmount()))[priceAssetsIndex]))
232235 }
233236 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
234237 let curIndex = (lastIndex + 1)
235238 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
236239 then true
237240 else throwPoolExists(), if (if (isManager(i))
238241 then true
239242 else isVerified(amountAssetId))
240243 then true
241244 else throwAssetNotVerified(), if ((getString(keyFeeAssetId()) == feeAssetId))
242245 then true
243246 else throwInvalidFeeAsset(), if (if (isManager(i))
244247 then true
245248 else (amountAssetPayment.amount >= getIntegerValue(keyAmountAssetMinAmount())))
246249 then true
247250 else throwInvalidAmountAsset(), if (if (isManager(i))
248251 then true
249252 else (priceAssetPayment.amount >= priceAssetMinAmount))
250253 then true
251254 else throwInvalidPriceAssetAmount(), if ((feeAssetPayment.amount == getInteger(keyFeeAmount())))
252255 then true
253256 else throwInvalidFee()]
254257 if ((checks == checks))
255258 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)]
256259 else throw("Strict value is not equal to itself.")
257260 }
258261
259262
260263
261264 @Callable(i)
262265 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
263266 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
264267 then true
265268 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
266269 then true
267270 else throwCanActivateOnlyPendingPool()]
268271 if ((checks == checks))
269272 then {
270273 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, "VLTPOOL", logo], nil)
271274 if ((activateNewPoolInv == activateNewPoolInv))
272275 then {
273276 let lpAssetId = match activateNewPoolInv {
274277 case id: String =>
275278 id
276279 case _ =>
277280 throwFactoryReturnedNotString()
278281 }
279282 if ((lpAssetId == lpAssetId))
280283 then {
281284 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
282285 if ((beforePut == beforePut))
283286 then {
284287 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
285288 then unit
286289 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
287290 if ((put == put))
288291 then {
289292 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
290293 if ((afterPut == afterPut))
291294 then {
292295 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
293-[StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
296+[StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), IntegerEntry(keyActivationHeight(amountAssetId, priceAssetId), height), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
294297 }
295298 else throw("Strict value is not equal to itself.")
296299 }
297300 else throw("Strict value is not equal to itself.")
298301 }
299302 else throw("Strict value is not equal to itself.")
300303 }
301304 else throw("Strict value is not equal to itself.")
302305 }
303306 else throw("Strict value is not equal to itself.")
304307 }
305308 else throw("Strict value is not equal to itself.")
306309 }
307310
308311
309312
310313 @Callable(i)
311314 func setAdmins (adminPubKeys) = {
312315 let checkCaller = mustManager(i)
313316 if ((checkCaller == checkCaller))
314317 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
315318 else throw("Strict value is not equal to itself.")
316319 }
317320
318321
319322
320323 @Callable(i)
321324 func setManager (pendingManagerPublicKey) = {
322325 let checkCaller = mustManager(i)
323326 if ((checkCaller == checkCaller))
324327 then {
325328 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
326329 if ((checkManagerPublicKey == checkManagerPublicKey))
327330 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
328331 else throw("Strict value is not equal to itself.")
329332 }
330333 else throw("Strict value is not equal to itself.")
331334 }
332335
333336
334337
335338 @Callable(i)
336339 func confirmManager () = {
337340 let pm = pendingManagerPublicKeyOrUnit()
338341 let hasPM = if (isDefined(pm))
339342 then true
340343 else throw("No pending manager")
341344 if ((hasPM == hasPM))
342345 then {
343346 let checkPM = if ((i.callerPublicKey == value(pm)))
344347 then true
345348 else throw("You are not pending manager")
346349 if ((checkPM == checkPM))
347350 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
348351 else throw("Strict value is not equal to itself.")
349352 }
350353 else throw("Strict value is not equal to itself.")
351354 }
352355
353356
354357
355358 @Callable(i)
356359 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
357360
358361
359362
360363 @Callable(i)
361364 func statusREADONLY (amountAssetId,priceAssetId) = {
362365 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
363366 case s: String =>
364367 s
365368 case _ =>
366369 unit
367370 }
368371 $Tuple2(nil, status)
369372 }
370373
371374
372375 @Verifier(tx)
373376 func verify () = {
374377 let targetPublicKey = match managerPublicKeyOrUnit() {
375378 case pk: ByteVector =>
376379 pk
377380 case _: Unit =>
378381 tx.senderPublicKey
379382 case _ =>
380383 throw("Match error")
381384 }
382385 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
383386 }
384387

github/deemru/w8io/026f985 
61.56 ms