tx · FyHkarCnBzEjCo6XAg9Bj2dZs7pPz62Mwb9fqAii9fcP 3N8E9LU71MDkdP8FWtbP4TBXCNhoc15hWfs: -0.14000000 Waves 2022.10.18 17:24 [2277953] smart account 3N8E9LU71MDkdP8FWtbP4TBXCNhoc15hWfs > SELF 0.00000000 Waves
{ "type": 13, "id": "FyHkarCnBzEjCo6XAg9Bj2dZs7pPz62Mwb9fqAii9fcP", "fee": 14000000, "feeAssetId": null, "timestamp": 1666103082627, "version": 2, "chainId": 84, "sender": "3N8E9LU71MDkdP8FWtbP4TBXCNhoc15hWfs", "senderPublicKey": "2EDucEDvqYfn6hdx4PbvykQFRoNgPMWX6SiVPjM8AyxM", "proofs": [ "3AaTXsoiw4UttR8vtfnC3SaqKsQuyh4GuCsMPhy8Qe7kSutb6VLoUxJbYbg2tyQPboJBqFzUtpycKL7mx2jte41Y", "5ygs8AMUDHYD6wYLwDY1TdzMq799DUvHtkauy6u9y12pvJZDs5DQyfoyaAThsFqueEYUWfhxzobM4hyrnaxacYm9" ], "script": "base64:BgIdCAISABIAEgMKAQESABIAEgASBgoEGBEBARIAEgBXAAdrQWN0aXZlAgZhY3RpdmUABmtDYXVzZQIOc2h1dGRvd25fY2F1c2UADWtMYXN0SW50ZXJlc3QCDWxhc3RfaW50ZXJlc3QAEWtVc2VyTGFzdEludGVyZXN0Ag5fbGFzdF9pbnRlcmVzdAAPa1VzZXJTV09QTG9ja2VkAgxfU1dPUF9hbW91bnQAEGtUb3RhbFNXT1BMb2NrZWQCEXRvdGFsX1NXT1BfYW1vdW50ABVrVXNlclN3b3BVbmxvY2tIZWlnaHQCE19TV09QX3VubG9ja19oZWlnaHQAEGtVc2VyR1N3b3BMb2NrZWQCDV9HU3dvcF9hbW91bnQAEWtUb3RhbEdTd29wTG9ja2VkAhJ0b3RhbF9HU3dvcF9hbW91bnQAEmtVc2VyVG90YWxWb3RlU1dPUAIWX3VzZXJfdG90YWxfdm90ZV9nU1dPUAAWa1VzZXJBdmFpbGFib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AQxCb29sZWFuRW50cnkCBQdrQWN0aXZlBgkAzAgCCQELRGVsZXRlRW50cnkBBQZrQ2F1c2UFA25pbAECdHgBBnZlcmlmeQAEEmFkbWluUHViS2V5MVNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDGFkbWluUHViS2V5MQABAAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFDGFkbWluUHViS2V5MgABAAAEEmFkbWluUHViS2V5M1NpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFDGFkbWluUHViS2V5MwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAoPqhZI=", "height": 2277953, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HT1o8kaQLrJahFFqVZ83YoNTc8em6KgsBABweM8tkaAm Next: DUg3371WqvKdHqXYPo6PGFt8PPWKGKBNPRSqTTLwGgqb Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "active" | |
11 | 11 | ||
12 | 12 | let e = "_SWOP_amount" | |
13 | 13 | ||
14 | - | let f = "_ | |
14 | + | let f = "total_SWOP_amount" | |
15 | 15 | ||
16 | - | let g = " | |
16 | + | let g = "_SWOP_unlock_height" | |
17 | 17 | ||
18 | - | let h = "_ | |
18 | + | let h = "_GSwop_amount" | |
19 | 19 | ||
20 | - | let i = "_ | |
20 | + | let i = "total_GSwop_amount" | |
21 | 21 | ||
22 | - | let j = "total_ | |
22 | + | let j = "_user_total_vote_gSWOP" | |
23 | 23 | ||
24 | - | let k = "_ | |
24 | + | let k = "_user_available_for_claim" | |
25 | 25 | ||
26 | - | let l = "_ | |
26 | + | let l = "_current_pool_fraction_reward" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "_previous_pool_fraction_reward" | |
29 | 29 | ||
30 | - | let n = "_ | |
30 | + | let n = "_pool_reward_update_height" | |
31 | 31 | ||
32 | - | let o = "_ | |
32 | + | let o = "reward_update_height" | |
33 | 33 | ||
34 | - | let p = "_ | |
34 | + | let p = "reward_update_height_first_pagination" | |
35 | 35 | ||
36 | - | let q = "_ | |
36 | + | let q = "_vote_no" | |
37 | 37 | ||
38 | - | let r = "_ | |
38 | + | let r = "_vote_yes" | |
39 | 39 | ||
40 | - | let s = "_ | |
40 | + | let s = "_status" | |
41 | 41 | ||
42 | - | let t = " | |
42 | + | let t = "_finish_height" | |
43 | 43 | ||
44 | - | let u = " | |
44 | + | let u = "voting_active_cell_1" | |
45 | 45 | ||
46 | - | let v = " | |
46 | + | let v = "voting_active_cell_2" | |
47 | 47 | ||
48 | - | let w = " | |
48 | + | let w = "voting_active_cell_3" | |
49 | 49 | ||
50 | - | let x = "_ | |
50 | + | let x = "sum_reward_current" | |
51 | 51 | ||
52 | - | let y = "_ | |
52 | + | let y = "_bought_tickets" | |
53 | 53 | ||
54 | - | let z = " | |
54 | + | let z = "_swop_per_ticket" | |
55 | 55 | ||
56 | - | let A = "_ | |
56 | + | let A = "launchpad_active_id" | |
57 | 57 | ||
58 | - | let B = "_ | |
58 | + | let B = "_duration" | |
59 | 59 | ||
60 | - | let C = " | |
60 | + | let C = "_start_height" | |
61 | 61 | ||
62 | - | let D = " | |
62 | + | let D = "start_height" | |
63 | 63 | ||
64 | - | let E = " | |
64 | + | let E = "base_period" | |
65 | 65 | ||
66 | - | let F = " | |
66 | + | let F = "period_length" | |
67 | 67 | ||
68 | - | let G = "_ | |
68 | + | let G = "_user_total_struc" | |
69 | 69 | ||
70 | - | let H = "_swop_ | |
70 | + | let H = "_freeze_swop_duration" | |
71 | 71 | ||
72 | - | let I = " | |
72 | + | let I = "SWOP_id" | |
73 | 73 | ||
74 | - | let J = "_ | |
74 | + | let J = "airdrop_fee" | |
75 | 75 | ||
76 | - | let K = "_ | |
76 | + | let K = "admin_pub_1" | |
77 | 77 | ||
78 | - | let L = " | |
78 | + | let L = "admin_pub_2" | |
79 | 79 | ||
80 | - | let M = " | |
80 | + | let M = "admin_pub_3" | |
81 | 81 | ||
82 | - | let N = " | |
82 | + | let N = "money_box_pub_key" | |
83 | 83 | ||
84 | - | let O = "_ | |
84 | + | let O = "farming_address" | |
85 | 85 | ||
86 | - | let P = "_ | |
86 | + | let P = "voting_address" | |
87 | 87 | ||
88 | - | let Q = " | |
88 | + | let Q = "voting_new_pool_address" | |
89 | 89 | ||
90 | - | let R = " | |
90 | + | let R = "launchpad_address" | |
91 | 91 | ||
92 | - | let S = " | |
92 | + | let S = "airdrop_fee_money_box" | |
93 | 93 | ||
94 | - | let T = | |
94 | + | let T = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
95 | 95 | ||
96 | - | let U = "admin_pub_3" | |
97 | - | ||
98 | - | let V = "money_box_pub_key" | |
99 | - | ||
100 | - | let W = "farming_address" | |
101 | - | ||
102 | - | let X = "voting_address" | |
103 | - | ||
104 | - | let Y = "voting_new_pool_address" | |
105 | - | ||
106 | - | let Z = "launchpad_address" | |
107 | - | ||
108 | - | let aa = "airdrop_fee_money_box" | |
109 | - | ||
110 | - | let ab = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
111 | - | ||
112 | - | func ac (ad) = { | |
113 | - | let ae = getString(ab, ad) | |
114 | - | if ($isInstanceOf(ae, "String")) | |
96 | + | func U (V) = { | |
97 | + | let W = getString(T, V) | |
98 | + | if ($isInstanceOf(W, "String")) | |
115 | 99 | then { | |
116 | - | let | |
117 | - | fromBase58String( | |
100 | + | let X = W | |
101 | + | fromBase58String(X) | |
118 | 102 | } | |
119 | 103 | else { | |
120 | - | let | |
121 | - | throw(( | |
104 | + | let Y = W | |
105 | + | throw((V + "is empty")) | |
122 | 106 | } | |
123 | 107 | } | |
124 | 108 | ||
125 | 109 | ||
126 | - | let | |
110 | + | let Z = U(K) | |
127 | 111 | ||
128 | - | let | |
112 | + | let aa = U(L) | |
129 | 113 | ||
130 | - | let | |
114 | + | let ab = U(M) | |
131 | 115 | ||
132 | - | let | |
116 | + | let ac = U(N) | |
133 | 117 | ||
134 | - | let | |
118 | + | let ad = Address(U(O)) | |
135 | 119 | ||
136 | - | let | |
120 | + | let ae = Address(U(P)) | |
137 | 121 | ||
138 | - | let | |
122 | + | let af = Address(U(Q)) | |
139 | 123 | ||
140 | - | let | |
124 | + | let ag = Address(U(R)) | |
141 | 125 | ||
142 | - | let | |
126 | + | let ah = Address(U(S)) | |
143 | 127 | ||
144 | - | let | |
128 | + | let ai = (10102 * 4) | |
145 | 129 | ||
146 | - | let | |
130 | + | let aj = fromBase58String(getStringValue(ad, I)) | |
147 | 131 | ||
148 | - | let | |
132 | + | let ak = 100000000 | |
149 | 133 | ||
150 | - | let | |
134 | + | let al = 10000000000 | |
151 | 135 | ||
152 | - | let | |
136 | + | let am = 1000000 | |
153 | 137 | ||
154 | - | let | |
138 | + | let an = valueOrErrorMessage(getInteger(ae, E), "Empty kBasePeriod at voting contract") | |
155 | 139 | ||
156 | - | let | |
140 | + | let ao = valueOrErrorMessage(getInteger(ae, D), "Empty kStartHeight at voting contract") | |
157 | 141 | ||
158 | - | let | |
142 | + | let ap = valueOrErrorMessage(getInteger(ae, F), "Empty kPeriodLength at voting contract") | |
159 | 143 | ||
160 | - | let | |
144 | + | let aq = valueOrElse(getString(af, u), "") | |
161 | 145 | ||
162 | - | let | |
146 | + | let ar = valueOrElse(getString(af, v), "") | |
163 | 147 | ||
164 | - | let | |
148 | + | let as = valueOrElse(getString(af, w), "") | |
165 | 149 | ||
166 | - | let | |
150 | + | let at = valueOrElse(getBoolean(this, a), true) | |
167 | 151 | ||
168 | - | let | |
152 | + | let au = getIntegerValue(T, J) | |
169 | 153 | ||
170 | - | func aD (aE) = [BooleanEntry(a, false), StringEntry(b, aE)] | |
154 | + | let av = (an + ((height - ao) / ap)) | |
155 | + | ||
156 | + | func aw (ax) = [BooleanEntry(a, false), StringEntry(b, ax)] | |
171 | 157 | ||
172 | 158 | ||
173 | - | func aF () = throw("Not enough SWOP: userSWOPLocked - userTotalVoteAmount < voteSWOPAmount") | |
159 | + | func ay () = if (at) | |
160 | + | then unit | |
161 | + | else throw("DApp is inactive at this moment") | |
174 | 162 | ||
175 | 163 | ||
176 | - | func aG () = valueOrElse(getInteger(this, c), 0) | |
164 | + | func az (aA) = if (containsElement([Z, aa, ab], aA.callerPublicKey)) | |
165 | + | then unit | |
166 | + | else throw("Only admin can call this function") | |
177 | 167 | ||
178 | 168 | ||
179 | - | func | |
169 | + | func aB () = valueOrElse(getInteger(this, c), 0) | |
180 | 170 | ||
181 | 171 | ||
182 | - | func aJ (aI) = valueOrElse(getInteger(this, (toString(aI) + k)), 0) | |
183 | - | ||
184 | - | ||
185 | - | func aK (aI) = valueOrElse(getInteger(am, (toString(aI) + h)), 0) | |
186 | - | ||
187 | - | ||
188 | - | func aL (aI,aM) = { | |
189 | - | let aN = aH(aI) | |
190 | - | let aO = getInteger(this, (toString(aI) + d)) | |
191 | - | let aP = { | |
192 | - | let ae = aO | |
193 | - | if ($isInstanceOf(ae, "Int")) | |
194 | - | then { | |
195 | - | let aO = ae | |
196 | - | aO | |
197 | - | } | |
198 | - | else aM | |
199 | - | } | |
200 | - | $Tuple2(aP, aN) | |
172 | + | func aC () = { | |
173 | + | let aD = valueOrElse(getInteger(this, f), 0) | |
174 | + | let aE = valueOrElse(getInteger(this, i), aD) | |
175 | + | $Tuple2(aD, aE) | |
201 | 176 | } | |
202 | 177 | ||
203 | 178 | ||
204 | - | func aQ (aR,aI) = { | |
205 | - | let aS = valueOrElse(getInteger(an, aR), -1) | |
206 | - | let aT = valueOrElse(getInteger(an, (toString(aS) + B)), 0) | |
207 | - | let aU = valueOrElse(getBoolean(an, (toString(aS) + A)), true) | |
179 | + | func aF (aG) = { | |
180 | + | let aH = valueOrElse(getInteger(this, (aG + e)), 0) | |
181 | + | let aI = valueOrElse(getInteger(this, (aG + h)), aH) | |
182 | + | $Tuple2(aH, aI) | |
183 | + | } | |
184 | + | ||
185 | + | ||
186 | + | func aJ (aG,aK) = { | |
187 | + | let aL = aF(aG) | |
188 | + | let aM = aL._1 | |
189 | + | let aN = aL._2 | |
190 | + | let aO = valueOrElse(getInteger(this, (aG + d)), aK) | |
191 | + | $Tuple3(aO, aM, aN) | |
192 | + | } | |
193 | + | ||
194 | + | ||
195 | + | func aP (aG) = valueOrElse(getInteger(this, (aG + k)), 0) | |
196 | + | ||
197 | + | ||
198 | + | func aQ (aR,aG) = { | |
199 | + | let aS = valueOrElse(getInteger(af, aR), -1) | |
200 | + | let aT = valueOrElse(getInteger(af, (toString(aS) + t)), 0) | |
201 | + | let aU = valueOrElse(getBoolean(af, (toString(aS) + s)), true) | |
208 | 202 | let aV = height | |
209 | 203 | if ((0 > aS)) | |
210 | 204 | then 0 | |
211 | 205 | else if (!(aU)) | |
212 | 206 | then 0 | |
213 | 207 | else if ((aT > aV)) | |
214 | - | then (valueOrElse(getInteger( | |
208 | + | then (valueOrElse(getInteger(af, (((toString(aG) + "_") + toString(aS)) + r)), 0) + valueOrElse(getInteger(af, (((toString(aG) + "_") + toString(aS)) + q)), 0)) | |
215 | 209 | else 0 | |
216 | 210 | } | |
217 | 211 | ||
218 | 212 | ||
219 | - | func aW ( | |
220 | - | let aX = [aQ( | |
213 | + | func aW (aG) = { | |
214 | + | let aX = [aQ(aq, aG), aQ(ar, aG), aQ(as, aG)] | |
221 | 215 | max(aX) | |
222 | 216 | } | |
223 | 217 | ||
224 | 218 | ||
225 | - | func aY ( | |
226 | - | let aZ = toString(valueOrElse(getInteger( | |
219 | + | func aY (aG) = { | |
220 | + | let aZ = toString(valueOrElse(getInteger(ag, A), 0)) | |
227 | 221 | if ((aZ == "0")) | |
228 | 222 | then 0 | |
229 | 223 | else { | |
230 | - | let ba = valueOrElse(getInteger( | |
231 | - | let bb = valueOrElse(getInteger( | |
232 | - | let bc = valueOrElse(getInteger( | |
224 | + | let ba = valueOrElse(getInteger(ag, (aZ + C)), 0) | |
225 | + | let bb = valueOrElse(getInteger(ag, (aZ + B)), 0) | |
226 | + | let bc = valueOrElse(getInteger(ag, (aZ + H)), 0) | |
233 | 227 | let bd = ((ba + bb) + bc) | |
234 | 228 | if ((height > bd)) | |
235 | 229 | then 0 | |
236 | 230 | else { | |
237 | - | let be = valueOrElse(getInteger( | |
238 | - | let bf = valueOrElse(getInteger( | |
231 | + | let be = valueOrElse(getInteger(ag, (((toString(aG) + "_") + aZ) + y)), 0) | |
232 | + | let bf = valueOrElse(getInteger(ag, (aZ + z)), 0) | |
239 | 233 | (be * bf) | |
240 | 234 | } | |
241 | 235 | } | |
242 | 236 | } | |
243 | 237 | ||
244 | 238 | ||
245 | - | func bg () = valueOrElse(getInteger(this, g), 0) | |
246 | - | ||
247 | - | ||
248 | - | func bh (aI) = { | |
249 | - | let bi = if (isDefined(getString(am, (toString(aI) + O)))) | |
239 | + | func bg (aG) = { | |
240 | + | let bh = if (isDefined(getString(ae, (toString(aG) + G)))) | |
250 | 241 | then { | |
251 | - | let | |
252 | - | $Tuple3(parseIntValue( | |
242 | + | let bi = split(valueOrErrorMessage(getString(ae, (toString(aG) + G)), "Empty kUserTotalStruc"), "_") | |
243 | + | $Tuple3(parseIntValue(bi[0]), parseIntValue(bi[1]), parseIntValue(bi[2])) | |
253 | 244 | } | |
254 | 245 | else { | |
255 | - | let | |
256 | - | $Tuple3( | |
246 | + | let bj = valueOrElse(getInteger(ae, (toString(aG) + j)), 0) | |
247 | + | $Tuple3(bj, 0, av) | |
257 | 248 | } | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | then | |
249 | + | let bk = bh._1 | |
250 | + | let bl = bh._2 | |
251 | + | let bm = bh._3 | |
252 | + | let bn = if ((bm == av)) | |
253 | + | then bl | |
263 | 254 | else 0 | |
264 | - | $Tuple2( | |
255 | + | $Tuple2(bk, bn) | |
265 | 256 | } | |
266 | 257 | ||
267 | 258 | ||
268 | - | func | |
259 | + | func bo (aR) = valueOrElse(getInteger(this, (aR + n)), 0) | |
269 | 260 | ||
270 | 261 | ||
271 | - | func | |
262 | + | func bp (aR) = isDefined(getInteger(this, (aR + n))) | |
272 | 263 | ||
273 | 264 | ||
274 | - | func | |
265 | + | func bq (aR) = valueOrElse(getInteger(this, (aR + l)), 0) | |
275 | 266 | ||
276 | 267 | ||
277 | - | func | |
268 | + | func br (aR) = valueOrElse(getInteger(this, (aR + m)), 0) | |
278 | 269 | ||
279 | 270 | ||
280 | - | func bu (aR) = valueOrElse(getInteger(this, (aR + q)), 0) | |
281 | - | ||
282 | - | ||
283 | - | func bv (aR) = valueOrElse(getInteger(this, (aR + r)), 0) | |
284 | - | ||
285 | - | ||
286 | - | func bw (aI,br,bx) = { | |
287 | - | let by = getInteger(this, (((br + bx) + toString(aI)) + i)) | |
288 | - | let bz = { | |
289 | - | let ae = by | |
290 | - | if ($isInstanceOf(ae, "Int")) | |
291 | - | then { | |
292 | - | let bz = ae | |
293 | - | bz | |
294 | - | } | |
295 | - | else if ($isInstanceOf(ae, "Unit")) | |
296 | - | then { | |
297 | - | let bz = ae | |
298 | - | 0 | |
299 | - | } | |
300 | - | else throw("Match error") | |
301 | - | } | |
302 | - | valueOrErrorMessage(bz, (((("No data on the key: " + br) + bx) + toString(aI)) + i)) | |
271 | + | func bs (aG) = { | |
272 | + | let aK = aB() | |
273 | + | let bt = aJ(aG, aK) | |
274 | + | let aO = bt._1 | |
275 | + | let bu = bt._2 | |
276 | + | let aN = bt._3 | |
277 | + | let bv = fraction(aN, (aK - aO), ak) | |
278 | + | let bw = aK | |
279 | + | $Tuple2(bw, bv) | |
303 | 280 | } | |
304 | 281 | ||
305 | 282 | ||
306 | - | func bA (br) = valueOrErrorMessage(getInteger(this, (br + p)), (("No data on the key: " + br) + p)) | |
307 | - | ||
308 | - | ||
309 | - | func bB (br,bx) = { | |
310 | - | let bC = getInteger(this, ((br + bx) + j)) | |
311 | - | let bD = { | |
312 | - | let ae = bC | |
313 | - | if ($isInstanceOf(ae, "Int")) | |
314 | - | then { | |
315 | - | let bD = ae | |
316 | - | bD | |
317 | - | } | |
318 | - | else if ($isInstanceOf(ae, "Unit")) | |
319 | - | then { | |
320 | - | let bD = ae | |
321 | - | 0 | |
322 | - | } | |
323 | - | else throw("Match error") | |
324 | - | } | |
325 | - | bD | |
326 | - | } | |
327 | - | ||
328 | - | ||
329 | - | func bE (br,bx,aI,bF) = { | |
330 | - | let ad = ((((((br + "_") + bx) + "_") + toString(aI)) + "_") + toString(bF)) | |
331 | - | valueOrErrorMessage(getInteger(this, ad), ("No data on the key: " + ad)) | |
332 | - | } | |
333 | - | ||
334 | - | ||
335 | - | func bG (bH) = { | |
336 | - | let aM = aG() | |
337 | - | let bI = aL(bH, aM) | |
338 | - | let aO = bI._1 | |
339 | - | let bJ = bI._2 | |
340 | - | let bK = fraction(bJ, (aM - aO), ar) | |
341 | - | let bL = aM | |
342 | - | $Tuple2(bL, bK) | |
343 | - | } | |
344 | - | ||
345 | - | ||
346 | - | @Callable(bM) | |
347 | - | func airDrop () = if (!(aA)) | |
348 | - | then throw("DApp is inactive at this moment") | |
349 | - | else { | |
350 | - | let bN = $Tuple2(bM.payments[0].amount, bM.payments[0].assetId) | |
351 | - | let bO = bN._1 | |
352 | - | let bP = bN._2 | |
353 | - | if ((bP != aq)) | |
354 | - | then throw("Incorrect pmtAssetId") | |
355 | - | else { | |
356 | - | let bQ = fraction(bO, aB, at, CEILING) | |
357 | - | let bR = bg() | |
358 | - | let aM = aG() | |
359 | - | let bS = (aM + fraction((bO - bQ), ar, bR)) | |
360 | - | [IntegerEntry(c, bS), ScriptTransfer(ap, bQ, aq)] | |
361 | - | } | |
362 | - | } | |
283 | + | @Callable(aA) | |
284 | + | func airDrop () = valueOrElse(ay(), { | |
285 | + | let bx = $Tuple2(aA.payments[0].amount, aA.payments[0].assetId) | |
286 | + | let by = bx._1 | |
287 | + | let bz = bx._2 | |
288 | + | if ((bz != aj)) | |
289 | + | then throw("Incorrect pmtAssetId") | |
290 | + | else { | |
291 | + | let bA = fraction(by, au, am, CEILING) | |
292 | + | let bB = aC() | |
293 | + | let bC = bB._1 | |
294 | + | let aE = bB._2 | |
295 | + | let aK = aB() | |
296 | + | let bD = (aK + fraction((by - bA), ak, aE)) | |
297 | + | [IntegerEntry(c, bD), ScriptTransfer(ah, bA, aj)] | |
298 | + | } | |
299 | + | }) | |
363 | 300 | ||
364 | 301 | ||
365 | 302 | ||
366 | - | @Callable(bM) | |
367 | - | func lockSWOP () = if (!(aA)) | |
368 | - | then throw("DApp is inactive at this moment") | |
369 | - | else { | |
370 | - | let bT = $Tuple2(bM.payments[0].amount, bM.payments[0].assetId) | |
371 | - | let bO = bT._1 | |
372 | - | let bP = bT._2 | |
373 | - | if ((bP != aq)) | |
374 | - | then throw("Incorrect pmtAssetId") | |
375 | - | else { | |
376 | - | let aM = aG() | |
377 | - | let bU = aL(bM.caller, aM) | |
378 | - | let aO = bU._1 | |
379 | - | let bJ = bU._2 | |
380 | - | let bK = fraction(bJ, (aM - aO), ar) | |
381 | - | let bV = ((bJ + bO) + bK) | |
382 | - | let bL = aM | |
383 | - | let bR = bg() | |
384 | - | let bW = ((bR + bO) + bK) | |
385 | - | let bX = aJ(bM.caller) | |
386 | - | let bY = (bX + bK) | |
387 | - | [IntegerEntry((toString(bM.caller) + d), bL), IntegerEntry((toString(bM.caller) + e), bV), IntegerEntry(g, bW), IntegerEntry((toString(bM.caller) + k), bY), IntegerEntry((toString(bM.caller) + l), bK)] | |
388 | - | } | |
389 | - | } | |
303 | + | @Callable(aA) | |
304 | + | func lockSWOP () = valueOrElse(ay(), { | |
305 | + | let bE = $Tuple2(aA.payments[0].amount, aA.payments[0].assetId) | |
306 | + | let by = bE._1 | |
307 | + | let bz = bE._2 | |
308 | + | if ((bz != aj)) | |
309 | + | then throw("Incorrect pmtAssetId") | |
310 | + | else { | |
311 | + | let aG = toString(aA.caller) | |
312 | + | let aK = aB() | |
313 | + | let bF = aF(aG) | |
314 | + | let bu = bF._1 | |
315 | + | let aI = bF._2 | |
316 | + | let bG = bs(aG) | |
317 | + | let bw = bG._1 | |
318 | + | let bH = bG._2 | |
319 | + | let bI = aP(aG) | |
320 | + | let bJ = (bI + bH) | |
321 | + | let bK = (bu + by) | |
322 | + | let bL = (aI + by) | |
323 | + | let bM = aC() | |
324 | + | let bC = bM._1 | |
325 | + | let aE = bM._2 | |
326 | + | let bN = (bC + by) | |
327 | + | let bO = (aE + by) | |
328 | + | [IntegerEntry((aG + g), (height + ai)), IntegerEntry((aG + d), bw), IntegerEntry((aG + e), bK), IntegerEntry((aG + h), aI), IntegerEntry((aG + k), bJ), IntegerEntry(f, bN), IntegerEntry(i, bO)] | |
329 | + | } | |
330 | + | }) | |
390 | 331 | ||
391 | 332 | ||
392 | 333 | ||
393 | - | @Callable(bM) | |
394 | - | func withdrawSWOP (bZ) = if (!(aA)) | |
395 | - | then throw("DApp is inactive at this moment") | |
396 | - | else if ((0 >= bZ)) | |
334 | + | @Callable(aA) | |
335 | + | func withdrawSWOP (bP) = valueOrElse(ay(), { | |
336 | + | let aG = toString(aA.caller) | |
337 | + | let bQ = valueOrElse(getInteger(this, (aG + g)), 0) | |
338 | + | if ((0 >= bP)) | |
397 | 339 | then throw("withdrawAmount <= 0") | |
398 | - | else { | |
399 | - | let bR = bg() | |
400 | - | let bJ = aH(bM.caller) | |
401 | - | let ca = bG(bM.caller) | |
402 | - | let bL = ca._1 | |
403 | - | let bK = ca._2 | |
404 | - | let cb = bh(bM.caller) | |
405 | - | let cc = cb._1 | |
406 | - | let cd = cb._2 | |
407 | - | let ce = aW(bM.caller) | |
408 | - | let cf = aY(bM.caller) | |
409 | - | if (if (if ((0 > cd)) | |
410 | - | then true | |
411 | - | else (0 > cc)) | |
412 | - | then true | |
413 | - | else (0 > ce)) | |
414 | - | then throw("userUnvoteAmount < 0 || userVoteAmount < 0 || userVoteAmountForNewPool < 0") | |
415 | - | else { | |
416 | - | let cg = (bJ - max([ce, (cc + cd), cf])) | |
417 | - | if ((bZ > cg)) | |
418 | - | then throw("withdrawAmount > availableToUnstake") | |
419 | - | else { | |
420 | - | let bW = ((bR + bK) - bZ) | |
421 | - | let ch = ((bJ + bK) - bZ) | |
422 | - | let bX = aJ(bM.caller) | |
423 | - | let bY = (bX + bK) | |
424 | - | [IntegerEntry((toString(bM.caller) + d), bL), IntegerEntry((toString(bM.caller) + e), ch), IntegerEntry(g, bW), ScriptTransfer(bM.caller, bZ, aq), IntegerEntry((toString(bM.caller) + k), bY), IntegerEntry((toString(bM.caller) + l), bK)] | |
425 | - | } | |
426 | - | } | |
427 | - | } | |
340 | + | else if ((bQ > height)) | |
341 | + | then throw(("You can't withdraw till " + toString(bQ))) | |
342 | + | else { | |
343 | + | let bR = aC() | |
344 | + | let bC = bR._1 | |
345 | + | let aE = bR._2 | |
346 | + | let bS = aF(aG) | |
347 | + | let bu = bS._1 | |
348 | + | let aI = bS._2 | |
349 | + | let bT = bs(aG) | |
350 | + | let bw = bT._1 | |
351 | + | let bH = bT._2 | |
352 | + | let bU = bg(aA.caller) | |
353 | + | let bV = bU._1 | |
354 | + | let bW = bU._2 | |
355 | + | let bX = aW(aA.caller) | |
356 | + | let bY = aY(aA.caller) | |
357 | + | if (if (if ((0 > bW)) | |
358 | + | then true | |
359 | + | else (0 > bV)) | |
360 | + | then true | |
361 | + | else (0 > bX)) | |
362 | + | then throw("userUnvoteAmount < 0 || userVoteAmount < 0 || userVoteAmountForNewPool < 0") | |
363 | + | else { | |
364 | + | let bZ = (bu - max([bX, (bV + bW), bY])) | |
365 | + | if ((bP > bZ)) | |
366 | + | then throw("withdrawAmount > availableToUnstake") | |
367 | + | else { | |
368 | + | let bI = aP(aG) | |
369 | + | let bJ = (bI + bH) | |
370 | + | let bN = (bC - bP) | |
371 | + | let ca = (bu - bP) | |
372 | + | let bO = ((aE - aI) + ca) | |
373 | + | [IntegerEntry((aG + d), bw), IntegerEntry((aG + e), ca), IntegerEntry((aG + h), ca), IntegerEntry((aG + k), bJ), IntegerEntry(f, bN), IntegerEntry(i, bO), ScriptTransfer(aA.caller, bP, aj)] | |
374 | + | } | |
375 | + | } | |
376 | + | } | |
377 | + | }) | |
428 | 378 | ||
429 | 379 | ||
430 | 380 | ||
431 | - | @Callable(bM) | |
432 | - | func claimAndWithdrawSWOP () = if (!(aA)) | |
433 | - | then throw("DApp is inactive at this moment") | |
434 | - | else { | |
435 | - | let aM = aG() | |
436 | - | let ci = bG(bM.caller) | |
437 | - | let bL = ci._1 | |
438 | - | let bK = ci._2 | |
439 | - | let bX = aJ(bM.caller) | |
440 | - | let bY = (bX + bK) | |
441 | - | if ((bK == 0)) | |
442 | - | then throw("You have 0 available SWOP") | |
443 | - | else [IntegerEntry((toString(bM.caller) + d), bL), IntegerEntry((toString(bM.caller) + k), bY), IntegerEntry((toString(bM.caller) + l), bK), ScriptTransfer(bM.caller, bK, aq)] | |
444 | - | } | |
381 | + | @Callable(aA) | |
382 | + | func claimAndWithdrawSWOP () = valueOrElse(ay(), { | |
383 | + | let aG = toString(aA.caller) | |
384 | + | let bI = aP(aG) | |
385 | + | let cb = bs(aG) | |
386 | + | let bw = cb._1 | |
387 | + | let bv = cb._2 | |
388 | + | let cc = (bI + bv) | |
389 | + | if ((cc == 0)) | |
390 | + | then throw("You have 0 available SWOP") | |
391 | + | else [IntegerEntry((aG + d), bw), ScriptTransfer(aA.caller, cc, aj)] | |
392 | + | }) | |
445 | 393 | ||
446 | 394 | ||
447 | 395 | ||
448 | - | @Callable(bM) | |
449 | - | func claimAndStakeSWOP () = if (!(aA)) | |
450 | - | then throw("DApp is inactive at this moment") | |
451 | - | else { | |
452 | - | let bR = bg() | |
453 | - | let bJ = aH(bM.caller) | |
454 | - | let aM = aG() | |
455 | - | let cj = bG(bM.caller) | |
456 | - | let bL = cj._1 | |
457 | - | let bK = cj._2 | |
458 | - | let bV = (bJ + bK) | |
459 | - | let bW = (bR + bK) | |
460 | - | let bX = aJ(bM.caller) | |
461 | - | let bY = (bX + bK) | |
462 | - | if ((bK == 0)) | |
463 | - | then throw("You have 0 available SWOP") | |
464 | - | else [IntegerEntry((toString(bM.caller) + d), bL), IntegerEntry(g, bW), IntegerEntry((toString(bM.caller) + e), bV), IntegerEntry((toString(bM.caller) + k), bY), IntegerEntry((toString(bM.caller) + l), bK)] | |
465 | - | } | |
396 | + | @Callable(aA) | |
397 | + | func claimAndStakeSWOP () = valueOrElse(ay(), { | |
398 | + | let aG = toString(aA.caller) | |
399 | + | let cd = aC() | |
400 | + | let bC = cd._1 | |
401 | + | let aE = cd._2 | |
402 | + | let ce = aF(aG) | |
403 | + | let bu = ce._1 | |
404 | + | let aI = ce._2 | |
405 | + | let bI = aP(aG) | |
406 | + | let cf = bs(aG) | |
407 | + | let bw = cf._1 | |
408 | + | let bv = cf._2 | |
409 | + | let cc = (bI + bv) | |
410 | + | let bK = (bu + cc) | |
411 | + | let bL = (aI + (cc * 2)) | |
412 | + | let bN = (bC + cc) | |
413 | + | let bO = (aE + (cc * 2)) | |
414 | + | if ((cc == 0)) | |
415 | + | then throw("You have 0 available SWOP") | |
416 | + | else [IntegerEntry((toString(aA.caller) + g), (height + ai)), IntegerEntry((toString(aA.caller) + d), bw), IntegerEntry(f, bN), IntegerEntry(i, bO), IntegerEntry((toString(aA.caller) + e), bK), IntegerEntry((toString(aA.caller) + h), bL)] | |
417 | + | }) | |
466 | 418 | ||
467 | 419 | ||
468 | 420 | ||
469 | - | @Callable(bM) | |
470 | - | func updateWeights (ck,cl,cm,cn) = if (!(aA)) | |
471 | - | then throw("DApp is inactive at this moment") | |
472 | - | else { | |
473 | - | let co = 10 | |
474 | - | let cp = valueOrElse(getInteger(this, v), 0) | |
475 | - | if (!(containsElement([ah, ai, aj, ak], bM.callerPublicKey))) | |
476 | - | then throw("Only admin can call this function") | |
477 | - | else if ((size(ck) > co)) | |
478 | - | then throw(("Max amount of pool is " + toString(co))) | |
479 | - | else if ((cp >= cm)) | |
480 | - | then throw("rewardUpdateHeight <= totalRewardUpdateHeight") | |
481 | - | else if ((height >= cm)) | |
482 | - | then throw("height >= rewardUpdateHeight") | |
483 | - | else if ((0 >= cm)) | |
484 | - | then throw("0 >= rewardUpdateHeight ") | |
485 | - | else { | |
486 | - | func cq (cr,cs) = (cr + cs) | |
487 | - | ||
488 | - | func ct (cu,aR) = { | |
489 | - | let cv = bs(aR) | |
490 | - | if (if (!(bt(aR))) | |
491 | - | then true | |
492 | - | else if ((cm != cv)) | |
493 | - | then (cv == cp) | |
494 | - | else false) | |
495 | - | then { | |
496 | - | let cw = bu(aR) | |
497 | - | IntegerEntry((aR + r), cw) :: cu | |
498 | - | } | |
499 | - | else { | |
500 | - | let cw = bv(aR) | |
501 | - | IntegerEntry((aR + r), cw) :: cu | |
502 | - | } | |
503 | - | } | |
504 | - | ||
505 | - | func cx (cu,aR) = { | |
506 | - | let cy = value(indexOf(ck, aR)) | |
507 | - | let cw = cl[cy] | |
508 | - | if ((0 > cw)) | |
509 | - | then throw("PoolReward < 0") | |
510 | - | else IntegerEntry((aR + q), cw) :: cu | |
511 | - | } | |
512 | - | ||
513 | - | func cz (cu,aR) = { | |
514 | - | let cA = cm | |
515 | - | IntegerEntry((aR + s), cA) :: cu | |
516 | - | } | |
517 | - | ||
518 | - | func cB (cC,cn) = if ((cn == 0)) | |
519 | - | then if ((cC > as)) | |
520 | - | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(cn)) + " ") + toString(cC))) | |
521 | - | else $Tuple2([IntegerEntry(F, cC)], [IntegerEntry(w, cm)]) | |
522 | - | else if ((cn == 1)) | |
523 | - | then { | |
524 | - | let cD = valueOrElse(getInteger(this, F), 0) | |
525 | - | let cE = valueOrElse(getInteger(this, w), 0) | |
526 | - | if (((cC + cD) > as)) | |
527 | - | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(cn)) + " ") + toString((cC + cD)))) | |
528 | - | else if ((cE != cm)) | |
529 | - | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
530 | - | else $Tuple2([IntegerEntry(F, (cC + cD))], nil) | |
531 | - | } | |
532 | - | else if ((cn == 2)) | |
533 | - | then { | |
534 | - | let cF = (valueOrElse(getInteger(this, F), 0) + cC) | |
535 | - | let cE = valueOrElse(getInteger(this, w), 0) | |
536 | - | if ((cF != as)) | |
537 | - | then throw("sumRewardPrevious != totalVoteShare or sumRewardCurrent != totalVoteShare") | |
538 | - | else if ((cE != cm)) | |
539 | - | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
540 | - | else $Tuple2([IntegerEntry(F, cF)], nil) | |
541 | - | } | |
542 | - | else throw("Incorrect pagination") | |
543 | - | ||
544 | - | let cG = { | |
545 | - | let cH = ck | |
546 | - | let cI = size(cH) | |
547 | - | let cJ = nil | |
548 | - | func cK (cL,cM) = if ((cM >= cI)) | |
549 | - | then cL | |
550 | - | else ct(cL, cH[cM]) | |
551 | - | ||
552 | - | func cN (cL,cM) = if ((cM >= cI)) | |
553 | - | then cL | |
554 | - | else throw("List size exceeds 10") | |
555 | - | ||
556 | - | cN(cK(cK(cK(cK(cK(cK(cK(cK(cK(cK(cJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
557 | - | } | |
558 | - | let cO = { | |
559 | - | let cH = ck | |
560 | - | let cI = size(cH) | |
561 | - | let cJ = nil | |
562 | - | func cP (cL,cM) = if ((cM >= cI)) | |
563 | - | then cL | |
564 | - | else cx(cL, cH[cM]) | |
565 | - | ||
566 | - | func cQ (cL,cM) = if ((cM >= cI)) | |
567 | - | then cL | |
568 | - | else throw("List size exceeds 10") | |
569 | - | ||
570 | - | cQ(cP(cP(cP(cP(cP(cP(cP(cP(cP(cP(cJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
571 | - | } | |
572 | - | let cR = { | |
573 | - | let cH = ck | |
574 | - | let cI = size(cH) | |
575 | - | let cJ = nil | |
576 | - | func cS (cL,cM) = if ((cM >= cI)) | |
577 | - | then cL | |
578 | - | else cz(cL, cH[cM]) | |
579 | - | ||
580 | - | func cT (cL,cM) = if ((cM >= cI)) | |
581 | - | then cL | |
582 | - | else throw("List size exceeds 10") | |
583 | - | ||
584 | - | cT(cS(cS(cS(cS(cS(cS(cS(cS(cS(cS(cJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
585 | - | } | |
586 | - | let cU = { | |
587 | - | let cH = cl | |
588 | - | let cI = size(cH) | |
589 | - | let cJ = 0 | |
590 | - | func cV (cL,cM) = if ((cM >= cI)) | |
591 | - | then cL | |
592 | - | else cq(cL, cH[cM]) | |
593 | - | ||
594 | - | func cW (cL,cM) = if ((cM >= cI)) | |
595 | - | then cL | |
596 | - | else throw("List size exceeds 10") | |
597 | - | ||
598 | - | cW(cV(cV(cV(cV(cV(cV(cV(cV(cV(cV(cJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
599 | - | } | |
600 | - | let cX = cB(cU, cn) | |
601 | - | let cY = cX._1 | |
602 | - | let cE = cX._2 | |
603 | - | let cZ = if ((cn == 2)) | |
604 | - | then [IntegerEntry(v, cm)] | |
605 | - | else nil | |
606 | - | if ((height > cm)) | |
607 | - | then throw("rewardUpdateHeight < height") | |
608 | - | else (((((cG ++ cO) ++ cR) ++ cY) ++ cZ) ++ cE) | |
609 | - | } | |
610 | - | } | |
421 | + | @Callable(aA) | |
422 | + | func lockSWOPFromFarming () = valueOrElse(ay(), { | |
423 | + | let cg = $Tuple2(aA.payments[0].amount, aA.payments[0].assetId) | |
424 | + | let by = cg._1 | |
425 | + | let bz = cg._2 | |
426 | + | if ((aA.caller != ad)) | |
427 | + | then throw("Only farming can call this function") | |
428 | + | else if ((bz != aj)) | |
429 | + | then throw("Incorrect pmtAssetId") | |
430 | + | else { | |
431 | + | let aG = toString(aA.originCaller) | |
432 | + | let aK = aB() | |
433 | + | let ch = aF(aG) | |
434 | + | let bu = ch._1 | |
435 | + | let aI = ch._2 | |
436 | + | let ci = bs(aG) | |
437 | + | let bw = ci._1 | |
438 | + | let bH = ci._2 | |
439 | + | let bI = aP(aG) | |
440 | + | let bJ = (bI + bH) | |
441 | + | let bK = (bu + by) | |
442 | + | let bL = (aI + (by * 2)) | |
443 | + | let cj = aC() | |
444 | + | let bC = cj._1 | |
445 | + | let aE = cj._2 | |
446 | + | let bN = (bC + by) | |
447 | + | let bO = (aE + (by * 2)) | |
448 | + | [IntegerEntry((aG + g), (height + ai)), IntegerEntry((aG + d), bw), IntegerEntry((aG + e), bK), IntegerEntry((aG + h), aI), IntegerEntry((aG + k), bJ), IntegerEntry(f, bN), IntegerEntry(i, bO)] | |
449 | + | } | |
450 | + | }) | |
611 | 451 | ||
612 | 452 | ||
613 | 453 | ||
614 | - | @Callable(bM) | |
615 | - | func shutdown () = if (!(aA)) | |
616 | - | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified"))) | |
617 | - | else if (!(containsElement([ah, ai, aj], bM.callerPublicKey))) | |
454 | + | @Callable(aA) | |
455 | + | func updateWeights (ck,cl,cm,cn) = valueOrElse(ay(), { | |
456 | + | let co = 10 | |
457 | + | let cp = valueOrElse(getInteger(this, o), 0) | |
458 | + | if (!(containsElement([Z, aa, ab, ac], aA.callerPublicKey))) | |
618 | 459 | then throw("Only admin can call this function") | |
619 | - | else aD("Paused by admin") | |
460 | + | else if ((size(ck) > co)) | |
461 | + | then throw(("Max amount of pool is " + toString(co))) | |
462 | + | else if ((cp >= cm)) | |
463 | + | then throw("rewardUpdateHeight <= totalRewardUpdateHeight") | |
464 | + | else if ((height >= cm)) | |
465 | + | then throw("height >= rewardUpdateHeight") | |
466 | + | else if ((0 >= cm)) | |
467 | + | then throw("0 >= rewardUpdateHeight ") | |
468 | + | else { | |
469 | + | func cq (cr,cs) = (cr + cs) | |
470 | + | ||
471 | + | func ct (cu,aR) = { | |
472 | + | let cv = bo(aR) | |
473 | + | if (if (!(bp(aR))) | |
474 | + | then true | |
475 | + | else if ((cm != cv)) | |
476 | + | then (cv == cp) | |
477 | + | else false) | |
478 | + | then { | |
479 | + | let cw = bq(aR) | |
480 | + | IntegerEntry((aR + m), cw) :: cu | |
481 | + | } | |
482 | + | else { | |
483 | + | let cw = br(aR) | |
484 | + | IntegerEntry((aR + m), cw) :: cu | |
485 | + | } | |
486 | + | } | |
487 | + | ||
488 | + | func cx (cu,aR) = { | |
489 | + | let cy = value(indexOf(ck, aR)) | |
490 | + | let cw = cl[cy] | |
491 | + | if ((0 > cw)) | |
492 | + | then throw("PoolReward < 0") | |
493 | + | else IntegerEntry((aR + l), cw) :: cu | |
494 | + | } | |
495 | + | ||
496 | + | func cz (cu,aR) = { | |
497 | + | let cA = cm | |
498 | + | let cB = invoke(ad, "updatePoolInterest", [aR], nil) | |
499 | + | if ((cB == cB)) | |
500 | + | then IntegerEntry((aR + n), cA) :: cu | |
501 | + | else throw("Strict value is not equal to itself.") | |
502 | + | } | |
503 | + | ||
504 | + | func cC (cD,cn) = if ((cn == 0)) | |
505 | + | then if ((cD > al)) | |
506 | + | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(cn)) + " ") + toString(cD))) | |
507 | + | else $Tuple2([IntegerEntry(x, cD)], [IntegerEntry(p, cm)]) | |
508 | + | else if ((cn == 1)) | |
509 | + | then { | |
510 | + | let cE = valueOrElse(getInteger(this, x), 0) | |
511 | + | let cF = valueOrElse(getInteger(this, p), 0) | |
512 | + | if (((cD + cE) > al)) | |
513 | + | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(cn)) + " ") + toString((cD + cE)))) | |
514 | + | else if ((cF != cm)) | |
515 | + | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
516 | + | else $Tuple2([IntegerEntry(x, (cD + cE))], nil) | |
517 | + | } | |
518 | + | else if ((cn == 2)) | |
519 | + | then { | |
520 | + | let cG = (valueOrElse(getInteger(this, x), 0) + cD) | |
521 | + | let cF = valueOrElse(getInteger(this, p), 0) | |
522 | + | if ((cG != al)) | |
523 | + | then throw("sumRewardPrevious != totalVoteShare or sumRewardCurrent != totalVoteShare") | |
524 | + | else if ((cF != cm)) | |
525 | + | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
526 | + | else $Tuple2([IntegerEntry(x, cG)], nil) | |
527 | + | } | |
528 | + | else throw("Incorrect pagination") | |
529 | + | ||
530 | + | let cH = { | |
531 | + | let cI = ck | |
532 | + | let cJ = size(cI) | |
533 | + | let cK = nil | |
534 | + | func cL (cM,cN) = if ((cN >= cJ)) | |
535 | + | then cM | |
536 | + | else ct(cM, cI[cN]) | |
537 | + | ||
538 | + | func cO (cM,cN) = if ((cN >= cJ)) | |
539 | + | then cM | |
540 | + | else throw("List size exceeds 10") | |
541 | + | ||
542 | + | cO(cL(cL(cL(cL(cL(cL(cL(cL(cL(cL(cK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
543 | + | } | |
544 | + | let cP = { | |
545 | + | let cI = ck | |
546 | + | let cJ = size(cI) | |
547 | + | let cK = nil | |
548 | + | func cQ (cM,cN) = if ((cN >= cJ)) | |
549 | + | then cM | |
550 | + | else cx(cM, cI[cN]) | |
551 | + | ||
552 | + | func cR (cM,cN) = if ((cN >= cJ)) | |
553 | + | then cM | |
554 | + | else throw("List size exceeds 10") | |
555 | + | ||
556 | + | cR(cQ(cQ(cQ(cQ(cQ(cQ(cQ(cQ(cQ(cQ(cK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
557 | + | } | |
558 | + | let cS = { | |
559 | + | let cI = ck | |
560 | + | let cJ = size(cI) | |
561 | + | let cK = nil | |
562 | + | func cT (cM,cN) = if ((cN >= cJ)) | |
563 | + | then cM | |
564 | + | else cz(cM, cI[cN]) | |
565 | + | ||
566 | + | func cU (cM,cN) = if ((cN >= cJ)) | |
567 | + | then cM | |
568 | + | else throw("List size exceeds 10") | |
569 | + | ||
570 | + | cU(cT(cT(cT(cT(cT(cT(cT(cT(cT(cT(cK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
571 | + | } | |
572 | + | let cV = { | |
573 | + | let cI = cl | |
574 | + | let cJ = size(cI) | |
575 | + | let cK = 0 | |
576 | + | func cW (cM,cN) = if ((cN >= cJ)) | |
577 | + | then cM | |
578 | + | else cq(cM, cI[cN]) | |
579 | + | ||
580 | + | func cX (cM,cN) = if ((cN >= cJ)) | |
581 | + | then cM | |
582 | + | else throw("List size exceeds 10") | |
583 | + | ||
584 | + | cX(cW(cW(cW(cW(cW(cW(cW(cW(cW(cW(cK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
585 | + | } | |
586 | + | let cY = cC(cV, cn) | |
587 | + | let cZ = cY._1 | |
588 | + | let cF = cY._2 | |
589 | + | let da = if ((cn == 2)) | |
590 | + | then [IntegerEntry(o, cm)] | |
591 | + | else nil | |
592 | + | if ((height > cm)) | |
593 | + | then throw("rewardUpdateHeight < height") | |
594 | + | else (((((cH ++ cP) ++ cS) ++ cZ) ++ da) ++ cF) | |
595 | + | } | |
596 | + | }) | |
620 | 597 | ||
621 | 598 | ||
622 | 599 | ||
623 | - | @Callable(bM) | |
624 | - | func activate () = if (aA) | |
625 | - | then throw("DApp is already active") | |
626 | - | else if (!(containsElement([ah, ai, aj], bM.callerPublicKey))) | |
627 | - | then throw("Only admin can call this function") | |
628 | - | else [BooleanEntry(a, true), DeleteEntry(b)] | |
600 | + | @Callable(aA) | |
601 | + | func shutdown () = valueOrElse(az(aA), if (!(at)) | |
602 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified"))) | |
603 | + | else aw("Paused by admin")) | |
629 | 604 | ||
630 | 605 | ||
631 | - | @Verifier(da) | |
632 | - | func db () = { | |
633 | - | let dc = if (sigVerify(da.bodyBytes, da.proofs[0], ah)) | |
606 | + | ||
607 | + | @Callable(aA) | |
608 | + | func activate () = valueOrElse(az(aA), if (at) | |
609 | + | then throw("DApp is already active") | |
610 | + | else [BooleanEntry(a, true), DeleteEntry(b)]) | |
611 | + | ||
612 | + | ||
613 | + | @Verifier(db) | |
614 | + | func dc () = { | |
615 | + | let dd = if (sigVerify(db.bodyBytes, db.proofs[0], Z)) | |
634 | 616 | then 1 | |
635 | 617 | else 0 | |
636 | - | let | |
618 | + | let de = if (sigVerify(db.bodyBytes, db.proofs[1], aa)) | |
637 | 619 | then 1 | |
638 | 620 | else 0 | |
639 | - | let | |
621 | + | let df = if (sigVerify(db.bodyBytes, db.proofs[2], ab)) | |
640 | 622 | then 1 | |
641 | 623 | else 0 | |
642 | - | ((( | |
624 | + | (((dd + de) + df) >= 2) | |
643 | 625 | } | |
644 | 626 |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
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 = "last_interest" | |
9 | 9 | ||
10 | 10 | let d = "_last_interest" | |
11 | 11 | ||
12 | 12 | let e = "_SWOP_amount" | |
13 | 13 | ||
14 | - | let f = "_ | |
14 | + | let f = "total_SWOP_amount" | |
15 | 15 | ||
16 | - | let g = " | |
16 | + | let g = "_SWOP_unlock_height" | |
17 | 17 | ||
18 | - | let h = "_ | |
18 | + | let h = "_GSwop_amount" | |
19 | 19 | ||
20 | - | let i = "_ | |
20 | + | let i = "total_GSwop_amount" | |
21 | 21 | ||
22 | - | let j = "total_ | |
22 | + | let j = "_user_total_vote_gSWOP" | |
23 | 23 | ||
24 | - | let k = "_ | |
24 | + | let k = "_user_available_for_claim" | |
25 | 25 | ||
26 | - | let l = "_ | |
26 | + | let l = "_current_pool_fraction_reward" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "_previous_pool_fraction_reward" | |
29 | 29 | ||
30 | - | let n = "_ | |
30 | + | let n = "_pool_reward_update_height" | |
31 | 31 | ||
32 | - | let o = "_ | |
32 | + | let o = "reward_update_height" | |
33 | 33 | ||
34 | - | let p = "_ | |
34 | + | let p = "reward_update_height_first_pagination" | |
35 | 35 | ||
36 | - | let q = "_ | |
36 | + | let q = "_vote_no" | |
37 | 37 | ||
38 | - | let r = "_ | |
38 | + | let r = "_vote_yes" | |
39 | 39 | ||
40 | - | let s = "_ | |
40 | + | let s = "_status" | |
41 | 41 | ||
42 | - | let t = " | |
42 | + | let t = "_finish_height" | |
43 | 43 | ||
44 | - | let u = " | |
44 | + | let u = "voting_active_cell_1" | |
45 | 45 | ||
46 | - | let v = " | |
46 | + | let v = "voting_active_cell_2" | |
47 | 47 | ||
48 | - | let w = " | |
48 | + | let w = "voting_active_cell_3" | |
49 | 49 | ||
50 | - | let x = "_ | |
50 | + | let x = "sum_reward_current" | |
51 | 51 | ||
52 | - | let y = "_ | |
52 | + | let y = "_bought_tickets" | |
53 | 53 | ||
54 | - | let z = " | |
54 | + | let z = "_swop_per_ticket" | |
55 | 55 | ||
56 | - | let A = "_ | |
56 | + | let A = "launchpad_active_id" | |
57 | 57 | ||
58 | - | let B = "_ | |
58 | + | let B = "_duration" | |
59 | 59 | ||
60 | - | let C = " | |
60 | + | let C = "_start_height" | |
61 | 61 | ||
62 | - | let D = " | |
62 | + | let D = "start_height" | |
63 | 63 | ||
64 | - | let E = " | |
64 | + | let E = "base_period" | |
65 | 65 | ||
66 | - | let F = " | |
66 | + | let F = "period_length" | |
67 | 67 | ||
68 | - | let G = "_ | |
68 | + | let G = "_user_total_struc" | |
69 | 69 | ||
70 | - | let H = "_swop_ | |
70 | + | let H = "_freeze_swop_duration" | |
71 | 71 | ||
72 | - | let I = " | |
72 | + | let I = "SWOP_id" | |
73 | 73 | ||
74 | - | let J = "_ | |
74 | + | let J = "airdrop_fee" | |
75 | 75 | ||
76 | - | let K = "_ | |
76 | + | let K = "admin_pub_1" | |
77 | 77 | ||
78 | - | let L = " | |
78 | + | let L = "admin_pub_2" | |
79 | 79 | ||
80 | - | let M = " | |
80 | + | let M = "admin_pub_3" | |
81 | 81 | ||
82 | - | let N = " | |
82 | + | let N = "money_box_pub_key" | |
83 | 83 | ||
84 | - | let O = "_ | |
84 | + | let O = "farming_address" | |
85 | 85 | ||
86 | - | let P = "_ | |
86 | + | let P = "voting_address" | |
87 | 87 | ||
88 | - | let Q = " | |
88 | + | let Q = "voting_new_pool_address" | |
89 | 89 | ||
90 | - | let R = " | |
90 | + | let R = "launchpad_address" | |
91 | 91 | ||
92 | - | let S = " | |
92 | + | let S = "airdrop_fee_money_box" | |
93 | 93 | ||
94 | - | let T = | |
94 | + | let T = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
95 | 95 | ||
96 | - | let U = "admin_pub_3" | |
97 | - | ||
98 | - | let V = "money_box_pub_key" | |
99 | - | ||
100 | - | let W = "farming_address" | |
101 | - | ||
102 | - | let X = "voting_address" | |
103 | - | ||
104 | - | let Y = "voting_new_pool_address" | |
105 | - | ||
106 | - | let Z = "launchpad_address" | |
107 | - | ||
108 | - | let aa = "airdrop_fee_money_box" | |
109 | - | ||
110 | - | let ab = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
111 | - | ||
112 | - | func ac (ad) = { | |
113 | - | let ae = getString(ab, ad) | |
114 | - | if ($isInstanceOf(ae, "String")) | |
96 | + | func U (V) = { | |
97 | + | let W = getString(T, V) | |
98 | + | if ($isInstanceOf(W, "String")) | |
115 | 99 | then { | |
116 | - | let | |
117 | - | fromBase58String( | |
100 | + | let X = W | |
101 | + | fromBase58String(X) | |
118 | 102 | } | |
119 | 103 | else { | |
120 | - | let | |
121 | - | throw(( | |
104 | + | let Y = W | |
105 | + | throw((V + "is empty")) | |
122 | 106 | } | |
123 | 107 | } | |
124 | 108 | ||
125 | 109 | ||
126 | - | let | |
110 | + | let Z = U(K) | |
127 | 111 | ||
128 | - | let | |
112 | + | let aa = U(L) | |
129 | 113 | ||
130 | - | let | |
114 | + | let ab = U(M) | |
131 | 115 | ||
132 | - | let | |
116 | + | let ac = U(N) | |
133 | 117 | ||
134 | - | let | |
118 | + | let ad = Address(U(O)) | |
135 | 119 | ||
136 | - | let | |
120 | + | let ae = Address(U(P)) | |
137 | 121 | ||
138 | - | let | |
122 | + | let af = Address(U(Q)) | |
139 | 123 | ||
140 | - | let | |
124 | + | let ag = Address(U(R)) | |
141 | 125 | ||
142 | - | let | |
126 | + | let ah = Address(U(S)) | |
143 | 127 | ||
144 | - | let | |
128 | + | let ai = (10102 * 4) | |
145 | 129 | ||
146 | - | let | |
130 | + | let aj = fromBase58String(getStringValue(ad, I)) | |
147 | 131 | ||
148 | - | let | |
132 | + | let ak = 100000000 | |
149 | 133 | ||
150 | - | let | |
134 | + | let al = 10000000000 | |
151 | 135 | ||
152 | - | let | |
136 | + | let am = 1000000 | |
153 | 137 | ||
154 | - | let | |
138 | + | let an = valueOrErrorMessage(getInteger(ae, E), "Empty kBasePeriod at voting contract") | |
155 | 139 | ||
156 | - | let | |
140 | + | let ao = valueOrErrorMessage(getInteger(ae, D), "Empty kStartHeight at voting contract") | |
157 | 141 | ||
158 | - | let | |
142 | + | let ap = valueOrErrorMessage(getInteger(ae, F), "Empty kPeriodLength at voting contract") | |
159 | 143 | ||
160 | - | let | |
144 | + | let aq = valueOrElse(getString(af, u), "") | |
161 | 145 | ||
162 | - | let | |
146 | + | let ar = valueOrElse(getString(af, v), "") | |
163 | 147 | ||
164 | - | let | |
148 | + | let as = valueOrElse(getString(af, w), "") | |
165 | 149 | ||
166 | - | let | |
150 | + | let at = valueOrElse(getBoolean(this, a), true) | |
167 | 151 | ||
168 | - | let | |
152 | + | let au = getIntegerValue(T, J) | |
169 | 153 | ||
170 | - | func aD (aE) = [BooleanEntry(a, false), StringEntry(b, aE)] | |
154 | + | let av = (an + ((height - ao) / ap)) | |
155 | + | ||
156 | + | func aw (ax) = [BooleanEntry(a, false), StringEntry(b, ax)] | |
171 | 157 | ||
172 | 158 | ||
173 | - | func aF () = throw("Not enough SWOP: userSWOPLocked - userTotalVoteAmount < voteSWOPAmount") | |
159 | + | func ay () = if (at) | |
160 | + | then unit | |
161 | + | else throw("DApp is inactive at this moment") | |
174 | 162 | ||
175 | 163 | ||
176 | - | func aG () = valueOrElse(getInteger(this, c), 0) | |
164 | + | func az (aA) = if (containsElement([Z, aa, ab], aA.callerPublicKey)) | |
165 | + | then unit | |
166 | + | else throw("Only admin can call this function") | |
177 | 167 | ||
178 | 168 | ||
179 | - | func | |
169 | + | func aB () = valueOrElse(getInteger(this, c), 0) | |
180 | 170 | ||
181 | 171 | ||
182 | - | func aJ (aI) = valueOrElse(getInteger(this, (toString(aI) + k)), 0) | |
183 | - | ||
184 | - | ||
185 | - | func aK (aI) = valueOrElse(getInteger(am, (toString(aI) + h)), 0) | |
186 | - | ||
187 | - | ||
188 | - | func aL (aI,aM) = { | |
189 | - | let aN = aH(aI) | |
190 | - | let aO = getInteger(this, (toString(aI) + d)) | |
191 | - | let aP = { | |
192 | - | let ae = aO | |
193 | - | if ($isInstanceOf(ae, "Int")) | |
194 | - | then { | |
195 | - | let aO = ae | |
196 | - | aO | |
197 | - | } | |
198 | - | else aM | |
199 | - | } | |
200 | - | $Tuple2(aP, aN) | |
172 | + | func aC () = { | |
173 | + | let aD = valueOrElse(getInteger(this, f), 0) | |
174 | + | let aE = valueOrElse(getInteger(this, i), aD) | |
175 | + | $Tuple2(aD, aE) | |
201 | 176 | } | |
202 | 177 | ||
203 | 178 | ||
204 | - | func aQ (aR,aI) = { | |
205 | - | let aS = valueOrElse(getInteger(an, aR), -1) | |
206 | - | let aT = valueOrElse(getInteger(an, (toString(aS) + B)), 0) | |
207 | - | let aU = valueOrElse(getBoolean(an, (toString(aS) + A)), true) | |
179 | + | func aF (aG) = { | |
180 | + | let aH = valueOrElse(getInteger(this, (aG + e)), 0) | |
181 | + | let aI = valueOrElse(getInteger(this, (aG + h)), aH) | |
182 | + | $Tuple2(aH, aI) | |
183 | + | } | |
184 | + | ||
185 | + | ||
186 | + | func aJ (aG,aK) = { | |
187 | + | let aL = aF(aG) | |
188 | + | let aM = aL._1 | |
189 | + | let aN = aL._2 | |
190 | + | let aO = valueOrElse(getInteger(this, (aG + d)), aK) | |
191 | + | $Tuple3(aO, aM, aN) | |
192 | + | } | |
193 | + | ||
194 | + | ||
195 | + | func aP (aG) = valueOrElse(getInteger(this, (aG + k)), 0) | |
196 | + | ||
197 | + | ||
198 | + | func aQ (aR,aG) = { | |
199 | + | let aS = valueOrElse(getInteger(af, aR), -1) | |
200 | + | let aT = valueOrElse(getInteger(af, (toString(aS) + t)), 0) | |
201 | + | let aU = valueOrElse(getBoolean(af, (toString(aS) + s)), true) | |
208 | 202 | let aV = height | |
209 | 203 | if ((0 > aS)) | |
210 | 204 | then 0 | |
211 | 205 | else if (!(aU)) | |
212 | 206 | then 0 | |
213 | 207 | else if ((aT > aV)) | |
214 | - | then (valueOrElse(getInteger( | |
208 | + | then (valueOrElse(getInteger(af, (((toString(aG) + "_") + toString(aS)) + r)), 0) + valueOrElse(getInteger(af, (((toString(aG) + "_") + toString(aS)) + q)), 0)) | |
215 | 209 | else 0 | |
216 | 210 | } | |
217 | 211 | ||
218 | 212 | ||
219 | - | func aW ( | |
220 | - | let aX = [aQ( | |
213 | + | func aW (aG) = { | |
214 | + | let aX = [aQ(aq, aG), aQ(ar, aG), aQ(as, aG)] | |
221 | 215 | max(aX) | |
222 | 216 | } | |
223 | 217 | ||
224 | 218 | ||
225 | - | func aY ( | |
226 | - | let aZ = toString(valueOrElse(getInteger( | |
219 | + | func aY (aG) = { | |
220 | + | let aZ = toString(valueOrElse(getInteger(ag, A), 0)) | |
227 | 221 | if ((aZ == "0")) | |
228 | 222 | then 0 | |
229 | 223 | else { | |
230 | - | let ba = valueOrElse(getInteger( | |
231 | - | let bb = valueOrElse(getInteger( | |
232 | - | let bc = valueOrElse(getInteger( | |
224 | + | let ba = valueOrElse(getInteger(ag, (aZ + C)), 0) | |
225 | + | let bb = valueOrElse(getInteger(ag, (aZ + B)), 0) | |
226 | + | let bc = valueOrElse(getInteger(ag, (aZ + H)), 0) | |
233 | 227 | let bd = ((ba + bb) + bc) | |
234 | 228 | if ((height > bd)) | |
235 | 229 | then 0 | |
236 | 230 | else { | |
237 | - | let be = valueOrElse(getInteger( | |
238 | - | let bf = valueOrElse(getInteger( | |
231 | + | let be = valueOrElse(getInteger(ag, (((toString(aG) + "_") + aZ) + y)), 0) | |
232 | + | let bf = valueOrElse(getInteger(ag, (aZ + z)), 0) | |
239 | 233 | (be * bf) | |
240 | 234 | } | |
241 | 235 | } | |
242 | 236 | } | |
243 | 237 | ||
244 | 238 | ||
245 | - | func bg () = valueOrElse(getInteger(this, g), 0) | |
246 | - | ||
247 | - | ||
248 | - | func bh (aI) = { | |
249 | - | let bi = if (isDefined(getString(am, (toString(aI) + O)))) | |
239 | + | func bg (aG) = { | |
240 | + | let bh = if (isDefined(getString(ae, (toString(aG) + G)))) | |
250 | 241 | then { | |
251 | - | let | |
252 | - | $Tuple3(parseIntValue( | |
242 | + | let bi = split(valueOrErrorMessage(getString(ae, (toString(aG) + G)), "Empty kUserTotalStruc"), "_") | |
243 | + | $Tuple3(parseIntValue(bi[0]), parseIntValue(bi[1]), parseIntValue(bi[2])) | |
253 | 244 | } | |
254 | 245 | else { | |
255 | - | let | |
256 | - | $Tuple3( | |
246 | + | let bj = valueOrElse(getInteger(ae, (toString(aG) + j)), 0) | |
247 | + | $Tuple3(bj, 0, av) | |
257 | 248 | } | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | then | |
249 | + | let bk = bh._1 | |
250 | + | let bl = bh._2 | |
251 | + | let bm = bh._3 | |
252 | + | let bn = if ((bm == av)) | |
253 | + | then bl | |
263 | 254 | else 0 | |
264 | - | $Tuple2( | |
255 | + | $Tuple2(bk, bn) | |
265 | 256 | } | |
266 | 257 | ||
267 | 258 | ||
268 | - | func | |
259 | + | func bo (aR) = valueOrElse(getInteger(this, (aR + n)), 0) | |
269 | 260 | ||
270 | 261 | ||
271 | - | func | |
262 | + | func bp (aR) = isDefined(getInteger(this, (aR + n))) | |
272 | 263 | ||
273 | 264 | ||
274 | - | func | |
265 | + | func bq (aR) = valueOrElse(getInteger(this, (aR + l)), 0) | |
275 | 266 | ||
276 | 267 | ||
277 | - | func | |
268 | + | func br (aR) = valueOrElse(getInteger(this, (aR + m)), 0) | |
278 | 269 | ||
279 | 270 | ||
280 | - | func bu (aR) = valueOrElse(getInteger(this, (aR + q)), 0) | |
281 | - | ||
282 | - | ||
283 | - | func bv (aR) = valueOrElse(getInteger(this, (aR + r)), 0) | |
284 | - | ||
285 | - | ||
286 | - | func bw (aI,br,bx) = { | |
287 | - | let by = getInteger(this, (((br + bx) + toString(aI)) + i)) | |
288 | - | let bz = { | |
289 | - | let ae = by | |
290 | - | if ($isInstanceOf(ae, "Int")) | |
291 | - | then { | |
292 | - | let bz = ae | |
293 | - | bz | |
294 | - | } | |
295 | - | else if ($isInstanceOf(ae, "Unit")) | |
296 | - | then { | |
297 | - | let bz = ae | |
298 | - | 0 | |
299 | - | } | |
300 | - | else throw("Match error") | |
301 | - | } | |
302 | - | valueOrErrorMessage(bz, (((("No data on the key: " + br) + bx) + toString(aI)) + i)) | |
271 | + | func bs (aG) = { | |
272 | + | let aK = aB() | |
273 | + | let bt = aJ(aG, aK) | |
274 | + | let aO = bt._1 | |
275 | + | let bu = bt._2 | |
276 | + | let aN = bt._3 | |
277 | + | let bv = fraction(aN, (aK - aO), ak) | |
278 | + | let bw = aK | |
279 | + | $Tuple2(bw, bv) | |
303 | 280 | } | |
304 | 281 | ||
305 | 282 | ||
306 | - | func bA (br) = valueOrErrorMessage(getInteger(this, (br + p)), (("No data on the key: " + br) + p)) | |
307 | - | ||
308 | - | ||
309 | - | func bB (br,bx) = { | |
310 | - | let bC = getInteger(this, ((br + bx) + j)) | |
311 | - | let bD = { | |
312 | - | let ae = bC | |
313 | - | if ($isInstanceOf(ae, "Int")) | |
314 | - | then { | |
315 | - | let bD = ae | |
316 | - | bD | |
317 | - | } | |
318 | - | else if ($isInstanceOf(ae, "Unit")) | |
319 | - | then { | |
320 | - | let bD = ae | |
321 | - | 0 | |
322 | - | } | |
323 | - | else throw("Match error") | |
324 | - | } | |
325 | - | bD | |
326 | - | } | |
327 | - | ||
328 | - | ||
329 | - | func bE (br,bx,aI,bF) = { | |
330 | - | let ad = ((((((br + "_") + bx) + "_") + toString(aI)) + "_") + toString(bF)) | |
331 | - | valueOrErrorMessage(getInteger(this, ad), ("No data on the key: " + ad)) | |
332 | - | } | |
333 | - | ||
334 | - | ||
335 | - | func bG (bH) = { | |
336 | - | let aM = aG() | |
337 | - | let bI = aL(bH, aM) | |
338 | - | let aO = bI._1 | |
339 | - | let bJ = bI._2 | |
340 | - | let bK = fraction(bJ, (aM - aO), ar) | |
341 | - | let bL = aM | |
342 | - | $Tuple2(bL, bK) | |
343 | - | } | |
344 | - | ||
345 | - | ||
346 | - | @Callable(bM) | |
347 | - | func airDrop () = if (!(aA)) | |
348 | - | then throw("DApp is inactive at this moment") | |
349 | - | else { | |
350 | - | let bN = $Tuple2(bM.payments[0].amount, bM.payments[0].assetId) | |
351 | - | let bO = bN._1 | |
352 | - | let bP = bN._2 | |
353 | - | if ((bP != aq)) | |
354 | - | then throw("Incorrect pmtAssetId") | |
355 | - | else { | |
356 | - | let bQ = fraction(bO, aB, at, CEILING) | |
357 | - | let bR = bg() | |
358 | - | let aM = aG() | |
359 | - | let bS = (aM + fraction((bO - bQ), ar, bR)) | |
360 | - | [IntegerEntry(c, bS), ScriptTransfer(ap, bQ, aq)] | |
361 | - | } | |
362 | - | } | |
283 | + | @Callable(aA) | |
284 | + | func airDrop () = valueOrElse(ay(), { | |
285 | + | let bx = $Tuple2(aA.payments[0].amount, aA.payments[0].assetId) | |
286 | + | let by = bx._1 | |
287 | + | let bz = bx._2 | |
288 | + | if ((bz != aj)) | |
289 | + | then throw("Incorrect pmtAssetId") | |
290 | + | else { | |
291 | + | let bA = fraction(by, au, am, CEILING) | |
292 | + | let bB = aC() | |
293 | + | let bC = bB._1 | |
294 | + | let aE = bB._2 | |
295 | + | let aK = aB() | |
296 | + | let bD = (aK + fraction((by - bA), ak, aE)) | |
297 | + | [IntegerEntry(c, bD), ScriptTransfer(ah, bA, aj)] | |
298 | + | } | |
299 | + | }) | |
363 | 300 | ||
364 | 301 | ||
365 | 302 | ||
366 | - | @Callable(bM) | |
367 | - | func lockSWOP () = if (!(aA)) | |
368 | - | then throw("DApp is inactive at this moment") | |
369 | - | else { | |
370 | - | let bT = $Tuple2(bM.payments[0].amount, bM.payments[0].assetId) | |
371 | - | let bO = bT._1 | |
372 | - | let bP = bT._2 | |
373 | - | if ((bP != aq)) | |
374 | - | then throw("Incorrect pmtAssetId") | |
375 | - | else { | |
376 | - | let aM = aG() | |
377 | - | let bU = aL(bM.caller, aM) | |
378 | - | let aO = bU._1 | |
379 | - | let bJ = bU._2 | |
380 | - | let bK = fraction(bJ, (aM - aO), ar) | |
381 | - | let bV = ((bJ + bO) + bK) | |
382 | - | let bL = aM | |
383 | - | let bR = bg() | |
384 | - | let bW = ((bR + bO) + bK) | |
385 | - | let bX = aJ(bM.caller) | |
386 | - | let bY = (bX + bK) | |
387 | - | [IntegerEntry((toString(bM.caller) + d), bL), IntegerEntry((toString(bM.caller) + e), bV), IntegerEntry(g, bW), IntegerEntry((toString(bM.caller) + k), bY), IntegerEntry((toString(bM.caller) + l), bK)] | |
388 | - | } | |
389 | - | } | |
303 | + | @Callable(aA) | |
304 | + | func lockSWOP () = valueOrElse(ay(), { | |
305 | + | let bE = $Tuple2(aA.payments[0].amount, aA.payments[0].assetId) | |
306 | + | let by = bE._1 | |
307 | + | let bz = bE._2 | |
308 | + | if ((bz != aj)) | |
309 | + | then throw("Incorrect pmtAssetId") | |
310 | + | else { | |
311 | + | let aG = toString(aA.caller) | |
312 | + | let aK = aB() | |
313 | + | let bF = aF(aG) | |
314 | + | let bu = bF._1 | |
315 | + | let aI = bF._2 | |
316 | + | let bG = bs(aG) | |
317 | + | let bw = bG._1 | |
318 | + | let bH = bG._2 | |
319 | + | let bI = aP(aG) | |
320 | + | let bJ = (bI + bH) | |
321 | + | let bK = (bu + by) | |
322 | + | let bL = (aI + by) | |
323 | + | let bM = aC() | |
324 | + | let bC = bM._1 | |
325 | + | let aE = bM._2 | |
326 | + | let bN = (bC + by) | |
327 | + | let bO = (aE + by) | |
328 | + | [IntegerEntry((aG + g), (height + ai)), IntegerEntry((aG + d), bw), IntegerEntry((aG + e), bK), IntegerEntry((aG + h), aI), IntegerEntry((aG + k), bJ), IntegerEntry(f, bN), IntegerEntry(i, bO)] | |
329 | + | } | |
330 | + | }) | |
390 | 331 | ||
391 | 332 | ||
392 | 333 | ||
393 | - | @Callable(bM) | |
394 | - | func withdrawSWOP (bZ) = if (!(aA)) | |
395 | - | then throw("DApp is inactive at this moment") | |
396 | - | else if ((0 >= bZ)) | |
334 | + | @Callable(aA) | |
335 | + | func withdrawSWOP (bP) = valueOrElse(ay(), { | |
336 | + | let aG = toString(aA.caller) | |
337 | + | let bQ = valueOrElse(getInteger(this, (aG + g)), 0) | |
338 | + | if ((0 >= bP)) | |
397 | 339 | then throw("withdrawAmount <= 0") | |
398 | - | else { | |
399 | - | let bR = bg() | |
400 | - | let bJ = aH(bM.caller) | |
401 | - | let ca = bG(bM.caller) | |
402 | - | let bL = ca._1 | |
403 | - | let bK = ca._2 | |
404 | - | let cb = bh(bM.caller) | |
405 | - | let cc = cb._1 | |
406 | - | let cd = cb._2 | |
407 | - | let ce = aW(bM.caller) | |
408 | - | let cf = aY(bM.caller) | |
409 | - | if (if (if ((0 > cd)) | |
410 | - | then true | |
411 | - | else (0 > cc)) | |
412 | - | then true | |
413 | - | else (0 > ce)) | |
414 | - | then throw("userUnvoteAmount < 0 || userVoteAmount < 0 || userVoteAmountForNewPool < 0") | |
415 | - | else { | |
416 | - | let cg = (bJ - max([ce, (cc + cd), cf])) | |
417 | - | if ((bZ > cg)) | |
418 | - | then throw("withdrawAmount > availableToUnstake") | |
419 | - | else { | |
420 | - | let bW = ((bR + bK) - bZ) | |
421 | - | let ch = ((bJ + bK) - bZ) | |
422 | - | let bX = aJ(bM.caller) | |
423 | - | let bY = (bX + bK) | |
424 | - | [IntegerEntry((toString(bM.caller) + d), bL), IntegerEntry((toString(bM.caller) + e), ch), IntegerEntry(g, bW), ScriptTransfer(bM.caller, bZ, aq), IntegerEntry((toString(bM.caller) + k), bY), IntegerEntry((toString(bM.caller) + l), bK)] | |
425 | - | } | |
426 | - | } | |
427 | - | } | |
340 | + | else if ((bQ > height)) | |
341 | + | then throw(("You can't withdraw till " + toString(bQ))) | |
342 | + | else { | |
343 | + | let bR = aC() | |
344 | + | let bC = bR._1 | |
345 | + | let aE = bR._2 | |
346 | + | let bS = aF(aG) | |
347 | + | let bu = bS._1 | |
348 | + | let aI = bS._2 | |
349 | + | let bT = bs(aG) | |
350 | + | let bw = bT._1 | |
351 | + | let bH = bT._2 | |
352 | + | let bU = bg(aA.caller) | |
353 | + | let bV = bU._1 | |
354 | + | let bW = bU._2 | |
355 | + | let bX = aW(aA.caller) | |
356 | + | let bY = aY(aA.caller) | |
357 | + | if (if (if ((0 > bW)) | |
358 | + | then true | |
359 | + | else (0 > bV)) | |
360 | + | then true | |
361 | + | else (0 > bX)) | |
362 | + | then throw("userUnvoteAmount < 0 || userVoteAmount < 0 || userVoteAmountForNewPool < 0") | |
363 | + | else { | |
364 | + | let bZ = (bu - max([bX, (bV + bW), bY])) | |
365 | + | if ((bP > bZ)) | |
366 | + | then throw("withdrawAmount > availableToUnstake") | |
367 | + | else { | |
368 | + | let bI = aP(aG) | |
369 | + | let bJ = (bI + bH) | |
370 | + | let bN = (bC - bP) | |
371 | + | let ca = (bu - bP) | |
372 | + | let bO = ((aE - aI) + ca) | |
373 | + | [IntegerEntry((aG + d), bw), IntegerEntry((aG + e), ca), IntegerEntry((aG + h), ca), IntegerEntry((aG + k), bJ), IntegerEntry(f, bN), IntegerEntry(i, bO), ScriptTransfer(aA.caller, bP, aj)] | |
374 | + | } | |
375 | + | } | |
376 | + | } | |
377 | + | }) | |
428 | 378 | ||
429 | 379 | ||
430 | 380 | ||
431 | - | @Callable(bM) | |
432 | - | func claimAndWithdrawSWOP () = if (!(aA)) | |
433 | - | then throw("DApp is inactive at this moment") | |
434 | - | else { | |
435 | - | let aM = aG() | |
436 | - | let ci = bG(bM.caller) | |
437 | - | let bL = ci._1 | |
438 | - | let bK = ci._2 | |
439 | - | let bX = aJ(bM.caller) | |
440 | - | let bY = (bX + bK) | |
441 | - | if ((bK == 0)) | |
442 | - | then throw("You have 0 available SWOP") | |
443 | - | else [IntegerEntry((toString(bM.caller) + d), bL), IntegerEntry((toString(bM.caller) + k), bY), IntegerEntry((toString(bM.caller) + l), bK), ScriptTransfer(bM.caller, bK, aq)] | |
444 | - | } | |
381 | + | @Callable(aA) | |
382 | + | func claimAndWithdrawSWOP () = valueOrElse(ay(), { | |
383 | + | let aG = toString(aA.caller) | |
384 | + | let bI = aP(aG) | |
385 | + | let cb = bs(aG) | |
386 | + | let bw = cb._1 | |
387 | + | let bv = cb._2 | |
388 | + | let cc = (bI + bv) | |
389 | + | if ((cc == 0)) | |
390 | + | then throw("You have 0 available SWOP") | |
391 | + | else [IntegerEntry((aG + d), bw), ScriptTransfer(aA.caller, cc, aj)] | |
392 | + | }) | |
445 | 393 | ||
446 | 394 | ||
447 | 395 | ||
448 | - | @Callable(bM) | |
449 | - | func claimAndStakeSWOP () = if (!(aA)) | |
450 | - | then throw("DApp is inactive at this moment") | |
451 | - | else { | |
452 | - | let bR = bg() | |
453 | - | let bJ = aH(bM.caller) | |
454 | - | let aM = aG() | |
455 | - | let cj = bG(bM.caller) | |
456 | - | let bL = cj._1 | |
457 | - | let bK = cj._2 | |
458 | - | let bV = (bJ + bK) | |
459 | - | let bW = (bR + bK) | |
460 | - | let bX = aJ(bM.caller) | |
461 | - | let bY = (bX + bK) | |
462 | - | if ((bK == 0)) | |
463 | - | then throw("You have 0 available SWOP") | |
464 | - | else [IntegerEntry((toString(bM.caller) + d), bL), IntegerEntry(g, bW), IntegerEntry((toString(bM.caller) + e), bV), IntegerEntry((toString(bM.caller) + k), bY), IntegerEntry((toString(bM.caller) + l), bK)] | |
465 | - | } | |
396 | + | @Callable(aA) | |
397 | + | func claimAndStakeSWOP () = valueOrElse(ay(), { | |
398 | + | let aG = toString(aA.caller) | |
399 | + | let cd = aC() | |
400 | + | let bC = cd._1 | |
401 | + | let aE = cd._2 | |
402 | + | let ce = aF(aG) | |
403 | + | let bu = ce._1 | |
404 | + | let aI = ce._2 | |
405 | + | let bI = aP(aG) | |
406 | + | let cf = bs(aG) | |
407 | + | let bw = cf._1 | |
408 | + | let bv = cf._2 | |
409 | + | let cc = (bI + bv) | |
410 | + | let bK = (bu + cc) | |
411 | + | let bL = (aI + (cc * 2)) | |
412 | + | let bN = (bC + cc) | |
413 | + | let bO = (aE + (cc * 2)) | |
414 | + | if ((cc == 0)) | |
415 | + | then throw("You have 0 available SWOP") | |
416 | + | else [IntegerEntry((toString(aA.caller) + g), (height + ai)), IntegerEntry((toString(aA.caller) + d), bw), IntegerEntry(f, bN), IntegerEntry(i, bO), IntegerEntry((toString(aA.caller) + e), bK), IntegerEntry((toString(aA.caller) + h), bL)] | |
417 | + | }) | |
466 | 418 | ||
467 | 419 | ||
468 | 420 | ||
469 | - | @Callable(bM) | |
470 | - | func updateWeights (ck,cl,cm,cn) = if (!(aA)) | |
471 | - | then throw("DApp is inactive at this moment") | |
472 | - | else { | |
473 | - | let co = 10 | |
474 | - | let cp = valueOrElse(getInteger(this, v), 0) | |
475 | - | if (!(containsElement([ah, ai, aj, ak], bM.callerPublicKey))) | |
476 | - | then throw("Only admin can call this function") | |
477 | - | else if ((size(ck) > co)) | |
478 | - | then throw(("Max amount of pool is " + toString(co))) | |
479 | - | else if ((cp >= cm)) | |
480 | - | then throw("rewardUpdateHeight <= totalRewardUpdateHeight") | |
481 | - | else if ((height >= cm)) | |
482 | - | then throw("height >= rewardUpdateHeight") | |
483 | - | else if ((0 >= cm)) | |
484 | - | then throw("0 >= rewardUpdateHeight ") | |
485 | - | else { | |
486 | - | func cq (cr,cs) = (cr + cs) | |
487 | - | ||
488 | - | func ct (cu,aR) = { | |
489 | - | let cv = bs(aR) | |
490 | - | if (if (!(bt(aR))) | |
491 | - | then true | |
492 | - | else if ((cm != cv)) | |
493 | - | then (cv == cp) | |
494 | - | else false) | |
495 | - | then { | |
496 | - | let cw = bu(aR) | |
497 | - | IntegerEntry((aR + r), cw) :: cu | |
498 | - | } | |
499 | - | else { | |
500 | - | let cw = bv(aR) | |
501 | - | IntegerEntry((aR + r), cw) :: cu | |
502 | - | } | |
503 | - | } | |
504 | - | ||
505 | - | func cx (cu,aR) = { | |
506 | - | let cy = value(indexOf(ck, aR)) | |
507 | - | let cw = cl[cy] | |
508 | - | if ((0 > cw)) | |
509 | - | then throw("PoolReward < 0") | |
510 | - | else IntegerEntry((aR + q), cw) :: cu | |
511 | - | } | |
512 | - | ||
513 | - | func cz (cu,aR) = { | |
514 | - | let cA = cm | |
515 | - | IntegerEntry((aR + s), cA) :: cu | |
516 | - | } | |
517 | - | ||
518 | - | func cB (cC,cn) = if ((cn == 0)) | |
519 | - | then if ((cC > as)) | |
520 | - | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(cn)) + " ") + toString(cC))) | |
521 | - | else $Tuple2([IntegerEntry(F, cC)], [IntegerEntry(w, cm)]) | |
522 | - | else if ((cn == 1)) | |
523 | - | then { | |
524 | - | let cD = valueOrElse(getInteger(this, F), 0) | |
525 | - | let cE = valueOrElse(getInteger(this, w), 0) | |
526 | - | if (((cC + cD) > as)) | |
527 | - | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(cn)) + " ") + toString((cC + cD)))) | |
528 | - | else if ((cE != cm)) | |
529 | - | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
530 | - | else $Tuple2([IntegerEntry(F, (cC + cD))], nil) | |
531 | - | } | |
532 | - | else if ((cn == 2)) | |
533 | - | then { | |
534 | - | let cF = (valueOrElse(getInteger(this, F), 0) + cC) | |
535 | - | let cE = valueOrElse(getInteger(this, w), 0) | |
536 | - | if ((cF != as)) | |
537 | - | then throw("sumRewardPrevious != totalVoteShare or sumRewardCurrent != totalVoteShare") | |
538 | - | else if ((cE != cm)) | |
539 | - | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
540 | - | else $Tuple2([IntegerEntry(F, cF)], nil) | |
541 | - | } | |
542 | - | else throw("Incorrect pagination") | |
543 | - | ||
544 | - | let cG = { | |
545 | - | let cH = ck | |
546 | - | let cI = size(cH) | |
547 | - | let cJ = nil | |
548 | - | func cK (cL,cM) = if ((cM >= cI)) | |
549 | - | then cL | |
550 | - | else ct(cL, cH[cM]) | |
551 | - | ||
552 | - | func cN (cL,cM) = if ((cM >= cI)) | |
553 | - | then cL | |
554 | - | else throw("List size exceeds 10") | |
555 | - | ||
556 | - | cN(cK(cK(cK(cK(cK(cK(cK(cK(cK(cK(cJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
557 | - | } | |
558 | - | let cO = { | |
559 | - | let cH = ck | |
560 | - | let cI = size(cH) | |
561 | - | let cJ = nil | |
562 | - | func cP (cL,cM) = if ((cM >= cI)) | |
563 | - | then cL | |
564 | - | else cx(cL, cH[cM]) | |
565 | - | ||
566 | - | func cQ (cL,cM) = if ((cM >= cI)) | |
567 | - | then cL | |
568 | - | else throw("List size exceeds 10") | |
569 | - | ||
570 | - | cQ(cP(cP(cP(cP(cP(cP(cP(cP(cP(cP(cJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
571 | - | } | |
572 | - | let cR = { | |
573 | - | let cH = ck | |
574 | - | let cI = size(cH) | |
575 | - | let cJ = nil | |
576 | - | func cS (cL,cM) = if ((cM >= cI)) | |
577 | - | then cL | |
578 | - | else cz(cL, cH[cM]) | |
579 | - | ||
580 | - | func cT (cL,cM) = if ((cM >= cI)) | |
581 | - | then cL | |
582 | - | else throw("List size exceeds 10") | |
583 | - | ||
584 | - | cT(cS(cS(cS(cS(cS(cS(cS(cS(cS(cS(cJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
585 | - | } | |
586 | - | let cU = { | |
587 | - | let cH = cl | |
588 | - | let cI = size(cH) | |
589 | - | let cJ = 0 | |
590 | - | func cV (cL,cM) = if ((cM >= cI)) | |
591 | - | then cL | |
592 | - | else cq(cL, cH[cM]) | |
593 | - | ||
594 | - | func cW (cL,cM) = if ((cM >= cI)) | |
595 | - | then cL | |
596 | - | else throw("List size exceeds 10") | |
597 | - | ||
598 | - | cW(cV(cV(cV(cV(cV(cV(cV(cV(cV(cV(cJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
599 | - | } | |
600 | - | let cX = cB(cU, cn) | |
601 | - | let cY = cX._1 | |
602 | - | let cE = cX._2 | |
603 | - | let cZ = if ((cn == 2)) | |
604 | - | then [IntegerEntry(v, cm)] | |
605 | - | else nil | |
606 | - | if ((height > cm)) | |
607 | - | then throw("rewardUpdateHeight < height") | |
608 | - | else (((((cG ++ cO) ++ cR) ++ cY) ++ cZ) ++ cE) | |
609 | - | } | |
610 | - | } | |
421 | + | @Callable(aA) | |
422 | + | func lockSWOPFromFarming () = valueOrElse(ay(), { | |
423 | + | let cg = $Tuple2(aA.payments[0].amount, aA.payments[0].assetId) | |
424 | + | let by = cg._1 | |
425 | + | let bz = cg._2 | |
426 | + | if ((aA.caller != ad)) | |
427 | + | then throw("Only farming can call this function") | |
428 | + | else if ((bz != aj)) | |
429 | + | then throw("Incorrect pmtAssetId") | |
430 | + | else { | |
431 | + | let aG = toString(aA.originCaller) | |
432 | + | let aK = aB() | |
433 | + | let ch = aF(aG) | |
434 | + | let bu = ch._1 | |
435 | + | let aI = ch._2 | |
436 | + | let ci = bs(aG) | |
437 | + | let bw = ci._1 | |
438 | + | let bH = ci._2 | |
439 | + | let bI = aP(aG) | |
440 | + | let bJ = (bI + bH) | |
441 | + | let bK = (bu + by) | |
442 | + | let bL = (aI + (by * 2)) | |
443 | + | let cj = aC() | |
444 | + | let bC = cj._1 | |
445 | + | let aE = cj._2 | |
446 | + | let bN = (bC + by) | |
447 | + | let bO = (aE + (by * 2)) | |
448 | + | [IntegerEntry((aG + g), (height + ai)), IntegerEntry((aG + d), bw), IntegerEntry((aG + e), bK), IntegerEntry((aG + h), aI), IntegerEntry((aG + k), bJ), IntegerEntry(f, bN), IntegerEntry(i, bO)] | |
449 | + | } | |
450 | + | }) | |
611 | 451 | ||
612 | 452 | ||
613 | 453 | ||
614 | - | @Callable(bM) | |
615 | - | func shutdown () = if (!(aA)) | |
616 | - | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified"))) | |
617 | - | else if (!(containsElement([ah, ai, aj], bM.callerPublicKey))) | |
454 | + | @Callable(aA) | |
455 | + | func updateWeights (ck,cl,cm,cn) = valueOrElse(ay(), { | |
456 | + | let co = 10 | |
457 | + | let cp = valueOrElse(getInteger(this, o), 0) | |
458 | + | if (!(containsElement([Z, aa, ab, ac], aA.callerPublicKey))) | |
618 | 459 | then throw("Only admin can call this function") | |
619 | - | else aD("Paused by admin") | |
460 | + | else if ((size(ck) > co)) | |
461 | + | then throw(("Max amount of pool is " + toString(co))) | |
462 | + | else if ((cp >= cm)) | |
463 | + | then throw("rewardUpdateHeight <= totalRewardUpdateHeight") | |
464 | + | else if ((height >= cm)) | |
465 | + | then throw("height >= rewardUpdateHeight") | |
466 | + | else if ((0 >= cm)) | |
467 | + | then throw("0 >= rewardUpdateHeight ") | |
468 | + | else { | |
469 | + | func cq (cr,cs) = (cr + cs) | |
470 | + | ||
471 | + | func ct (cu,aR) = { | |
472 | + | let cv = bo(aR) | |
473 | + | if (if (!(bp(aR))) | |
474 | + | then true | |
475 | + | else if ((cm != cv)) | |
476 | + | then (cv == cp) | |
477 | + | else false) | |
478 | + | then { | |
479 | + | let cw = bq(aR) | |
480 | + | IntegerEntry((aR + m), cw) :: cu | |
481 | + | } | |
482 | + | else { | |
483 | + | let cw = br(aR) | |
484 | + | IntegerEntry((aR + m), cw) :: cu | |
485 | + | } | |
486 | + | } | |
487 | + | ||
488 | + | func cx (cu,aR) = { | |
489 | + | let cy = value(indexOf(ck, aR)) | |
490 | + | let cw = cl[cy] | |
491 | + | if ((0 > cw)) | |
492 | + | then throw("PoolReward < 0") | |
493 | + | else IntegerEntry((aR + l), cw) :: cu | |
494 | + | } | |
495 | + | ||
496 | + | func cz (cu,aR) = { | |
497 | + | let cA = cm | |
498 | + | let cB = invoke(ad, "updatePoolInterest", [aR], nil) | |
499 | + | if ((cB == cB)) | |
500 | + | then IntegerEntry((aR + n), cA) :: cu | |
501 | + | else throw("Strict value is not equal to itself.") | |
502 | + | } | |
503 | + | ||
504 | + | func cC (cD,cn) = if ((cn == 0)) | |
505 | + | then if ((cD > al)) | |
506 | + | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(cn)) + " ") + toString(cD))) | |
507 | + | else $Tuple2([IntegerEntry(x, cD)], [IntegerEntry(p, cm)]) | |
508 | + | else if ((cn == 1)) | |
509 | + | then { | |
510 | + | let cE = valueOrElse(getInteger(this, x), 0) | |
511 | + | let cF = valueOrElse(getInteger(this, p), 0) | |
512 | + | if (((cD + cE) > al)) | |
513 | + | then throw(((("sumRewardPrevious > totalVoteShare or sumRewardCurrent > totalVoteShare - " + toString(cn)) + " ") + toString((cD + cE)))) | |
514 | + | else if ((cF != cm)) | |
515 | + | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
516 | + | else $Tuple2([IntegerEntry(x, (cD + cE))], nil) | |
517 | + | } | |
518 | + | else if ((cn == 2)) | |
519 | + | then { | |
520 | + | let cG = (valueOrElse(getInteger(this, x), 0) + cD) | |
521 | + | let cF = valueOrElse(getInteger(this, p), 0) | |
522 | + | if ((cG != al)) | |
523 | + | then throw("sumRewardPrevious != totalVoteShare or sumRewardCurrent != totalVoteShare") | |
524 | + | else if ((cF != cm)) | |
525 | + | then throw("current rewardUpdateHeight != rewardUpdateHeightFirstPaginationEntry") | |
526 | + | else $Tuple2([IntegerEntry(x, cG)], nil) | |
527 | + | } | |
528 | + | else throw("Incorrect pagination") | |
529 | + | ||
530 | + | let cH = { | |
531 | + | let cI = ck | |
532 | + | let cJ = size(cI) | |
533 | + | let cK = nil | |
534 | + | func cL (cM,cN) = if ((cN >= cJ)) | |
535 | + | then cM | |
536 | + | else ct(cM, cI[cN]) | |
537 | + | ||
538 | + | func cO (cM,cN) = if ((cN >= cJ)) | |
539 | + | then cM | |
540 | + | else throw("List size exceeds 10") | |
541 | + | ||
542 | + | cO(cL(cL(cL(cL(cL(cL(cL(cL(cL(cL(cK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
543 | + | } | |
544 | + | let cP = { | |
545 | + | let cI = ck | |
546 | + | let cJ = size(cI) | |
547 | + | let cK = nil | |
548 | + | func cQ (cM,cN) = if ((cN >= cJ)) | |
549 | + | then cM | |
550 | + | else cx(cM, cI[cN]) | |
551 | + | ||
552 | + | func cR (cM,cN) = if ((cN >= cJ)) | |
553 | + | then cM | |
554 | + | else throw("List size exceeds 10") | |
555 | + | ||
556 | + | cR(cQ(cQ(cQ(cQ(cQ(cQ(cQ(cQ(cQ(cQ(cK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
557 | + | } | |
558 | + | let cS = { | |
559 | + | let cI = ck | |
560 | + | let cJ = size(cI) | |
561 | + | let cK = nil | |
562 | + | func cT (cM,cN) = if ((cN >= cJ)) | |
563 | + | then cM | |
564 | + | else cz(cM, cI[cN]) | |
565 | + | ||
566 | + | func cU (cM,cN) = if ((cN >= cJ)) | |
567 | + | then cM | |
568 | + | else throw("List size exceeds 10") | |
569 | + | ||
570 | + | cU(cT(cT(cT(cT(cT(cT(cT(cT(cT(cT(cK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
571 | + | } | |
572 | + | let cV = { | |
573 | + | let cI = cl | |
574 | + | let cJ = size(cI) | |
575 | + | let cK = 0 | |
576 | + | func cW (cM,cN) = if ((cN >= cJ)) | |
577 | + | then cM | |
578 | + | else cq(cM, cI[cN]) | |
579 | + | ||
580 | + | func cX (cM,cN) = if ((cN >= cJ)) | |
581 | + | then cM | |
582 | + | else throw("List size exceeds 10") | |
583 | + | ||
584 | + | cX(cW(cW(cW(cW(cW(cW(cW(cW(cW(cW(cK, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
585 | + | } | |
586 | + | let cY = cC(cV, cn) | |
587 | + | let cZ = cY._1 | |
588 | + | let cF = cY._2 | |
589 | + | let da = if ((cn == 2)) | |
590 | + | then [IntegerEntry(o, cm)] | |
591 | + | else nil | |
592 | + | if ((height > cm)) | |
593 | + | then throw("rewardUpdateHeight < height") | |
594 | + | else (((((cH ++ cP) ++ cS) ++ cZ) ++ da) ++ cF) | |
595 | + | } | |
596 | + | }) | |
620 | 597 | ||
621 | 598 | ||
622 | 599 | ||
623 | - | @Callable(bM) | |
624 | - | func activate () = if (aA) | |
625 | - | then throw("DApp is already active") | |
626 | - | else if (!(containsElement([ah, ai, aj], bM.callerPublicKey))) | |
627 | - | then throw("Only admin can call this function") | |
628 | - | else [BooleanEntry(a, true), DeleteEntry(b)] | |
600 | + | @Callable(aA) | |
601 | + | func shutdown () = valueOrElse(az(aA), if (!(at)) | |
602 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified"))) | |
603 | + | else aw("Paused by admin")) | |
629 | 604 | ||
630 | 605 | ||
631 | - | @Verifier(da) | |
632 | - | func db () = { | |
633 | - | let dc = if (sigVerify(da.bodyBytes, da.proofs[0], ah)) | |
606 | + | ||
607 | + | @Callable(aA) | |
608 | + | func activate () = valueOrElse(az(aA), if (at) | |
609 | + | then throw("DApp is already active") | |
610 | + | else [BooleanEntry(a, true), DeleteEntry(b)]) | |
611 | + | ||
612 | + | ||
613 | + | @Verifier(db) | |
614 | + | func dc () = { | |
615 | + | let dd = if (sigVerify(db.bodyBytes, db.proofs[0], Z)) | |
634 | 616 | then 1 | |
635 | 617 | else 0 | |
636 | - | let | |
618 | + | let de = if (sigVerify(db.bodyBytes, db.proofs[1], aa)) | |
637 | 619 | then 1 | |
638 | 620 | else 0 | |
639 | - | let | |
621 | + | let df = if (sigVerify(db.bodyBytes, db.proofs[2], ab)) | |
640 | 622 | then 1 | |
641 | 623 | else 0 | |
642 | - | ((( | |
624 | + | (((dd + de) + df) >= 2) | |
643 | 625 | } | |
644 | 626 |
github/deemru/w8io/026f985 124.15 ms ◑