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