tx · DQJ7FCrKy7Uqqut92iE3VhFHEy3YfJ7rYBhvpUnrzA6M 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE: -0.02700000 Waves 2022.09.26 12:18 [2245915] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves
{ "type": 13, "id": "DQJ7FCrKy7Uqqut92iE3VhFHEy3YfJ7rYBhvpUnrzA6M", "fee": 2700000, "feeAssetId": null, "timestamp": 1664183972526, "version": 1, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "5fwToZeZpC6Ft9LixLEmNRvnC7us564mdkxXDAULHZg1PbMnQPfVQSFEKgGVjciLxTggA6b4aLCKso5QZkzMXyZQ" ], "script": "base64:BgJmCAISBAoCCAESABIDCgEBEgASABIAEgMKAQgSAwoBCBIDCgEIEgUKAwEBARIFCgMBAQESABIDCgEIEgcKBQgICAgIEgMKAQgSCgoICAgICAgICAgSCgoICAgICAgICAgSAwoBCBIATwADU0VQAgJfXwAFU0NBTEUA6AcABU1VTFQ4AIDC1y8ACnplcm9CaWdJbnQJALYCAQAAABRwcm9jZXNzaW5nU3RhZ2VUb3RhbAAAABVwcm9jZXNzaW5nU3RhZ2VTaGFyZXMAAQEOZ2V0TnVtYmVyQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzBQNrZXkAAAEPZ2V0TnVtYmVyT3JGYWlsAQNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAmggCBQR0aGlzBQNrZXkJAKwCAgkArAICAg9tYW5kYXRvcnkgdGhpcy4FA2tleQIPIGlzIG5vdCBkZWZpbmVkAQ5nZXRTdHJpbmdCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAQ9nZXRTdHJpbmdPckZhaWwBA2tleQkBE3ZhbHVlT3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vdSBhcmUgbm90IHBlbmRpbmcgbWFuYWdlcgMJAAACBQdjaGVja1BNBQdjaGVja1BNCQDMCAIJAQtTdHJpbmdFbnRyeQIJARNrZXlNYW5hZ2VyUHVibGljS2V5AAkA2AQBCQEFdmFsdWUBBQJwbQkAzAgCCQELRGVsZXRlRW50cnkBCQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkABQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXka24l0", "chainId": 84, "height": 2245915, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2EqmEgtugLzvcrYDNE43AG9ZLHpzzzLn4P63ymNmMMQu Next: CM9uPGA7kmwVyNPD5jGv3Z9AKhWjaHJ5E8CArURnoURL Diff:
Old | New | Differences | |
---|---|---|---|
611 | 611 | ||
612 | 612 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
613 | 613 | then $a | |
614 | - | else throw("List size exceeds | |
614 | + | else throw("List size exceeds 20") | |
615 | 615 | ||
616 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12) | |
616 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
617 | 617 | } | |
618 | 618 | let xNext = $t02329623369._1 | |
619 | 619 | let xPrev = $t02329623369._2 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let SCALE = 1000 | |
7 | 7 | ||
8 | 8 | let MULT8 = 100000000 | |
9 | 9 | ||
10 | 10 | let zeroBigInt = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let processingStageTotal = 0 | |
13 | 13 | ||
14 | 14 | let processingStageShares = 1 | |
15 | 15 | ||
16 | 16 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getNumberOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("mandatory this." + key) + " is not defined")) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("mandatory this." + key) + " is not defined")) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func abs (val) = if ((0 > val)) | |
29 | 29 | then -(val) | |
30 | 30 | else val | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func absBigInt (val) = if ((zeroBigInt > val)) | |
34 | 34 | then -(val) | |
35 | 35 | else val | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | let keyMaxDepth = "%s__maxDepth" | |
39 | 39 | ||
40 | 40 | let maxDepthDefault = 30 | |
41 | 41 | ||
42 | 42 | let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault) | |
43 | 43 | ||
44 | 44 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | let factoryAddressStr = getStringOrFail(keyFactoryAddress()) | |
48 | 48 | ||
49 | 49 | let factoryContract = addressFromStringValue(factoryAddressStr) | |
50 | 50 | ||
51 | 51 | func keyEmissionAddress () = "%s%s__config__emissionAddress" | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyNumToUserMapping (num) = makeString(["%s%s%s", "mapping", "num2user", toString(num)], SEP) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP) | |
58 | 58 | ||
59 | 59 | let referralProgramNameDefault = "wxlock" | |
60 | 60 | ||
61 | 61 | let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault) | |
62 | 62 | ||
63 | 63 | let keyReferralMinGWxAmount = makeString(["%s%s", "referral", "minGWxAmount"], SEP) | |
64 | 64 | ||
65 | 65 | let referralMinGWxAmountDefault = (500 * MULT8) | |
66 | 66 | ||
67 | 67 | let referralMinGWxAmount = valueOrElse(getInteger(this, keyReferralMinGWxAmount), referralMinGWxAmountDefault) | |
68 | 68 | ||
69 | 69 | let keyReferrerRewardPermille = makeString(["%s%s", "referral", "referrerRewardPermille"], SEP) | |
70 | 70 | ||
71 | 71 | let referrerRewardPermilleDefault = 50 | |
72 | 72 | ||
73 | 73 | let referrerRewardPermille = valueOrElse(getInteger(this, keyReferrerRewardPermille), referrerRewardPermilleDefault) | |
74 | 74 | ||
75 | 75 | let keyReferralRewardPermille = makeString(["%s%s", "referral", "referralRewardPermille"], SEP) | |
76 | 76 | ||
77 | 77 | let referralRewardPermilleDefault = 50 | |
78 | 78 | ||
79 | 79 | let referralRewardPermille = valueOrElse(getInteger(this, keyReferralRewardPermille), referralRewardPermilleDefault) | |
80 | 80 | ||
81 | 81 | func keyReferrer (referralAddress) = makeString(["%s%s%s", "referrer", referralProgramName, referralAddress], SEP) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyUnclaimedReferral (programName,claimerAddress) = makeString(["%s%s%s%s", "unclaimedReferral", programName, claimerAddress], SEP) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | let emissionAddressStr = getStringOrFail(keyEmissionAddress()) | |
88 | 88 | ||
89 | 89 | let emissionContract = addressFromStringValue(emissionAddressStr) | |
90 | 90 | ||
91 | 91 | let IdxCfgAssetId = 1 | |
92 | 92 | ||
93 | 93 | let IdxCfgPacemakerAddress = 2 | |
94 | 94 | ||
95 | 95 | let IdxCfgBoostingContract = 3 | |
96 | 96 | ||
97 | 97 | let IdxCfgMaxDepth = 4 | |
98 | 98 | ||
99 | 99 | func keyConfig () = "%s__config" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func boostingContractOrFail () = { | |
109 | 109 | let cfgArray = readConfigArrayOrFail() | |
110 | 110 | valueOrErrorMessage(addressFromString(cfgArray[IdxCfgBoostingContract]), "boosting contract address is not defined") | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyUsersCount () = "%s__nextUserNum" | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL" | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyNextProcessedUser () = "%s__nextProcessedUser" | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyLatestPeriod () = "%s__latestPeriod" | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyNextPeriod () = "%s__nextPeriod" | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyProcessingStage () = "%s__processingStage" | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyNextProcessedPeriod () = "%s__nextProcessedPeriod" | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyUserUnclaimed (userIndex) = makeString(["%s%d", "userUnclaimed", toString(userIndex)], SEP) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyAuxEmissionRewardForPeriod (period) = makeString(["%s%d__auxEmissionReward", toString(period)], SEP) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func keyLastPayoutInfo () = "%s__lastPayoutInfo" | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func PeriodPayoutInfo (period,matcherReward,emissionReward) = makeString(["%d%d%d", toString(period), toString(matcherReward), toString(emissionReward)], SEP) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func keyPayoutHistoryInfo (period) = makeString(["%s%s%d__payouts__history", toString(period)], SEP) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func keyUserWeightForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "weight", toString(period)], SEP) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(keyReferralsContractAddress())) | |
184 | 184 | ||
185 | 185 | func HistoryEntry (type,user,amount,i) = { | |
186 | 186 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
187 | 187 | let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
188 | 188 | StringEntry(historyKEY, historyDATA) | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
199 | 199 | case s: String => | |
200 | 200 | fromBase58String(s) | |
201 | 201 | case _: Unit => | |
202 | 202 | unit | |
203 | 203 | case _ => | |
204 | 204 | throw("Match error") | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
209 | 209 | case s: String => | |
210 | 210 | fromBase58String(s) | |
211 | 211 | case _: Unit => | |
212 | 212 | unit | |
213 | 213 | case _ => | |
214 | 214 | throw("Match error") | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func mustManager (i) = { | |
219 | 219 | let pd = throw("Permission denied") | |
220 | 220 | match managerPublicKeyOrUnit() { | |
221 | 221 | case pk: ByteVector => | |
222 | 222 | if ((i.callerPublicKey == pk)) | |
223 | 223 | then true | |
224 | 224 | else pd | |
225 | 225 | case _: Unit => | |
226 | 226 | if ((i.caller == this)) | |
227 | 227 | then true | |
228 | 228 | else pd | |
229 | 229 | case _ => | |
230 | 230 | throw("Match error") | |
231 | 231 | } | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
236 | 236 | let kLast = keyLastProcessedPeriodOfUser(userIndex) | |
237 | 237 | let kKey = keyUserKValueForPeriod(period, userIndex) | |
238 | 238 | let kRaw = getInteger(boostingContractAddress, kKey) | |
239 | 239 | let kUserWeight = keyUserWeightForPeriod(period, userIndex) | |
240 | 240 | if (isDefined(kRaw)) | |
241 | 241 | then { | |
242 | 242 | let k = value(kRaw) | |
243 | 243 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex))) | |
244 | 244 | let w = ((k * heightForPeriod) + b) | |
245 | 245 | if ((w > 0)) | |
246 | 246 | then $Tuple2((w / SCALE), [IntegerEntry(kLast, period), IntegerEntry(kUserWeight, w)]) | |
247 | 247 | else $Tuple2(0, nil) | |
248 | 248 | } | |
249 | 249 | else { | |
250 | 250 | let p = getInteger(this, kLast) | |
251 | 251 | if (if (isDefined(p)) | |
252 | 252 | then (period >= value(p)) | |
253 | 253 | else false) | |
254 | 254 | then { | |
255 | 255 | let pv = value(p) | |
256 | 256 | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
257 | 257 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex))) | |
258 | 258 | let w = ((k * heightForPeriod) + b) | |
259 | 259 | if ((w > 0)) | |
260 | 260 | then $Tuple2((w / SCALE), [IntegerEntry(kUserWeight, w)]) | |
261 | 261 | else $Tuple2(0, nil) | |
262 | 262 | } | |
263 | 263 | else $Tuple2(0, nil) | |
264 | 264 | } | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func calcUserWeightForClaim (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
269 | 269 | let kUserWeight = keyUserWeightForPeriod(period, userIndex) | |
270 | 270 | let userWeightOrUnit = getInteger(kUserWeight) | |
271 | 271 | match userWeightOrUnit { | |
272 | 272 | case _: Unit => | |
273 | 273 | 0 | |
274 | 274 | case w: Int => | |
275 | 275 | (w / SCALE) | |
276 | 276 | case _ => | |
277 | 277 | throw("Match error") | |
278 | 278 | } | |
279 | 279 | } | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func getUserIndexByAddress (boostingContractAddressStr,userAddress) = { | |
283 | 283 | let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP) | |
284 | 284 | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key))) | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | func nextPeriod () = getNumberByKey(keyNextPeriod()) | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | func commonClaimReward (userAddress) = { | |
292 | 292 | let cfgArray = readConfigArrayOrFail() | |
293 | 293 | let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress) | |
294 | 294 | let userUnclaimedOption = getInteger(keyUserUnclaimed(userIdx)) | |
295 | 295 | match userUnclaimedOption { | |
296 | 296 | case _: Unit => | |
297 | 297 | $Tuple2(0, nil) | |
298 | 298 | case u: Int => | |
299 | 299 | $Tuple2(u, [IntegerEntry(keyUserUnclaimed(userIdx), 0)]) | |
300 | 300 | case _ => | |
301 | 301 | throw("Match error") | |
302 | 302 | } | |
303 | 303 | } | |
304 | 304 | ||
305 | 305 | ||
306 | 306 | @Callable(i) | |
307 | 307 | func updateReferralActivity (userAddress,gWxAmountStart) = { | |
308 | 308 | let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress)) | |
309 | 309 | let activeReferralInv = if ((referrer == unit)) | |
310 | 310 | then unit | |
311 | 311 | else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (gWxAmountStart >= referralMinGWxAmount)], nil) | |
312 | 312 | if ((activeReferralInv == activeReferralInv)) | |
313 | 313 | then $Tuple2(nil, unit) | |
314 | 314 | else throw("Strict value is not equal to itself.") | |
315 | 315 | } | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | ||
319 | 319 | @Callable(i) | |
320 | 320 | func finalizeHelper () = { | |
321 | 321 | let processingStage = valueOrElse(getInteger(keyProcessingStage()), processingStageTotal) | |
322 | 322 | let currentPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
323 | 323 | let currentUser = getNumberByKey(keyNextProcessedUser()) | |
324 | 324 | let latestPeriod = getNumberByKey(keyLatestPeriod()) | |
325 | 325 | let usersCount = valueOrElse(getInteger(boostingContractOrFail(), keyUsersCount()), 0) | |
326 | 326 | let totalWeightKey = keyTotalWeightForPeriod(currentPeriod) | |
327 | 327 | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
328 | 328 | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
329 | 329 | if ((currentPeriod > latestPeriod)) | |
330 | 330 | then $Tuple2(nil, false) | |
331 | 331 | else if ((processingStage == processingStageTotal)) | |
332 | 332 | then { | |
333 | 333 | let $t01208412200 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser) | |
334 | 334 | let userWeight = $t01208412200._1 | |
335 | 335 | let userActions = $t01208412200._2 | |
336 | 336 | let totalWeightNew = (totalWeight + userWeight) | |
337 | 337 | let processingActions = if (((usersCount - 1) > currentUser)) | |
338 | 338 | then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))] | |
339 | 339 | else [IntegerEntry(keyProcessingStage(), processingStageShares), IntegerEntry(keyNextProcessedUser(), 0)] | |
340 | 340 | $Tuple2((([IntegerEntry(totalWeightKey, totalWeightNew)] ++ processingActions) ++ userActions), true) | |
341 | 341 | } | |
342 | 342 | else if ((processingStage == processingStageShares)) | |
343 | 343 | then { | |
344 | 344 | let userWeight = calcUserWeightForClaim(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser) | |
345 | 345 | let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight) | |
346 | 346 | let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight) | |
347 | 347 | let userTotalAmount = (userAmountEmissionForPeriod + userAmountMatcherForPeriod) | |
348 | 348 | let userUnclaimedOption = getInteger(keyUserUnclaimed(currentUser)) | |
349 | 349 | let userAddress = getStringValue(boostingContractOrFail(), keyNumToUserMapping(currentUser)) | |
350 | 350 | let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress)) | |
351 | 351 | let activeReferralInv = if ((referrer == unit)) | |
352 | 352 | then unit | |
353 | 353 | else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (userWeight >= referralMinGWxAmount)], nil) | |
354 | 354 | if ((activeReferralInv == activeReferralInv)) | |
355 | 355 | then { | |
356 | 356 | let referralInv = if (if ((referrer == unit)) | |
357 | 357 | then true | |
358 | 358 | else (referralMinGWxAmount > userWeight)) | |
359 | 359 | then unit | |
360 | 360 | else { | |
361 | 361 | let referrerReward = fraction(userTotalAmount, referrerRewardPermille, SCALE) | |
362 | 362 | let referralReward = fraction(userTotalAmount, referralRewardPermille, SCALE) | |
363 | 363 | invoke(referralsContractAddressOrFail, "incUnclaimed", [referralProgramName, userAddress, referrerReward, referralReward], nil) | |
364 | 364 | } | |
365 | 365 | if ((referralInv == referralInv)) | |
366 | 366 | then { | |
367 | 367 | let unclaimedActions = [IntegerEntry(keyUserUnclaimed(currentUser), (valueOrElse(userUnclaimedOption, 0) + userTotalAmount))] | |
368 | 368 | let processingActions = if (((usersCount - 1) > currentUser)) | |
369 | 369 | then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))] | |
370 | 370 | else [IntegerEntry(keyNextProcessedPeriod(), (currentPeriod + 1)), IntegerEntry(keyNextProcessedUser(), 0), DeleteEntry(keyProcessingStage())] | |
371 | 371 | $Tuple2((unclaimedActions ++ processingActions), true) | |
372 | 372 | } | |
373 | 373 | else throw("Strict value is not equal to itself.") | |
374 | 374 | } | |
375 | 375 | else throw("Strict value is not equal to itself.") | |
376 | 376 | } | |
377 | 377 | else throw("invalid processing stage") | |
378 | 378 | } | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | ||
382 | 382 | @Callable(i) | |
383 | 383 | func finalizeWrapper (counter) = { | |
384 | 384 | let result = { | |
385 | 385 | let @ = invoke(this, "finalizeHelper", nil, nil) | |
386 | 386 | if ($isInstanceOf(@, "Boolean")) | |
387 | 387 | then @ | |
388 | 388 | else throw(($getType(invoke(this, "finalizeHelper", nil, nil)) + " couldn't be cast to Boolean")) | |
389 | 389 | } | |
390 | 390 | if ((result == result)) | |
391 | 391 | then if (!(result)) | |
392 | 392 | then if ((counter == maxDepth)) | |
393 | 393 | then throw("Nothing to process") | |
394 | 394 | else $Tuple2(nil, unit) | |
395 | 395 | else if ((counter > 0)) | |
396 | 396 | then $Tuple2(nil, invoke(this, "finalizeWrapper", [(counter - 1)], nil)) | |
397 | 397 | else $Tuple2(nil, unit) | |
398 | 398 | else throw("Strict value is not equal to itself.") | |
399 | 399 | } | |
400 | 400 | ||
401 | 401 | ||
402 | 402 | ||
403 | 403 | @Callable(i) | |
404 | 404 | func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [maxDepth], nil)) | |
405 | 405 | ||
406 | 406 | ||
407 | 407 | ||
408 | 408 | @Callable(i) | |
409 | 409 | func deposit () = { | |
410 | 410 | let cfgArray = readConfigArrayOrFail() | |
411 | 411 | if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress])))) | |
412 | 412 | then throw("Wrong caller address") | |
413 | 413 | else { | |
414 | 414 | let assetId = value(value(i.payments[0]).assetId) | |
415 | 415 | if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId]))) | |
416 | 416 | then throw("Wrong payment asset") | |
417 | 417 | else { | |
418 | 418 | let period = nextPeriod() | |
419 | 419 | let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight())) | |
420 | 420 | let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined")) | |
421 | 421 | let weight = valueOrErrorMessage(getInteger(factoryContract, keyPoolWeightVirtual()), (("mandatory factory_contract." + keyPoolWeightVirtual()) + " is not defined")) | |
422 | 422 | let auxAmount = fraction((deltaH * weight), emissionRate, MULT8) | |
423 | 423 | let em = invoke(emissionContract, "emit", [auxAmount], nil) | |
424 | 424 | if ((em == em)) | |
425 | 425 | then { | |
426 | 426 | let matcherPart = value(i.payments[0]).amount | |
427 | 427 | let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount) | |
428 | 428 | [IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyAuxEmissionRewardForPeriod(period), auxAmount), IntegerEntry(keyGwxRewardEmissionStartHeight(), height), IntegerEntry(keyTotalAmountForPeriod(period), matcherPart), IntegerEntry(keyNextPeriod(), (period + 1)), StringEntry(keyLastPayoutInfo(), payoutInfo), StringEntry(keyPayoutHistoryInfo(period), payoutInfo)] | |
429 | 429 | } | |
430 | 430 | else throw("Strict value is not equal to itself.") | |
431 | 431 | } | |
432 | 432 | } | |
433 | 433 | } | |
434 | 434 | ||
435 | 435 | ||
436 | 436 | ||
437 | 437 | @Callable(i) | |
438 | 438 | func claimReward () = { | |
439 | 439 | let cfgArray = readConfigArrayOrFail() | |
440 | 440 | let address = toString(i.caller) | |
441 | 441 | let $t01754217592 = commonClaimReward(address) | |
442 | 442 | let amount = $t01754217592._1 | |
443 | 443 | let actions = $t01754217592._2 | |
444 | 444 | let checkAmount = if ((amount > 0)) | |
445 | 445 | then true | |
446 | 446 | else throw("Nothing to claim") | |
447 | 447 | if ((checkAmount == checkAmount)) | |
448 | 448 | then { | |
449 | 449 | let amountFromEmission = 0 | |
450 | 450 | let claimedReferral = { | |
451 | 451 | let @ = invoke(referralsContractAddressOrFail, "claim", [referralProgramName], nil) | |
452 | 452 | if ($isInstanceOf(@, "Int")) | |
453 | 453 | then @ | |
454 | 454 | else throw(($getType(invoke(referralsContractAddressOrFail, "claim", [referralProgramName], nil)) + " couldn't be cast to Int")) | |
455 | 455 | } | |
456 | 456 | let totalAmount = (amount + claimedReferral) | |
457 | 457 | $Tuple2(([ScriptTransfer(i.caller, totalAmount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, i)] ++ actions), [totalAmount, amountFromEmission]) | |
458 | 458 | } | |
459 | 459 | else throw("Strict value is not equal to itself.") | |
460 | 460 | } | |
461 | 461 | ||
462 | 462 | ||
463 | 463 | ||
464 | 464 | @Callable(i) | |
465 | 465 | func claimRewardREADONLY (address) = { | |
466 | 466 | let $t01816518215 = commonClaimReward(address) | |
467 | 467 | let amount = $t01816518215._1 | |
468 | 468 | let actions = $t01816518215._2 | |
469 | 469 | let referralUnclaimed = valueOrElse(getInteger(referralsContractAddressOrFail, keyUnclaimedReferral(referralProgramName, address)), 0) | |
470 | 470 | let totalAmount = (amount + referralUnclaimed) | |
471 | 471 | $Tuple2(nil, totalAmount) | |
472 | 472 | } | |
473 | 473 | ||
474 | 474 | ||
475 | 475 | ||
476 | 476 | @Callable(i) | |
477 | 477 | func latestFinalizedPeriodREADONLY (address) = $Tuple2(nil, valueOrElse(getInteger(this, keyLatestPeriod()), -1)) | |
478 | 478 | ||
479 | 479 | ||
480 | 480 | ||
481 | 481 | @Callable(i) | |
482 | 482 | func latestFinalizedPeriodInfoREADONLY (address) = $Tuple2(nil, getStringByKey(keyLastPayoutInfo())) | |
483 | 483 | ||
484 | 484 | ||
485 | 485 | ||
486 | 486 | @Callable(i) | |
487 | 487 | func calcGwxParamsREADONLY (gwxAmountStart,lockStartHeight,lockDurationBlocks) = { | |
488 | 488 | let lockEndHeight = (lockStartHeight + lockDurationBlocks) | |
489 | 489 | let scale8ParamK = -(fraction(gwxAmountStart, SCALE, lockDurationBlocks)) | |
490 | 490 | let scale8ParamB = (fraction(gwxAmountStart, SCALE, lockDurationBlocks) * lockEndHeight) | |
491 | 491 | $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()]) | |
492 | 492 | } | |
493 | 493 | ||
494 | 494 | ||
495 | 495 | ||
496 | 496 | @Callable(i) | |
497 | 497 | func calcGwxAmountStartREADONLY (wxLockAmount,lockDuration,maxLockDuration) = { | |
498 | 498 | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
499 | 499 | let gWxAmountStart = fraction(wxLockAmount, coeffX8, MULT8) | |
500 | 500 | $Tuple2(nil, [gWxAmountStart]) | |
501 | 501 | } | |
502 | 502 | ||
503 | 503 | ||
504 | 504 | ||
505 | 505 | @Callable(i) | |
506 | 506 | func onEmissionForGwxStart () = if ((i.caller != factoryContract)) | |
507 | 507 | then throw("permissions denied") | |
508 | 508 | else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)] | |
509 | 509 | ||
510 | 510 | ||
511 | 511 | ||
512 | 512 | @Callable(i) | |
513 | 513 | func latestPeriodEmissionRewardsREADONLY (address) = { | |
514 | 514 | let period = nextPeriod() | |
515 | 515 | $Tuple2(nil, [getNumberByKey(keyAuxEmissionRewardForPeriod(period))]) | |
516 | 516 | } | |
517 | 517 | ||
518 | 518 | ||
519 | 519 | ||
520 | 520 | @Callable(i) | |
521 | 521 | func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = { | |
522 | 522 | let nCoins = toBigInt(2) | |
523 | 523 | let aPrecision = parseBigIntValue(aPrecisionBigIntStr) | |
524 | 524 | let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr) | |
525 | 525 | let x1 = parseBigIntValue(x1BigIntStr) | |
526 | 526 | let x2 = parseBigIntValue(x2BigIntStr) | |
527 | 527 | let amp = (parseBigIntValue(ampBigIntStr) * aPrecision) | |
528 | 528 | let s = (x1 + x2) | |
529 | 529 | if ((s == zeroBigInt)) | |
530 | 530 | then $Tuple2(nil, toString(zeroBigInt)) | |
531 | 531 | else { | |
532 | 532 | let ann = (amp * nCoins) | |
533 | 533 | let arr = [1, 2, 3, 4, 5, 6, 7] | |
534 | 534 | func calc (acc,cur) = { | |
535 | 535 | let $t02083821027 = acc | |
536 | 536 | let d = $t02083821027._1 | |
537 | 537 | let dPrev = $t02083821027._2 | |
538 | 538 | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) | |
539 | 539 | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) | |
540 | 540 | $Tuple2(dNext, d) | |
541 | 541 | } | |
542 | 542 | ||
543 | 543 | let $t02124021290 = { | |
544 | 544 | let $l = arr | |
545 | 545 | let $s = size($l) | |
546 | 546 | let $acc0 = $Tuple2(s, unit) | |
547 | 547 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
548 | 548 | then $a | |
549 | 549 | else calc($a, $l[$i]) | |
550 | 550 | ||
551 | 551 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
552 | 552 | then $a | |
553 | 553 | else throw("List size exceeds 7") | |
554 | 554 | ||
555 | 555 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
556 | 556 | } | |
557 | 557 | let dNext = $t02124021290._1 | |
558 | 558 | let dPrev = $t02124021290._2 | |
559 | 559 | let dDiff = absBigInt((dNext - value(dPrev))) | |
560 | 560 | if ((targetPrecision >= dDiff)) | |
561 | 561 | then $Tuple2(nil, toString(dNext)) | |
562 | 562 | else throw(("D calculation error, dDiff = " + toString(dDiff))) | |
563 | 563 | } | |
564 | 564 | } | |
565 | 565 | ||
566 | 566 | ||
567 | 567 | ||
568 | 568 | @Callable(i) | |
569 | 569 | func logger (str) = $Tuple2(nil, unit) | |
570 | 570 | ||
571 | 571 | ||
572 | 572 | ||
573 | 573 | @Callable(i) | |
574 | 574 | func calcPutXOnly (amountAssetAmountBigIntStr,amountAssetBalanceBigIntStr,priceAssetBalanceBigIntStr,dBigIntStr,amplificatorBigIntStr,amplificatorPrecisionBigIntStr,targetXPrecisionBigIntStr,targetDPrecisionBigIntStr) = { | |
575 | 575 | let nCoins = toBigInt(2) | |
576 | 576 | let aPrecision = parseBigIntValue(amplificatorPrecisionBigIntStr) | |
577 | 577 | let targetPrecision = parseBigIntValue(targetXPrecisionBigIntStr) | |
578 | 578 | let X = parseBigIntValue(amountAssetBalanceBigIntStr) | |
579 | 579 | let Y = parseBigIntValue(priceAssetBalanceBigIntStr) | |
580 | 580 | let d = if ((dBigIntStr == "")) | |
581 | 581 | then parseBigIntValue({ | |
582 | 582 | let @ = invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil) | |
583 | 583 | if ($isInstanceOf(@, "String")) | |
584 | 584 | then @ | |
585 | 585 | else throw(($getType(invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil)) + " couldn't be cast to String")) | |
586 | 586 | }) | |
587 | 587 | else parseBigIntValue(dBigIntStr) | |
588 | 588 | let amp = (parseBigIntValue(amplificatorBigIntStr) * aPrecision) | |
589 | 589 | let S = parseBigIntValue(amountAssetAmountBigIntStr) | |
590 | 590 | let ann = (amp * nCoins) | |
591 | 591 | let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] | |
592 | 592 | func calc (acc,cur) = { | |
593 | 593 | let $t02293922968 = acc | |
594 | 594 | let x = $t02293922968._1 | |
595 | 595 | let xPrev = $t02293922968._2 | |
596 | 596 | let results = $t02293922968._3 | |
597 | 597 | let newX = ((X + S) - x) | |
598 | 598 | let newY = (Y - ((x * Y) / X)) | |
599 | 599 | let dp = (((d * d) * d) / (((newX * newY) * nCoins) * nCoins)) | |
600 | 600 | let xNext = (x + ((((((-(d) * ann) / aPrecision) + d) + ((ann * (newX + newY)) / aPrecision)) - dp) / ((((-(ann) * (toBigInt(-1) - (Y / X))) / aPrecision) + (dp / newX)) + ((Y * dp) / (X * newY))))) | |
601 | 601 | $Tuple3(xNext, x, (results :+ toString(x))) | |
602 | 602 | } | |
603 | 603 | ||
604 | 604 | let $t02329623369 = { | |
605 | 605 | let $l = arr | |
606 | 606 | let $s = size($l) | |
607 | 607 | let $acc0 = $Tuple3(zeroBigInt, unit, nil) | |
608 | 608 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
609 | 609 | then $a | |
610 | 610 | else calc($a, $l[$i]) | |
611 | 611 | ||
612 | 612 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
613 | 613 | then $a | |
614 | - | else throw("List size exceeds | |
614 | + | else throw("List size exceeds 20") | |
615 | 615 | ||
616 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12) | |
616 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
617 | 617 | } | |
618 | 618 | let xNext = $t02329623369._1 | |
619 | 619 | let xPrev = $t02329623369._2 | |
620 | 620 | let results = $t02329623369._3 | |
621 | 621 | let logInv = invoke(this, "logger", [makeString(results, " ")], nil) | |
622 | 622 | if ((logInv == logInv)) | |
623 | 623 | then { | |
624 | 624 | let xDiff = absBigInt((xNext - value(xPrev))) | |
625 | 625 | if ((targetPrecision >= xDiff)) | |
626 | 626 | then $Tuple2(nil, $Tuple3(toInt(xNext), toInt(fraction(xNext, Y, X)), results)) | |
627 | 627 | else throw(((((("X calculation error, xDiff = " + toString(xDiff)) + ", xNext = ") + toString(xNext)) + ", xPrev = ") + toString(value(xPrev)))) | |
628 | 628 | } | |
629 | 629 | else throw("Strict value is not equal to itself.") | |
630 | 630 | } | |
631 | 631 | ||
632 | 632 | ||
633 | 633 | ||
634 | 634 | @Callable(i) | |
635 | 635 | func calcSwapXToY (amountAssetAmountBigIntStr,amountAssetBalanceBigIntStr,priceAssetBalanceBigIntStr,dBigIntStr,amplificatorBigIntStr,amplificatorPrecisionBigIntStr,targetXPrecisionBigIntStr,targetDPrecisionBigIntStr) = { | |
636 | 636 | let nCoins = toBigInt(2) | |
637 | 637 | let aPrecision = parseBigIntValue(amplificatorPrecisionBigIntStr) | |
638 | 638 | let targetPrecision = parseBigIntValue(targetXPrecisionBigIntStr) | |
639 | 639 | let X = parseBigIntValue(amountAssetBalanceBigIntStr) | |
640 | 640 | let Y = parseBigIntValue(priceAssetBalanceBigIntStr) | |
641 | 641 | let x = parseBigIntValue(amountAssetAmountBigIntStr) | |
642 | 642 | let d = if ((dBigIntStr == "")) | |
643 | 643 | then parseBigIntValue({ | |
644 | 644 | let @ = invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil) | |
645 | 645 | if ($isInstanceOf(@, "String")) | |
646 | 646 | then @ | |
647 | 647 | else throw(($getType(invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil)) + " couldn't be cast to String")) | |
648 | 648 | }) | |
649 | 649 | else parseBigIntValue(dBigIntStr) | |
650 | 650 | let amp = (parseBigIntValue(amplificatorBigIntStr) * aPrecision) | |
651 | 651 | let S = parseBigIntValue(amountAssetAmountBigIntStr) | |
652 | 652 | let ann = (amp * nCoins) | |
653 | 653 | let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
654 | 654 | func calc (acc,cur) = { | |
655 | 655 | let $t02512225142 = acc | |
656 | 656 | let y = $t02512225142._1 | |
657 | 657 | let yPrev = $t02512225142._2 | |
658 | 658 | let newX = (X + x) | |
659 | 659 | let newY = (Y - y) | |
660 | 660 | let dp = (((d * d) * d) / (((newX * newY) * nCoins) * nCoins)) | |
661 | 661 | let yNext = (y + ((((((-(d) * ann) / aPrecision) + d) + ((ann * (newX + newY)) / aPrecision)) - dp) / ((ann / aPrecision) + (dp / newY)))) | |
662 | 662 | $Tuple2(yNext, y) | |
663 | 663 | } | |
664 | 664 | ||
665 | 665 | let $t02538425444 = { | |
666 | 666 | let $l = arr | |
667 | 667 | let $s = size($l) | |
668 | 668 | let $acc0 = $Tuple2(zeroBigInt, unit) | |
669 | 669 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
670 | 670 | then $a | |
671 | 671 | else calc($a, $l[$i]) | |
672 | 672 | ||
673 | 673 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
674 | 674 | then $a | |
675 | 675 | else throw("List size exceeds 10") | |
676 | 676 | ||
677 | 677 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
678 | 678 | } | |
679 | 679 | let yNext = $t02538425444._1 | |
680 | 680 | let yPrev = $t02538425444._2 | |
681 | 681 | let xDiff = absBigInt((yNext - value(yPrev))) | |
682 | 682 | if ((targetPrecision >= xDiff)) | |
683 | 683 | then $Tuple2(nil, toInt(yNext)) | |
684 | 684 | else throw(((((("Y calculation error, yDiff = " + toString(xDiff)) + ", yNext = ") + toString(yNext)) + ", yPrev = ") + toString(value(yPrev)))) | |
685 | 685 | } | |
686 | 686 | ||
687 | 687 | ||
688 | 688 | ||
689 | 689 | @Callable(i) | |
690 | 690 | func setManager (pendingManagerPublicKey) = { | |
691 | 691 | let checkCaller = mustManager(i) | |
692 | 692 | if ((checkCaller == checkCaller)) | |
693 | 693 | then { | |
694 | 694 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
695 | 695 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
696 | 696 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
697 | 697 | else throw("Strict value is not equal to itself.") | |
698 | 698 | } | |
699 | 699 | else throw("Strict value is not equal to itself.") | |
700 | 700 | } | |
701 | 701 | ||
702 | 702 | ||
703 | 703 | ||
704 | 704 | @Callable(i) | |
705 | 705 | func confirmManager () = { | |
706 | 706 | let pm = pendingManagerPublicKeyOrUnit() | |
707 | 707 | let hasPM = if (isDefined(pm)) | |
708 | 708 | then true | |
709 | 709 | else throw("No pending manager") | |
710 | 710 | if ((hasPM == hasPM)) | |
711 | 711 | then { | |
712 | 712 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
713 | 713 | then true | |
714 | 714 | else throw("You are not pending manager") | |
715 | 715 | if ((checkPM == checkPM)) | |
716 | 716 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
717 | 717 | else throw("Strict value is not equal to itself.") | |
718 | 718 | } | |
719 | 719 | else throw("Strict value is not equal to itself.") | |
720 | 720 | } | |
721 | 721 | ||
722 | 722 | ||
723 | 723 | @Verifier(tx) | |
724 | 724 | func verify () = { | |
725 | 725 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
726 | 726 | case pk: ByteVector => | |
727 | 727 | pk | |
728 | 728 | case _: Unit => | |
729 | 729 | tx.senderPublicKey | |
730 | 730 | case _ => | |
731 | 731 | throw("Match error") | |
732 | 732 | } | |
733 | 733 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
734 | 734 | } | |
735 | 735 |
github/deemru/w8io/026f985 73.61 ms ◑