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