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