tx · 8aVB4qCePmauuk3RPM3VBvom1tCkdVQ2KgUC3fhs1rLw

3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C:  -0.01400000 Waves

2023.01.06 13:24 [2392971] smart account 3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C > SELF 0.00000000 Waves

{ "type": 13, "id": "8aVB4qCePmauuk3RPM3VBvom1tCkdVQ2KgUC3fhs1rLw", "fee": 1400000, "feeAssetId": null, "timestamp": 1673000739563, "version": 2, "chainId": 84, "sender": "3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C", "senderPublicKey": "FdYKNQwdMUQAvn4qKaXm1ZGT4LjfePqGcYHGZSeAeZ9M", "proofs": [ "KbAPSPrNMqv1mFodzdz2cRnv6Q3NEv1vC37wp5E69zjFn8ubSQ8WQHN1KaMfYTftm1RnTcp8LUkcTRr83nAtD8X" ], "script": "base64:BgIKCAISBgoEGBERCAEBEXZhbGlkYXRlQXJndW1lbnRzBApyZWNpcGllbnRzB2Ftb3VudHMKcGF5bWVudElkeAhwYXltZW50cwQOcmVjaXBpZW50c1NpemUJAJADAQUKcmVjaXBpZW50cwQLYW1vdW50c1NpemUJAJADAQUHYW1vdW50cwQOcGF5bWVudElkeFNpemUJAJADAQUKcGF5bWVudElkeAQMcGF5bWVudHNTaXplCQCQAwEFCHBheW1lbnRzBAltaW5BbW91bnQJAJcDAQUHYW1vdW50cwQNbWluUGF5bWVudElkeAkAlwMBBQpwYXltZW50SWR4BA1tYXhQYXltZW50SWR4CQCWAwEFCnBheW1lbnRJZHgKARFwYXltZW50c1ZhbGlkYXRvcgIMcGF5bWVudEFjY3VtC25leHRQYXltZW50BAkkdDA1ODM2MjAFDHBheW1lbnRBY2N1bQQNdmFsaWRQYXltZW50cwgFCSR0MDU4MzYyMAJfMQQBaggFCSR0MDU4MzYyMAJfMgMJAGcCBQFqBQxwYXltZW50c1NpemUJAJQKAgUNdmFsaWRQYXltZW50cwkAZAIFAWoAAQoBEWFtb3V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kbAoABSRhY2MwCQCUCgIFA25pbAAACgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJARhzY3JpcHRUcmFuc2ZlcnNHZW5lcmF0b3ICBQIkYQkAkQMCBQIkbAUCJGkKAQUkZjBfMgICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkAAgECE0xpc3Qgc2l6ZSBleGNlZWRzIDMJAQUkZjBfMgIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIFBSRhY2MwAAAAAQACAAMJAJQKAggFBnJlc3VsdAJfMQUEdW5pdACwHnjW", "height": 2392971, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3sqaP2Rt2ScxKeLNtb5bmzgSbQzFhGyeDbXzxu37xCZP Next: 7aZ18HAnHiNPupHK8UsQ5fuJqEgetPVD63S77GHWyhCS Diff:
OldNewDifferences
3737
3838 func $f0_2 ($a,$i) = if (($i >= $s))
3939 then $a
40- else throw("List size exceeds 2")
40+ else throw("List size exceeds 3")
4141
42- $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
42+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
4343 }
4444 if ((aggregatedAmount._1 == nextPayment.amount))
4545 then $Tuple2((validPayments + 1), (j + 1))
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 3")
6161
62- $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
62+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
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)
69- then (2 >= recipientsSize)
69+ then (3 >= recipientsSize)
7070 else false)
7171 then (paymentsSize > 0)
7272 else false)
105105
106106 func $f0_2 ($a,$i) = if (($i >= $s))
107107 then $a
108- else throw("List size exceeds 2")
108+ else throw("List size exceeds 3")
109109
110- $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
110+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
111111 }
112112 $Tuple2(result._1, unit)
113113 }
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
40- else throw("List size exceeds 2")
40+ else throw("List size exceeds 3")
4141
42- $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
42+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
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 3")
6161
62- $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
62+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
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)
69- then (2 >= recipientsSize)
69+ then (3 >= 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) = {
9090 let $t018731905 = accum
9191 let scriptTransfers = $t018731905._1
9292 let j = $t018731905._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
108- else throw("List size exceeds 2")
108+ else throw("List size exceeds 3")
109109
110- $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
110+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
111111 }
112112 $Tuple2(result._1, unit)
113113 }
114114
115115

github/deemru/w8io/026f985 
50.26 ms