tx · 7pjDAjxCiUJpaW7vJrDnBfidGpLzYh8A3HC724Vdbr16

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01400000 Waves

2023.05.19 11:26 [2584592] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "7pjDAjxCiUJpaW7vJrDnBfidGpLzYh8A3HC724Vdbr16", "fee": 1400000, "feeAssetId": null, "timestamp": 1684484769108, "version": 2, "chainId": 84, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "23gJKGpBs3Rx3UjWNTWp325BMVckG3swjwcXPQj666hfMdkMFag41JDf6RKjQcdQqz127z46EiWpLogHkjmNzT8Q" ], "script": "base64:BgKnEAgCEgkKBwgICBgBCAESABIAEggKBggICAgICBIDCgEYEgASBAoCCAgiEGNvbnRyYWN0RmlsZW5hbWUiA1NFUCIMd2F2ZXNBc3NldElkIgdWTFRQT09MIghTVEJMUE9PTCIRaW52YWxpZFByaWNlQXNzZXQiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiB3Rocm93UEQiFHRocm93Q3JlYXRlTm90Q2FsbGVkIhF0aHJvd1lvdU5vdElzc3VlciIPdGhyb3dQb29sRXhpc3RzIhV0aHJvd0Fzc2V0Tm90VmVyaWZpZWQiFnRocm93SW52YWxpZFByaWNlQXNzZXQiFHRocm93SW52YWxpZEZlZUFzc2V0Ihd0aHJvd0ludmFsaWRBbW91bnRBc3NldCISdGhyb3dJbnZhbGlkU3RhdHVzIh90aHJvd0NhbkFjdGl2YXRlT25seVBlbmRpbmdQb29sIh10aHJvd0ZhY3RvcnlSZXR1cm5lZE5vdFN0cmluZyIcdGhyb3dJbnZhbGlkUHJpY2VBc3NldEFtb3VudCIPdGhyb3dJbnZhbGlkRmVlIhV0aHJvd0ludmFsaWRBc3NldFBha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bGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmFwAQlzZXRBZG1pbnMBAmJ4BAJiawkBAmFyAQUCYXADCQAAAgUCYmsFAmJrCQDMCAIJAQtTdHJpbmdFbnRyeQIJAQF6AAkAuQkCBQJieAUBYgUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmFwARNwcmljZUFzc2V0c1JFQURPTkxZAAkAlAoCBQNuaWwJAQJhZAEJAKIIAQkBAVgAAmFwAQ5zdGF0dXNSRUFET05MWQIBQgFDBAJhQgQBWgkAoggBCQEBQQIFAUIFAUMDCQABAgUBWgIGU3RyaW5nBAJhYQUBWgUCYWEFBHVuaXQJAJQKAgUDbmlsBQJhQgECYnkBAmJ6AAQCYkEEAVoJAQJhbQADCQABAgUBWgIKQnl0ZVZlY3RvcgQCYXEFAVoFAmFxAwkAAQIFAVoCBFVuaXQIBQJieQ9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCYnkJYm9keUJ5dGVzCQCRAwIIBQJieQZwcm9vZnMAAAUCYkE24JZm", "height": 2584592, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Duo9txVVnFQJBVSx9QubDAYiQF579MJuFCuonS7KnFDB Next: tXhDBS2mq3Yrg39TJBvb3aJ12cS8HL8zrvyGe6f5j9v Diff:
OldNewDifferences
271271 then true
272272 else throwPoolExists(), if ((amountAssetId != priceAssetId))
273273 then true
274- else throwInvalidAssetPair(), if (if (isVerified(amountAssetId))
275- then isVerified(priceAssetId)
276- else false)
274+ else throwInvalidAssetPair(), if (if (isManager(i))
275+ then true
276+ else if (isVerified(amountAssetId))
277+ then isVerified(priceAssetId)
278+ else false)
277279 then true
278280 else throwInvalidAssetPair(), if (if (containsElement(priceAssetsList, amountAssetId))
279281 then true
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFilename = "user_pools.ride"
55
66 let SEP = "__"
77
88 let wavesAssetId = "WAVES"
99
1010 let VLTPOOL = "VLTPOOL"
1111
1212 let STBLPOOL = "STBLPOOL"
1313
1414 let invalidPriceAsset = "Invalid price asset"
1515
1616 func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
1717
1818
1919 func throwErr (msg) = throw(wrapErr(msg))
2020
2121
2222 func throwPD () = throwErr("Permission denied")
2323
2424
2525 func throwCreateNotCalled () = throwErr("Create is not called for assets pair")
2626
2727
2828 func throwYouNotIssuer () = throwErr("You are not amountAsset issuer")
2929
3030
3131 func throwPoolExists () = throwErr("Pool with such assets already exists")
3232
3333
3434 func throwAssetNotVerified () = throwErr("Asset is not verified")
3535
3636
3737 func throwInvalidPriceAsset () = throwErr(invalidPriceAsset)
3838
3939
4040 func throwInvalidFeeAsset () = throwErr("Invalid fee asset")
4141
4242
4343 func throwInvalidAmountAsset () = throwErr("Invalid amount asset attached")
4444
4545
4646 func throwInvalidStatus () = throwErr("Invalid status")
4747
4848
4949 func throwCanActivateOnlyPendingPool () = throwErr("Can activate pool only in 'pending' status")
5050
5151
5252 func throwFactoryReturnedNotString () = throwErr("FactoryV2 returned not string")
5353
5454
5555 func throwInvalidPriceAssetAmount () = throwErr("invalid price asset amount")
5656
5757
5858 func throwInvalidFee () = throwErr("invalid fee")
5959
6060
6161 func throwInvalidAssetPair () = throwErr("invalid asset pair")
6262
6363
6464 func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
6565
6666
6767 func keyManagerVaultAddress () = "%s__managerVaultAddress"
6868
6969
7070 func keyAdminPubKeys () = makeString(["%s", "adminPubKeys"], SEP)
7171
7272
7373 func keyStatus (amountAssetId,priceAssetId) = makeString(["%s%s%s", "status", amountAssetId, priceAssetId], SEP)
7474
7575
7676 func keyFactoryContract () = makeString(["%s", "factoryContract"], SEP)
7777
7878
7979 func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], SEP)
8080
8181
8282 func keyEmissionContract () = makeString(["%s", "emissionContract"], SEP)
8383
8484
8585 func keySuffix (amountAssetId,priceAssetId) = makeString(["%s%s%s", "suffix", amountAssetId, priceAssetId], SEP)
8686
8787
8888 func keyLastIndex () = makeString(["%s", "lastIndex"], SEP)
8989
9090
9191 let indexSuffix = "u"
9292
9393 let statusPending = "pending"
9494
9595 let statusDeclined = "declined"
9696
9797 let statusActive = "active"
9898
9999 let statuses = [statusPending, statusDeclined, statusActive]
100100
101101 func keyCreateCalled (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCalled", amountAssetId, priceAssetId], SEP)
102102
103103
104104 func keyCreateCaller (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCaller", amountAssetId, priceAssetId], SEP)
105105
106106
107107 func keyAmountAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "amountAssetAmount", amountAssetId, priceAssetId], SEP)
108108
109109
110110 func keyPriceAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "priceAssetAmount", amountAssetId, priceAssetId], SEP)
111111
112112
113113 func keyHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "height", amountAssetId, priceAssetId], SEP)
114114
115115
116116 func keyPoolType (amountAssetId,priceAssetId) = makeString(["%s%s%s", "poolType", amountAssetId, priceAssetId], SEP)
117117
118118
119119 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
120120
121121
122122 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
123123
124124
125125 func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
126126
127127
128128 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
129129
130130
131131 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
132132
133133
134134 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
135135 case s: String =>
136136 addressFromStringValue(s)
137137 case _ =>
138138 this
139139 }
140140
141141
142142 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
143143
144144
145145 func stringOptionToList (stringOrUnit) = match stringOrUnit {
146146 case s: String =>
147147 if ((size(s) == 0))
148148 then nil
149149 else split(s, SEP)
150150 case _: Unit =>
151151 nil
152152 case _ =>
153153 throw("Match error")
154154 }
155155
156156
157157 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
158158
159159 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
160160
161161 let votingEmissionContract = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyVotingEmissionContract), wrapErr("voting emission contract address is required")))
162162
163163 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], SEP)
164164
165165 let votingEmissionCandidateContract = addressFromStringValue(valueOrErrorMessage(getString(votingEmissionContract, keyVotingEmissionCandidateContract), wrapErr("voting emission candidate contract address is required")))
166166
167167 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
168168
169169
170170 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
171171 then true
172172 else throwCreateNotCalled()
173173
174174
175175 func managerPublicKeyOrUnit () = {
176176 let managerVaultAddress = getManagerVaultAddressOrThis()
177177 match getString(managerVaultAddress, keyManagerPublicKey()) {
178178 case s: String =>
179179 fromBase58String(s)
180180 case _: Unit =>
181181 unit
182182 case _ =>
183183 throw("Match error")
184184 }
185185 }
186186
187187
188188 func isManager (i) = match managerPublicKeyOrUnit() {
189189 case pk: ByteVector =>
190190 (i.callerPublicKey == pk)
191191 case _: Unit =>
192192 (i.caller == this)
193193 case _ =>
194194 throw("Match error")
195195 }
196196
197197
198198 func mustManager (i) = if (isManager(i))
199199 then true
200200 else throwPD()
201201
202202
203203 func mustAdmin (i) = {
204204 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
205205 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
206206 then true
207207 else mustManager(i)
208208 }
209209
210210
211211 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
212212
213213
214214 func getIdAndInfo (payment) = match payment.assetId {
215215 case id: ByteVector =>
216216 let info = value(assetInfo(id))
217217 $Tuple2(toBase58String(id), info)
218218 case _: Unit =>
219219 $Tuple2(wavesAssetId, unit)
220220 case _ =>
221221 throw("Match error")
222222 }
223223
224224
225225 func validStatus (status) = containsElement(statuses, status)
226226
227227
228228 func _create (i,poolType) = {
229229 let amountAssetPayment = value(i.payments[0])
230230 let priceAssetPayment = value(i.payments[1])
231231 let feeAssetPayment = value(i.payments[2])
232232 let $t064836555 = getIdAndInfo(amountAssetPayment)
233233 let amountAssetId = $t064836555._1
234234 let amountAssetInfo = $t064836555._2
235235 let $t065586627 = getIdAndInfo(priceAssetPayment)
236236 let priceAssetId = $t065586627._1
237237 let priceAssetInfo = $t065586627._2
238238 let $t066306693 = getIdAndInfo(feeAssetPayment)
239239 let feeAssetId = $t066306693._1
240240 let feeAssetInfo = $t066306693._2
241241 let amountAssetAmount = amountAssetPayment.amount
242242 let priceAssetAmount = priceAssetPayment.amount
243243 let feeAssetAmount = feeAssetPayment.amount
244244 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
245245 let assetMinAmountDefault = getIntegerValue(keyAmountAssetMinAmount())
246246 let allowedAssetsMinAmounts = stringOptionToList(getString(keyPriceAssetsMinAmount()))
247247 let amountAssetMinAmount = if (containsElement(priceAssetsList, amountAssetId))
248248 then {
249249 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, amountAssetId), invalidPriceAsset)
250250 value(parseInt(allowedAssetsMinAmounts[priceAssetsIndex]))
251251 }
252252 else assetMinAmountDefault
253253 let priceAssetMinAmount = if (containsElement(priceAssetsList, priceAssetId))
254254 then {
255255 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
256256 value(parseInt(allowedAssetsMinAmounts[priceAssetsIndex]))
257257 }
258258 else assetMinAmountDefault
259259 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
260260 let curIndex = (lastIndex + 1)
261261 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract()))
262262 let poolExists = {
263263 let @ = invoke(factoryContract, "poolExistsREADONLY", [amountAssetId, priceAssetId], nil)
264264 if ($isInstanceOf(@, "Boolean"))
265265 then @
266266 else throw(($getType(@) + " couldn't be cast to Boolean"))
267267 }
268268 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
269269 then true
270270 else throwPoolExists(), if (!(poolExists))
271271 then true
272272 else throwPoolExists(), if ((amountAssetId != priceAssetId))
273273 then true
274- else throwInvalidAssetPair(), if (if (isVerified(amountAssetId))
275- then isVerified(priceAssetId)
276- else false)
274+ else throwInvalidAssetPair(), if (if (isManager(i))
275+ then true
276+ else if (isVerified(amountAssetId))
277+ then isVerified(priceAssetId)
278+ else false)
277279 then true
278280 else throwInvalidAssetPair(), if (if (containsElement(priceAssetsList, amountAssetId))
279281 then true
280282 else containsElement(priceAssetsList, priceAssetId))
281283 then true
282284 else throwInvalidAssetPair(), if (if (isManager(i))
283285 then true
284286 else (getString(keyFeeAssetId()) == feeAssetId))
285287 then true
286288 else throwInvalidFeeAsset(), if (if (isManager(i))
287289 then true
288290 else (amountAssetAmount >= getIntegerValue(keyAmountAssetMinAmount())))
289291 then true
290292 else throwInvalidAmountAsset(), if (if (isManager(i))
291293 then true
292294 else (priceAssetAmount >= priceAssetMinAmount))
293295 then true
294296 else throwInvalidPriceAssetAmount(), if (if (isManager(i))
295297 then true
296298 else (feeAssetAmount == getInteger(keyFeeAmount())))
297299 then true
298300 else throwInvalidFee()]
299301 if ((checks == checks))
300302 then {
301303 let paymentsWithFeeSize = 3
302304 let burnEmissionInv = if ((size(i.payments) >= paymentsWithFeeSize))
303305 then invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetAmount)])
304306 else unit
305307 if ((burnEmissionInv == burnEmissionInv))
306308 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), amountAssetAmount), IntegerEntry(keyPriceAssetAmount(amountAssetId, priceAssetId), priceAssetAmount), StringEntry(keyPoolType(amountAssetId, priceAssetId), poolType)]
307309 else throw("Strict value is not equal to itself.")
308310 }
309311 else throw("Strict value is not equal to itself.")
310312 }
311313
312314
313315 @Callable(i)
314316 func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
315317 let checkCaller = mustManager(i)
316318 if ((checkCaller == checkCaller))
317319 then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
318320 else throw("Strict value is not equal to itself.")
319321 }
320322
321323
322324
323325 @Callable(i)
324326 func create () = _create(i, VLTPOOL)
325327
326328
327329
328330 @Callable(i)
329331 func createStable () = {
330332 let checkCaller = mustManager(i)
331333 if ((checkCaller == checkCaller))
332334 then _create(i, STBLPOOL)
333335 else throw("Strict value is not equal to itself.")
334336 }
335337
336338
337339
338340 @Callable(i)
339341 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
340342 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
341343 then true
342344 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
343345 then true
344346 else throwCanActivateOnlyPendingPool()]
345347 if ((checks == checks))
346348 then {
347349 let poolTypeOption = getString(this, keyPoolType(amountAssetId, priceAssetId))
348350 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, if ((poolTypeOption == unit))
349351 then "VLTPOOL"
350352 else value(poolTypeOption), logo], nil)
351353 if ((activateNewPoolInv == activateNewPoolInv))
352354 then {
353355 let lpAssetId = match activateNewPoolInv {
354356 case id: String =>
355357 id
356358 case _ =>
357359 throwFactoryReturnedNotString()
358360 }
359361 if ((lpAssetId == lpAssetId))
360362 then {
361363 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
362364 if ((beforePut == beforePut))
363365 then {
364366 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(if ((amountAssetId == "WAVES"))
365367 then unit
366368 else fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
367369 then unit
368370 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
369371 if ((put == put))
370372 then {
371373 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
372374 if ((afterPut == afterPut))
373375 then {
374376 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
375377 let res = invoke(votingEmissionCandidateContract, "approve", [amountAssetId, priceAssetId], nil)
376378 if ((res == res))
377379 then [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
378380 else throw("Strict value is not equal to itself.")
379381 }
380382 else throw("Strict value is not equal to itself.")
381383 }
382384 else throw("Strict value is not equal to itself.")
383385 }
384386 else throw("Strict value is not equal to itself.")
385387 }
386388 else throw("Strict value is not equal to itself.")
387389 }
388390 else throw("Strict value is not equal to itself.")
389391 }
390392 else throw("Strict value is not equal to itself.")
391393 }
392394
393395
394396
395397 @Callable(i)
396398 func setAdmins (adminPubKeys) = {
397399 let checkCaller = mustManager(i)
398400 if ((checkCaller == checkCaller))
399401 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
400402 else throw("Strict value is not equal to itself.")
401403 }
402404
403405
404406
405407 @Callable(i)
406408 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
407409
408410
409411
410412 @Callable(i)
411413 func statusREADONLY (amountAssetId,priceAssetId) = {
412414 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
413415 case s: String =>
414416 s
415417 case _ =>
416418 unit
417419 }
418420 $Tuple2(nil, status)
419421 }
420422
421423
422424 @Verifier(tx)
423425 func verify () = {
424426 let targetPublicKey = match managerPublicKeyOrUnit() {
425427 case pk: ByteVector =>
426428 pk
427429 case _: Unit =>
428430 tx.senderPublicKey
429431 case _ =>
430432 throw("Match error")
431433 }
432434 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
433435 }
434436

github/deemru/w8io/026f985 
45.73 ms