tx · 13bW8pmxgJs6KT8zJAJhx13n9hmz4BqwzW4pZc4JemhQ 3Ms2ssGBpsFccHLtdb5zApeJ51jU3377r1d: -0.01000000 Waves 2023.10.12 12:29 [2795203] smart account 3Ms2ssGBpsFccHLtdb5zApeJ51jU3377r1d > SELF 0.00000000 Waves
{ "type": 13, "id": "13bW8pmxgJs6KT8zJAJhx13n9hmz4BqwzW4pZc4JemhQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1697102984853, "version": 2, "chainId": 84, "sender": "3Ms2ssGBpsFccHLtdb5zApeJ51jU3377r1d", "senderPublicKey": "7E4cNcg8gSYTmNbmLG2kvAiePh9KZoAT7W64shHxCc6n", "proofs": [ "DF9zENUgjqekdwhPZq5ayWdjPMRDYUJnUXnMUCKtZneYFQy88ppsawDFar9aXULBJo7r6mFxnScCRpVsCSTqwc1" ], "script": "base64:BgIPCAISBgoEGBERCBIDCgEBBAARbHBfYWRkcmVzc19wdWJrZXkBIHy+XBhI/rhv/LQUflYon8e8q0PT8nBDeExH6jeAesBrACBtYXNzdHJhbnNmZXJfd2hpdGVsaXN0ZWRfYWRkcmVzcwkApwgBBRFscF9hZGRyZXNzX3B1YmtleQALbmV0d29ya19mZWUAoMIeARF2YWxpZGF0ZUFyZ3VtZW50cwQKcmVjaXBpZW50cwdhbW91bnRzCnBheW1lbnRJZHgIcGF5bWVudHMEDnJlY2lwaWVudHNTaXplCQCQAwEFCnJlY2lwaWVudHMEC2Ftb3VudHNTaXplCQCQAwEFB2Ftb3VudHMEDnBheW1lbnRJZHhTaXplCQCQAwEFCnBheW1lbnRJZHgEDHBheW1lbnRzU2l6ZQkAkAMBBQhwYXltZW50cwQJbWluQW1vdW50CQCXAwEFB2Ftb3VudHMEDW1pblBheW1lbnRJZHgJAJcDAQUKcGF5bWVudElkeAQNbWF4UGF5bWVudElkeAkAlgMBBQpwYXltZW50SWR4CgERcGF5bWVudHNWYWxpZGF0b3ICDHBheW1lbnRBY2N1bQtuZXh0UGF5bWVudAQ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hdGVkX3Bvb2xfYmFsYW5jZQkAzAgCCQEMSW50ZWdlckVudHJ5AgIVTWFzc19UcmFuc2Zlcl9Db3VudGVyBRhUb3RhbE1hc3NUcmFuc2ZlckNvdW50ZXIJAMwIAgkBDEludGVnZXJFbnRyeQICGFRvdGFsX01hc3NfVHJhbnNmZXJfU2VuZAUVVG90YWxNYXNzVHJhbnNmZXJTZW5kCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKQDAQUYVG90YWxNYXNzVHJhbnNmZXJDb3VudGVyAhNfTWFzc19UcmFuc2Zlcl9TZW5kBRZQYWlkTWFzc1RyYW5zZmVyQW1vdW50CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAKcIAQURbHBfYWRkcmVzc19wdWJrZXkFFlBhaWRNYXNzVHJhbnNmZXJBbW91bnQFBHVuaXQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkApwgBBRFscF9hZGRyZXNzX3B1YmtleQULbmV0d29ya19mZWUFBHVuaXQFA25pbAD9JfLt", "height": 2795203, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DHWMjwPMfQHyW7eVe6TJReKP7bMv5HRkr3LR3yxUDLAz Next: EdmuZMkxjS8m9NZ4b7FFxeULPUptsdd1Mr1xRGJ12ezE Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let masstransfer_whitelisted_address = addressFromPublicKey(lp_address_pubkey) | |
7 | 7 | ||
8 | - | let network_fee = | |
8 | + | let network_fee = 500000 | |
9 | 9 | ||
10 | 10 | func validateArguments (recipients,amounts,paymentIdx,payments) = { | |
11 | 11 | let recipientsSize = size(recipients) | |
16 | 16 | let minPaymentIdx = min(paymentIdx) | |
17 | 17 | let maxPaymentIdx = max(paymentIdx) | |
18 | 18 | func paymentsValidator (paymentAccum,nextPayment) = { | |
19 | - | let $ | |
20 | - | let validPayments = $ | |
21 | - | let j = $ | |
19 | + | let $t0787824 = paymentAccum | |
20 | + | let validPayments = $t0787824._1 | |
21 | + | let j = $t0787824._2 | |
22 | 22 | if ((j >= paymentsSize)) | |
23 | 23 | then $Tuple2(validPayments, (j + 1)) | |
24 | 24 | else { | |
25 | 25 | func amountsAggregator (amountAccum,nextAmount) = { | |
26 | - | let $ | |
27 | - | let amount = $ | |
28 | - | let k = $ | |
26 | + | let $t09791008 = amountAccum | |
27 | + | let amount = $t09791008._1 | |
28 | + | let k = $t09791008._2 | |
29 | 29 | if (if ((k >= recipientsSize)) | |
30 | 30 | then true | |
31 | 31 | else (paymentIdx[k] != j)) | |
99 | 99 | else { | |
100 | 100 | let recipientsSize = size(recipients) | |
101 | 101 | func scriptTransfersGenerator (accum,next) = { | |
102 | - | let $ | |
103 | - | let scriptTransfers = $ | |
104 | - | let j = $ | |
102 | + | let $t023652397 = accum | |
103 | + | let scriptTransfers = $t023652397._1 | |
104 | + | let j = $t023652397._2 | |
105 | 105 | if ((j >= recipientsSize)) | |
106 | 106 | then $Tuple2(scriptTransfers, (j + 1)) | |
107 | 107 | else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let lp_address_pubkey = base58'9Pwum3va2xrkVwsGRNiTeGxBBBNFEDaS9sfkZiSpSvdQ' | |
5 | 5 | ||
6 | 6 | let masstransfer_whitelisted_address = addressFromPublicKey(lp_address_pubkey) | |
7 | 7 | ||
8 | - | let network_fee = | |
8 | + | let network_fee = 500000 | |
9 | 9 | ||
10 | 10 | func validateArguments (recipients,amounts,paymentIdx,payments) = { | |
11 | 11 | let recipientsSize = size(recipients) | |
12 | 12 | let amountsSize = size(amounts) | |
13 | 13 | let paymentIdxSize = size(paymentIdx) | |
14 | 14 | let paymentsSize = size(payments) | |
15 | 15 | let minAmount = min(amounts) | |
16 | 16 | let minPaymentIdx = min(paymentIdx) | |
17 | 17 | let maxPaymentIdx = max(paymentIdx) | |
18 | 18 | func paymentsValidator (paymentAccum,nextPayment) = { | |
19 | - | let $ | |
20 | - | let validPayments = $ | |
21 | - | let j = $ | |
19 | + | let $t0787824 = paymentAccum | |
20 | + | let validPayments = $t0787824._1 | |
21 | + | let j = $t0787824._2 | |
22 | 22 | if ((j >= paymentsSize)) | |
23 | 23 | then $Tuple2(validPayments, (j + 1)) | |
24 | 24 | else { | |
25 | 25 | func amountsAggregator (amountAccum,nextAmount) = { | |
26 | - | let $ | |
27 | - | let amount = $ | |
28 | - | let k = $ | |
26 | + | let $t09791008 = amountAccum | |
27 | + | let amount = $t09791008._1 | |
28 | + | let k = $t09791008._2 | |
29 | 29 | if (if ((k >= recipientsSize)) | |
30 | 30 | then true | |
31 | 31 | else (paymentIdx[k] != j)) | |
32 | 32 | then $Tuple2(amount, (k + 1)) | |
33 | 33 | else $Tuple2((amount + nextAmount), (k + 1)) | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | let aggregatedAmount = { | |
37 | 37 | let $l = amounts | |
38 | 38 | let $s = size($l) | |
39 | 39 | let $acc0 = $Tuple2(0, 0) | |
40 | 40 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
41 | 41 | then $a | |
42 | 42 | else amountsAggregator($a, $l[$i]) | |
43 | 43 | ||
44 | 44 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
45 | 45 | then $a | |
46 | 46 | else throw("List size exceeds 100") | |
47 | 47 | ||
48 | 48 | $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($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), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
49 | 49 | } | |
50 | 50 | if ((aggregatedAmount._1 == nextPayment.amount)) | |
51 | 51 | then $Tuple2((validPayments + 1), (j + 1)) | |
52 | 52 | else $Tuple2(validPayments, (j + 1)) | |
53 | 53 | } | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | let paymentsValidation = { | |
57 | 57 | let $l = payments | |
58 | 58 | let $s = size($l) | |
59 | 59 | let $acc0 = $Tuple2(0, 0) | |
60 | 60 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
61 | 61 | then $a | |
62 | 62 | else paymentsValidator($a, $l[$i]) | |
63 | 63 | ||
64 | 64 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
65 | 65 | then $a | |
66 | 66 | else throw("List size exceeds 10") | |
67 | 67 | ||
68 | 68 | $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) | |
69 | 69 | } | |
70 | 70 | if (if (if (if (if (if (if (if ((recipientsSize == amountsSize)) | |
71 | 71 | then (recipientsSize == paymentIdxSize) | |
72 | 72 | else false) | |
73 | 73 | then (recipientsSize > 0) | |
74 | 74 | else false) | |
75 | 75 | then (100 >= recipientsSize) | |
76 | 76 | else false) | |
77 | 77 | then (paymentsSize > 0) | |
78 | 78 | else false) | |
79 | 79 | then (minAmount > 0) | |
80 | 80 | else false) | |
81 | 81 | then (minPaymentIdx == 0) | |
82 | 82 | else false) | |
83 | 83 | then (maxPaymentIdx == (paymentsSize - 1)) | |
84 | 84 | else false) | |
85 | 85 | then (paymentsValidation._1 == paymentsSize) | |
86 | 86 | else false | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(i) | |
91 | 91 | func massTransfer (recipients,amounts,paymentIdx,attachment) = { | |
92 | 92 | let pmt = value(i.payments[0]) | |
93 | 93 | if ((i.caller != masstransfer_whitelisted_address)) | |
94 | 94 | then throw((("Not an Admin only " + toString(masstransfer_whitelisted_address)) + " can sign it.")) | |
95 | 95 | else if (isDefined(pmt.assetId)) | |
96 | 96 | then throw("Only Waves is allowed to Attach as payment.") | |
97 | 97 | else if (!(validateArguments(recipients, amounts, paymentIdx, i.payments))) | |
98 | 98 | then throw("Invalid arguments") | |
99 | 99 | else { | |
100 | 100 | let recipientsSize = size(recipients) | |
101 | 101 | func scriptTransfersGenerator (accum,next) = { | |
102 | - | let $ | |
103 | - | let scriptTransfers = $ | |
104 | - | let j = $ | |
102 | + | let $t023652397 = accum | |
103 | + | let scriptTransfers = $t023652397._1 | |
104 | + | let j = $t023652397._2 | |
105 | 105 | if ((j >= recipientsSize)) | |
106 | 106 | then $Tuple2(scriptTransfers, (j + 1)) | |
107 | 107 | else $Tuple2((scriptTransfers :+ ScriptTransfer(addressFromStringValue(recipients[j]), next, i.payments[paymentIdx[j]].assetId)), (j + 1)) | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | let result = { | |
111 | 111 | let $l = amounts | |
112 | 112 | let $s = size($l) | |
113 | 113 | let $acc0 = $Tuple2(nil, 0) | |
114 | 114 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
115 | 115 | then $a | |
116 | 116 | else scriptTransfersGenerator($a, $l[$i]) | |
117 | 117 | ||
118 | 118 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
119 | 119 | then $a | |
120 | 120 | else throw("List size exceeds 100") | |
121 | 121 | ||
122 | 122 | $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($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), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
123 | 123 | } | |
124 | 124 | $Tuple2(result._1, unit) | |
125 | 125 | } | |
126 | 126 | } | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | ||
130 | 130 | @Callable(i) | |
131 | 131 | func UpdateLPBalance (PaidMassTransferAmount) = { | |
132 | 132 | let read_account_balance = wavesBalance(this).regular | |
133 | 133 | let read_total_pool_liquidity = valueOrErrorMessage(getInteger(this, "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.") | |
134 | 134 | let received_order_amount = (read_account_balance - read_total_pool_liquidity) | |
135 | 135 | let updated_pool_balance = ((read_total_pool_liquidity - PaidMassTransferAmount) + received_order_amount) | |
136 | 136 | let PreviousMassTransferCounter = match getInteger(this, "Mass_Transfer_Counter") { | |
137 | 137 | case a: Int => | |
138 | 138 | a | |
139 | 139 | case _ => | |
140 | 140 | 0 | |
141 | 141 | } | |
142 | 142 | let TotalMassTransferCounter = (PreviousMassTransferCounter + 1) | |
143 | 143 | let PreviousMassTransferSend = match getInteger(this, "Total_Mass_Transfer_Send") { | |
144 | 144 | case a: Int => | |
145 | 145 | a | |
146 | 146 | case _ => | |
147 | 147 | 0 | |
148 | 148 | } | |
149 | 149 | let TotalMassTransferSend = (PreviousMassTransferSend + PaidMassTransferAmount) | |
150 | 150 | if ((i.caller != masstransfer_whitelisted_address)) | |
151 | 151 | then throw((("This Address is not Authorized. Only " + toString(masstransfer_whitelisted_address)) + " is Authorized Address to Sign it.")) | |
152 | 152 | else if ((PaidMassTransferAmount > read_total_pool_liquidity)) | |
153 | 153 | then throw("Placed Mass Transfer Amount Size is more than Total Pool Liquidity.") | |
154 | 154 | else [IntegerEntry("Total_Pool_Liquidity", updated_pool_balance), IntegerEntry("Mass_Transfer_Counter", TotalMassTransferCounter), IntegerEntry("Total_Mass_Transfer_Send", TotalMassTransferSend), IntegerEntry((toString(TotalMassTransferCounter) + "_Mass_Transfer_Send"), PaidMassTransferAmount), ScriptTransfer(addressFromPublicKey(lp_address_pubkey), PaidMassTransferAmount, unit), ScriptTransfer(addressFromPublicKey(lp_address_pubkey), network_fee, unit)] | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 |
github/deemru/w8io/026f985 33.79 ms ◑