tx · 9sn1kkgK3utoR36m8JFkJeGf4CRygCtCVfuZXZYVNkgT 3Ms2ssGBpsFccHLtdb5zApeJ51jU3377r1d: -0.01000000 Waves 2023.10.20 18:26 [2807088] smart account 3Ms2ssGBpsFccHLtdb5zApeJ51jU3377r1d > SELF 0.00000000 Waves
{ "type": 13, "id": "9sn1kkgK3utoR36m8JFkJeGf4CRygCtCVfuZXZYVNkgT", "fee": 1000000, "feeAssetId": null, "timestamp": 1697815576704, "version": 2, "chainId": 84, "sender": "3Ms2ssGBpsFccHLtdb5zApeJ51jU3377r1d", "senderPublicKey": "7E4cNcg8gSYTmNbmLG2kvAiePh9KZoAT7W64shHxCc6n", "proofs": [ "dik3uTUrD3MbBVgWyZq3CixxMZnPmhmS3ZULvvd5Csec3HvnhvSv9S5jPy8kj2xtbK8fUt5nwoi8xscV6bLHeS2" ], "script": "base64:BgIPCAISBgoEGBERCBIDCgEBBAARbHBfYWRkcmVzc19wdWJrZXkBIHy+XBhI/rhv/LQUflYon8e8q0PT8nBDeExH6jeAesBrACBtYXNzdHJhbnNmZXJfd2hpdGVsaXN0ZWRfYWRkcmVzcwkApwgBBRFscF9hZGRyZXNzX3B1YmtleQALbmV0d29ya19mZWUAoMIeAR12YWxpZGF0ZU1hc3NUcmFuc2ZlckFyZ3VtZW50cwQKcmVjaXBpZW50cwdhbW91bnRzCnBheW1lbnRJZHgIcGF5bWVudHMEDnJlY2lwaWVudHNTaXplCQCQAwEFCnJlY2lwaWVudHMEC2Ftb3VudHNTaXplCQCQAwEFB2Ftb3VudHMEDnBheW1lbnRJZHhTaXplCQCQAwEFCnBheW1lbnRJZHgEDHBheW1lbnRzU2l6ZQkAkAMBBQhwYXltZW50cwQJbWluQW1vdW50CQCXAwEFB2Ftb3VudHMEDW1pblBheW1lbnRJZHgJAJcDAQUKcGF5bWVudElkeAQNbWF4UGF5bWVudElkeAkAlgMBBQpwYXltZW50SWR4CgERcGF5bWVudHNWYWxpZGF0b3ICDHBheW1lbnRBY2N1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XJFbnRyeQICGFRvdGFsX01hc3NfVHJhbnNmZXJfU2VuZAUVVG90YWxNYXNzVHJhbnNmZXJTZW5kCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKQDAQUYVG90YWxNYXNzVHJhbnNmZXJDb3VudGVyAhNfTWFzc19UcmFuc2Zlcl9TZW5kBRZQYWlkTWFzc1RyYW5zZmVyQW1vdW50CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAKcIAQURbHBfYWRkcmVzc19wdWJrZXkFFlBhaWRNYXNzVHJhbnNmZXJBbW91bnQFBHVuaXQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkApwgBBRFscF9hZGRyZXNzX3B1YmtleQULbmV0d29ya19mZWUFBHVuaXQFA25pbAAa5SRO", "height": 2807088, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dx47NVFt8CGRXpSmeqLFQpkpaYeZLt4eCawZDnM7B9CU Next: XXeyphCtsdMttyU7v5Zg2Q2p8aDk8p1EoM76SxYfvFP Diff:
Old | New | Differences | |
---|---|---|---|
90 | 90 | @Callable(K) | |
91 | 91 | func massTransfer (e,f,g,L) = { | |
92 | 92 | let M = value(K.payments[0]) | |
93 | - | let N = split(L, "_")[0] | |
94 | - | let O = getStringValue((N + "_Winners_Status")) | |
93 | + | let N = M.amount | |
94 | + | let O = 18 | |
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) | |
95 | 99 | if ((K.caller != b)) | |
96 | 100 | then throw((("Not an Admin only " + toString(b)) + " can sign it.")) | |
97 | 101 | else if (isDefined(M.assetId)) | |
98 | 102 | then throw("Only Waves is allowed to Attach as payment.") | |
99 | 103 | else if (!(d(e, f, g, K.payments))) | |
100 | 104 | then throw("Invalid arguments") | |
101 | - | else if ((O == "Paid")) | |
102 | - | then throw(("Mass Transfer was already released for Counter: " + N)) | |
103 | - | else { | |
104 | - | let i = size(e) | |
105 | - | func P (Q,R) = { | |
106 | - | let S = Q | |
107 | - | let T = S._1 | |
108 | - | let u = S._2 | |
109 | - | if ((u >= i)) | |
110 | - | then $Tuple2(T, (u + 1)) | |
111 | - | else $Tuple2((T :+ ScriptTransfer(addressFromStringValue(e[u]), R, K.payments[g[u]].assetId)), (u + 1)) | |
105 | + | else if ((Q == "Paid")) | |
106 | + | then throw((("Mass Transfer against Counter ID: " + P) + " is already released.")) | |
107 | + | else if ((N > R)) | |
108 | + | then throw((("Attached Payment Amount is exceeding more than Maximum Eligible Limit of " + toString(S)) + " Wavelets.")) | |
109 | + | else { | |
110 | + | let i = size(e) | |
111 | + | func T (U,V) = { | |
112 | + | let W = U | |
113 | + | let X = W._1 | |
114 | + | let u = W._2 | |
115 | + | if ((u >= i)) | |
116 | + | then $Tuple2(X, (u + 1)) | |
117 | + | else $Tuple2((X :+ ScriptTransfer(addressFromStringValue(e[u]), V, K.payments[g[u]].assetId)), (u + 1)) | |
118 | + | } | |
119 | + | ||
120 | + | let Y = { | |
121 | + | let C = f | |
122 | + | let D = size(C) | |
123 | + | let E = $Tuple2(nil, 0) | |
124 | + | func F (G,H) = if ((H >= D)) | |
125 | + | then G | |
126 | + | else T(G, C[H]) | |
127 | + | ||
128 | + | func I (G,H) = if ((H >= D)) | |
129 | + | then G | |
130 | + | else throw("List size exceeds 100") | |
131 | + | ||
132 | + | 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 | + | } | |
134 | + | $Tuple2((Y._1 ++ [StringEntry((P + "_Winners_Status"), "Paid"), IntegerEntry((P + "_Eligible_Limits"), S)]), unit) | |
112 | 135 | } | |
113 | - | ||
114 | - | let U = { | |
115 | - | let C = f | |
116 | - | let D = size(C) | |
117 | - | let E = $Tuple2(nil, 0) | |
118 | - | func F (G,H) = if ((H >= D)) | |
119 | - | then G | |
120 | - | else P(G, C[H]) | |
121 | - | ||
122 | - | func I (G,H) = if ((H >= D)) | |
123 | - | then G | |
124 | - | else throw("List size exceeds 100") | |
125 | - | ||
126 | - | 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) | |
127 | - | } | |
128 | - | $Tuple2((U._1 ++ [StringEntry((N + "_Winners_Status"), "Paid"), IntegerEntry((N + "_Total_Winners"), i)]), unit) | |
129 | - | } | |
130 | 136 | } | |
131 | 137 | ||
132 | 138 | ||
133 | 139 | ||
134 | 140 | @Callable(K) | |
135 | - | func UpdateLPBalance ( | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
140 | - | let | |
141 | - | let | |
142 | - | if ($isInstanceOf( | |
141 | + | func UpdateLPBalance (Z) = { | |
142 | + | let aa = wavesBalance(this).regular | |
143 | + | let ab = valueOrErrorMessage(getInteger(this, "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.") | |
144 | + | let ac = ((aa - ab) - c) | |
145 | + | let ad = ((ab - Z) + ac) | |
146 | + | let ae = { | |
147 | + | let af = getInteger(this, "Mass_Transfer_Counter") | |
148 | + | if ($isInstanceOf(af, "Int")) | |
143 | 149 | then { | |
144 | - | let | |
145 | - | | |
150 | + | let ag = af | |
151 | + | ag | |
146 | 152 | } | |
147 | 153 | else 0 | |
148 | 154 | } | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | if ($isInstanceOf( | |
155 | + | let ah = (ae + 1) | |
156 | + | let ai = { | |
157 | + | let af = getInteger(this, "Total_Mass_Transfer_Send") | |
158 | + | if ($isInstanceOf(af, "Int")) | |
153 | 159 | then { | |
154 | - | let | |
155 | - | | |
160 | + | let ag = af | |
161 | + | ag | |
156 | 162 | } | |
157 | 163 | else 0 | |
158 | 164 | } | |
159 | - | let | |
165 | + | let aj = (ai + Z) | |
160 | 166 | if ((K.caller != b)) | |
161 | 167 | then throw((("This Address is not Authorized. Only " + toString(b)) + " is Authorized Address to Sign it.")) | |
162 | - | else if (( | |
168 | + | else if ((Z > ab)) | |
163 | 169 | then throw("Placed Mass Transfer Amount Size is more than Total Pool Liquidity.") | |
164 | - | else [IntegerEntry("Total_Pool_Liquidity", | |
170 | + | else [IntegerEntry("Total_Pool_Liquidity", ad), IntegerEntry("Mass_Transfer_Counter", ah), IntegerEntry("Total_Mass_Transfer_Send", aj), IntegerEntry((toString(ah) + "_Mass_Transfer_Send"), Z), ScriptTransfer(addressFromPublicKey(a), Z, unit), ScriptTransfer(addressFromPublicKey(a), c, unit)] | |
165 | 171 | } | |
166 | 172 | ||
167 | 173 |
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 | - | let N = split(L, "_")[0] | |
94 | - | let O = getStringValue((N + "_Winners_Status")) | |
93 | + | let N = M.amount | |
94 | + | let O = 18 | |
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) | |
95 | 99 | if ((K.caller != b)) | |
96 | 100 | then throw((("Not an Admin only " + toString(b)) + " can sign it.")) | |
97 | 101 | else if (isDefined(M.assetId)) | |
98 | 102 | then throw("Only Waves is allowed to Attach as payment.") | |
99 | 103 | else if (!(d(e, f, g, K.payments))) | |
100 | 104 | then throw("Invalid arguments") | |
101 | - | else if ((O == "Paid")) | |
102 | - | then throw(("Mass Transfer was already released for Counter: " + N)) | |
103 | - | else { | |
104 | - | let i = size(e) | |
105 | - | func P (Q,R) = { | |
106 | - | let S = Q | |
107 | - | let T = S._1 | |
108 | - | let u = S._2 | |
109 | - | if ((u >= i)) | |
110 | - | then $Tuple2(T, (u + 1)) | |
111 | - | else $Tuple2((T :+ ScriptTransfer(addressFromStringValue(e[u]), R, K.payments[g[u]].assetId)), (u + 1)) | |
105 | + | else if ((Q == "Paid")) | |
106 | + | then throw((("Mass Transfer against Counter ID: " + P) + " is already released.")) | |
107 | + | else if ((N > R)) | |
108 | + | then throw((("Attached Payment Amount is exceeding more than Maximum Eligible Limit of " + toString(S)) + " Wavelets.")) | |
109 | + | else { | |
110 | + | let i = size(e) | |
111 | + | func T (U,V) = { | |
112 | + | let W = U | |
113 | + | let X = W._1 | |
114 | + | let u = W._2 | |
115 | + | if ((u >= i)) | |
116 | + | then $Tuple2(X, (u + 1)) | |
117 | + | else $Tuple2((X :+ ScriptTransfer(addressFromStringValue(e[u]), V, K.payments[g[u]].assetId)), (u + 1)) | |
118 | + | } | |
119 | + | ||
120 | + | let Y = { | |
121 | + | let C = f | |
122 | + | let D = size(C) | |
123 | + | let E = $Tuple2(nil, 0) | |
124 | + | func F (G,H) = if ((H >= D)) | |
125 | + | then G | |
126 | + | else T(G, C[H]) | |
127 | + | ||
128 | + | func I (G,H) = if ((H >= D)) | |
129 | + | then G | |
130 | + | else throw("List size exceeds 100") | |
131 | + | ||
132 | + | 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 | + | } | |
134 | + | $Tuple2((Y._1 ++ [StringEntry((P + "_Winners_Status"), "Paid"), IntegerEntry((P + "_Eligible_Limits"), S)]), unit) | |
112 | 135 | } | |
113 | - | ||
114 | - | let U = { | |
115 | - | let C = f | |
116 | - | let D = size(C) | |
117 | - | let E = $Tuple2(nil, 0) | |
118 | - | func F (G,H) = if ((H >= D)) | |
119 | - | then G | |
120 | - | else P(G, C[H]) | |
121 | - | ||
122 | - | func I (G,H) = if ((H >= D)) | |
123 | - | then G | |
124 | - | else throw("List size exceeds 100") | |
125 | - | ||
126 | - | 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) | |
127 | - | } | |
128 | - | $Tuple2((U._1 ++ [StringEntry((N + "_Winners_Status"), "Paid"), IntegerEntry((N + "_Total_Winners"), i)]), unit) | |
129 | - | } | |
130 | 136 | } | |
131 | 137 | ||
132 | 138 | ||
133 | 139 | ||
134 | 140 | @Callable(K) | |
135 | - | func UpdateLPBalance ( | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
140 | - | let | |
141 | - | let | |
142 | - | if ($isInstanceOf( | |
141 | + | func UpdateLPBalance (Z) = { | |
142 | + | let aa = wavesBalance(this).regular | |
143 | + | let ab = valueOrErrorMessage(getInteger(this, "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.") | |
144 | + | let ac = ((aa - ab) - c) | |
145 | + | let ad = ((ab - Z) + ac) | |
146 | + | let ae = { | |
147 | + | let af = getInteger(this, "Mass_Transfer_Counter") | |
148 | + | if ($isInstanceOf(af, "Int")) | |
143 | 149 | then { | |
144 | - | let | |
145 | - | | |
150 | + | let ag = af | |
151 | + | ag | |
146 | 152 | } | |
147 | 153 | else 0 | |
148 | 154 | } | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | if ($isInstanceOf( | |
155 | + | let ah = (ae + 1) | |
156 | + | let ai = { | |
157 | + | let af = getInteger(this, "Total_Mass_Transfer_Send") | |
158 | + | if ($isInstanceOf(af, "Int")) | |
153 | 159 | then { | |
154 | - | let | |
155 | - | | |
160 | + | let ag = af | |
161 | + | ag | |
156 | 162 | } | |
157 | 163 | else 0 | |
158 | 164 | } | |
159 | - | let | |
165 | + | let aj = (ai + Z) | |
160 | 166 | if ((K.caller != b)) | |
161 | 167 | then throw((("This Address is not Authorized. Only " + toString(b)) + " is Authorized Address to Sign it.")) | |
162 | - | else if (( | |
168 | + | else if ((Z > ab)) | |
163 | 169 | then throw("Placed Mass Transfer Amount Size is more than Total Pool Liquidity.") | |
164 | - | else [IntegerEntry("Total_Pool_Liquidity", | |
170 | + | else [IntegerEntry("Total_Pool_Liquidity", ad), IntegerEntry("Mass_Transfer_Counter", ah), IntegerEntry("Total_Mass_Transfer_Send", aj), IntegerEntry((toString(ah) + "_Mass_Transfer_Send"), Z), ScriptTransfer(addressFromPublicKey(a), Z, unit), ScriptTransfer(addressFromPublicKey(a), c, unit)] | |
165 | 171 | } | |
166 | 172 | ||
167 | 173 |
github/deemru/w8io/169f3d6 110.43 ms ◑