tx · DSCWkEX2ijsCiJMQaxLZ9UdqTttV7r1Wo8kYMAotc2fA 3Mx9259DXd7MFiAw294TvP3QkBPbUjkB3sP: -0.01800000 Waves 2022.09.16 13:47 [2231556] smart account 3Mx9259DXd7MFiAw294TvP3QkBPbUjkB3sP > SELF 0.00000000 Waves
{ "type": 13, "id": "DSCWkEX2ijsCiJMQaxLZ9UdqTttV7r1Wo8kYMAotc2fA", "fee": 1800000, "feeAssetId": null, "timestamp": 1663325224743, "version": 2, "chainId": 84, "sender": "3Mx9259DXd7MFiAw294TvP3QkBPbUjkB3sP", "senderPublicKey": "8FvcW5FVcnWjYSA4vjLsRR8hhEQMbCQykv8mCYVa8MRy", "proofs": [ "2vt99T9TCgoKWNCfXk5N93ah7jtutL83kzXgE3nU1np4NkHtB1e1pJa3oK4VR8MUnTrYQE2h7o6SYTDcxW78BrAR", "2Q498FNRyV5RjMshAfdFeB8YZV78UkCxQjYVKnGfCpH3ymDoiKwsfLMeNAatXGHZeeWY4dZhPqwHoBP3U6d1HkYr" ], "script": "base64:BgITCAISABIECgIIARIDCgEIEgASACMAB2tBY3RpdmUCBmFjdGl2ZQAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQAWa0xhc3RQb29sVG9rZW5JbnRlcmVzdAITX3Bvb2xfbGFzdF9pbnRlcmVzdAARa1VzZXJMYXN0SW50ZXJlc3QCE191c2VyX2xhc3RfaW50ZXJlc3QAE2tVc2VyQ2xhaW1BdmFpbGFibGUCGF91c2VyX2F2YWlsYWJsZV90b19jbGFpbQAWa1VzZXJTaGFyZVRva2Vuc0xvY2tlZAIUX3NoYXJlX3Rva2Vuc19sb2NrZWQAEmtTaGFyZVRva2Vuc0xvY2tlZAIaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAC2tPcmFjbGVQb29sAgVwb29sXwANa1Bvb2xBc3NldElkcwIJYXNzZXRfaWRzAA1rQWRtaW5QdWJLZXkxAgthZG1pbl9wdWJfMQANa0FkbWluUHViS2V5M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IAgUMYWRtaW5QdWJLZXkzBQNuaWwIBQFpD2NhbGxlclB1YmxpY0tleQkAAgECIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgkAzAgCCQEMQm9vbGVhbkVudHJ5AgUHa0FjdGl2ZQYJAMwIAgkBC0RlbGV0ZUVudHJ5AQUGa0NhdXNlBQNuaWwBAnR4AQZ2ZXJpZnkABBJhZG1pblB1YktleTFTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTEAAQAABBJhZG1pblB1YktleTJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQxhZG1pblB1YktleTIAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQxhZG1pblB1YktleTMAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAALnBcg0", "height": 2231556, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3TWdGwSqjt2dG4Vv4pQxaqZ9QpBjaHpfkHwj8sDGVFnj Next: AQ42qYw3JN3qQkhy297wznzjmWJnS9UxRddN7SARwJNg Diff:
Old | New | Differences | |
---|---|---|---|
27 | 27 | ||
28 | 28 | let m = "farming_address" | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = "money_box_address" | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 100000000 | |
33 | 33 | ||
34 | - | func p (q) = { | |
35 | - | let r = getString(o, q) | |
36 | - | if ($isInstanceOf(r, "String")) | |
34 | + | let p = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
35 | + | ||
36 | + | func q (r) = { | |
37 | + | let s = getString(p, r) | |
38 | + | if ($isInstanceOf(s, "String")) | |
37 | 39 | then { | |
38 | - | let | |
39 | - | fromBase58String( | |
40 | + | let t = s | |
41 | + | fromBase58String(t) | |
40 | 42 | } | |
41 | 43 | else { | |
42 | - | let | |
43 | - | throw(( | |
44 | + | let u = s | |
45 | + | throw((r + "is empty")) | |
44 | 46 | } | |
45 | 47 | } | |
46 | 48 | ||
47 | 49 | ||
48 | - | let | |
50 | + | let v = q(j) | |
49 | 51 | ||
50 | - | let | |
52 | + | let w = q(k) | |
51 | 53 | ||
52 | - | let | |
54 | + | let x = q(l) | |
53 | 55 | ||
54 | - | let | |
56 | + | let y = Address(q(m)) | |
55 | 57 | ||
56 | - | let | |
58 | + | let z = Address(q(n)) | |
57 | 59 | ||
58 | - | func z () = if (y) | |
60 | + | let A = valueOrElse(getBoolean(this, a), true) | |
61 | + | ||
62 | + | func B () = if (A) | |
59 | 63 | then unit | |
60 | 64 | else throw("DApp is inactive at this moment") | |
61 | 65 | ||
62 | 66 | ||
63 | - | func | |
67 | + | func C (D) = if (isDefined(getString(p, (h + toString(D))))) | |
64 | 68 | then unit | |
65 | 69 | else throw("Only pool can call this function") | |
66 | 70 | ||
67 | 71 | ||
68 | - | func | |
72 | + | func E (D) = if ((D == y)) | |
69 | 73 | then unit | |
70 | 74 | else throw("Only farming can call this function") | |
71 | 75 | ||
72 | 76 | ||
73 | - | func | |
77 | + | func F (G) = [BooleanEntry(a, false), StringEntry(b, G)] | |
74 | 78 | ||
75 | 79 | ||
76 | - | func | |
80 | + | func H (I,J) = valueOrElse(getInteger(y, (((I + "_") + J) + f)), 0) | |
77 | 81 | ||
78 | 82 | ||
79 | - | func | |
83 | + | func K (I) = valueOrElse(getInteger(y, (I + g)), 0) | |
80 | 84 | ||
81 | 85 | ||
82 | - | func | |
86 | + | func L (M,I,N) = valueOrElse(getInteger(this, (((((M + "_") + I) + "_") + N) + d)), 0) | |
83 | 87 | ||
84 | 88 | ||
85 | - | func | |
89 | + | func O (I,N) = valueOrElse(getInteger(this, (((I + "_") + N) + c)), 0) | |
86 | 90 | ||
87 | 91 | ||
88 | - | func | |
92 | + | func P (M,I,N) = valueOrElse(getInteger(this, (((((M + "_") + I) + "_") + N) + e)), 0) | |
89 | 93 | ||
90 | 94 | ||
91 | - | func | |
92 | - | let | |
93 | - | if ($isInstanceOf( | |
95 | + | func Q (N) = { | |
96 | + | let s = N | |
97 | + | if ($isInstanceOf(s, "ByteVector")) | |
94 | 98 | then { | |
95 | - | let | |
96 | - | toBase58String( | |
99 | + | let R = s | |
100 | + | toBase58String(R) | |
97 | 101 | } | |
98 | - | else if ($isInstanceOf( | |
102 | + | else if ($isInstanceOf(s, "Unit")) | |
99 | 103 | then { | |
100 | - | let | |
104 | + | let S = s | |
101 | 105 | "WAVES" | |
102 | 106 | } | |
103 | 107 | else throw("Match error") | |
104 | 108 | } | |
105 | 109 | ||
106 | 110 | ||
107 | - | func | |
108 | - | let | |
109 | - | let | |
110 | - | let | |
111 | - | let | |
112 | - | let | |
113 | - | $Tuple2(( | |
111 | + | func T (I,N,M) = { | |
112 | + | let U = O(I, N) | |
113 | + | let V = L(M, I, N) | |
114 | + | let W = H(I, M) | |
115 | + | let X = P(M, I, N) | |
116 | + | let Y = fraction(W, (U - V), o) | |
117 | + | $Tuple2((X + Y), U) | |
114 | 118 | } | |
115 | 119 | ||
116 | 120 | ||
117 | - | func | |
118 | - | let | |
119 | - | let | |
120 | - | func | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
124 | - | ( | |
121 | + | func Z (I,M) = { | |
122 | + | let aa = Address(fromBase58String(I)) | |
123 | + | let ab = split(valueOrErrorMessage(getString(aa, i), "Can't find pool assets"), ",") | |
124 | + | func ac (ad,N) = { | |
125 | + | let ae = T(I, N, M) | |
126 | + | let af = ae._1 | |
127 | + | let U = ae._2 | |
128 | + | (ad :+ [af]) | |
125 | 129 | } | |
126 | 130 | ||
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | func | |
132 | - | then | |
133 | - | else | |
131 | + | let ag = { | |
132 | + | let ah = ab | |
133 | + | let ai = size(ah) | |
134 | + | let aj = nil | |
135 | + | func ak (al,am) = if ((am >= ai)) | |
136 | + | then al | |
137 | + | else ac(al, ah[am]) | |
134 | 138 | ||
135 | - | func | |
136 | - | then | |
139 | + | func an (al,am) = if ((am >= ai)) | |
140 | + | then al | |
137 | 141 | else throw("List size exceeds 15") | |
138 | 142 | ||
139 | - | | |
143 | + | an(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
140 | 144 | } | |
141 | - | $Tuple2( | |
145 | + | $Tuple2(ab, ag) | |
142 | 146 | } | |
143 | 147 | ||
144 | 148 | ||
145 | - | @Callable(am) | |
146 | - | func airDrop () = valueOrElse(z(), valueOrElse(A(am.caller), { | |
147 | - | let an = $Tuple2(am.payments[0].amount, am.payments[0].assetId) | |
148 | - | let ao = an._1 | |
149 | - | let ap = an._2 | |
150 | - | let G = toString(am.caller) | |
151 | - | let aq = I(G) | |
152 | - | let S = M(G, O(ap)) | |
153 | - | let ar = (S + (if (if ((aq > 0)) | |
154 | - | then (ao > 0) | |
155 | - | else false) | |
156 | - | then fraction(ao, n, aq) | |
157 | - | else 0)) | |
158 | - | [IntegerEntry((((G + "_") + O(ap)) + c), ar)] | |
149 | + | @Callable(ao) | |
150 | + | func airDrop () = valueOrElse(B(), valueOrElse(C(ao.caller), { | |
151 | + | let ap = $Tuple2(ao.payments[0].amount, ao.payments[0].assetId) | |
152 | + | let aq = ap._1 | |
153 | + | let ar = ap._2 | |
154 | + | let I = toString(ao.caller) | |
155 | + | let as = K(I) | |
156 | + | if ((as == 0)) | |
157 | + | then [ScriptTransfer(z, aq, ar)] | |
158 | + | else { | |
159 | + | let U = O(I, Q(ar)) | |
160 | + | let at = (U + (if ((aq > 0)) | |
161 | + | then fraction(aq, o, as) | |
162 | + | else 0)) | |
163 | + | [IntegerEntry((((I + "_") + Q(ar)) + c), at)] | |
164 | + | } | |
159 | 165 | })) | |
160 | 166 | ||
161 | 167 | ||
162 | 168 | ||
163 | - | @Callable( | |
164 | - | func updateUserInterest ( | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | func | |
169 | - | let | |
170 | - | let | |
171 | - | let | |
172 | - | ( | |
169 | + | @Callable(ao) | |
170 | + | func updateUserInterest (I,au) = valueOrElse(B(), valueOrElse(E(ao.caller), { | |
171 | + | let aa = Address(fromBase58String(I)) | |
172 | + | let M = toString(ao.originCaller) | |
173 | + | let ab = split(valueOrErrorMessage(getString(aa, i), "Can't find pool assets"), ",") | |
174 | + | func av (ad,N) = { | |
175 | + | let aw = T(I, N, M) | |
176 | + | let af = aw._1 | |
177 | + | let U = aw._2 | |
178 | + | (ad ++ [IntegerEntry((((((M + "_") + I) + "_") + N) + e), af), IntegerEntry((((((M + "_") + I) + "_") + N) + d), U)]) | |
173 | 179 | } | |
174 | 180 | ||
175 | - | let | |
176 | - | let | |
177 | - | let | |
178 | - | func | |
179 | - | then | |
180 | - | else | |
181 | + | let ah = ab | |
182 | + | let ai = size(ah) | |
183 | + | let aj = nil | |
184 | + | func ak (al,am) = if ((am >= ai)) | |
185 | + | then al | |
186 | + | else av(al, ah[am]) | |
181 | 187 | ||
182 | - | func | |
183 | - | then | |
188 | + | func an (al,am) = if ((am >= ai)) | |
189 | + | then al | |
184 | 190 | else throw("List size exceeds 15") | |
185 | 191 | ||
186 | - | | |
192 | + | an(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
187 | 193 | })) | |
188 | 194 | ||
189 | 195 | ||
190 | 196 | ||
191 | - | @Callable( | |
192 | - | func claim ( | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | func | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | $Tuple2(( | |
197 | + | @Callable(ao) | |
198 | + | func claim (I) = valueOrElse(B(), { | |
199 | + | let aa = Address(fromBase58String(I)) | |
200 | + | let M = toString(ao.caller) | |
201 | + | let ab = split(valueOrErrorMessage(getString(aa, i), "Can't find pool assets"), ",") | |
202 | + | func ax (ad,N) = { | |
203 | + | let ay = ad | |
204 | + | let az = ay._1 | |
205 | + | let aA = ay._2 | |
206 | + | let aB = T(I, N, M) | |
207 | + | let af = aB._1 | |
208 | + | let U = aB._2 | |
209 | + | $Tuple2((az ++ [ScriptTransfer(ao.caller, af, fromBase58String(N)), IntegerEntry((((((M + "_") + I) + "_") + N) + e), 0), IntegerEntry((((((M + "_") + I) + "_") + N) + d), U)]), af) | |
204 | 210 | } | |
205 | 211 | ||
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | func | |
211 | - | then | |
212 | - | else | |
212 | + | let aC = { | |
213 | + | let ah = ab | |
214 | + | let ai = size(ah) | |
215 | + | let aj = $Tuple2(nil, 0) | |
216 | + | func ak (al,am) = if ((am >= ai)) | |
217 | + | then al | |
218 | + | else ax(al, ah[am]) | |
213 | 219 | ||
214 | - | func | |
215 | - | then | |
220 | + | func an (al,am) = if ((am >= ai)) | |
221 | + | then al | |
216 | 222 | else throw("List size exceeds 15") | |
217 | 223 | ||
218 | - | | |
224 | + | an(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
219 | 225 | } | |
220 | - | let | |
221 | - | let | |
222 | - | if (( | |
226 | + | let aD = aC._1 | |
227 | + | let aE = aC._2 | |
228 | + | if ((aE == 0)) | |
223 | 229 | then throw("You have no tokens for claim") | |
224 | - | else | |
230 | + | else aD | |
225 | 231 | }) | |
226 | 232 | ||
227 | 233 | ||
228 | 234 | ||
229 | - | @Callable( | |
230 | - | func shutdown () = if (!( | |
235 | + | @Callable(ao) | |
236 | + | func shutdown () = if (!(A)) | |
231 | 237 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified"))) | |
232 | - | else if (!(containsElement([ | |
238 | + | else if (!(containsElement([v, w, x], ao.callerPublicKey))) | |
233 | 239 | then throw("Only admin can call this function") | |
234 | - | else | |
240 | + | else F("Paused by admin") | |
235 | 241 | ||
236 | 242 | ||
237 | 243 | ||
238 | - | @Callable( | |
239 | - | func activate () = if ( | |
244 | + | @Callable(ao) | |
245 | + | func activate () = if (A) | |
240 | 246 | then throw("DApp is already active") | |
241 | - | else if (!(containsElement([ | |
247 | + | else if (!(containsElement([v, w, x], ao.callerPublicKey))) | |
242 | 248 | then throw("Only admin can call this function") | |
243 | 249 | else [BooleanEntry(a, true), DeleteEntry(b)] | |
244 | 250 | ||
245 | 251 | ||
246 | - | @Verifier( | |
247 | - | func | |
248 | - | let | |
252 | + | @Verifier(aF) | |
253 | + | func aG () = { | |
254 | + | let aH = if (sigVerify(aF.bodyBytes, aF.proofs[0], v)) | |
249 | 255 | then 1 | |
250 | 256 | else 0 | |
251 | - | let | |
257 | + | let aI = if (sigVerify(aF.bodyBytes, aF.proofs[1], w)) | |
252 | 258 | then 1 | |
253 | 259 | else 0 | |
254 | - | let | |
260 | + | let aJ = if (sigVerify(aF.bodyBytes, aF.proofs[2], x)) | |
255 | 261 | then 1 | |
256 | 262 | else 0 | |
257 | - | ((( | |
263 | + | (((aH + aI) + aJ) >= 2) | |
258 | 264 | } | |
259 | 265 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "active" | |
5 | 5 | ||
6 | 6 | let b = "shutdown_cause" | |
7 | 7 | ||
8 | 8 | let c = "_pool_last_interest" | |
9 | 9 | ||
10 | 10 | let d = "_user_last_interest" | |
11 | 11 | ||
12 | 12 | let e = "_user_available_to_claim" | |
13 | 13 | ||
14 | 14 | let f = "_share_tokens_locked" | |
15 | 15 | ||
16 | 16 | let g = "_total_share_tokens_locked" | |
17 | 17 | ||
18 | 18 | let h = "pool_" | |
19 | 19 | ||
20 | 20 | let i = "asset_ids" | |
21 | 21 | ||
22 | 22 | let j = "admin_pub_1" | |
23 | 23 | ||
24 | 24 | let k = "admin_pub_2" | |
25 | 25 | ||
26 | 26 | let l = "admin_pub_3" | |
27 | 27 | ||
28 | 28 | let m = "farming_address" | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = "money_box_address" | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 100000000 | |
33 | 33 | ||
34 | - | func p (q) = { | |
35 | - | let r = getString(o, q) | |
36 | - | if ($isInstanceOf(r, "String")) | |
34 | + | let p = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
35 | + | ||
36 | + | func q (r) = { | |
37 | + | let s = getString(p, r) | |
38 | + | if ($isInstanceOf(s, "String")) | |
37 | 39 | then { | |
38 | - | let | |
39 | - | fromBase58String( | |
40 | + | let t = s | |
41 | + | fromBase58String(t) | |
40 | 42 | } | |
41 | 43 | else { | |
42 | - | let | |
43 | - | throw(( | |
44 | + | let u = s | |
45 | + | throw((r + "is empty")) | |
44 | 46 | } | |
45 | 47 | } | |
46 | 48 | ||
47 | 49 | ||
48 | - | let | |
50 | + | let v = q(j) | |
49 | 51 | ||
50 | - | let | |
52 | + | let w = q(k) | |
51 | 53 | ||
52 | - | let | |
54 | + | let x = q(l) | |
53 | 55 | ||
54 | - | let | |
56 | + | let y = Address(q(m)) | |
55 | 57 | ||
56 | - | let | |
58 | + | let z = Address(q(n)) | |
57 | 59 | ||
58 | - | func z () = if (y) | |
60 | + | let A = valueOrElse(getBoolean(this, a), true) | |
61 | + | ||
62 | + | func B () = if (A) | |
59 | 63 | then unit | |
60 | 64 | else throw("DApp is inactive at this moment") | |
61 | 65 | ||
62 | 66 | ||
63 | - | func | |
67 | + | func C (D) = if (isDefined(getString(p, (h + toString(D))))) | |
64 | 68 | then unit | |
65 | 69 | else throw("Only pool can call this function") | |
66 | 70 | ||
67 | 71 | ||
68 | - | func | |
72 | + | func E (D) = if ((D == y)) | |
69 | 73 | then unit | |
70 | 74 | else throw("Only farming can call this function") | |
71 | 75 | ||
72 | 76 | ||
73 | - | func | |
77 | + | func F (G) = [BooleanEntry(a, false), StringEntry(b, G)] | |
74 | 78 | ||
75 | 79 | ||
76 | - | func | |
80 | + | func H (I,J) = valueOrElse(getInteger(y, (((I + "_") + J) + f)), 0) | |
77 | 81 | ||
78 | 82 | ||
79 | - | func | |
83 | + | func K (I) = valueOrElse(getInteger(y, (I + g)), 0) | |
80 | 84 | ||
81 | 85 | ||
82 | - | func | |
86 | + | func L (M,I,N) = valueOrElse(getInteger(this, (((((M + "_") + I) + "_") + N) + d)), 0) | |
83 | 87 | ||
84 | 88 | ||
85 | - | func | |
89 | + | func O (I,N) = valueOrElse(getInteger(this, (((I + "_") + N) + c)), 0) | |
86 | 90 | ||
87 | 91 | ||
88 | - | func | |
92 | + | func P (M,I,N) = valueOrElse(getInteger(this, (((((M + "_") + I) + "_") + N) + e)), 0) | |
89 | 93 | ||
90 | 94 | ||
91 | - | func | |
92 | - | let | |
93 | - | if ($isInstanceOf( | |
95 | + | func Q (N) = { | |
96 | + | let s = N | |
97 | + | if ($isInstanceOf(s, "ByteVector")) | |
94 | 98 | then { | |
95 | - | let | |
96 | - | toBase58String( | |
99 | + | let R = s | |
100 | + | toBase58String(R) | |
97 | 101 | } | |
98 | - | else if ($isInstanceOf( | |
102 | + | else if ($isInstanceOf(s, "Unit")) | |
99 | 103 | then { | |
100 | - | let | |
104 | + | let S = s | |
101 | 105 | "WAVES" | |
102 | 106 | } | |
103 | 107 | else throw("Match error") | |
104 | 108 | } | |
105 | 109 | ||
106 | 110 | ||
107 | - | func | |
108 | - | let | |
109 | - | let | |
110 | - | let | |
111 | - | let | |
112 | - | let | |
113 | - | $Tuple2(( | |
111 | + | func T (I,N,M) = { | |
112 | + | let U = O(I, N) | |
113 | + | let V = L(M, I, N) | |
114 | + | let W = H(I, M) | |
115 | + | let X = P(M, I, N) | |
116 | + | let Y = fraction(W, (U - V), o) | |
117 | + | $Tuple2((X + Y), U) | |
114 | 118 | } | |
115 | 119 | ||
116 | 120 | ||
117 | - | func | |
118 | - | let | |
119 | - | let | |
120 | - | func | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
124 | - | ( | |
121 | + | func Z (I,M) = { | |
122 | + | let aa = Address(fromBase58String(I)) | |
123 | + | let ab = split(valueOrErrorMessage(getString(aa, i), "Can't find pool assets"), ",") | |
124 | + | func ac (ad,N) = { | |
125 | + | let ae = T(I, N, M) | |
126 | + | let af = ae._1 | |
127 | + | let U = ae._2 | |
128 | + | (ad :+ [af]) | |
125 | 129 | } | |
126 | 130 | ||
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | func | |
132 | - | then | |
133 | - | else | |
131 | + | let ag = { | |
132 | + | let ah = ab | |
133 | + | let ai = size(ah) | |
134 | + | let aj = nil | |
135 | + | func ak (al,am) = if ((am >= ai)) | |
136 | + | then al | |
137 | + | else ac(al, ah[am]) | |
134 | 138 | ||
135 | - | func | |
136 | - | then | |
139 | + | func an (al,am) = if ((am >= ai)) | |
140 | + | then al | |
137 | 141 | else throw("List size exceeds 15") | |
138 | 142 | ||
139 | - | | |
143 | + | an(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
140 | 144 | } | |
141 | - | $Tuple2( | |
145 | + | $Tuple2(ab, ag) | |
142 | 146 | } | |
143 | 147 | ||
144 | 148 | ||
145 | - | @Callable(am) | |
146 | - | func airDrop () = valueOrElse(z(), valueOrElse(A(am.caller), { | |
147 | - | let an = $Tuple2(am.payments[0].amount, am.payments[0].assetId) | |
148 | - | let ao = an._1 | |
149 | - | let ap = an._2 | |
150 | - | let G = toString(am.caller) | |
151 | - | let aq = I(G) | |
152 | - | let S = M(G, O(ap)) | |
153 | - | let ar = (S + (if (if ((aq > 0)) | |
154 | - | then (ao > 0) | |
155 | - | else false) | |
156 | - | then fraction(ao, n, aq) | |
157 | - | else 0)) | |
158 | - | [IntegerEntry((((G + "_") + O(ap)) + c), ar)] | |
149 | + | @Callable(ao) | |
150 | + | func airDrop () = valueOrElse(B(), valueOrElse(C(ao.caller), { | |
151 | + | let ap = $Tuple2(ao.payments[0].amount, ao.payments[0].assetId) | |
152 | + | let aq = ap._1 | |
153 | + | let ar = ap._2 | |
154 | + | let I = toString(ao.caller) | |
155 | + | let as = K(I) | |
156 | + | if ((as == 0)) | |
157 | + | then [ScriptTransfer(z, aq, ar)] | |
158 | + | else { | |
159 | + | let U = O(I, Q(ar)) | |
160 | + | let at = (U + (if ((aq > 0)) | |
161 | + | then fraction(aq, o, as) | |
162 | + | else 0)) | |
163 | + | [IntegerEntry((((I + "_") + Q(ar)) + c), at)] | |
164 | + | } | |
159 | 165 | })) | |
160 | 166 | ||
161 | 167 | ||
162 | 168 | ||
163 | - | @Callable( | |
164 | - | func updateUserInterest ( | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | func | |
169 | - | let | |
170 | - | let | |
171 | - | let | |
172 | - | ( | |
169 | + | @Callable(ao) | |
170 | + | func updateUserInterest (I,au) = valueOrElse(B(), valueOrElse(E(ao.caller), { | |
171 | + | let aa = Address(fromBase58String(I)) | |
172 | + | let M = toString(ao.originCaller) | |
173 | + | let ab = split(valueOrErrorMessage(getString(aa, i), "Can't find pool assets"), ",") | |
174 | + | func av (ad,N) = { | |
175 | + | let aw = T(I, N, M) | |
176 | + | let af = aw._1 | |
177 | + | let U = aw._2 | |
178 | + | (ad ++ [IntegerEntry((((((M + "_") + I) + "_") + N) + e), af), IntegerEntry((((((M + "_") + I) + "_") + N) + d), U)]) | |
173 | 179 | } | |
174 | 180 | ||
175 | - | let | |
176 | - | let | |
177 | - | let | |
178 | - | func | |
179 | - | then | |
180 | - | else | |
181 | + | let ah = ab | |
182 | + | let ai = size(ah) | |
183 | + | let aj = nil | |
184 | + | func ak (al,am) = if ((am >= ai)) | |
185 | + | then al | |
186 | + | else av(al, ah[am]) | |
181 | 187 | ||
182 | - | func | |
183 | - | then | |
188 | + | func an (al,am) = if ((am >= ai)) | |
189 | + | then al | |
184 | 190 | else throw("List size exceeds 15") | |
185 | 191 | ||
186 | - | | |
192 | + | an(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
187 | 193 | })) | |
188 | 194 | ||
189 | 195 | ||
190 | 196 | ||
191 | - | @Callable( | |
192 | - | func claim ( | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | func | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | $Tuple2(( | |
197 | + | @Callable(ao) | |
198 | + | func claim (I) = valueOrElse(B(), { | |
199 | + | let aa = Address(fromBase58String(I)) | |
200 | + | let M = toString(ao.caller) | |
201 | + | let ab = split(valueOrErrorMessage(getString(aa, i), "Can't find pool assets"), ",") | |
202 | + | func ax (ad,N) = { | |
203 | + | let ay = ad | |
204 | + | let az = ay._1 | |
205 | + | let aA = ay._2 | |
206 | + | let aB = T(I, N, M) | |
207 | + | let af = aB._1 | |
208 | + | let U = aB._2 | |
209 | + | $Tuple2((az ++ [ScriptTransfer(ao.caller, af, fromBase58String(N)), IntegerEntry((((((M + "_") + I) + "_") + N) + e), 0), IntegerEntry((((((M + "_") + I) + "_") + N) + d), U)]), af) | |
204 | 210 | } | |
205 | 211 | ||
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | func | |
211 | - | then | |
212 | - | else | |
212 | + | let aC = { | |
213 | + | let ah = ab | |
214 | + | let ai = size(ah) | |
215 | + | let aj = $Tuple2(nil, 0) | |
216 | + | func ak (al,am) = if ((am >= ai)) | |
217 | + | then al | |
218 | + | else ax(al, ah[am]) | |
213 | 219 | ||
214 | - | func | |
215 | - | then | |
220 | + | func an (al,am) = if ((am >= ai)) | |
221 | + | then al | |
216 | 222 | else throw("List size exceeds 15") | |
217 | 223 | ||
218 | - | | |
224 | + | an(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
219 | 225 | } | |
220 | - | let | |
221 | - | let | |
222 | - | if (( | |
226 | + | let aD = aC._1 | |
227 | + | let aE = aC._2 | |
228 | + | if ((aE == 0)) | |
223 | 229 | then throw("You have no tokens for claim") | |
224 | - | else | |
230 | + | else aD | |
225 | 231 | }) | |
226 | 232 | ||
227 | 233 | ||
228 | 234 | ||
229 | - | @Callable( | |
230 | - | func shutdown () = if (!( | |
235 | + | @Callable(ao) | |
236 | + | func shutdown () = if (!(A)) | |
231 | 237 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified"))) | |
232 | - | else if (!(containsElement([ | |
238 | + | else if (!(containsElement([v, w, x], ao.callerPublicKey))) | |
233 | 239 | then throw("Only admin can call this function") | |
234 | - | else | |
240 | + | else F("Paused by admin") | |
235 | 241 | ||
236 | 242 | ||
237 | 243 | ||
238 | - | @Callable( | |
239 | - | func activate () = if ( | |
244 | + | @Callable(ao) | |
245 | + | func activate () = if (A) | |
240 | 246 | then throw("DApp is already active") | |
241 | - | else if (!(containsElement([ | |
247 | + | else if (!(containsElement([v, w, x], ao.callerPublicKey))) | |
242 | 248 | then throw("Only admin can call this function") | |
243 | 249 | else [BooleanEntry(a, true), DeleteEntry(b)] | |
244 | 250 | ||
245 | 251 | ||
246 | - | @Verifier( | |
247 | - | func | |
248 | - | let | |
252 | + | @Verifier(aF) | |
253 | + | func aG () = { | |
254 | + | let aH = if (sigVerify(aF.bodyBytes, aF.proofs[0], v)) | |
249 | 255 | then 1 | |
250 | 256 | else 0 | |
251 | - | let | |
257 | + | let aI = if (sigVerify(aF.bodyBytes, aF.proofs[1], w)) | |
252 | 258 | then 1 | |
253 | 259 | else 0 | |
254 | - | let | |
260 | + | let aJ = if (sigVerify(aF.bodyBytes, aF.proofs[2], x)) | |
255 | 261 | then 1 | |
256 | 262 | else 0 | |
257 | - | ((( | |
263 | + | (((aH + aI) + aJ) >= 2) | |
258 | 264 | } | |
259 | 265 |
github/deemru/w8io/169f3d6 91.15 ms ◑