tx · Cdg4bPT1LYDcqtJNeNWu8i5maCnagr457THYJwhthdpH

3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C:  -0.01400000 Waves

2023.01.06 13:07 [2392953] smart account 3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C > SELF 0.00000000 Waves

{ "type": 13, "id": "Cdg4bPT1LYDcqtJNeNWu8i5maCnagr457THYJwhthdpH", "fee": 1400000, "feeAssetId": null, "timestamp": 1672999680205, "version": 2, "chainId": 84, "sender": "3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C", "senderPublicKey": "FdYKNQwdMUQAvn4qKaXm1ZGT4LjfePqGcYHGZSeAeZ9M", "proofs": [ "5XuRdKS5TfS2LFB6EpTthBTkb3vY3nfGiDbRQUQYaqjzGEoqU1HsK89bNZBujmeLLUv4TK3sF6apdvhjZWVoLdnr" ], "script": "base64:BgIKCAISBgoEEhERCAEBEXZhbGlkYXRlQXJndW1lbnRzBApyZWNpcGllbnRzB2Ftb3VudHMKcGF5bWVudElkeAhwYXltZW50cwQOcmVjaXBpZW50c1NpemUJAJADAQUKcmVjaXBpZW50cwQLYW1vdW50c1NpemUJAJADAQUHYW1vdW50cwQOcGF5bWVudElkeFNpemUJAJADAQUKcGF5bWVudElkeAQMcGF5bWVudHNTaXplCQCQAwEFCHBheW1lbnRzBAltaW5BbW91bnQJAJcDAQUHYW1vdW50cwQNbWluUGF5bWVudElkeAkAlwMBBQpwYXltZW50SWR4BA1tYXhQYXltZW50SWR4CQCWAwEFCnBheW1lbnRJZHgKARFwYXltZW50c1ZhbGlkYXRvcgIMcGF5bWVudEFjY3VtC25leHRQYXltZW50BAkkdDA1ODc2MjQFDHBheW1lbnRBY2N1bQQNdmFsaWRQYXltZW50cwgFCSR0MDU4NzYyNAJfMQQBaggFCSR0MDU4NzYyNAJfMgMJAGcCBQFqBQxwYXltZW50c1NpemUJAJQKAgUNdmFsaWRQYXltZW50cwkAZAIFAWoAAQoBEWFtb3VudHNBZ2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BQNuaWwAAAoBBSRmMF8xAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQEYc2NyaXB0VHJhbnNmZXJzR2VuZXJhdG9yAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhNMaXN0IHNpemUgZXhjZWVkcyAyCQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgkAlAoCCAUGcmVzdWx0Al8xBQR1bml0ANh2CJM=", "height": 2392953, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DQCDSxJX9oEoiXV15qfF5y5V1vLMKaeKjQWcq4gusBsN Next: 3sqaP2Rt2ScxKeLNtb5bmzgSbQzFhGyeDbXzxu37xCZP Diff:
OldNewDifferences
1010 let minPaymentIdx = min(paymentIdx)
1111 let maxPaymentIdx = max(paymentIdx)
1212 func paymentsValidator (paymentAccum,nextPayment) = {
13- let $t0583620 = paymentAccum
14- let validPayments = $t0583620._1
15- let j = $t0583620._2
13+ let $t0587624 = paymentAccum
14+ let validPayments = $t0587624._1
15+ let j = $t0587624._2
1616 if ((j >= paymentsSize))
1717 then $Tuple2(validPayments, (j + 1))
1818 else {
1919 func amountsAggregator (amountAccum,nextAmount) = {
20- let $t0775804 = amountAccum
21- let amount = $t0775804._1
22- let k = $t0775804._2
20+ let $t0779808 = amountAccum
21+ let amount = $t0779808._1
22+ let k = $t0779808._2
2323 if (if ((k >= recipientsSize))
2424 then true
2525 else (paymentIdx[k] != j))
8787 else {
8888 let recipientsSize = size(recipients)
8989 func scriptTransfersGenerator (accum,next) = {
90- let $t018731905 = accum
91- let scriptTransfers = $t018731905._1
92- let j = $t018731905._2
90+ let $t018811913 = accum
91+ let scriptTransfers = $t018811913._1
92+ let j = $t018811913._2
9393 if ((j >= recipientsSize))
9494 then $Tuple2(scriptTransfers, (j + 1))
95- else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1))
95+ else $Tuple2((scriptTransfers :+ ScriptTransfer(Address(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1))
9696 }
9797
9898 let result = {
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) = {
13- let $t0583620 = paymentAccum
14- let validPayments = $t0583620._1
15- let j = $t0583620._2
13+ let $t0587624 = paymentAccum
14+ let validPayments = $t0587624._1
15+ let j = $t0587624._2
1616 if ((j >= paymentsSize))
1717 then $Tuple2(validPayments, (j + 1))
1818 else {
1919 func amountsAggregator (amountAccum,nextAmount) = {
20- let $t0775804 = amountAccum
21- let amount = $t0775804._1
22- let k = $t0775804._2
20+ let $t0779808 = amountAccum
21+ let amount = $t0779808._1
22+ let k = $t0779808._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
6060 else throw("List size exceeds 2")
6161
6262 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
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 $t018731905 = accum
91- let scriptTransfers = $t018731905._1
92- let j = $t018731905._2
90+ let $t018811913 = accum
91+ let scriptTransfers = $t018811913._1
92+ let j = $t018811913._2
9393 if ((j >= recipientsSize))
9494 then $Tuple2(scriptTransfers, (j + 1))
95- else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1))
95+ else $Tuple2((scriptTransfers :+ ScriptTransfer(Address(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 
37.40 ms