tx · AjEBmJjy3NLcc7oQghBdYLDjQncoWTEnkdpUzSMcRzex

3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx:  -0.01600000 Waves

2023.08.18 10:33 [2715748] smart account 3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx > SELF 0.00000000 Waves

{ "type": 13, "id": "AjEBmJjy3NLcc7oQghBdYLDjQncoWTEnkdpUzSMcRzex", "fee": 1600000, "feeAssetId": null, "timestamp": 1692344050842, "version": 1, "sender": "3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx", "senderPublicKey": "62CHk4MqTdq3LqeUycy7TPnpvwrjgerSa2FqAY2EafXn", "proofs": [ "2XuhsX8jwY6Xx8ohSeEAjbuETTEJF5AgNvN9FwsqzUW5xzfUKm5kxXBqfeBqN5FztXa7dhxZeWUAAr4Sqdx2s84e" ], "script": "base64:BwKHAQgCEgQKAggIEgQKAggBEgQKAggEEgQKAggCEgMKAQgSAwoBARIDCgEBEgUKAwIBAhIFCgMCGBgSBAoCAgESBAoCAgESBgoEAQEBARIGCgQBAQEBEgASAwoBCBIDCgEYEgASABIDCgEIEgASBAoCCAgSBAoCCBgSAwoBCBIFCgMCAgESAwoBCDcAA1NFUAICX18ABVdBVkVTAgVXQVZFUwAQY29udHJhY3RGaWxlbmFtZQIMZmFjdG9yeS5yaWRlAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAQ9zdHJpbmdUb0Fzc2V0SWQBAXMDCQAAAgUBcwUFV0FWRVMFBHVuaXQJANkEAQUBcwAPQURNSU5fTElTVF9TSVpFAAUABlFVT1JVTQADABFUWElEX0JZVEVTX0xFTkdUSAAgARhrZXlBbGxvd2VkVHhJZFZvdGVQcmVmaXgBBHR4SWQJALkJAgkAzAgCAgYlcyVzJXMJAMwIAgIJYWxsb3dUeElkCQDMCAIFBHR4SWQFA25p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CdCAIFBHRoaXMJAQ5rZXlBbGxvd2VkVHhJZAACAAQHYnlPd25lcgMJAGcCCQCQAwEJAQ1nZXRBZG1pbnNMaXN0AAUGUVVPUlVNBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQMDBQpieVByb3Bvc2FsBgUIYnlBZG1pbnMGBQdieU93bmVy9cfDOw==", "chainId": 84, "height": 2715748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DygbdmnjtaS9cYUyP4yqdooK3Fs8n1uQmZwsXh2EyByL Next: 2qdzZdBTHW56ucvmocdoAWq86Teq67bxek3X69BkFzw2 Diff:
OldNewDifferences
486486
487487
488488 @Callable(i)
489-func powerStake (recipientBytes) = if (onlyCalculator(i))
490- then $Tuple2(nil, invoke(powerContractAddressOrFail, "commitForMiner", [toString(Address(recipientBytes))], i.payments))
489+func powerStake (recipientBytes,assetIdBytes,amount) = if (onlyCalculator(i))
490+ then $Tuple2(nil, invoke(powerContractAddressOrFail, "commitForMiner", [toString(Address(recipientBytes))], [AttachedPayment(assetIdBytes, amount)]))
491491 else $Tuple2(nil, unit)
492492
493493
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let WAVES = "WAVES"
77
88 let contractFilename = "factory.ride"
99
1010 func wrapErr (s) = ((contractFilename + ": ") + s)
1111
1212
1313 func throwErr (s) = throw(wrapErr(s))
1414
1515
1616 func stringToAssetId (s) = if ((s == WAVES))
1717 then unit
1818 else fromBase58String(s)
1919
2020
2121 let ADMIN_LIST_SIZE = 5
2222
2323 let QUORUM = 3
2424
2525 let TXID_BYTES_LENGTH = 32
2626
2727 func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP)
2828
2929
3030 func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP)
3131
3232
3333 func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP)
3434
3535
3636 func keyAllowedTxId () = makeString(["%s", "txId"], SEP)
3737
3838
3939 func getAdminVote (prefix,admin) = {
4040 let voteKey = keyFullAdminVote(prefix, admin)
4141 valueOrElse(getInteger(voteKey), 0)
4242 }
4343
4444
4545 func getAdminsList () = match getString(this, keyAdminAddressList()) {
4646 case s: String =>
4747 split(s, SEP)
4848 case _ =>
4949 nil
5050 }
5151
5252
5353 func isInAdminList (address) = containsElement(getAdminsList(), address)
5454
5555
5656 func genVotesKeysHelper (a,adminAddress) = {
5757 let $t013751399 = a
5858 let result = $t013751399._1
5959 let prefix = $t013751399._2
6060 $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
6161 }
6262
6363
6464 func genVotesKeys (keyPrefix) = {
6565 let adminList = keyAdminAddressList()
6666 let $t015461630 = {
6767 let $l = getAdminsList()
6868 let $s = size($l)
6969 let $acc0 = $Tuple2(nil, keyPrefix)
7070 func $f0_1 ($a,$i) = if (($i >= $s))
7171 then $a
7272 else genVotesKeysHelper($a, $l[$i])
7373
7474 func $f0_2 ($a,$i) = if (($i >= $s))
7575 then $a
7676 else throw("List size exceeds 5")
7777
7878 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
7979 }
8080 let result = $t015461630._1
8181 let prefix = $t015461630._2
8282 result
8383 }
8484
8585
8686 func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0))
8787
8888
8989 func countVotes (prefix) = {
9090 let votes = genVotesKeys(prefix)
9191 let $l = votes
9292 let $s = size($l)
9393 let $acc0 = 0
9494 func $f0_1 ($a,$i) = if (($i >= $s))
9595 then $a
9696 else countVotesHelper($a, $l[$i])
9797
9898 func $f0_2 ($a,$i) = if (($i >= $s))
9999 then $a
100100 else throw("List size exceeds 5")
101101
102102 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
103103 }
104104
105105
106106 func clearVotesHelper (result,key) = (result :+ DeleteEntry(key))
107107
108108
109109 func getClearVoteEntries (prefix) = {
110110 let votes = genVotesKeys(prefix)
111111 let $l = votes
112112 let $s = size($l)
113113 let $acc0 = nil
114114 func $f0_1 ($a,$i) = if (($i >= $s))
115115 then $a
116116 else clearVotesHelper($a, $l[$i])
117117
118118 func $f0_2 ($a,$i) = if (($i >= $s))
119119 then $a
120120 else throw("List size exceeds 5")
121121
122122 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
123123 }
124124
125125
126126 func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = {
127127 let voteKey = keyFullAdminVote(keyPrefix, callerAddressString)
128128 let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString)
129129 let err = if (!(isInAdminList(callerAddressString)))
130130 then throwErr((("Address: " + callerAddressString) + " not in Admin list"))
131131 else if ((adminCurrentVote == 1))
132132 then throwErr((voteKey + " you already voted"))
133133 else unit
134134 if ((err == err))
135135 then {
136136 let votes = countVotes(keyPrefix)
137137 if (((votes + 1) >= minVotes))
138138 then {
139139 let clearVoteEntries = getClearVoteEntries(keyPrefix)
140140 (clearVoteEntries ++ voteResult)
141141 }
142142 else [IntegerEntry(voteKey, 1)]
143143 }
144144 else throw("Strict value is not equal to itself.")
145145 }
146146
147147
148148 func keyCalculatorAddress () = "%s__calculator"
149149
150150
151151 func keyProxyTreasuryAddress () = "%s__proxyTreasury"
152152
153153
154154 func keyPowerContractAddress () = "%s__powerContract"
155155
156156
157157 func keySwapContractAddress () = "%s__swapContract"
158158
159159
160160 func keyChildAddress () = "%s__child"
161161
162162
163163 func keyBlockProcessingReward () = "%s__blockProcessingReward"
164164
165165
166166 func keyNextBlockToProcess () = "%s__nextBlockToProcess"
167167
168168
169169 func keyLpAssetId () = "%s__lpAssetId"
170170
171171
172172 let calculatorAddressOption = match getString(this, keyCalculatorAddress()) {
173173 case s: String =>
174174 addressFromString(s)
175175 case _: Unit =>
176176 unit
177177 case _ =>
178178 throw("Match error")
179179 }
180180
181181 let calculatorAddressOrFail = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address"))
182182
183183 let proxyTreasuryAddressOption = match getString(this, keyProxyTreasuryAddress()) {
184184 case s: String =>
185185 addressFromString(s)
186186 case _: Unit =>
187187 unit
188188 case _ =>
189189 throw("Match error")
190190 }
191191
192192 let proxyTreasuryAddressOrFail = valueOrErrorMessage(proxyTreasuryAddressOption, wrapErr("invalid proxy treasury address"))
193193
194194 let powerContractAddressOption = match getString(this, keyPowerContractAddress()) {
195195 case s: String =>
196196 addressFromString(s)
197197 case _: Unit =>
198198 unit
199199 case _ =>
200200 throw("Match error")
201201 }
202202
203203 let powerContractAddressOrFail = valueOrErrorMessage(powerContractAddressOption, wrapErr("invalid power contract address"))
204204
205205 let swapContractAddressOption = match getString(this, keySwapContractAddress()) {
206206 case s: String =>
207207 addressFromString(s)
208208 case _: Unit =>
209209 unit
210210 case _ =>
211211 throw("Match error")
212212 }
213213
214214 let swapContractAddressOrFail = valueOrErrorMessage(swapContractAddressOption, wrapErr("invalid swap contract address"))
215215
216216 func keyConfigAddress () = "%s__config"
217217
218218
219219 func keyChildrenAddress () = "contract_children"
220220
221221
222222 func keyVotingResultAddress () = "contract_voting_result"
223223
224224
225225 func keyProposalAllowBroadcast (address,txId) = ((("proposal_allow_broadcast_" + toString(address)) + "_") + toBase58String(txId))
226226
227227
228228 func keyInvestedByUser (childAddress,userAddress) = makeString(["investor", toString(childAddress), toString(userAddress)], "_")
229229
230230
231231 let configAddressOption = match getString(this, keyConfigAddress()) {
232232 case s: String =>
233233 addressFromString(s)
234234 case _: Unit =>
235235 unit
236236 case _ =>
237237 throw("Match error")
238238 }
239239
240240 let configAddressOrFail = valueOrErrorMessage(configAddressOption, wrapErr("invalid config address"))
241241
242242 let votingResultAddressOption = match configAddressOption {
243243 case a: Address =>
244244 match getString(a, keyVotingResultAddress()) {
245245 case s: String =>
246246 addressFromString(s)
247247 case _: Unit =>
248248 unit
249249 case _ =>
250250 throw("Match error")
251251 }
252252 case _: Unit =>
253253 unit
254254 case _ =>
255255 throw("Match error")
256256 }
257257
258258 let votingResultAddressOrFail = valueOrErrorMessage(votingResultAddressOption, wrapErr("invalid voting result address"))
259259
260260 let childrenAddressOption = match configAddressOption {
261261 case a: Address =>
262262 match getString(a, keyChildrenAddress()) {
263263 case s: String =>
264264 addressFromString(s)
265265 case _: Unit =>
266266 unit
267267 case _ =>
268268 throw("Match error")
269269 }
270270 case _: Unit =>
271271 unit
272272 case _ =>
273273 throw("Match error")
274274 }
275275
276276 let childrenAddressOrFail = valueOrErrorMessage(childrenAddressOption, wrapErr("invalid children address"))
277277
278278 let lpAssetIdOption = match getString(this, keyLpAssetId()) {
279279 case s: String =>
280280 fromBase58String(s)
281281 case _: Unit =>
282282 unit
283283 case _ =>
284284 throw("Match error")
285285 }
286286
287287 let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId"))
288288
289289 func onlyAddress (i,address) = if ((i.caller == address))
290290 then true
291291 else throwErr("permission denied")
292292
293293
294294 func onlyThis (i) = onlyAddress(i, this)
295295
296296
297297 func onlyCalculator (i) = onlyAddress(i, calculatorAddressOrFail)
298298
299299
300300 @Callable(i)
301301 func stringEntry (key,val) = if (onlyCalculator(i))
302302 then $Tuple2([StringEntry(key, val)], key)
303303 else $Tuple2(nil, unit)
304304
305305
306306
307307 @Callable(i)
308308 func integerEntry (key,val) = if (onlyCalculator(i))
309309 then $Tuple2([IntegerEntry(key, val)], key)
310310 else $Tuple2(nil, unit)
311311
312312
313313
314314 @Callable(i)
315315 func booleanEntry (key,val) = if (onlyCalculator(i))
316316 then $Tuple2([BooleanEntry(key, val)], key)
317317 else $Tuple2(nil, unit)
318318
319319
320320
321321 @Callable(i)
322322 func binaryEntry (key,val) = if (onlyCalculator(i))
323323 then $Tuple2([BinaryEntry(key, val)], key)
324324 else $Tuple2(nil, unit)
325325
326326
327327
328328 @Callable(i)
329329 func deleteEntry (key) = if (onlyCalculator(i))
330330 then $Tuple2([DeleteEntry(key)], key)
331331 else $Tuple2(nil, unit)
332332
333333
334334
335335 @Callable(i)
336336 func reissue (amount) = if (onlyCalculator(i))
337337 then $Tuple2([Reissue(lpAssetIdOrFail, amount, true)], amount)
338338 else $Tuple2(nil, unit)
339339
340340
341341
342342 @Callable(i)
343343 func burn (amount) = if (onlyCalculator(i))
344344 then $Tuple2([Burn(lpAssetIdOrFail, amount)], amount)
345345 else $Tuple2(nil, unit)
346346
347347
348348
349349 @Callable(i)
350350 func transferAsset (recipientBytes,amount,assetId) = if (onlyCalculator(i))
351351 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount)
352352 else $Tuple2(nil, unit)
353353
354354
355355
356356 @Callable(i)
357357 func transferAssets (recipientBytes,assetsList,amountsList) = if (onlyCalculator(i))
358358 then {
359359 func addNewTransfer (acc,nextAssetId) = {
360360 let $t081188142 = acc
361361 let transfers = $t081188142._1
362362 let j = $t081188142._2
363363 let newTransfer = ScriptTransfer(Address(recipientBytes), parseIntValue(amountsList[j]), stringToAssetId(assetsList[j]))
364364 let updatedTransfers = (transfers :+ newTransfer)
365365 $Tuple2(updatedTransfers, (j + 1))
366366 }
367367
368368 let $t084028483 = {
369369 let $l = assetsList
370370 let $s = size($l)
371371 let $acc0 = $Tuple2(nil, 0)
372372 func $f0_1 ($a,$i) = if (($i >= $s))
373373 then $a
374374 else addNewTransfer($a, $l[$i])
375375
376376 func $f0_2 ($a,$i) = if (($i >= $s))
377377 then $a
378378 else throw("List size exceeds 10")
379379
380380 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
381381 }
382382 let assetsTransfers = $t084028483._1
383383 let _lastIndex = $t084028483._2
384384 $Tuple2(assetsTransfers, unit)
385385 }
386386 else $Tuple2(nil, unit)
387387
388388
389389
390390 @Callable(i)
391391 func transferWaves (recipientBytes,amount) = if (onlyCalculator(i))
392392 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount)
393393 else $Tuple2(nil, unit)
394394
395395
396396
397397 @Callable(i)
398398 func transferFromProxyTreasury (recipientBytes,rewardsAmount) = if (onlyCalculator(i))
399399 then $Tuple2(nil, invoke(proxyTreasuryAddressOrFail, "transferWaves", [recipientBytes, rewardsAmount], nil))
400400 else $Tuple2(nil, unit)
401401
402402
403403
404404 @Callable(i)
405405 func finalize (donationPartInWaves,lpPartInWaves,claimPartInWaves,powerStakePartInWaves) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalize", [i.caller.bytes, donationPartInWaves, lpPartInWaves, claimPartInWaves, powerStakePartInWaves], i.payments))
406406
407407
408408
409409 @Callable(i)
410410 func finalizeREADONLY (donationPartInWaves,lpPartInWaves,claimPartInWaves,powerStakePartInWaves) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "finalizeREADONLY", [donationPartInWaves, lpPartInWaves, claimPartInWaves, powerStakePartInWaves], nil))
411411
412412
413413
414414 @Callable(i)
415415 func claimLP () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimLP", [i.caller.bytes], i.payments))
416416
417417
418418
419419 @Callable(i)
420420 func claimCollateral (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateral", [i.caller.bytes, txIdStr], i.payments))
421421
422422
423423
424424 @Callable(i)
425425 func claimCollateralBulk (txIds) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateralBulk", [i.caller.bytes, txIds], i.payments))
426426
427427
428428
429429 @Callable(i)
430430 func invest () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "invest", [i.caller.bytes], i.payments))
431431
432432
433433
434434 @Callable(i)
435435 func withdraw () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "withdraw", [i.caller.bytes], i.payments))
436436
437437
438438
439439 @Callable(i)
440440 func cancelWithdraw (txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "cancelWithdraw", [i.caller.bytes, fromBase58String(txIdStr)], i.payments))
441441
442442
443443
444444 @Callable(i)
445445 func processBlocks () = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "processBlocks", [i.caller.bytes], i.payments))
446446
447447
448448
449449 @Callable(i)
450450 func claimCollateralREADONLY (userAddress,txIdStr) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateralREADONLY", [fromBase58String(userAddress), txIdStr], nil))
451451
452452
453453
454454 @Callable(i)
455455 func claimCollateralBulkREADONLY (userAddress,txIds) = $Tuple2(nil, reentrantInvoke(calculatorAddressOrFail, "claimCollateralBulkREADONLY", [fromBase58String(userAddress), txIds], nil))
456456
457457
458458
459459 @Callable(i)
460460 func swap (assetId) = {
461461 let check = [onlyCalculator(i)]
462462 if ((check == check))
463463 then {
464464 let initAssetBalance = if ((assetId == "WAVES"))
465465 then wavesBalance(this).available
466466 else assetBalance(this, fromBase58String(assetId))
467467 if ((initAssetBalance == initAssetBalance))
468468 then {
469469 let swapInvoke = invoke(swapContractAddressOrFail, "swap", [0, assetId, toString(this)], i.payments)
470470 if ((swapInvoke == swapInvoke))
471471 then {
472472 let newAssetBalance = if ((assetId == "WAVES"))
473473 then wavesBalance(this).available
474474 else assetBalance(this, fromBase58String(assetId))
475475 if ((newAssetBalance == newAssetBalance))
476476 then $Tuple2(nil, (newAssetBalance - initAssetBalance))
477477 else throw("Strict value is not equal to itself.")
478478 }
479479 else throw("Strict value is not equal to itself.")
480480 }
481481 else throw("Strict value is not equal to itself.")
482482 }
483483 else throw("Strict value is not equal to itself.")
484484 }
485485
486486
487487
488488 @Callable(i)
489-func powerStake (recipientBytes) = if (onlyCalculator(i))
490- then $Tuple2(nil, invoke(powerContractAddressOrFail, "commitForMiner", [toString(Address(recipientBytes))], i.payments))
489+func powerStake (recipientBytes,assetIdBytes,amount) = if (onlyCalculator(i))
490+ then $Tuple2(nil, invoke(powerContractAddressOrFail, "commitForMiner", [toString(Address(recipientBytes))], [AttachedPayment(assetIdBytes, amount)]))
491491 else $Tuple2(nil, unit)
492492
493493
494494
495495 @Callable(i)
496496 func voteForTxId (txId) = {
497497 let callerAddressString = toBase58String(i.caller.bytes)
498498 let keyPrefix = keyAllowedTxIdVotePrefix(txId)
499499 let result = [StringEntry(keyAllowedTxId(), txId)]
500500 let allowedTxIdOption = getString(this, keyAllowedTxId())
501501 let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH))
502502 then true
503503 else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit))
504504 then true
505505 else (value(allowedTxIdOption) != txId))
506506 then true
507507 else throwErr((txId + " is already allowed"))]
508508 if ((err == err))
509509 then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result)
510510 else throw("Strict value is not equal to itself.")
511511 }
512512
513513
514514 @Verifier(tx)
515515 func verify () = {
516516 let byProposal = match votingResultAddressOption {
517517 case proposalAddress: Address =>
518518 valueOrElse(getBoolean(proposalAddress, keyProposalAllowBroadcast(this, tx.id)), false)
519519 case _ =>
520520 false
521521 }
522522 let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), "")))
523523 let byOwner = if ((size(getAdminsList()) >= QUORUM))
524524 then false
525525 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
526526 if (if (byProposal)
527527 then true
528528 else byAdmins)
529529 then true
530530 else byOwner
531531 }
532532

github/deemru/w8io/169f3d6 
104.22 ms