tx · H7jf2AcxbepgXY9HdvvRWQ4Aak7kQq1Ac6nduhQ3zK8o

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01400000 Waves

2022.04.25 12:53 [2023863] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
46.69 ms