tx · AM4CJw4MDMfKEh2A6QJx5BF8PwCGTvh2KuWNsEpvw2Zc 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE: -0.01500000 Waves 2023.08.08 16:18 [2701664] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves
{ "type": 13, "id": "AM4CJw4MDMfKEh2A6QJx5BF8PwCGTvh2KuWNsEpvw2Zc", "fee": 1500000, "feeAssetId": null, "timestamp": 1691500738052, "version": 2, "chainId": 84, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "2qGZqaFsUUxgrkLHfw7H3hwGkE9rvMabKgpdC1mXgu1t8CM4j8PEFaJ5J45JTg4uTLEFFmDk2GnQBaEsotRNDEYw" ], "script": "base64:BgKFFQgCEgMKAQISBgoEARgRARIECgIIARIAEgASAwoBCBIAEgQKAhgREgASAwoBCCIDU0VQIgVTQ0FMRSIFTVVMVDgiB01VTFQ4QkkiCnplcm9CaWdJbnQiFHByb2Nlc3NpbmdTdGFnZVRvdGFsIhVwcm9jZXNzaW5nU3RhZ2VTaGFyZXMiBk1VTFQxOCIITVVMVDE4QkkiC3dhdmVzU3RyaW5nIg5nZXROdW1iZXJCeUtleSIDa2V5Ig9nZXROdW1iZXJPckZhaWwiDmdldFN0cmluZ0J5S2V5Ig9nZXRTdHJpbmdPckZhaWwiDHBhcnNlQXNzZXRJZCIFaW5wdXQiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiA2FicyIDdmFsIglhYnNCaWdJbnQiC2tleU1heERlcHRoIg9tYXhEZXB0aERlZmF1bHQiCG1heERlcHRoIhFrZXlGYWN0b3J5QWRkcmVzcyIRZmFjdG9yeUFkZHJlc3NTdHIiD2ZhY3RvcnlDb250cmFjdCISa2V5RW1pc3Npb25BZGRyZXNzIhlrZXlWb3RpbmdFbWlzc2lvbkNvbnRyYWN0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JiQQUCYkEEAmJCCQD8BwQFBHRoaXMCE3RyYWRlUmV3YXJkSW50ZXJuYWwJAMwIAgUCYlcJAMwIAgUCYngJAMwIAgUCYnkJAMwIAgAABQNuaWwFA25pbAMJAAACBQJiQgUCYkIJAJQKAgUDbmlsBQJiQgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgJhQwESY2xhaW1UcmFkaW5nUmV3YXJkAAQCYUUIBQJhQwZjYWxsZXIEAmJYCQClCAEFAmFFBAJiWQkBAmJhAQUCYlgDCQBmAgUCYlkAAAkAlAoCCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFAmFFBQJiWQUCYWoJAMwIAgkBDEludGVnZXJFbnRyeQIJAQJhRAEFAmJYAAAFA25pbAUCYlkJAQF0AQIQbm90aGluZyB0byBjbGFpbQJhQwEaY2xhaW1UcmFkaW5nUmV3YXJkUkVBRE9OTFkBAmFFCQCUCgIFA25pbAkBAmJhAQUCYUUBAmJaAQJjYQAEAmNiBAJhTwkBAmFRAAMJAAECBQJhTwIKQnl0ZVZlY3RvcgQCYVUFAmFPBQJhVQMJAAECBQJhTwIEVW5pdAgFAmJaD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJiWglib2R5Qnl0ZXMJAJEDAggFAmJaBnByb29mcwAABQJjYpN3w5k=", "height": 2701664, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9zo1J28X6gnXZXw5PmvdzWGFXxG6N2quZEoyMsQegPw2 Next: APBEZEcYLZdwadZipwgJVCVNUhpr4gd6YV5ezYcrQqYK Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | - | let d = toBigInt( | |
10 | + | let d = toBigInt(c) | |
11 | 11 | ||
12 | - | let e = 0 | |
12 | + | let e = toBigInt(0) | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = 0 | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = 1 | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 1000000000000000000 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = toBigInt(h) | |
21 | 21 | ||
22 | - | func j (k) = valueOrElse(getInteger(this, k), 0) | |
22 | + | let j = "WAVES" | |
23 | + | ||
24 | + | func k (l) = valueOrElse(getInteger(this, l), 0) | |
23 | 25 | ||
24 | 26 | ||
25 | - | func | |
27 | + | func m (l) = valueOrErrorMessage(getInteger(this, l), (("mandatory this." + l) + " is not defined")) | |
26 | 28 | ||
27 | 29 | ||
28 | - | func | |
30 | + | func n (l) = valueOrElse(getString(this, l), "") | |
29 | 31 | ||
30 | 32 | ||
31 | - | func | |
33 | + | func o (l) = valueOrErrorMessage(getString(this, l), (("mandatory this." + l) + " is not defined")) | |
32 | 34 | ||
33 | 35 | ||
34 | - | func | |
36 | + | func p (q) = if ((q == j)) | |
35 | 37 | then unit | |
36 | - | else fromBase58String( | |
38 | + | else fromBase58String(q) | |
37 | 39 | ||
38 | 40 | ||
39 | - | func | |
41 | + | func r (s) = makeString(["gwx_reward.ride:", s], " ") | |
40 | 42 | ||
41 | 43 | ||
42 | - | func | |
44 | + | func t (s) = throw(r(s)) | |
43 | 45 | ||
44 | 46 | ||
45 | - | func | |
46 | - | then -( | |
47 | - | else | |
47 | + | func u (v) = if ((0 > v)) | |
48 | + | then -(v) | |
49 | + | else v | |
48 | 50 | ||
49 | 51 | ||
50 | - | func | |
51 | - | then -( | |
52 | - | else | |
52 | + | func w (v) = if ((e > v)) | |
53 | + | then -(v) | |
54 | + | else v | |
53 | 55 | ||
54 | 56 | ||
55 | - | let | |
57 | + | let x = "%s__maxDepth" | |
56 | 58 | ||
57 | - | let | |
59 | + | let y = 30 | |
58 | 60 | ||
59 | - | let | |
61 | + | let z = valueOrElse(getInteger(this, x), y) | |
60 | 62 | ||
61 | - | func | |
63 | + | func A () = "%s%s__config__factoryAddress" | |
62 | 64 | ||
63 | 65 | ||
64 | - | let | |
66 | + | let B = o(A()) | |
65 | 67 | ||
66 | - | let | |
68 | + | let C = addressFromStringValue(B) | |
67 | 69 | ||
68 | - | func | |
70 | + | func D () = "%s%s__config__emissionAddress" | |
69 | 71 | ||
70 | 72 | ||
71 | - | func | |
73 | + | func E () = makeString(["%s", "votingEmissionContract"], a) | |
72 | 74 | ||
73 | 75 | ||
74 | - | let | |
76 | + | let F = addressFromStringValue(getStringValue(C, E())) | |
75 | 77 | ||
76 | - | func | |
78 | + | func G (H) = makeString(["%s%s%s", "mapping", "num2user", toString(H)], a) | |
77 | 79 | ||
78 | 80 | ||
79 | - | let | |
81 | + | let I = makeString(["%s%s", "referral", "programName"], a) | |
80 | 82 | ||
81 | - | let | |
83 | + | let J = "wxlock" | |
82 | 84 | ||
83 | - | let | |
85 | + | let K = valueOrElse(getString(this, I), J) | |
84 | 86 | ||
85 | - | let | |
87 | + | let L = makeString(["%s%s", "referral", "minGWxAmount"], a) | |
86 | 88 | ||
87 | - | let | |
89 | + | let M = (500 * c) | |
88 | 90 | ||
89 | - | let | |
91 | + | let N = valueOrElse(getInteger(this, L), M) | |
90 | 92 | ||
91 | - | let | |
93 | + | let O = makeString(["%s%s", "referral", "referrerRewardPermille"], a) | |
92 | 94 | ||
93 | - | let | |
95 | + | let P = 50 | |
94 | 96 | ||
95 | - | let | |
97 | + | let Q = valueOrElse(getInteger(this, O), P) | |
96 | 98 | ||
97 | - | let | |
99 | + | let R = makeString(["%s%s", "referral", "referralRewardPermille"], a) | |
98 | 100 | ||
99 | - | let | |
101 | + | let S = 50 | |
100 | 102 | ||
101 | - | let | |
103 | + | let T = valueOrElse(getInteger(this, R), S) | |
102 | 104 | ||
103 | - | func | |
105 | + | func U (V) = makeString(["%s%s%s", "referrer", K, V], a) | |
104 | 106 | ||
105 | 107 | ||
106 | - | func | |
108 | + | func W (X,Y) = makeString(["%s%s%s", "unclaimedReferral", X, Y], a) | |
107 | 109 | ||
108 | 110 | ||
109 | - | let | |
111 | + | let Z = o(D()) | |
110 | 112 | ||
111 | - | let | |
113 | + | let aa = addressFromStringValue(Z) | |
112 | 114 | ||
113 | - | let | |
115 | + | let ab = 1 | |
114 | 116 | ||
115 | - | let | |
117 | + | let ac = 2 | |
116 | 118 | ||
117 | - | let | |
119 | + | let ad = 3 | |
118 | 120 | ||
119 | - | let | |
121 | + | let ae = 4 | |
120 | 122 | ||
121 | - | func | |
123 | + | func af () = "%s__config" | |
122 | 124 | ||
123 | 125 | ||
124 | - | func | |
126 | + | func ag () = addressFromStringValue(valueOrErrorMessage(getString(this, D()), (("mandatory this." + D()) + " is not defined"))) | |
125 | 127 | ||
126 | 128 | ||
127 | - | let | |
129 | + | let ah = ag() | |
128 | 130 | ||
129 | - | let | |
131 | + | let ai = split(value(getString(ah, af())), a)[1] | |
130 | 132 | ||
131 | - | let | |
133 | + | let aj = fromBase58String(ai) | |
132 | 134 | ||
133 | - | func | |
135 | + | func ak () = split(o(af()), a) | |
134 | 136 | ||
135 | 137 | ||
136 | - | func | |
138 | + | func al (ai,am,an,z) = makeString(["%s%s%s%d", ai, am, an, toString(z)], a) | |
137 | 139 | ||
138 | 140 | ||
139 | - | func | |
140 | - | let | |
141 | - | valueOrErrorMessage(addressFromString( | |
141 | + | func ao () = { | |
142 | + | let ap = ak() | |
143 | + | valueOrErrorMessage(addressFromString(ap[ad]), "boosting contract address is not defined") | |
142 | 144 | } | |
143 | 145 | ||
144 | 146 | ||
145 | - | func | |
147 | + | func aq () = "%s%s__gwxRewardEmissionPart__startHeight" | |
146 | 148 | ||
147 | 149 | ||
148 | - | func | |
150 | + | func ar () = "%s__nextUserNum" | |
149 | 151 | ||
150 | 152 | ||
151 | - | func | |
153 | + | func as () = "%s%s__ratePerBlock__current" | |
152 | 154 | ||
153 | 155 | ||
154 | - | func | |
156 | + | func at () = "%s%s__gwxHoldersReward__current" | |
155 | 157 | ||
156 | 158 | ||
157 | - | func | |
159 | + | func au () = "%s%s__gwxHoldersReward__next" | |
158 | 160 | ||
159 | 161 | ||
160 | - | func | |
162 | + | func av () = "%s%s__poolWeight__GWXvirtualPOOL" | |
161 | 163 | ||
162 | 164 | ||
163 | - | func | |
165 | + | func aw (ax) = makeString(["%s%d", "userUnclaimed", toString(ax)], a) | |
164 | 166 | ||
165 | 167 | ||
166 | - | func | |
168 | + | func ay () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
167 | 169 | ||
168 | 170 | ||
169 | - | let | |
171 | + | let az = addressFromStringValue(o(ay())) | |
170 | 172 | ||
171 | - | func | |
173 | + | func aA (aB,aC) = makeString(["%s%s%s%s", "tradingReward", "history", aB, toBase58String(aC.transactionId)], a) | |
172 | 174 | ||
173 | 175 | ||
174 | - | func | |
176 | + | func aD (aE) = makeString(["%s%s", "tradingReward", aE], a) | |
175 | 177 | ||
176 | 178 | ||
177 | - | func | |
179 | + | func aF () = makeString(["%s", "maxRecipients"], a) | |
178 | 180 | ||
179 | 181 | ||
180 | - | func | |
181 | - | let | |
182 | - | let | |
183 | - | StringEntry( | |
182 | + | func aG (aH,aB,aI,aC) = { | |
183 | + | let aJ = makeString(["%s%s%s%s__history", aH, aB, toBase58String(aC.transactionId)], a) | |
184 | + | let aK = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aI)], a) | |
185 | + | StringEntry(aJ, aK) | |
184 | 186 | } | |
185 | 187 | ||
186 | 188 | ||
187 | - | func | |
189 | + | func aL () = "%s__managerPublicKey" | |
188 | 190 | ||
189 | 191 | ||
190 | - | func | |
192 | + | func aM () = "%s__managerVaultAddress" | |
191 | 193 | ||
192 | 194 | ||
193 | - | func | |
194 | - | let | |
195 | - | if ($isInstanceOf( | |
195 | + | func aN () = { | |
196 | + | let aO = getString(aM()) | |
197 | + | if ($isInstanceOf(aO, "String")) | |
196 | 198 | then { | |
197 | - | let | |
198 | - | addressFromStringValue( | |
199 | + | let aP = aO | |
200 | + | addressFromStringValue(aP) | |
199 | 201 | } | |
200 | 202 | else this | |
201 | 203 | } | |
202 | 204 | ||
203 | 205 | ||
204 | - | func | |
205 | - | let | |
206 | - | let | |
207 | - | if ($isInstanceOf( | |
206 | + | func aQ () = { | |
207 | + | let aR = aN() | |
208 | + | let aO = getString(aR, aL()) | |
209 | + | if ($isInstanceOf(aO, "String")) | |
208 | 210 | then { | |
209 | - | let | |
210 | - | fromBase58String( | |
211 | + | let aP = aO | |
212 | + | fromBase58String(aP) | |
211 | 213 | } | |
212 | - | else if ($isInstanceOf( | |
214 | + | else if ($isInstanceOf(aO, "Unit")) | |
213 | 215 | then unit | |
214 | 216 | else throw("Match error") | |
215 | 217 | } | |
216 | 218 | ||
217 | 219 | ||
218 | - | func | |
219 | - | let | |
220 | - | let | |
221 | - | if ($isInstanceOf( | |
220 | + | func aS (aC) = { | |
221 | + | let aT = throw("Permission denied") | |
222 | + | let aO = aQ() | |
223 | + | if ($isInstanceOf(aO, "ByteVector")) | |
222 | 224 | then { | |
223 | - | let | |
224 | - | if (( | |
225 | + | let aU = aO | |
226 | + | if ((aC.callerPublicKey == aU)) | |
225 | 227 | then true | |
226 | - | else | |
228 | + | else aT | |
227 | 229 | } | |
228 | - | else if ($isInstanceOf( | |
229 | - | then if (( | |
230 | + | else if ($isInstanceOf(aO, "Unit")) | |
231 | + | then if ((aC.caller == this)) | |
230 | 232 | then true | |
231 | - | else | |
233 | + | else aT | |
232 | 234 | else throw("Match error") | |
233 | 235 | } | |
234 | 236 | ||
235 | 237 | ||
236 | - | func | |
237 | - | let | |
238 | - | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String( | |
238 | + | func aV (an,aE) = { | |
239 | + | let l = makeString(["%s%s%s", "mapping", "user2num", aE], a) | |
240 | + | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), l), ((("User address " + aE) + " is not found in boosting contract data, key=") + l))) | |
239 | 241 | } | |
240 | 242 | ||
241 | 243 | ||
242 | - | func | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | if ($isInstanceOf( | |
244 | + | func aW (aE) = { | |
245 | + | let ap = ak() | |
246 | + | let aX = aV(ap[ad], aE) | |
247 | + | let aY = getInteger(aw(aX)) | |
248 | + | let aO = aY | |
249 | + | if ($isInstanceOf(aO, "Unit")) | |
248 | 250 | then $Tuple2(0, nil) | |
249 | - | else if ($isInstanceOf( | |
251 | + | else if ($isInstanceOf(aO, "Int")) | |
250 | 252 | then { | |
251 | - | let | |
252 | - | $Tuple2( | |
253 | + | let aZ = aO | |
254 | + | $Tuple2(aZ, [IntegerEntry(aw(aX), 0)]) | |
253 | 255 | } | |
254 | 256 | else throw("Match error") | |
255 | 257 | } | |
256 | 258 | ||
257 | 259 | ||
258 | - | func | |
260 | + | func ba (aE) = valueOrElse(getInteger(this, aD(aE)), 0) | |
259 | 261 | ||
260 | 262 | ||
261 | - | func | |
263 | + | func bb () = makeString(["%s", "rewardPerGwxIntegral"], a) | |
262 | 264 | ||
263 | 265 | ||
264 | - | func | |
265 | - | let | |
266 | - | let | |
267 | - | if ($isInstanceOf( | |
266 | + | func bc () = { | |
267 | + | let bd = valueOrElse({ | |
268 | + | let aO = getString(this, bb()) | |
269 | + | if ($isInstanceOf(aO, "String")) | |
268 | 270 | then { | |
269 | - | let | |
270 | - | parseBigInt( | |
271 | + | let aP = aO | |
272 | + | parseBigInt(aP) | |
271 | 273 | } | |
272 | - | else if ($isInstanceOf( | |
274 | + | else if ($isInstanceOf(aO, "Unit")) | |
273 | 275 | then unit | |
274 | 276 | else throw("Match error") | |
275 | - | }, | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | if ($isInstanceOf( | |
282 | - | then | |
283 | - | else throw(($getType( | |
277 | + | }, e) | |
278 | + | let be = valueOrErrorMessage(getInteger(this, aq()), r(("invalid " + aq()))) | |
279 | + | let bf = valueOrErrorMessage(getInteger(aa, as()), r(("invalid " + as()))) | |
280 | + | let bg = valueOrElse(getInteger(aa, at()), 0) | |
281 | + | let bh = { | |
282 | + | let bi = invoke(ao(), "getGwxTotalREADONLY", nil, nil) | |
283 | + | if ($isInstanceOf(bi, "Int")) | |
284 | + | then bi | |
285 | + | else throw(($getType(bi) + " couldn't be cast to Int")) | |
284 | 286 | } | |
285 | - | let | |
286 | - | let | |
287 | - | $Tuple2([IntegerEntry( | |
287 | + | let bj = toBigInt((height - be)) | |
288 | + | let bk = (bd + fraction(bj, ((toBigInt(bf) * toBigInt(bg)) * i), (toBigInt(bh) * d))) | |
289 | + | $Tuple2([IntegerEntry(aq(), height), StringEntry(bb(), toString(bk))], bk) | |
288 | 290 | } | |
289 | 291 | ||
290 | 292 | ||
291 | - | func | |
293 | + | func bl (aE) = makeString(["%s%s", "rewardPerGwxIntegralUserLast", toString(aE)], a) | |
292 | 294 | ||
293 | 295 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | if ($isInstanceOf( | |
296 | + | func bm (aE) = { | |
297 | + | let bn = valueOrElse({ | |
298 | + | let aO = getString(this, bl(aE)) | |
299 | + | if ($isInstanceOf(aO, "String")) | |
298 | 300 | then { | |
299 | - | let | |
300 | - | parseBigInt( | |
301 | + | let aP = aO | |
302 | + | parseBigInt(aP) | |
301 | 303 | } | |
302 | - | else if ($isInstanceOf( | |
304 | + | else if ($isInstanceOf(aO, "Unit")) | |
303 | 305 | then unit | |
304 | 306 | else throw("Match error") | |
305 | - | }, | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | if ($isInstanceOf( | |
314 | - | then | |
315 | - | else throw(($getType( | |
307 | + | }, e) | |
308 | + | let bo = aV(toString(ao()), toString(aE)) | |
309 | + | let bp = valueOrElse(getInteger(aw(bo)), 0) | |
310 | + | let bq = bc() | |
311 | + | let br = bq._1 | |
312 | + | let bk = bq._2 | |
313 | + | let bs = { | |
314 | + | let bi = invoke(ao(), "getUserGwxAmount", [toString(aE)], nil) | |
315 | + | if ($isInstanceOf(bi, "Int")) | |
316 | + | then bi | |
317 | + | else throw(($getType(bi) + " couldn't be cast to Int")) | |
316 | 318 | } | |
317 | - | let | |
318 | - | $Tuple2(([StringEntry( | |
319 | + | let bt = (toInt(fraction(toBigInt(bs), (bk - bn), i)) + bp) | |
320 | + | $Tuple2(([StringEntry(bl(aE), toString(bk))] ++ br), bt) | |
319 | 321 | } | |
320 | 322 | ||
321 | 323 | ||
322 | - | @Callable( | |
323 | - | func refreshUserReward ( | |
324 | - | let | |
324 | + | @Callable(aC) | |
325 | + | func refreshUserReward (bu) = { | |
326 | + | let bv = if ((aC.caller == ao())) | |
325 | 327 | then true | |
326 | - | else | |
327 | - | if (( | |
328 | - | then | |
328 | + | else t("permission denied") | |
329 | + | if ((bv == bv)) | |
330 | + | then bm(Address(bu)) | |
329 | 331 | else throw("Strict value is not equal to itself.") | |
330 | 332 | } | |
331 | 333 | ||
332 | 334 | ||
333 | 335 | ||
334 | - | @Callable( | |
335 | - | func tradeRewardInternal ( | |
336 | + | @Callable(aC) | |
337 | + | func tradeRewardInternal (bw,bx,by,bz) = if ((bz == size(bx))) | |
336 | 338 | then nil | |
337 | 339 | else { | |
338 | - | let | |
340 | + | let bA = [if ((aC.caller == this)) | |
339 | 341 | then true | |
340 | - | else | |
342 | + | else t("Permission denied"), if ((bw >= by[bz])) | |
341 | 343 | then true | |
342 | - | else | |
343 | - | if (( | |
344 | + | else t("insufficient payment assetId")] | |
345 | + | if ((bA == bA)) | |
344 | 346 | then { | |
345 | - | let | |
346 | - | if (( | |
347 | + | let bB = invoke(this, "tradeRewardInternal", [(bw - by[bz]), bx, by, (bz + 1)], nil) | |
348 | + | if ((bB == bB)) | |
347 | 349 | then { | |
348 | - | let | |
349 | - | let | |
350 | - | $Tuple2([IntegerEntry( | |
350 | + | let bC = aA(bx[bz], aC) | |
351 | + | let aE = addressFromStringValue(bx[bz]) | |
352 | + | $Tuple2([IntegerEntry(bC, by[bz]), IntegerEntry(aD(bx[bz]), by[bz])], bB) | |
351 | 353 | } | |
352 | 354 | else throw("Strict value is not equal to itself.") | |
353 | 355 | } | |
356 | 358 | ||
357 | 359 | ||
358 | 360 | ||
359 | - | @Callable( | |
360 | - | func updateReferralActivity ( | |
361 | - | let | |
362 | - | let | |
361 | + | @Callable(aC) | |
362 | + | func updateReferralActivity (aE,bD) = { | |
363 | + | let bE = getString(az, U(aE)) | |
364 | + | let bF = if ((bE == unit)) | |
363 | 365 | then unit | |
364 | - | else invoke( | |
365 | - | if (( | |
366 | + | else invoke(az, "updateReferralActivity", [K, aE, (bD >= N)], nil) | |
367 | + | if ((bF == bF)) | |
366 | 368 | then $Tuple2(nil, unit) | |
367 | 369 | else throw("Strict value is not equal to itself.") | |
368 | 370 | } | |
369 | 371 | ||
370 | 372 | ||
371 | 373 | ||
372 | - | @Callable( | |
373 | - | func processPendingPeriodsAndUsers () = $Tuple2(nil, | |
374 | + | @Callable(aC) | |
375 | + | func processPendingPeriodsAndUsers () = $Tuple2(nil, t("deprecated")) | |
374 | 376 | ||
375 | 377 | ||
376 | 378 | ||
377 | - | @Callable( | |
379 | + | @Callable(aC) | |
378 | 380 | func claimReward () = { | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
381 | + | let ap = ak() | |
382 | + | let aE = aC.caller | |
383 | + | let bG = toString(aE) | |
384 | + | let bH = aW(bG) | |
385 | + | let aI = bH._1 | |
386 | + | let bI = bH._2 | |
387 | + | let bJ = if ((aI > 0)) | |
386 | 388 | then true | |
387 | 389 | else throw("nothing to claim") | |
388 | - | if (( | |
390 | + | if ((bJ == bJ)) | |
389 | 391 | then { | |
390 | - | let | |
391 | - | let | |
392 | - | if ($isInstanceOf( | |
393 | - | then | |
394 | - | else throw(($getType( | |
392 | + | let bs = { | |
393 | + | let bi = invoke(ao(), "getUserGwxAmount", [bG], nil) | |
394 | + | if ($isInstanceOf(bi, "Int")) | |
395 | + | then bi | |
396 | + | else throw(($getType(bi) + " couldn't be cast to Int")) | |
395 | 397 | } | |
396 | - | let | |
397 | - | let | |
398 | + | let bE = getString(az, U(bG)) | |
399 | + | let bF = if ((bE == unit)) | |
398 | 400 | then unit | |
399 | - | else invoke( | |
400 | - | if (( | |
401 | + | else invoke(az, "updateReferralActivity", [K, aE, (bs >= N)], nil) | |
402 | + | if ((bF == bF)) | |
401 | 403 | then { | |
402 | - | let | |
404 | + | let bK = if (if ((bE == unit)) | |
403 | 405 | then true | |
404 | - | else ( | |
406 | + | else (N > bs)) | |
405 | 407 | then unit | |
406 | 408 | else { | |
407 | - | let | |
408 | - | let | |
409 | - | invoke( | |
409 | + | let bL = fraction(aI, Q, b) | |
410 | + | let bM = fraction(aI, T, b) | |
411 | + | invoke(az, "incUnclaimed", [K, aE, bL, bM], nil) | |
410 | 412 | } | |
411 | - | if (( | |
413 | + | if ((bK == bK)) | |
412 | 414 | then { | |
413 | - | let | |
414 | - | let | |
415 | - | if ($isInstanceOf( | |
416 | - | then | |
417 | - | else throw(($getType( | |
415 | + | let bN = { | |
416 | + | let bi = invoke(az, "claim", [K], nil) | |
417 | + | if ($isInstanceOf(bi, "Int")) | |
418 | + | then bi | |
419 | + | else throw(($getType(bi) + " couldn't be cast to Int")) | |
418 | 420 | } | |
419 | - | if (( | |
421 | + | if ((bN == bN)) | |
420 | 422 | then { | |
421 | - | let | |
422 | - | $Tuple2(([ScriptTransfer( | |
423 | + | let bO = (aI + bN) | |
424 | + | $Tuple2(([ScriptTransfer(aC.caller, aI, fromBase58String(ap[ab])), aG("claim", bG, bO, aC)] ++ bI), bO) | |
423 | 425 | } | |
424 | 426 | else throw("Strict value is not equal to itself.") | |
425 | 427 | } | |
432 | 434 | ||
433 | 435 | ||
434 | 436 | ||
435 | - | @Callable( | |
436 | - | func claimRewardREADONLY ( | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | let | |
442 | - | $Tuple2(nil, | |
437 | + | @Callable(aC) | |
438 | + | func claimRewardREADONLY (bP) = { | |
439 | + | let bQ = aW(bP) | |
440 | + | let aI = bQ._1 | |
441 | + | let bI = bQ._2 | |
442 | + | let bR = valueOrElse(getInteger(az, W(K, bP)), 0) | |
443 | + | let bO = (aI + bR) | |
444 | + | $Tuple2(nil, bO) | |
443 | 445 | } | |
444 | 446 | ||
445 | 447 | ||
446 | 448 | ||
447 | - | @Callable( | |
448 | - | func onEmissionForGwxStart () = if (( | |
449 | + | @Callable(aC) | |
450 | + | func onEmissionForGwxStart () = if ((aC.caller != C)) | |
449 | 451 | then throw("permissions denied") | |
450 | - | else [IntegerEntry( | |
452 | + | else [IntegerEntry(aq(), height)] | |
451 | 453 | ||
452 | 454 | ||
453 | 455 | ||
454 | - | @Callable( | |
455 | - | func tradeReward ( | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
456 | + | @Callable(aC) | |
457 | + | func tradeReward (bx,by) = { | |
458 | + | let bS = (size(bx) == size(by)) | |
459 | + | let bT = valueOrElse(getInteger(aF()), 0) | |
460 | + | let bU = aC.payments[0] | |
461 | + | let bV = bU.assetId | |
462 | + | let bW = bU.amount | |
463 | + | let bA = [if ((bT >= size(bx))) | |
462 | 464 | then true | |
463 | - | else | |
465 | + | else t("Too many recipients"), if (bS) | |
464 | 466 | then true | |
465 | - | else | |
467 | + | else t("Arguments size mismatch"), if ((bV == aj)) | |
466 | 468 | then true | |
467 | - | else | |
468 | - | if (( | |
469 | + | else t("Wrong asset payment")] | |
470 | + | if ((bA == bA)) | |
469 | 471 | then { | |
470 | - | let | |
471 | - | if (( | |
472 | - | then $Tuple2(nil, | |
472 | + | let bB = invoke(this, "tradeRewardInternal", [bW, bx, by, 0], nil) | |
473 | + | if ((bB == bB)) | |
474 | + | then $Tuple2(nil, bB) | |
473 | 475 | else throw("Strict value is not equal to itself.") | |
474 | 476 | } | |
475 | 477 | else throw("Strict value is not equal to itself.") | |
477 | 479 | ||
478 | 480 | ||
479 | 481 | ||
480 | - | @Callable( | |
482 | + | @Callable(aC) | |
481 | 483 | func claimTradingReward () = { | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | if (( | |
486 | - | then $Tuple2([ScriptTransfer( | |
487 | - | else | |
484 | + | let aE = aC.caller | |
485 | + | let bX = toString(aE) | |
486 | + | let bY = ba(bX) | |
487 | + | if ((bY > 0)) | |
488 | + | then $Tuple2([ScriptTransfer(aE, bY, aj), IntegerEntry(aD(bX), 0)], bY) | |
489 | + | else t("nothing to claim") | |
488 | 490 | } | |
489 | 491 | ||
490 | 492 | ||
491 | 493 | ||
492 | - | @Callable( | |
493 | - | func claimTradingRewardREADONLY ( | |
494 | + | @Callable(aC) | |
495 | + | func claimTradingRewardREADONLY (aE) = $Tuple2(nil, ba(aE)) | |
494 | 496 | ||
495 | 497 | ||
496 | - | @Verifier( | |
497 | - | func | |
498 | - | let | |
499 | - | let | |
500 | - | if ($isInstanceOf( | |
498 | + | @Verifier(bZ) | |
499 | + | func ca () = { | |
500 | + | let cb = { | |
501 | + | let aO = aQ() | |
502 | + | if ($isInstanceOf(aO, "ByteVector")) | |
501 | 503 | then { | |
502 | - | let | |
503 | - | | |
504 | + | let aU = aO | |
505 | + | aU | |
504 | 506 | } | |
505 | - | else if ($isInstanceOf( | |
506 | - | then | |
507 | + | else if ($isInstanceOf(aO, "Unit")) | |
508 | + | then bZ.senderPublicKey | |
507 | 509 | else throw("Match error") | |
508 | 510 | } | |
509 | - | sigVerify( | |
511 | + | sigVerify(bZ.bodyBytes, bZ.proofs[0], cb) | |
510 | 512 | } | |
511 | 513 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = 1000 | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | - | let d = toBigInt( | |
10 | + | let d = toBigInt(c) | |
11 | 11 | ||
12 | - | let e = 0 | |
12 | + | let e = toBigInt(0) | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = 0 | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = 1 | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 1000000000000000000 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = toBigInt(h) | |
21 | 21 | ||
22 | - | func j (k) = valueOrElse(getInteger(this, k), 0) | |
22 | + | let j = "WAVES" | |
23 | + | ||
24 | + | func k (l) = valueOrElse(getInteger(this, l), 0) | |
23 | 25 | ||
24 | 26 | ||
25 | - | func | |
27 | + | func m (l) = valueOrErrorMessage(getInteger(this, l), (("mandatory this." + l) + " is not defined")) | |
26 | 28 | ||
27 | 29 | ||
28 | - | func | |
30 | + | func n (l) = valueOrElse(getString(this, l), "") | |
29 | 31 | ||
30 | 32 | ||
31 | - | func | |
33 | + | func o (l) = valueOrErrorMessage(getString(this, l), (("mandatory this." + l) + " is not defined")) | |
32 | 34 | ||
33 | 35 | ||
34 | - | func | |
36 | + | func p (q) = if ((q == j)) | |
35 | 37 | then unit | |
36 | - | else fromBase58String( | |
38 | + | else fromBase58String(q) | |
37 | 39 | ||
38 | 40 | ||
39 | - | func | |
41 | + | func r (s) = makeString(["gwx_reward.ride:", s], " ") | |
40 | 42 | ||
41 | 43 | ||
42 | - | func | |
44 | + | func t (s) = throw(r(s)) | |
43 | 45 | ||
44 | 46 | ||
45 | - | func | |
46 | - | then -( | |
47 | - | else | |
47 | + | func u (v) = if ((0 > v)) | |
48 | + | then -(v) | |
49 | + | else v | |
48 | 50 | ||
49 | 51 | ||
50 | - | func | |
51 | - | then -( | |
52 | - | else | |
52 | + | func w (v) = if ((e > v)) | |
53 | + | then -(v) | |
54 | + | else v | |
53 | 55 | ||
54 | 56 | ||
55 | - | let | |
57 | + | let x = "%s__maxDepth" | |
56 | 58 | ||
57 | - | let | |
59 | + | let y = 30 | |
58 | 60 | ||
59 | - | let | |
61 | + | let z = valueOrElse(getInteger(this, x), y) | |
60 | 62 | ||
61 | - | func | |
63 | + | func A () = "%s%s__config__factoryAddress" | |
62 | 64 | ||
63 | 65 | ||
64 | - | let | |
66 | + | let B = o(A()) | |
65 | 67 | ||
66 | - | let | |
68 | + | let C = addressFromStringValue(B) | |
67 | 69 | ||
68 | - | func | |
70 | + | func D () = "%s%s__config__emissionAddress" | |
69 | 71 | ||
70 | 72 | ||
71 | - | func | |
73 | + | func E () = makeString(["%s", "votingEmissionContract"], a) | |
72 | 74 | ||
73 | 75 | ||
74 | - | let | |
76 | + | let F = addressFromStringValue(getStringValue(C, E())) | |
75 | 77 | ||
76 | - | func | |
78 | + | func G (H) = makeString(["%s%s%s", "mapping", "num2user", toString(H)], a) | |
77 | 79 | ||
78 | 80 | ||
79 | - | let | |
81 | + | let I = makeString(["%s%s", "referral", "programName"], a) | |
80 | 82 | ||
81 | - | let | |
83 | + | let J = "wxlock" | |
82 | 84 | ||
83 | - | let | |
85 | + | let K = valueOrElse(getString(this, I), J) | |
84 | 86 | ||
85 | - | let | |
87 | + | let L = makeString(["%s%s", "referral", "minGWxAmount"], a) | |
86 | 88 | ||
87 | - | let | |
89 | + | let M = (500 * c) | |
88 | 90 | ||
89 | - | let | |
91 | + | let N = valueOrElse(getInteger(this, L), M) | |
90 | 92 | ||
91 | - | let | |
93 | + | let O = makeString(["%s%s", "referral", "referrerRewardPermille"], a) | |
92 | 94 | ||
93 | - | let | |
95 | + | let P = 50 | |
94 | 96 | ||
95 | - | let | |
97 | + | let Q = valueOrElse(getInteger(this, O), P) | |
96 | 98 | ||
97 | - | let | |
99 | + | let R = makeString(["%s%s", "referral", "referralRewardPermille"], a) | |
98 | 100 | ||
99 | - | let | |
101 | + | let S = 50 | |
100 | 102 | ||
101 | - | let | |
103 | + | let T = valueOrElse(getInteger(this, R), S) | |
102 | 104 | ||
103 | - | func | |
105 | + | func U (V) = makeString(["%s%s%s", "referrer", K, V], a) | |
104 | 106 | ||
105 | 107 | ||
106 | - | func | |
108 | + | func W (X,Y) = makeString(["%s%s%s", "unclaimedReferral", X, Y], a) | |
107 | 109 | ||
108 | 110 | ||
109 | - | let | |
111 | + | let Z = o(D()) | |
110 | 112 | ||
111 | - | let | |
113 | + | let aa = addressFromStringValue(Z) | |
112 | 114 | ||
113 | - | let | |
115 | + | let ab = 1 | |
114 | 116 | ||
115 | - | let | |
117 | + | let ac = 2 | |
116 | 118 | ||
117 | - | let | |
119 | + | let ad = 3 | |
118 | 120 | ||
119 | - | let | |
121 | + | let ae = 4 | |
120 | 122 | ||
121 | - | func | |
123 | + | func af () = "%s__config" | |
122 | 124 | ||
123 | 125 | ||
124 | - | func | |
126 | + | func ag () = addressFromStringValue(valueOrErrorMessage(getString(this, D()), (("mandatory this." + D()) + " is not defined"))) | |
125 | 127 | ||
126 | 128 | ||
127 | - | let | |
129 | + | let ah = ag() | |
128 | 130 | ||
129 | - | let | |
131 | + | let ai = split(value(getString(ah, af())), a)[1] | |
130 | 132 | ||
131 | - | let | |
133 | + | let aj = fromBase58String(ai) | |
132 | 134 | ||
133 | - | func | |
135 | + | func ak () = split(o(af()), a) | |
134 | 136 | ||
135 | 137 | ||
136 | - | func | |
138 | + | func al (ai,am,an,z) = makeString(["%s%s%s%d", ai, am, an, toString(z)], a) | |
137 | 139 | ||
138 | 140 | ||
139 | - | func | |
140 | - | let | |
141 | - | valueOrErrorMessage(addressFromString( | |
141 | + | func ao () = { | |
142 | + | let ap = ak() | |
143 | + | valueOrErrorMessage(addressFromString(ap[ad]), "boosting contract address is not defined") | |
142 | 144 | } | |
143 | 145 | ||
144 | 146 | ||
145 | - | func | |
147 | + | func aq () = "%s%s__gwxRewardEmissionPart__startHeight" | |
146 | 148 | ||
147 | 149 | ||
148 | - | func | |
150 | + | func ar () = "%s__nextUserNum" | |
149 | 151 | ||
150 | 152 | ||
151 | - | func | |
153 | + | func as () = "%s%s__ratePerBlock__current" | |
152 | 154 | ||
153 | 155 | ||
154 | - | func | |
156 | + | func at () = "%s%s__gwxHoldersReward__current" | |
155 | 157 | ||
156 | 158 | ||
157 | - | func | |
159 | + | func au () = "%s%s__gwxHoldersReward__next" | |
158 | 160 | ||
159 | 161 | ||
160 | - | func | |
162 | + | func av () = "%s%s__poolWeight__GWXvirtualPOOL" | |
161 | 163 | ||
162 | 164 | ||
163 | - | func | |
165 | + | func aw (ax) = makeString(["%s%d", "userUnclaimed", toString(ax)], a) | |
164 | 166 | ||
165 | 167 | ||
166 | - | func | |
168 | + | func ay () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
167 | 169 | ||
168 | 170 | ||
169 | - | let | |
171 | + | let az = addressFromStringValue(o(ay())) | |
170 | 172 | ||
171 | - | func | |
173 | + | func aA (aB,aC) = makeString(["%s%s%s%s", "tradingReward", "history", aB, toBase58String(aC.transactionId)], a) | |
172 | 174 | ||
173 | 175 | ||
174 | - | func | |
176 | + | func aD (aE) = makeString(["%s%s", "tradingReward", aE], a) | |
175 | 177 | ||
176 | 178 | ||
177 | - | func | |
179 | + | func aF () = makeString(["%s", "maxRecipients"], a) | |
178 | 180 | ||
179 | 181 | ||
180 | - | func | |
181 | - | let | |
182 | - | let | |
183 | - | StringEntry( | |
182 | + | func aG (aH,aB,aI,aC) = { | |
183 | + | let aJ = makeString(["%s%s%s%s__history", aH, aB, toBase58String(aC.transactionId)], a) | |
184 | + | let aK = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aI)], a) | |
185 | + | StringEntry(aJ, aK) | |
184 | 186 | } | |
185 | 187 | ||
186 | 188 | ||
187 | - | func | |
189 | + | func aL () = "%s__managerPublicKey" | |
188 | 190 | ||
189 | 191 | ||
190 | - | func | |
192 | + | func aM () = "%s__managerVaultAddress" | |
191 | 193 | ||
192 | 194 | ||
193 | - | func | |
194 | - | let | |
195 | - | if ($isInstanceOf( | |
195 | + | func aN () = { | |
196 | + | let aO = getString(aM()) | |
197 | + | if ($isInstanceOf(aO, "String")) | |
196 | 198 | then { | |
197 | - | let | |
198 | - | addressFromStringValue( | |
199 | + | let aP = aO | |
200 | + | addressFromStringValue(aP) | |
199 | 201 | } | |
200 | 202 | else this | |
201 | 203 | } | |
202 | 204 | ||
203 | 205 | ||
204 | - | func | |
205 | - | let | |
206 | - | let | |
207 | - | if ($isInstanceOf( | |
206 | + | func aQ () = { | |
207 | + | let aR = aN() | |
208 | + | let aO = getString(aR, aL()) | |
209 | + | if ($isInstanceOf(aO, "String")) | |
208 | 210 | then { | |
209 | - | let | |
210 | - | fromBase58String( | |
211 | + | let aP = aO | |
212 | + | fromBase58String(aP) | |
211 | 213 | } | |
212 | - | else if ($isInstanceOf( | |
214 | + | else if ($isInstanceOf(aO, "Unit")) | |
213 | 215 | then unit | |
214 | 216 | else throw("Match error") | |
215 | 217 | } | |
216 | 218 | ||
217 | 219 | ||
218 | - | func | |
219 | - | let | |
220 | - | let | |
221 | - | if ($isInstanceOf( | |
220 | + | func aS (aC) = { | |
221 | + | let aT = throw("Permission denied") | |
222 | + | let aO = aQ() | |
223 | + | if ($isInstanceOf(aO, "ByteVector")) | |
222 | 224 | then { | |
223 | - | let | |
224 | - | if (( | |
225 | + | let aU = aO | |
226 | + | if ((aC.callerPublicKey == aU)) | |
225 | 227 | then true | |
226 | - | else | |
228 | + | else aT | |
227 | 229 | } | |
228 | - | else if ($isInstanceOf( | |
229 | - | then if (( | |
230 | + | else if ($isInstanceOf(aO, "Unit")) | |
231 | + | then if ((aC.caller == this)) | |
230 | 232 | then true | |
231 | - | else | |
233 | + | else aT | |
232 | 234 | else throw("Match error") | |
233 | 235 | } | |
234 | 236 | ||
235 | 237 | ||
236 | - | func | |
237 | - | let | |
238 | - | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String( | |
238 | + | func aV (an,aE) = { | |
239 | + | let l = makeString(["%s%s%s", "mapping", "user2num", aE], a) | |
240 | + | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), l), ((("User address " + aE) + " is not found in boosting contract data, key=") + l))) | |
239 | 241 | } | |
240 | 242 | ||
241 | 243 | ||
242 | - | func | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | if ($isInstanceOf( | |
244 | + | func aW (aE) = { | |
245 | + | let ap = ak() | |
246 | + | let aX = aV(ap[ad], aE) | |
247 | + | let aY = getInteger(aw(aX)) | |
248 | + | let aO = aY | |
249 | + | if ($isInstanceOf(aO, "Unit")) | |
248 | 250 | then $Tuple2(0, nil) | |
249 | - | else if ($isInstanceOf( | |
251 | + | else if ($isInstanceOf(aO, "Int")) | |
250 | 252 | then { | |
251 | - | let | |
252 | - | $Tuple2( | |
253 | + | let aZ = aO | |
254 | + | $Tuple2(aZ, [IntegerEntry(aw(aX), 0)]) | |
253 | 255 | } | |
254 | 256 | else throw("Match error") | |
255 | 257 | } | |
256 | 258 | ||
257 | 259 | ||
258 | - | func | |
260 | + | func ba (aE) = valueOrElse(getInteger(this, aD(aE)), 0) | |
259 | 261 | ||
260 | 262 | ||
261 | - | func | |
263 | + | func bb () = makeString(["%s", "rewardPerGwxIntegral"], a) | |
262 | 264 | ||
263 | 265 | ||
264 | - | func | |
265 | - | let | |
266 | - | let | |
267 | - | if ($isInstanceOf( | |
266 | + | func bc () = { | |
267 | + | let bd = valueOrElse({ | |
268 | + | let aO = getString(this, bb()) | |
269 | + | if ($isInstanceOf(aO, "String")) | |
268 | 270 | then { | |
269 | - | let | |
270 | - | parseBigInt( | |
271 | + | let aP = aO | |
272 | + | parseBigInt(aP) | |
271 | 273 | } | |
272 | - | else if ($isInstanceOf( | |
274 | + | else if ($isInstanceOf(aO, "Unit")) | |
273 | 275 | then unit | |
274 | 276 | else throw("Match error") | |
275 | - | }, | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | if ($isInstanceOf( | |
282 | - | then | |
283 | - | else throw(($getType( | |
277 | + | }, e) | |
278 | + | let be = valueOrErrorMessage(getInteger(this, aq()), r(("invalid " + aq()))) | |
279 | + | let bf = valueOrErrorMessage(getInteger(aa, as()), r(("invalid " + as()))) | |
280 | + | let bg = valueOrElse(getInteger(aa, at()), 0) | |
281 | + | let bh = { | |
282 | + | let bi = invoke(ao(), "getGwxTotalREADONLY", nil, nil) | |
283 | + | if ($isInstanceOf(bi, "Int")) | |
284 | + | then bi | |
285 | + | else throw(($getType(bi) + " couldn't be cast to Int")) | |
284 | 286 | } | |
285 | - | let | |
286 | - | let | |
287 | - | $Tuple2([IntegerEntry( | |
287 | + | let bj = toBigInt((height - be)) | |
288 | + | let bk = (bd + fraction(bj, ((toBigInt(bf) * toBigInt(bg)) * i), (toBigInt(bh) * d))) | |
289 | + | $Tuple2([IntegerEntry(aq(), height), StringEntry(bb(), toString(bk))], bk) | |
288 | 290 | } | |
289 | 291 | ||
290 | 292 | ||
291 | - | func | |
293 | + | func bl (aE) = makeString(["%s%s", "rewardPerGwxIntegralUserLast", toString(aE)], a) | |
292 | 294 | ||
293 | 295 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | if ($isInstanceOf( | |
296 | + | func bm (aE) = { | |
297 | + | let bn = valueOrElse({ | |
298 | + | let aO = getString(this, bl(aE)) | |
299 | + | if ($isInstanceOf(aO, "String")) | |
298 | 300 | then { | |
299 | - | let | |
300 | - | parseBigInt( | |
301 | + | let aP = aO | |
302 | + | parseBigInt(aP) | |
301 | 303 | } | |
302 | - | else if ($isInstanceOf( | |
304 | + | else if ($isInstanceOf(aO, "Unit")) | |
303 | 305 | then unit | |
304 | 306 | else throw("Match error") | |
305 | - | }, | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | if ($isInstanceOf( | |
314 | - | then | |
315 | - | else throw(($getType( | |
307 | + | }, e) | |
308 | + | let bo = aV(toString(ao()), toString(aE)) | |
309 | + | let bp = valueOrElse(getInteger(aw(bo)), 0) | |
310 | + | let bq = bc() | |
311 | + | let br = bq._1 | |
312 | + | let bk = bq._2 | |
313 | + | let bs = { | |
314 | + | let bi = invoke(ao(), "getUserGwxAmount", [toString(aE)], nil) | |
315 | + | if ($isInstanceOf(bi, "Int")) | |
316 | + | then bi | |
317 | + | else throw(($getType(bi) + " couldn't be cast to Int")) | |
316 | 318 | } | |
317 | - | let | |
318 | - | $Tuple2(([StringEntry( | |
319 | + | let bt = (toInt(fraction(toBigInt(bs), (bk - bn), i)) + bp) | |
320 | + | $Tuple2(([StringEntry(bl(aE), toString(bk))] ++ br), bt) | |
319 | 321 | } | |
320 | 322 | ||
321 | 323 | ||
322 | - | @Callable( | |
323 | - | func refreshUserReward ( | |
324 | - | let | |
324 | + | @Callable(aC) | |
325 | + | func refreshUserReward (bu) = { | |
326 | + | let bv = if ((aC.caller == ao())) | |
325 | 327 | then true | |
326 | - | else | |
327 | - | if (( | |
328 | - | then | |
328 | + | else t("permission denied") | |
329 | + | if ((bv == bv)) | |
330 | + | then bm(Address(bu)) | |
329 | 331 | else throw("Strict value is not equal to itself.") | |
330 | 332 | } | |
331 | 333 | ||
332 | 334 | ||
333 | 335 | ||
334 | - | @Callable( | |
335 | - | func tradeRewardInternal ( | |
336 | + | @Callable(aC) | |
337 | + | func tradeRewardInternal (bw,bx,by,bz) = if ((bz == size(bx))) | |
336 | 338 | then nil | |
337 | 339 | else { | |
338 | - | let | |
340 | + | let bA = [if ((aC.caller == this)) | |
339 | 341 | then true | |
340 | - | else | |
342 | + | else t("Permission denied"), if ((bw >= by[bz])) | |
341 | 343 | then true | |
342 | - | else | |
343 | - | if (( | |
344 | + | else t("insufficient payment assetId")] | |
345 | + | if ((bA == bA)) | |
344 | 346 | then { | |
345 | - | let | |
346 | - | if (( | |
347 | + | let bB = invoke(this, "tradeRewardInternal", [(bw - by[bz]), bx, by, (bz + 1)], nil) | |
348 | + | if ((bB == bB)) | |
347 | 349 | then { | |
348 | - | let | |
349 | - | let | |
350 | - | $Tuple2([IntegerEntry( | |
350 | + | let bC = aA(bx[bz], aC) | |
351 | + | let aE = addressFromStringValue(bx[bz]) | |
352 | + | $Tuple2([IntegerEntry(bC, by[bz]), IntegerEntry(aD(bx[bz]), by[bz])], bB) | |
351 | 353 | } | |
352 | 354 | else throw("Strict value is not equal to itself.") | |
353 | 355 | } | |
354 | 356 | else throw("Strict value is not equal to itself.") | |
355 | 357 | } | |
356 | 358 | ||
357 | 359 | ||
358 | 360 | ||
359 | - | @Callable( | |
360 | - | func updateReferralActivity ( | |
361 | - | let | |
362 | - | let | |
361 | + | @Callable(aC) | |
362 | + | func updateReferralActivity (aE,bD) = { | |
363 | + | let bE = getString(az, U(aE)) | |
364 | + | let bF = if ((bE == unit)) | |
363 | 365 | then unit | |
364 | - | else invoke( | |
365 | - | if (( | |
366 | + | else invoke(az, "updateReferralActivity", [K, aE, (bD >= N)], nil) | |
367 | + | if ((bF == bF)) | |
366 | 368 | then $Tuple2(nil, unit) | |
367 | 369 | else throw("Strict value is not equal to itself.") | |
368 | 370 | } | |
369 | 371 | ||
370 | 372 | ||
371 | 373 | ||
372 | - | @Callable( | |
373 | - | func processPendingPeriodsAndUsers () = $Tuple2(nil, | |
374 | + | @Callable(aC) | |
375 | + | func processPendingPeriodsAndUsers () = $Tuple2(nil, t("deprecated")) | |
374 | 376 | ||
375 | 377 | ||
376 | 378 | ||
377 | - | @Callable( | |
379 | + | @Callable(aC) | |
378 | 380 | func claimReward () = { | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
381 | + | let ap = ak() | |
382 | + | let aE = aC.caller | |
383 | + | let bG = toString(aE) | |
384 | + | let bH = aW(bG) | |
385 | + | let aI = bH._1 | |
386 | + | let bI = bH._2 | |
387 | + | let bJ = if ((aI > 0)) | |
386 | 388 | then true | |
387 | 389 | else throw("nothing to claim") | |
388 | - | if (( | |
390 | + | if ((bJ == bJ)) | |
389 | 391 | then { | |
390 | - | let | |
391 | - | let | |
392 | - | if ($isInstanceOf( | |
393 | - | then | |
394 | - | else throw(($getType( | |
392 | + | let bs = { | |
393 | + | let bi = invoke(ao(), "getUserGwxAmount", [bG], nil) | |
394 | + | if ($isInstanceOf(bi, "Int")) | |
395 | + | then bi | |
396 | + | else throw(($getType(bi) + " couldn't be cast to Int")) | |
395 | 397 | } | |
396 | - | let | |
397 | - | let | |
398 | + | let bE = getString(az, U(bG)) | |
399 | + | let bF = if ((bE == unit)) | |
398 | 400 | then unit | |
399 | - | else invoke( | |
400 | - | if (( | |
401 | + | else invoke(az, "updateReferralActivity", [K, aE, (bs >= N)], nil) | |
402 | + | if ((bF == bF)) | |
401 | 403 | then { | |
402 | - | let | |
404 | + | let bK = if (if ((bE == unit)) | |
403 | 405 | then true | |
404 | - | else ( | |
406 | + | else (N > bs)) | |
405 | 407 | then unit | |
406 | 408 | else { | |
407 | - | let | |
408 | - | let | |
409 | - | invoke( | |
409 | + | let bL = fraction(aI, Q, b) | |
410 | + | let bM = fraction(aI, T, b) | |
411 | + | invoke(az, "incUnclaimed", [K, aE, bL, bM], nil) | |
410 | 412 | } | |
411 | - | if (( | |
413 | + | if ((bK == bK)) | |
412 | 414 | then { | |
413 | - | let | |
414 | - | let | |
415 | - | if ($isInstanceOf( | |
416 | - | then | |
417 | - | else throw(($getType( | |
415 | + | let bN = { | |
416 | + | let bi = invoke(az, "claim", [K], nil) | |
417 | + | if ($isInstanceOf(bi, "Int")) | |
418 | + | then bi | |
419 | + | else throw(($getType(bi) + " couldn't be cast to Int")) | |
418 | 420 | } | |
419 | - | if (( | |
421 | + | if ((bN == bN)) | |
420 | 422 | then { | |
421 | - | let | |
422 | - | $Tuple2(([ScriptTransfer( | |
423 | + | let bO = (aI + bN) | |
424 | + | $Tuple2(([ScriptTransfer(aC.caller, aI, fromBase58String(ap[ab])), aG("claim", bG, bO, aC)] ++ bI), bO) | |
423 | 425 | } | |
424 | 426 | else throw("Strict value is not equal to itself.") | |
425 | 427 | } | |
426 | 428 | else throw("Strict value is not equal to itself.") | |
427 | 429 | } | |
428 | 430 | else throw("Strict value is not equal to itself.") | |
429 | 431 | } | |
430 | 432 | else throw("Strict value is not equal to itself.") | |
431 | 433 | } | |
432 | 434 | ||
433 | 435 | ||
434 | 436 | ||
435 | - | @Callable( | |
436 | - | func claimRewardREADONLY ( | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | let | |
442 | - | $Tuple2(nil, | |
437 | + | @Callable(aC) | |
438 | + | func claimRewardREADONLY (bP) = { | |
439 | + | let bQ = aW(bP) | |
440 | + | let aI = bQ._1 | |
441 | + | let bI = bQ._2 | |
442 | + | let bR = valueOrElse(getInteger(az, W(K, bP)), 0) | |
443 | + | let bO = (aI + bR) | |
444 | + | $Tuple2(nil, bO) | |
443 | 445 | } | |
444 | 446 | ||
445 | 447 | ||
446 | 448 | ||
447 | - | @Callable( | |
448 | - | func onEmissionForGwxStart () = if (( | |
449 | + | @Callable(aC) | |
450 | + | func onEmissionForGwxStart () = if ((aC.caller != C)) | |
449 | 451 | then throw("permissions denied") | |
450 | - | else [IntegerEntry( | |
452 | + | else [IntegerEntry(aq(), height)] | |
451 | 453 | ||
452 | 454 | ||
453 | 455 | ||
454 | - | @Callable( | |
455 | - | func tradeReward ( | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
456 | + | @Callable(aC) | |
457 | + | func tradeReward (bx,by) = { | |
458 | + | let bS = (size(bx) == size(by)) | |
459 | + | let bT = valueOrElse(getInteger(aF()), 0) | |
460 | + | let bU = aC.payments[0] | |
461 | + | let bV = bU.assetId | |
462 | + | let bW = bU.amount | |
463 | + | let bA = [if ((bT >= size(bx))) | |
462 | 464 | then true | |
463 | - | else | |
465 | + | else t("Too many recipients"), if (bS) | |
464 | 466 | then true | |
465 | - | else | |
467 | + | else t("Arguments size mismatch"), if ((bV == aj)) | |
466 | 468 | then true | |
467 | - | else | |
468 | - | if (( | |
469 | + | else t("Wrong asset payment")] | |
470 | + | if ((bA == bA)) | |
469 | 471 | then { | |
470 | - | let | |
471 | - | if (( | |
472 | - | then $Tuple2(nil, | |
472 | + | let bB = invoke(this, "tradeRewardInternal", [bW, bx, by, 0], nil) | |
473 | + | if ((bB == bB)) | |
474 | + | then $Tuple2(nil, bB) | |
473 | 475 | else throw("Strict value is not equal to itself.") | |
474 | 476 | } | |
475 | 477 | else throw("Strict value is not equal to itself.") | |
476 | 478 | } | |
477 | 479 | ||
478 | 480 | ||
479 | 481 | ||
480 | - | @Callable( | |
482 | + | @Callable(aC) | |
481 | 483 | func claimTradingReward () = { | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | if (( | |
486 | - | then $Tuple2([ScriptTransfer( | |
487 | - | else | |
484 | + | let aE = aC.caller | |
485 | + | let bX = toString(aE) | |
486 | + | let bY = ba(bX) | |
487 | + | if ((bY > 0)) | |
488 | + | then $Tuple2([ScriptTransfer(aE, bY, aj), IntegerEntry(aD(bX), 0)], bY) | |
489 | + | else t("nothing to claim") | |
488 | 490 | } | |
489 | 491 | ||
490 | 492 | ||
491 | 493 | ||
492 | - | @Callable( | |
493 | - | func claimTradingRewardREADONLY ( | |
494 | + | @Callable(aC) | |
495 | + | func claimTradingRewardREADONLY (aE) = $Tuple2(nil, ba(aE)) | |
494 | 496 | ||
495 | 497 | ||
496 | - | @Verifier( | |
497 | - | func | |
498 | - | let | |
499 | - | let | |
500 | - | if ($isInstanceOf( | |
498 | + | @Verifier(bZ) | |
499 | + | func ca () = { | |
500 | + | let cb = { | |
501 | + | let aO = aQ() | |
502 | + | if ($isInstanceOf(aO, "ByteVector")) | |
501 | 503 | then { | |
502 | - | let | |
503 | - | | |
504 | + | let aU = aO | |
505 | + | aU | |
504 | 506 | } | |
505 | - | else if ($isInstanceOf( | |
506 | - | then | |
507 | + | else if ($isInstanceOf(aO, "Unit")) | |
508 | + | then bZ.senderPublicKey | |
507 | 509 | else throw("Match error") | |
508 | 510 | } | |
509 | - | sigVerify( | |
511 | + | sigVerify(bZ.bodyBytes, bZ.proofs[0], cb) | |
510 | 512 | } | |
511 | 513 |
github/deemru/w8io/026f985 173.30 ms ◑