tx · XXeyphCtsdMttyU7v5Zg2Q2p8aDk8p1EoM76SxYfvFP 3Ms2ssGBpsFccHLtdb5zApeJ51jU3377r1d: -0.01000000 Waves 2023.10.20 18:28 [2807091] smart account 3Ms2ssGBpsFccHLtdb5zApeJ51jU3377r1d > SELF 0.00000000 Waves
{ "type": 13, "id": "XXeyphCtsdMttyU7v5Zg2Q2p8aDk8p1EoM76SxYfvFP", "fee": 1000000, "feeAssetId": null, "timestamp": 1697815744750, "version": 2, "chainId": 84, "sender": "3Ms2ssGBpsFccHLtdb5zApeJ51jU3377r1d", "senderPublicKey": "7E4cNcg8gSYTmNbmLG2kvAiePh9KZoAT7W64shHxCc6n", "proofs": [ "5oUZVybvcVFqD3VB5VmyAyQHex3wKWG81KzyxutHQ6rMeaPoYdSVybMH8YhqcXxFhhNRLHzu8ydBxQh8GVzn1heJ" ], "script": "base64:BgIPCAISBgoEGBERCBIDCgEBBAARbHBfYWRkcmVzc19wdWJrZXkBIHy+XBhI/rhv/LQUflYon8e8q0PT8nBDeExH6jeAesBrACBtYXNzdHJhbnNmZXJfd2hpdGVsaXN0ZWRfYWRkcmVzcwkApwgBBRFscF9hZGRyZXNzX3B1YmtleQALbmV0d29ya19mZWUAoMIeAR12YWxpZGF0ZU1hc3NUcmFuc2ZlckFyZ3VtZW50cwQKcmVjaXBpZW50cwdhbW91bnRzCnBheW1lbnRJZHgIcGF5bWVudHMEDnJlY2lwaWVudHNTaXplCQCQAwEFCnJlY2lwaWVudHMEC2Ftb3VudHNTaXplCQCQAwEFB2Ftb3VudHMEDnBheW1lbnRJZHhTaXplCQCQAwEFCnBheW1lbnRJZHgEDHBheW1lbnRzU2l6ZQkAkAMBBQhwYXltZW50cwQJbWluQW1vdW50CQCXAwEFB2Ftb3VudHMEDW1pblBheW1lbnRJZHgJAJcDAQUKcGF5bWVudElkeAQNbWF4UGF5bWVudElkeAkAlgMBBQpwYXltZW50SWR4CgERcGF5bWVudHNWYWxpZGF0b3ICDHBheW1lbnRBY2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lcgUYVG90YWxNYXNzVHJhbnNmZXJDb3VudGVyCQDMCAIJAQxJbnRlZ2VyRW50cnkCAhhUb3RhbF9NYXNzX1RyYW5zZmVyX1NlbmQFFVRvdGFsTWFzc1RyYW5zZmVyU2VuZAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICCQCkAwEFGFRvdGFsTWFzc1RyYW5zZmVyQ291bnRlcgITX01hc3NfVHJhbnNmZXJfU2VuZAUWUGFpZE1hc3NUcmFuc2ZlckFtb3VudAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQCnCAEFEWxwX2FkZHJlc3NfcHVia2V5BRZQYWlkTWFzc1RyYW5zZmVyQW1vdW50BQR1bml0CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAKcIAQURbHBfYWRkcmVzc19wdWJrZXkFC25ldHdvcmtfZmVlBQR1bml0BQNuaWwAztfLVg==", "height": 2807091, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9sn1kkgK3utoR36m8JFkJeGf4CRygCtCVfuZXZYVNkgT Next: AwuxwdviPnpALikrXGZr4SLvCWi875pPUFbSnAXoBp8r Diff:
Old | New | Differences | |
---|---|---|---|
93 | 93 | let N = M.amount | |
94 | 94 | let O = 18 | |
95 | 95 | let P = split(L, "_")[0] | |
96 | - | let Q = getStringValue((P + "_Winners_Status")) | |
97 | - | let R = getIntegerValue(("Total_Funds_Added_In_Option_Order_" + P)) | |
98 | - | let S = fraction(R, O, 10) | |
96 | + | let Q = getIntegerValue(("Total_Funds_Added_In_Option_Order_" + P)) | |
97 | + | let R = fraction(Q, O, 10) | |
99 | 98 | if ((K.caller != b)) | |
100 | 99 | then throw((("Not an Admin only " + toString(b)) + " can sign it.")) | |
101 | 100 | else if (isDefined(M.assetId)) | |
102 | 101 | then throw("Only Waves is allowed to Attach as payment.") | |
103 | 102 | else if (!(d(e, f, g, K.payments))) | |
104 | 103 | then throw("Invalid arguments") | |
105 | - | else if (( | |
104 | + | else if (((P + "_Winners_Status") == "Paid")) | |
106 | 105 | then throw((("Mass Transfer against Counter ID: " + P) + " is already released.")) | |
107 | - | else if ((N > | |
108 | - | then throw((("Attached Payment Amount is exceeding more than Maximum Eligible Limit of " + toString( | |
106 | + | else if ((N > Q)) | |
107 | + | then throw((("Attached Payment Amount is exceeding more than Maximum Eligible Limit of " + toString(R)) + " Wavelets.")) | |
109 | 108 | else { | |
110 | 109 | let i = size(e) | |
111 | - | func | |
112 | - | let | |
113 | - | let | |
114 | - | let u = | |
110 | + | func S (T,U) = { | |
111 | + | let V = T | |
112 | + | let W = V._1 | |
113 | + | let u = V._2 | |
115 | 114 | if ((u >= i)) | |
116 | - | then $Tuple2( | |
117 | - | else $Tuple2(( | |
115 | + | then $Tuple2(W, (u + 1)) | |
116 | + | else $Tuple2((W :+ ScriptTransfer(addressFromStringValue(e[u]), U, K.payments[g[u]].assetId)), (u + 1)) | |
118 | 117 | } | |
119 | 118 | ||
120 | - | let | |
119 | + | let X = { | |
121 | 120 | let C = f | |
122 | 121 | let D = size(C) | |
123 | 122 | let E = $Tuple2(nil, 0) | |
124 | 123 | func F (G,H) = if ((H >= D)) | |
125 | 124 | then G | |
126 | - | else | |
125 | + | else S(G, C[H]) | |
127 | 126 | ||
128 | 127 | func I (G,H) = if ((H >= D)) | |
129 | 128 | then G | |
131 | 130 | ||
132 | 131 | I(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(E, 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) | |
133 | 132 | } | |
134 | - | $Tuple2(( | |
133 | + | $Tuple2((X._1 ++ [StringEntry((P + "_Winners_Status"), "Paid"), IntegerEntry((P + "_Eligible_Limits"), R)]), unit) | |
135 | 134 | } | |
136 | 135 | } | |
137 | 136 | ||
138 | 137 | ||
139 | 138 | ||
140 | 139 | @Callable(K) | |
141 | - | func UpdateLPBalance ( | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | let | |
146 | - | let | |
147 | - | let | |
148 | - | if ($isInstanceOf( | |
140 | + | func UpdateLPBalance (Y) = { | |
141 | + | let Z = wavesBalance(this).regular | |
142 | + | let aa = valueOrErrorMessage(getInteger(this, "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.") | |
143 | + | let ab = ((Z - aa) - c) | |
144 | + | let ac = ((aa - Y) + ab) | |
145 | + | let ad = { | |
146 | + | let ae = getInteger(this, "Mass_Transfer_Counter") | |
147 | + | if ($isInstanceOf(ae, "Int")) | |
149 | 148 | then { | |
150 | - | let | |
151 | - | | |
149 | + | let af = ae | |
150 | + | af | |
152 | 151 | } | |
153 | 152 | else 0 | |
154 | 153 | } | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | if ($isInstanceOf( | |
154 | + | let ag = (ad + 1) | |
155 | + | let ah = { | |
156 | + | let ae = getInteger(this, "Total_Mass_Transfer_Send") | |
157 | + | if ($isInstanceOf(ae, "Int")) | |
159 | 158 | then { | |
160 | - | let | |
161 | - | | |
159 | + | let af = ae | |
160 | + | af | |
162 | 161 | } | |
163 | 162 | else 0 | |
164 | 163 | } | |
165 | - | let | |
164 | + | let ai = (ah + Y) | |
166 | 165 | if ((K.caller != b)) | |
167 | 166 | then throw((("This Address is not Authorized. Only " + toString(b)) + " is Authorized Address to Sign it.")) | |
168 | - | else if (( | |
167 | + | else if ((Y > aa)) | |
169 | 168 | then throw("Placed Mass Transfer Amount Size is more than Total Pool Liquidity.") | |
170 | - | else [IntegerEntry("Total_Pool_Liquidity", | |
169 | + | else [IntegerEntry("Total_Pool_Liquidity", ac), IntegerEntry("Mass_Transfer_Counter", ag), IntegerEntry("Total_Mass_Transfer_Send", ai), IntegerEntry((toString(ag) + "_Mass_Transfer_Send"), Y), ScriptTransfer(addressFromPublicKey(a), Y, unit), ScriptTransfer(addressFromPublicKey(a), c, unit)] | |
171 | 170 | } | |
172 | 171 | ||
173 | 172 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'9Pwum3va2xrkVwsGRNiTeGxBBBNFEDaS9sfkZiSpSvdQ' | |
5 | 5 | ||
6 | 6 | let b = addressFromPublicKey(a) | |
7 | 7 | ||
8 | 8 | let c = 500000 | |
9 | 9 | ||
10 | 10 | func d (e,f,g,h) = { | |
11 | 11 | let i = size(e) | |
12 | 12 | let j = size(f) | |
13 | 13 | let k = size(g) | |
14 | 14 | let l = size(h) | |
15 | 15 | let m = min(f) | |
16 | 16 | let n = min(g) | |
17 | 17 | let o = max(g) | |
18 | 18 | func p (q,r) = { | |
19 | 19 | let s = q | |
20 | 20 | let t = s._1 | |
21 | 21 | let u = s._2 | |
22 | 22 | if ((u >= l)) | |
23 | 23 | then $Tuple2(t, (u + 1)) | |
24 | 24 | else { | |
25 | 25 | func v (w,x) = { | |
26 | 26 | let y = w | |
27 | 27 | let z = y._1 | |
28 | 28 | let A = y._2 | |
29 | 29 | if (if ((A >= i)) | |
30 | 30 | then true | |
31 | 31 | else (g[A] != u)) | |
32 | 32 | then $Tuple2(z, (A + 1)) | |
33 | 33 | else $Tuple2((z + x), (A + 1)) | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | let B = { | |
37 | 37 | let C = f | |
38 | 38 | let D = size(C) | |
39 | 39 | let E = $Tuple2(0, 0) | |
40 | 40 | func F (G,H) = if ((H >= D)) | |
41 | 41 | then G | |
42 | 42 | else v(G, C[H]) | |
43 | 43 | ||
44 | 44 | func I (G,H) = if ((H >= D)) | |
45 | 45 | then G | |
46 | 46 | else throw("List size exceeds 100") | |
47 | 47 | ||
48 | 48 | I(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(E, 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 ((B._1 == r.amount)) | |
51 | 51 | then $Tuple2((t + 1), (u + 1)) | |
52 | 52 | else $Tuple2(t, (u + 1)) | |
53 | 53 | } | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | let J = { | |
57 | 57 | let C = h | |
58 | 58 | let D = size(C) | |
59 | 59 | let E = $Tuple2(0, 0) | |
60 | 60 | func F (G,H) = if ((H >= D)) | |
61 | 61 | then G | |
62 | 62 | else p(G, C[H]) | |
63 | 63 | ||
64 | 64 | func I (G,H) = if ((H >= D)) | |
65 | 65 | then G | |
66 | 66 | else throw("List size exceeds 10") | |
67 | 67 | ||
68 | 68 | I(F(F(F(F(F(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
69 | 69 | } | |
70 | 70 | if (if (if (if (if (if (if (if ((i == j)) | |
71 | 71 | then (i == k) | |
72 | 72 | else false) | |
73 | 73 | then (i > 0) | |
74 | 74 | else false) | |
75 | 75 | then (100 >= i) | |
76 | 76 | else false) | |
77 | 77 | then (l > 0) | |
78 | 78 | else false) | |
79 | 79 | then (m > 0) | |
80 | 80 | else false) | |
81 | 81 | then (n == 0) | |
82 | 82 | else false) | |
83 | 83 | then (o == (l - 1)) | |
84 | 84 | else false) | |
85 | 85 | then (J._1 == l) | |
86 | 86 | else false | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(K) | |
91 | 91 | func massTransfer (e,f,g,L) = { | |
92 | 92 | let M = value(K.payments[0]) | |
93 | 93 | let N = M.amount | |
94 | 94 | let O = 18 | |
95 | 95 | let P = split(L, "_")[0] | |
96 | - | let Q = getStringValue((P + "_Winners_Status")) | |
97 | - | let R = getIntegerValue(("Total_Funds_Added_In_Option_Order_" + P)) | |
98 | - | let S = fraction(R, O, 10) | |
96 | + | let Q = getIntegerValue(("Total_Funds_Added_In_Option_Order_" + P)) | |
97 | + | let R = fraction(Q, O, 10) | |
99 | 98 | if ((K.caller != b)) | |
100 | 99 | then throw((("Not an Admin only " + toString(b)) + " can sign it.")) | |
101 | 100 | else if (isDefined(M.assetId)) | |
102 | 101 | then throw("Only Waves is allowed to Attach as payment.") | |
103 | 102 | else if (!(d(e, f, g, K.payments))) | |
104 | 103 | then throw("Invalid arguments") | |
105 | - | else if (( | |
104 | + | else if (((P + "_Winners_Status") == "Paid")) | |
106 | 105 | then throw((("Mass Transfer against Counter ID: " + P) + " is already released.")) | |
107 | - | else if ((N > | |
108 | - | then throw((("Attached Payment Amount is exceeding more than Maximum Eligible Limit of " + toString( | |
106 | + | else if ((N > Q)) | |
107 | + | then throw((("Attached Payment Amount is exceeding more than Maximum Eligible Limit of " + toString(R)) + " Wavelets.")) | |
109 | 108 | else { | |
110 | 109 | let i = size(e) | |
111 | - | func | |
112 | - | let | |
113 | - | let | |
114 | - | let u = | |
110 | + | func S (T,U) = { | |
111 | + | let V = T | |
112 | + | let W = V._1 | |
113 | + | let u = V._2 | |
115 | 114 | if ((u >= i)) | |
116 | - | then $Tuple2( | |
117 | - | else $Tuple2(( | |
115 | + | then $Tuple2(W, (u + 1)) | |
116 | + | else $Tuple2((W :+ ScriptTransfer(addressFromStringValue(e[u]), U, K.payments[g[u]].assetId)), (u + 1)) | |
118 | 117 | } | |
119 | 118 | ||
120 | - | let | |
119 | + | let X = { | |
121 | 120 | let C = f | |
122 | 121 | let D = size(C) | |
123 | 122 | let E = $Tuple2(nil, 0) | |
124 | 123 | func F (G,H) = if ((H >= D)) | |
125 | 124 | then G | |
126 | - | else | |
125 | + | else S(G, C[H]) | |
127 | 126 | ||
128 | 127 | func I (G,H) = if ((H >= D)) | |
129 | 128 | then G | |
130 | 129 | else throw("List size exceeds 100") | |
131 | 130 | ||
132 | 131 | I(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(E, 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) | |
133 | 132 | } | |
134 | - | $Tuple2(( | |
133 | + | $Tuple2((X._1 ++ [StringEntry((P + "_Winners_Status"), "Paid"), IntegerEntry((P + "_Eligible_Limits"), R)]), unit) | |
135 | 134 | } | |
136 | 135 | } | |
137 | 136 | ||
138 | 137 | ||
139 | 138 | ||
140 | 139 | @Callable(K) | |
141 | - | func UpdateLPBalance ( | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | let | |
146 | - | let | |
147 | - | let | |
148 | - | if ($isInstanceOf( | |
140 | + | func UpdateLPBalance (Y) = { | |
141 | + | let Z = wavesBalance(this).regular | |
142 | + | let aa = valueOrErrorMessage(getInteger(this, "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.") | |
143 | + | let ab = ((Z - aa) - c) | |
144 | + | let ac = ((aa - Y) + ab) | |
145 | + | let ad = { | |
146 | + | let ae = getInteger(this, "Mass_Transfer_Counter") | |
147 | + | if ($isInstanceOf(ae, "Int")) | |
149 | 148 | then { | |
150 | - | let | |
151 | - | | |
149 | + | let af = ae | |
150 | + | af | |
152 | 151 | } | |
153 | 152 | else 0 | |
154 | 153 | } | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | if ($isInstanceOf( | |
154 | + | let ag = (ad + 1) | |
155 | + | let ah = { | |
156 | + | let ae = getInteger(this, "Total_Mass_Transfer_Send") | |
157 | + | if ($isInstanceOf(ae, "Int")) | |
159 | 158 | then { | |
160 | - | let | |
161 | - | | |
159 | + | let af = ae | |
160 | + | af | |
162 | 161 | } | |
163 | 162 | else 0 | |
164 | 163 | } | |
165 | - | let | |
164 | + | let ai = (ah + Y) | |
166 | 165 | if ((K.caller != b)) | |
167 | 166 | then throw((("This Address is not Authorized. Only " + toString(b)) + " is Authorized Address to Sign it.")) | |
168 | - | else if (( | |
167 | + | else if ((Y > aa)) | |
169 | 168 | then throw("Placed Mass Transfer Amount Size is more than Total Pool Liquidity.") | |
170 | - | else [IntegerEntry("Total_Pool_Liquidity", | |
169 | + | else [IntegerEntry("Total_Pool_Liquidity", ac), IntegerEntry("Mass_Transfer_Counter", ag), IntegerEntry("Total_Mass_Transfer_Send", ai), IntegerEntry((toString(ag) + "_Mass_Transfer_Send"), Y), ScriptTransfer(addressFromPublicKey(a), Y, unit), ScriptTransfer(addressFromPublicKey(a), c, unit)] | |
171 | 170 | } | |
172 | 171 | ||
173 | 172 |
github/deemru/w8io/169f3d6 54.78 ms ◑