tx · DCa1Y4dSitwvkLGaaezQzN1EYyFGK2iFvo3XuYqFWHMj 3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C: -0.01400000 Waves 2023.01.07 12:56 [2394379] smart account 3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C > SELF 0.00000000 Waves
{ "type": 13, "id": "DCa1Y4dSitwvkLGaaezQzN1EYyFGK2iFvo3XuYqFWHMj", "fee": 1400000, "feeAssetId": null, "timestamp": 1673085414927, "version": 2, "chainId": 84, "sender": "3N1Gvdh1nTHcAEF36MmwYtro9fFpSQYKq3C", "senderPublicKey": "FdYKNQwdMUQAvn4qKaXm1ZGT4LjfePqGcYHGZSeAeZ9M", "proofs": [ "2nGqpteiNmt6hWKV7fayQicDRk8Fb3F4cxVDy3eUUnfqnivu8Na2vLqUBXopsYRH4TQMoTQKRLGEdgHm4AWht4dT" ], "script": "base64:BgIKCAISBgoEGBERCAEBEXZhbGlkYXRlQXJndW1lbnRzBApyZWNpcGllbnRzB2Ftb3VudHMKcGF5bWVudElkeAhwYXltZW50cwQOcmVjaXBpZW50c1NpemUJAJADAQUKcmVjaXBpZW50cwQLYW1vdW50c1NpemUJAJADAQUHYW1vdW50cwQOcGF5bWVudElkeFNpemUJAJADAQUKcGF5bWVudElkeAQMcGF5bWVudHNTaXplCQCQAwEFCHBheW1lbnRzBAltaW5BbW91bnQJAJcDAQUHYW1vdW50cwQNbWluUGF5bWVudElkeAkAlwMBBQpwYXltZW50SWR4BA1tYXhQYXltZW50SWR4CQCWAwEFCnBheW1lbnRJZHgKARFwYXltZW50c1ZhbGlkYXRvcgIMcGF5bWVudEFjY3VtC25leHRQYXltZW50BAkkdDA1ODM2MjAFDHBheW1lbnRBY2N1bQQNdmFsaWRQYXltZW50cwgFCSR0MDU4MzYyMAJfMQQBaggFCSR0MDU4MzYyMAJfMgMJAGcCBQFqBQxwYXltZW50c1NpemUJAJQKAgUNdmFsaWRQYXltZW50cwkAZAIFAWoAAQoBEWFtb3Vud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jBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIFBSRhY2MwAAAAAQACAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdAB4AHwAgACEAIgAjACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyCQCUCgIIBQZyZXN1bHQCXzEFBHVuaXQAmoTvlA==", "height": 2394379, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9DQpPxoa9FTdMUs9yo7eKiX6xJqfkEeEkKGDAoxzuKu9 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | ||
38 | 38 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
39 | 39 | then $a | |
40 | - | else throw("List size exceeds | |
40 | + | else throw("List size exceeds 50") | |
41 | 41 | ||
42 | - | $f0_2($f0_1($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), 11) | |
42 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
43 | 43 | } | |
44 | 44 | if ((aggregatedAmount._1 == nextPayment.amount)) | |
45 | 45 | then $Tuple2((validPayments + 1), (j + 1)) | |
66 | 66 | else false) | |
67 | 67 | then (recipientsSize > 0) | |
68 | 68 | else false) | |
69 | - | then ( | |
69 | + | then (50 >= recipientsSize) | |
70 | 70 | else false) | |
71 | 71 | then (paymentsSize > 0) | |
72 | 72 | else false) | |
105 | 105 | ||
106 | 106 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
107 | 107 | then $a | |
108 | - | else throw("List size exceeds | |
108 | + | else throw("List size exceeds 50") | |
109 | 109 | ||
110 | - | $f0_2($f0_1($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), 11) | |
110 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
111 | 111 | } | |
112 | 112 | $Tuple2(result._1, unit) | |
113 | 113 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func validateArguments (recipients,amounts,paymentIdx,payments) = { | |
5 | 5 | let recipientsSize = size(recipients) | |
6 | 6 | let amountsSize = size(amounts) | |
7 | 7 | let paymentIdxSize = size(paymentIdx) | |
8 | 8 | let paymentsSize = size(payments) | |
9 | 9 | let minAmount = min(amounts) | |
10 | 10 | let minPaymentIdx = min(paymentIdx) | |
11 | 11 | let maxPaymentIdx = max(paymentIdx) | |
12 | 12 | func paymentsValidator (paymentAccum,nextPayment) = { | |
13 | 13 | let $t0583620 = paymentAccum | |
14 | 14 | let validPayments = $t0583620._1 | |
15 | 15 | let j = $t0583620._2 | |
16 | 16 | if ((j >= paymentsSize)) | |
17 | 17 | then $Tuple2(validPayments, (j + 1)) | |
18 | 18 | else { | |
19 | 19 | func amountsAggregator (amountAccum,nextAmount) = { | |
20 | 20 | let $t0775804 = amountAccum | |
21 | 21 | let amount = $t0775804._1 | |
22 | 22 | let k = $t0775804._2 | |
23 | 23 | if (if ((k >= recipientsSize)) | |
24 | 24 | then true | |
25 | 25 | else (paymentIdx[k] != j)) | |
26 | 26 | then $Tuple2(amount, (k + 1)) | |
27 | 27 | else $Tuple2((amount + nextAmount), (k + 1)) | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | let aggregatedAmount = { | |
31 | 31 | let $l = amounts | |
32 | 32 | let $s = size($l) | |
33 | 33 | let $acc0 = $Tuple2(0, 0) | |
34 | 34 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
35 | 35 | then $a | |
36 | 36 | else amountsAggregator($a, $l[$i]) | |
37 | 37 | ||
38 | 38 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
39 | 39 | then $a | |
40 | - | else throw("List size exceeds | |
40 | + | else throw("List size exceeds 50") | |
41 | 41 | ||
42 | - | $f0_2($f0_1($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), 11) | |
42 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
43 | 43 | } | |
44 | 44 | if ((aggregatedAmount._1 == nextPayment.amount)) | |
45 | 45 | then $Tuple2((validPayments + 1), (j + 1)) | |
46 | 46 | else $Tuple2(validPayments, (j + 1)) | |
47 | 47 | } | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | let paymentsValidation = { | |
51 | 51 | let $l = payments | |
52 | 52 | let $s = size($l) | |
53 | 53 | let $acc0 = $Tuple2(0, 0) | |
54 | 54 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
55 | 55 | then $a | |
56 | 56 | else paymentsValidator($a, $l[$i]) | |
57 | 57 | ||
58 | 58 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
59 | 59 | then $a | |
60 | 60 | else throw("List size exceeds 10") | |
61 | 61 | ||
62 | 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) | |
63 | 63 | } | |
64 | 64 | if (if (if (if (if (if (if (if ((recipientsSize == amountsSize)) | |
65 | 65 | then (recipientsSize == paymentIdxSize) | |
66 | 66 | else false) | |
67 | 67 | then (recipientsSize > 0) | |
68 | 68 | else false) | |
69 | - | then ( | |
69 | + | then (50 >= recipientsSize) | |
70 | 70 | else false) | |
71 | 71 | then (paymentsSize > 0) | |
72 | 72 | else false) | |
73 | 73 | then (minAmount > 0) | |
74 | 74 | else false) | |
75 | 75 | then (minPaymentIdx == 0) | |
76 | 76 | else false) | |
77 | 77 | then (maxPaymentIdx == (paymentsSize - 1)) | |
78 | 78 | else false) | |
79 | 79 | then (paymentsValidation._1 == paymentsSize) | |
80 | 80 | else false | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | @Callable(i) | |
85 | 85 | func massTransfer (recipients,amounts,paymentIdx,attachment) = if (!(validateArguments(recipients, amounts, paymentIdx, i.payments))) | |
86 | 86 | then throw("Invalid arguments") | |
87 | 87 | else { | |
88 | 88 | let recipientsSize = size(recipients) | |
89 | 89 | func scriptTransfersGenerator (accum,next) = { | |
90 | 90 | let $t019021934 = accum | |
91 | 91 | let scriptTransfers = $t019021934._1 | |
92 | 92 | let j = $t019021934._2 | |
93 | 93 | if ((j >= recipientsSize)) | |
94 | 94 | then $Tuple2(scriptTransfers, (j + 1)) | |
95 | 95 | else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1)) | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | let result = { | |
99 | 99 | let $l = amounts | |
100 | 100 | let $s = size($l) | |
101 | 101 | let $acc0 = $Tuple2(nil, 0) | |
102 | 102 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
103 | 103 | then $a | |
104 | 104 | else scriptTransfersGenerator($a, $l[$i]) | |
105 | 105 | ||
106 | 106 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
107 | 107 | then $a | |
108 | - | else throw("List size exceeds | |
108 | + | else throw("List size exceeds 50") | |
109 | 109 | ||
110 | - | $f0_2($f0_1($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), 11) | |
110 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
111 | 111 | } | |
112 | 112 | $Tuple2(result._1, unit) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 |
github/deemru/w8io/026f985 41.63 ms ◑