tx · H5D4FatLn1oC1mU1aP2VKcfagdHc48JUvorCjBxvu8yA

3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C:  -0.01400000 Waves

2023.01.06 13:35 [2392980] smart account 3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C > SELF 0.00000000 Waves

{ "type": 13, "id": "H5D4FatLn1oC1mU1aP2VKcfagdHc48JUvorCjBxvu8yA", "fee": 1400000, "feeAssetId": null, "timestamp": 1673001317866, "version": 2, "chainId": 84, "sender": "3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C", "senderPublicKey": "FdYKNQwdMUQAvn4qKaXm1ZGT4LjfePqGcYHGZSeAeZ9M", "proofs": [ "gAZsvnRYJsUAAcZbcXEaHupemSZbYDq9zfw4LyGzgqf2Lfky62X5MyJnSeMzjQkM1ng9pNutMg64VjkfRHT1hk9" ], "script": "base64:BgIKCAISBgoEGBERCAEBEXZhbGlkYXRlQXJndW1lbnRzBApyZWNpcGllbnRzB2Ftb3VudHMKcGF5bWVudElkeAhwYXltZW50cwQOcmVjaXBpZW50c1NpemUJAJADAQUKcmVjaXBpZW50cwQLYW1vdW50c1NpemUJAJADAQUHYW1vdW50cwQOcGF5bWVudElkeFNpemUJAJADAQUKcGF5bWVudElkeAQMcGF5bWVudHNTaXplCQCQAwEFCHBheW1lbnRzBAltaW5BbW91bnQJAJcDAQUHYW1vdW50cwQNbWluUGF5bWVudElkeAkAlwMBBQpwYXltZW50SWR4BA1tYXhQYXltZW50SWR4CQCWAwEFCnBheW1lbnRJZHgKARFwYXltZW50c1ZhbGlkYXRvcgIMcGF5bWVudEFjY3VtC25leHRQYXltZW50BAkkdDA1ODM2MjAFDHBheW1lbnRBY2N1bQQNdmFsaWRQYXltZW50cwgFCSR0MDU4MzYyMAJfMQQBaggFCSR0MDU4MzYyMAJfMgMJAGcCBQFqBQxwYXltZW50c1NpemUJAJQKAgUNdmFsaWRQYXltZW50cwkAZAIFAWoAAQoBEWFtb3VudHNBZ2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UBaQhwYXltZW50cwkAkQMCBQpwYXltZW50SWR4BQFqB2Fzc2V0SWQJAGQCBQFqAAEEBnJlc3VsdAoAAiRsBQdhbW91bnRzCgACJHMJAJADAQUCJGwKAAUkYWNjMAkAlAoCBQNuaWwAAAoBBSRmMF8xAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQEYc2NyaXB0VHJhbnNmZXJzR2VuZXJhdG9yAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhNMaXN0IHNpemUgZXhjZWVkcyAyCQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgkAlAoCCAUGcmVzdWx0Al8xBQR1bml0ADFPFn4=", "height": 2392980, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3bdKQY1vrPJPqTDt1q7j3wQXtUMQKmwGHcNfZphtqizb Next: GFBcyUDS8LhMtPQvtUatKqaqzdfX8iQtKucUS77nJszs Diff:
OldNewDifferences
5757
5858 func $f0_2 ($a,$i) = if (($i >= $s))
5959 then $a
60- else throw("List size exceeds 2")
60+ else throw("List size exceeds 10")
6161
62- $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
62+ $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)
6363 }
6464 if (if (if (if (if (if (if (if ((recipientsSize == amountsSize))
6565 then (recipientsSize == paymentIdxSize)
8787 else {
8888 let recipientsSize = size(recipients)
8989 func scriptTransfersGenerator (accum,next) = {
90- let $t018991931 = accum
91- let scriptTransfers = $t018991931._1
92- let j = $t018991931._2
90+ let $t019001932 = accum
91+ let scriptTransfers = $t019001932._1
92+ let j = $t019001932._2
9393 if ((j >= recipientsSize))
9494 then $Tuple2(scriptTransfers, (j + 1))
9595 else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func validateArguments (recipients,amounts,paymentIdx,payments) = {
55 let recipientsSize = size(recipients)
66 let amountsSize = size(amounts)
77 let paymentIdxSize = size(paymentIdx)
88 let paymentsSize = size(payments)
99 let minAmount = min(amounts)
1010 let minPaymentIdx = min(paymentIdx)
1111 let maxPaymentIdx = max(paymentIdx)
1212 func paymentsValidator (paymentAccum,nextPayment) = {
1313 let $t0583620 = paymentAccum
1414 let validPayments = $t0583620._1
1515 let j = $t0583620._2
1616 if ((j >= paymentsSize))
1717 then $Tuple2(validPayments, (j + 1))
1818 else {
1919 func amountsAggregator (amountAccum,nextAmount) = {
2020 let $t0775804 = amountAccum
2121 let amount = $t0775804._1
2222 let k = $t0775804._2
2323 if (if ((k >= recipientsSize))
2424 then true
2525 else (paymentIdx[k] != j))
2626 then $Tuple2(amount, (k + 1))
2727 else $Tuple2((amount + nextAmount), (k + 1))
2828 }
2929
3030 let aggregatedAmount = {
3131 let $l = amounts
3232 let $s = size($l)
3333 let $acc0 = $Tuple2(0, 0)
3434 func $f0_1 ($a,$i) = if (($i >= $s))
3535 then $a
3636 else amountsAggregator($a, $l[$i])
3737
3838 func $f0_2 ($a,$i) = if (($i >= $s))
3939 then $a
4040 else throw("List size exceeds 2")
4141
4242 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
4343 }
4444 if ((aggregatedAmount._1 == nextPayment.amount))
4545 then $Tuple2((validPayments + 1), (j + 1))
4646 else $Tuple2(validPayments, (j + 1))
4747 }
4848 }
4949
5050 let paymentsValidation = {
5151 let $l = payments
5252 let $s = size($l)
5353 let $acc0 = $Tuple2(0, 0)
5454 func $f0_1 ($a,$i) = if (($i >= $s))
5555 then $a
5656 else paymentsValidator($a, $l[$i])
5757
5858 func $f0_2 ($a,$i) = if (($i >= $s))
5959 then $a
60- else throw("List size exceeds 2")
60+ else throw("List size exceeds 10")
6161
62- $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
62+ $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)
6363 }
6464 if (if (if (if (if (if (if (if ((recipientsSize == amountsSize))
6565 then (recipientsSize == paymentIdxSize)
6666 else false)
6767 then (recipientsSize > 0)
6868 else false)
6969 then (2 >= recipientsSize)
7070 else false)
7171 then (paymentsSize > 0)
7272 else false)
7373 then (minAmount > 0)
7474 else false)
7575 then (minPaymentIdx == 0)
7676 else false)
7777 then (maxPaymentIdx == (paymentsSize - 1))
7878 else false)
7979 then (paymentsValidation._1 == paymentsSize)
8080 else false
8181 }
8282
8383
8484 @Callable(i)
8585 func massTransfer (recipients,amounts,paymentIdx,attachment) = if (!(validateArguments(recipients, amounts, paymentIdx, i.payments)))
8686 then throw("Invalid arguments")
8787 else {
8888 let recipientsSize = size(recipients)
8989 func scriptTransfersGenerator (accum,next) = {
90- let $t018991931 = accum
91- let scriptTransfers = $t018991931._1
92- let j = $t018991931._2
90+ let $t019001932 = accum
91+ let scriptTransfers = $t019001932._1
92+ let j = $t019001932._2
9393 if ((j >= recipientsSize))
9494 then $Tuple2(scriptTransfers, (j + 1))
9595 else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1))
9696 }
9797
9898 let result = {
9999 let $l = amounts
100100 let $s = size($l)
101101 let $acc0 = $Tuple2(nil, 0)
102102 func $f0_1 ($a,$i) = if (($i >= $s))
103103 then $a
104104 else scriptTransfersGenerator($a, $l[$i])
105105
106106 func $f0_2 ($a,$i) = if (($i >= $s))
107107 then $a
108108 else throw("List size exceeds 2")
109109
110110 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
111111 }
112112 $Tuple2(result._1, unit)
113113 }
114114
115115

github/deemru/w8io/026f985 
25.98 ms