Contract con_staking_rswp_rswp


Contract Code

1 # Imports
2
3 import con_rswp_lst001
4
5 I = importlib
6
7 # Setup Tokens
8
9 STAKING_TOKEN = con_rswp_lst001
10 YIELD_TOKEN = con_rswp_lst001
11
12 # State
13
14 Owner = Variable()
15 DevRewardWallet = Variable()
16 EmissionRatePerHour = Variable()
17 DevRewardPct = Variable()
18 StartTime = Variable()
19 EndTime = Variable()
20 OpenForBusiness = Variable() # If false, users will be unable to join the pool
21
22 Deposits = Hash(default_value=False)
23 Withdrawals = Hash(default_value=0)
24 CurrentEpochIndex = Variable()
25 Epochs = Hash(default_value=False)
26 StakedBalance = Variable() # The total amount of farming token in the vault.
27 WithdrawnBalance = Variable()
28 EpochMinTime = Variable() # The minimum amount of seconds in Epoch
29 EpochMaxRatioIncrease = (
30 Variable()
31 ) # The maximum ratio which the Epoch can increase by since last Epoch before incrementing.
32 meta = Hash(default_value=False)
33 decimal_converter_var = Variable()
34 TimeRampValues = Variable()
35 UseTimeRamp = Variable()
36 TrustedImporters = Variable()
37
38 # Vtoken
39 balances = Hash(default_value=0)
40
41
42 @construct
43 def seed():
44 Owner.set(ctx.caller)
45 DevRewardWallet.set(ctx.caller)
46 CurrentEpochIndex.set(0)
47 StakedBalance.set(0)
48 WithdrawnBalance.set(0)
49 EpochMaxRatioIncrease.set(1000) # We're not incrementing the Epoch until the staking begins
50 EpochMinTime.set(30 * 60 * 24 * 3) # 3 days
51 UseTimeRamp.set(True)
52
53 TimeRampValues.set(
54 [
55 {'lower': 0, 'upper': 1, 'multiplier': 0.1},
56 {'lower': 1, 'upper': 2, 'multiplier': 0.2},
57 {'lower': 2, 'upper': 3, 'multiplier': 0.3},
58 {'lower': 3, 'upper': 4, 'multiplier': 0.4},
59 {'lower': 4, 'upper': 5, 'multiplier': 0.5},
60 {'lower': 5, 'upper': 6, 'multiplier': 0.6},
61 {'lower': 6, 'upper': 7, 'multiplier': 0.7},
62 {'lower': 7, 'upper': 8, 'multiplier': 0.8},
63 {'lower': 8, 'upper': 9, 'multiplier': 0.9},
64 {'lower': 9, 'upper': 10, 'multiplier': 1},
65 ]
66 )
67
68 Epochs[0] = {"time": now, "staked": 0, "amt_per_hr": 3424}
69
70 meta["version"] = "0.3"
71 meta[
72 "type"
73 ] = "staking_smart_epoch_compounding_timeramp" # staking || lp_farming || etcetera ...
74 meta["STAKING_TOKEN"] = "con_rswp_lst001"
75 meta["YIELD_TOKEN"] = "con_rswp_lst001"
76
77 EmissionRatePerHour.set(3424)
78 DevRewardPct.set(1 / 10)
79
80 # The datetime from which you want to allow staking.
81 StartTime.set(datetime.datetime(year=2021, month=5, day=2, hour=18))
82 # The datetime at which you want staking to finish.
83 EndTime.set(datetime.datetime(year=2022, month=5, day=2, hour=0))
84
85 OpenForBusiness.set(True)
86
87
88 @export
89 def addStakingTokens(amount: float):
90 user = ctx.caller
91 deposit = Deposits[user]
92
93 if deposit is False:
94 return createNewDeposit(amount=amount, user_ctx="caller", from_contract=False)
95 else:
96 return increaseDeposit(amount=amount, user_ctx="caller", from_contract=False)
97
98
99 # This is called FROM the contract to which the yields will be staked.
100 # This contract name will need to be added to the "TrustedImporters" list on the foreign contract.
101 @export
102 def stakeFromContractProfits(contract: str):
103 # import staking contract
104 yield_contract = I.import_module(contract)
105 # call withdraw function to this contract, take return value
106 amount = yield_contract.exportYieldToForeignContract()
107 # stake this value
108 user = ctx.signer
109
110 deposit = Deposits[user]
111
112 if deposit is False:
113 return createNewDeposit(amount=amount, user_ctx="caller", from_contract=True)
114 else:
115 return increaseDeposit(amount=amount, user_ctx="caller", from_contract=True)
116
117
118 def createNewDeposit(
119 amount: float, user_ctx: str, from_contract: bool
120 ): # user_ctx will either be "caller" or "signer"
121 assert OpenForBusiness.get() == True, "This staking pool is not open right now."
122 assert amount > 0, "You must stake something."
123
124 user = ctx.caller
125
126 # Take the staking tokens from the user's wallet if the user has called this function via addStakingTokens
127 if from_contract is False:
128 STAKING_TOKEN.transfer_from(amount=amount, to=ctx.this, main_account=user)
129
130 # Update the Staked amount
131 staked = StakedBalance.get()
132 new_staked_amount = staked + amount
133 StakedBalance.set(new_staked_amount)
134
135 # Update the Epoch
136 epoch_index = decideIncrementEpoch(new_staked_amount=new_staked_amount)
137
138 # Create a record of the user's deposit
139
140 Deposits[user] = {"starting_epoch": epoch_index, "time": now, "amount": amount}
141
142 # mint vtoken equal to the deposit.
143 mintVToken(amount=amount)
144 return Deposits[user]
145
146
147 @export
148 def increaseDeposit(
149 amount: float, user_ctx: str, from_contract: bool
150 ): # user_ctx will either be "caller" or "signer"
151
152 user = ctx.caller if user_ctx is "caller" else "signer"
153 assert OpenForBusiness.get() == True, "This staking pool is not open right now."
154 assert amount >= 0, "You cannot stake a negative balance."
155
156 deposit = Deposits[user]
157
158 assert deposit is not False, "This user has no deposit to add to."
159
160 # Take the staking tokens from the user's wallet
161 if amount > 0 and from_contract is False:
162 STAKING_TOKEN.transfer_from(amount=amount, to=ctx.this, main_account=user)
163
164 withdrawn_yield = Withdrawals[user]
165 yield_to_harvest = 0
166 existing_stake = 0
167 user_yield_share = 0
168 start_time = False
169
170 yield_to_harvest += calculateYield(deposit=deposit)
171 start_time = deposit["time"]
172 existing_stake = deposit["amount"]
173
174 yield_to_harvest -= withdrawn_yield
175
176 if yield_to_harvest > 0:
177
178 # Take % of Yield Tokens, send it to dev fund
179 dev_share = yield_to_harvest * DevRewardPct.get()
180 if dev_share > 0:
181 YIELD_TOKEN.transfer(to=DevRewardWallet.get(), amount=dev_share)
182
183 # Send remanding Yield Tokens to user
184 user_yield_share = yield_to_harvest - dev_share
185
186 total_deposit_amount = user_yield_share + existing_stake + amount
187 global_amount_staked = StakedBalance.get()
188 new_global_staked = global_amount_staked + user_yield_share + amount
189 StakedBalance.set(new_global_staked)
190 WithdrawnBalance.set(WithdrawnBalance.get() + yield_to_harvest)
191
192 mintVToken(amount=user_yield_share + amount)
193
194 Withdrawals[user] = 0
195 Deposits[user] = {
196 "starting_epoch": decideIncrementEpoch(new_staked_amount=new_global_staked),
197 "time": start_time,
198 "amount": total_deposit_amount,
199 "step_offset": now - start_time,
200 }
201
202 return Deposits[user]
203
204
205 def sendYieldToTarget(amount: float, target: str, user: str):
206
207 deposit = Deposits[user]
208 assert deposit is not False, "You have no deposit to withdraw yield from."
209
210 # Calculate how much yield is due per deposit account
211 withdrawn_yield = Withdrawals[user]
212 harvestable_yield = 0
213
214 harvestable_yield += calculateYield(deposit=deposit)
215
216 # Determine maximum amount of yield user can withdraw
217 harvestable_yield -= withdrawn_yield
218
219 yield_to_harvest = amount if amount < harvestable_yield else harvestable_yield
220
221 assert yield_to_harvest > 0, "There is no yield to harvest right now :("
222
223 # Take % of Yield Tokens, send it to dev fund
224 dev_share = yield_to_harvest * DevRewardPct.get()
225
226 if dev_share > 0:
227 YIELD_TOKEN.transfer(to=DevRewardWallet.get(), amount=dev_share)
228
229 # Send remanding Yield Tokens to user
230 user_share = yield_to_harvest - dev_share
231 YIELD_TOKEN.transfer(to=target, amount=user_share)
232
233 Withdrawals[user] = withdrawn_yield + yield_to_harvest
234
235 new_withdrawn_amount = WithdrawnBalance.get() + yield_to_harvest
236 WithdrawnBalance.set(new_withdrawn_amount)
237
238 return user_share
239
240
241 @export
242 def withdrawYield(amount: float):
243 assert amount > 0, "You cannot harvest a negative balance"
244
245 user = ctx.caller
246 return sendYieldToTarget(amount=amount, target=user, user=user)
247
248
249 @export
250 def withdrawTokensAndYield():
251 user = ctx.caller
252 deposit = Deposits[user]
253
254 assert deposit is not False, "You have no deposit to withdraw"
255
256 # Calculate how much yield is due per deposit account
257 withdrawn_yield = Withdrawals[user]
258 stake_to_return = 0
259 yield_to_harvest = 0
260 user_share = 0
261
262 yield_to_harvest += calculateYield(deposit=deposit)
263 stake_to_return += deposit["amount"]
264
265 # Send Staking Tokens to user
266 STAKING_TOKEN.transfer(to=user, amount=stake_to_return)
267 returnAndBurnVToken(amount=stake_to_return)
268
269 # check that the user has yield left to harvest (this should never be negative, but let's check here just in case)
270 yield_to_harvest -= withdrawn_yield
271 if yield_to_harvest > 0:
272
273 # Take % of Yield Tokens, send it to dev fund
274 dev_share = yield_to_harvest * DevRewardPct.get()
275 if dev_share > 0:
276 YIELD_TOKEN.transfer(to=DevRewardWallet.get(), amount=dev_share)
277
278 # Send remanding Yield Tokens to user
279 user_share = yield_to_harvest - dev_share
280 YIELD_TOKEN.transfer(to=user, amount=user_share)
281
282 # Reset User's Deposits
283 Deposits[user] = False
284
285 # Reset User's Withdrawal
286 Withdrawals[user] = 0
287
288 # Remove token amount from Staked
289 new_staked_amount = StakedBalance.get() - stake_to_return
290 StakedBalance.set(new_staked_amount)
291 new_withdrawn_amount = WithdrawnBalance.get() + yield_to_harvest
292 WithdrawnBalance.set(new_withdrawn_amount)
293
294 # Increment Epoch
295 decideIncrementEpoch(new_staked_amount=new_staked_amount)
296
297 return user_share
298
299
300 # This runs over each of the items in the user's Deposit
301 def calculateYield(deposit):
302 starting_epoch_index = deposit.get("starting_epoch")
303 deposit_start_time = deposit.get("time")
304 amount = deposit.get("amount")
305 step_offset = deposit.get("step_offset")
306
307 if step_offset is not None:
308 deposit_start_time = deposit_start_time + step_offset
309 else:
310 step_offset = now - now # now - now // 0 delta
311
312 current_epoch_index = getCurrentEpochIndex()
313 this_epoch_index = starting_epoch_index
314
315 y = 0
316 time_step_multiplier = 1
317
318 while this_epoch_index <= current_epoch_index:
319 this_epoch = Epochs[this_epoch_index]
320 next_epoch = Epochs[this_epoch_index + 1]
321
322 if UseTimeRamp.get():
323 time_ramp_delta = (
324 fitTimeToRange(now) - fitTimeToRange(this_epoch["time"]) + step_offset
325 )
326 time_step_multiplier = findTimeRampStep(time_ramp_delta.days)
327
328 delta = 0
329
330 if starting_epoch_index == current_epoch_index:
331 delta = fitTimeToRange(now) - fitTimeToRange(deposit_start_time)
332 elif this_epoch_index == starting_epoch_index:
333 delta = fitTimeToRange(next_epoch["time"]) - fitTimeToRange(
334 deposit_start_time
335 )
336 elif this_epoch_index == current_epoch_index:
337 delta = fitTimeToRange(now) - fitTimeToRange(this_epoch["time"])
338 else:
339 delta = fitTimeToRange(next_epoch["time"]) - fitTimeToRange(
340 this_epoch["time"]
341 )
342
343 pct_share_of_stake = 0
344 if amount is not 0 and this_epoch["staked"] is not 0:
345 pct_share_of_stake = amount / this_epoch["staked"]
346
347 # These two lines below were causing some problems, until I used the decimal method. get a python expert to review.
348 emission_rate_per_hour = this_epoch["amt_per_hr"]
349 global_yield_this_epoch = delta.seconds * getEmissionRatePerSecond(
350 emission_rate_per_hour
351 )
352 decimal_converter_var.set(pct_share_of_stake)
353 pct_share_of_stake = decimal_converter_var.get()
354 deposit_yield_this_epoch = (
355 global_yield_this_epoch * pct_share_of_stake * time_step_multiplier
356 )
357 y += deposit_yield_this_epoch
358
359 this_epoch_index += 1
360
361 return y
362
363
364 def fitTimeToRange(time: Any):
365 if time < StartTime.get():
366 time = StartTime.get()
367 elif time > EndTime.get():
368 time = EndTime.get()
369 return time
370
371
372 def getCurrentEpochIndex():
373 current_epoch_index = CurrentEpochIndex.get()
374 return current_epoch_index
375
376
377 def decideIncrementEpoch(new_staked_amount: float):
378 epoch_index = getCurrentEpochIndex()
379 this_epoch = Epochs[epoch_index]
380 this_epoch_staked = this_epoch["staked"]
381 delta = now - this_epoch["time"]
382 delta_seconds = delta.seconds if delta.seconds > 0 else 0
383 if (
384 delta_seconds >= EpochMinTime.get()
385 or this_epoch_staked is 0
386 or maxStakedChangeRatioExceeded(
387 new_staked_amount=new_staked_amount, this_epoch_staked=this_epoch_staked
388 )
389 ):
390 epoch_index = incrementEpoch(new_staked_amount)
391 return epoch_index
392
393
394 def maxStakedChangeRatioExceeded(new_staked_amount: float, this_epoch_staked: float):
395 smaller = (
396 new_staked_amount
397 if new_staked_amount <= this_epoch_staked
398 else this_epoch_staked
399 )
400 bigger = (
401 new_staked_amount
402 if new_staked_amount >= this_epoch_staked
403 else this_epoch_staked
404 )
405 dif = bigger - smaller
406 return (dif) / this_epoch_staked >= EpochMaxRatioIncrease.get()
407
408
409 def incrementEpoch(new_staked_amount: float):
410 current_epoch = CurrentEpochIndex.get()
411 new_epoch_idx = current_epoch + 1
412 CurrentEpochIndex.set(new_epoch_idx)
413 Epochs[new_epoch_idx] = {
414 "time": now,
415 "staked": new_staked_amount,
416 "amt_per_hr": Epochs[current_epoch]["amt_per_hr"],
417 }
418 return new_epoch_idx
419
420
421 @export
422 def changeAmountPerHour(amount_per_hour: float):
423 assertOwner()
424 current_epoch = getCurrentEpochIndex()
425 new_epoch_idx = current_epoch + 1
426 CurrentEpochIndex.set(new_epoch_idx)
427 setEmissionRatePerHour(amount=amount_per_hour)
428
429 Epochs[new_epoch_idx] = {
430 "time": now,
431 "staked": StakedBalance.get(),
432 "amt_per_hr": amount_per_hour,
433 }
434
435
436 @export
437 def setEpochMinTime(min_seconds: float):
438 assertOwner()
439 assert min_seconds >= 0, "you must choose a positive value."
440 EpochMinTime.set(min_seconds)
441
442
443 @export
444 def setEpochMaxRatioIncrease(ratio: float):
445 assertOwner()
446 assert ratio > 0, "must be a positive value"
447 EpochMaxRatioIncrease.set(ratio)
448
449
450 def getEmissionRatePerSecond(emission_rate_per_hour: float):
451 emission_rate_per_minute = emission_rate_per_hour / 60
452 emission_rate_per_second = emission_rate_per_minute / 60
453 return emission_rate_per_second
454
455
456 @export
457 def setOwner(vk: str):
458 assertOwner()
459 Owner.set(vk)
460
461
462 @export
463 def setDevWallet(vk: str):
464 assertOwner()
465 DevRewardWallet.set(vk)
466
467
468 @export
469 def setDevRewardPct(amount: float):
470 assertOwner()
471 assert amount < 1 and amount >= 0, "Amount must be a value between 0 and 1"
472 DevRewardPct.set(amount)
473
474
475 def setEmissionRatePerHour(amount: float):
476 assertOwner()
477 EmissionRatePerHour.set(amount)
478
479
480 @export
481 def recoverYieldToken(amount: float):
482 assertOwner()
483 assert amount > 0, "Yield token amount must be greater than 0"
484 staked_balance = StakedBalance.get()
485 yield_balances = ForeignHash(
486 foreign_contract=meta["YIELD_TOKEN"], foreign_name="balances"
487 )
488 total_in_contract = yield_balances[ctx.this]
489 total_available = total_in_contract - staked_balance
490 amount_to_recover = amount if amount <= total_available else total_available
491 YIELD_TOKEN.transfer(amount=amount_to_recover, to=Owner.get())
492
493
494 @export
495 def allowStaking(is_open: bool):
496 assertOwner()
497 OpenForBusiness.set(is_open)
498
499
500 @export
501 def setStartTime(year: int, month: int, day: int, hour: int):
502 assertOwner()
503 time = datetime.datetime(year, month, day, hour)
504 StartTime.set(time)
505
506
507 @export
508 def setEndTime(year: int, month: int, day: int, hour: int):
509 assertOwner()
510 time = datetime.datetime(year, month, day, hour)
511 EndTime.set(time)
512
513
514 def assertOwner():
515 assert Owner.get() == ctx.caller, "You must be the owner to call this function."
516
517
518 # This is only to be called in emergencies - the user will forgo their yield when calling this FN.
519
520
521 @export
522 def emergencyReturnStake():
523
524 user = ctx.caller
525 deposit = Deposits[user]
526
527 assert Deposits[user] is not False, "This account has no deposits to return."
528
529 stake_to_return = 0
530
531 stake_to_return += deposit["amount"]
532
533 STAKING_TOKEN.transfer(to=user, amount=stake_to_return)
534 returnAndBurnVToken(amount=stake_to_return)
535 Deposits[user] = False
536 Withdrawals[user] = 0
537
538 # Remove token amount from Staked
539 new_staked_amount = StakedBalance.get() - stake_to_return
540 StakedBalance.set(new_staked_amount)
541 decideIncrementEpoch(new_staked_amount=new_staked_amount)
542
543
544 @export
545 def toggleTimeRamp(on: bool):
546 assertOwner()
547 UseTimeRamp.set(on)
548
549
550 def findTimeRampStep(days: int):
551 time_ramps = TimeRampValues.get()
552 step = None
553 for s in time_ramps:
554 if s["lower"] <= days and s["upper"] > days:
555 step = s
556 if step is None:
557 return time_ramps[len(time_ramps) - 1]["multiplier"]
558 return step["multiplier"]
559
560
561 @export
562 def setTimeRampValues(data: list):
563 assertOwner()
564 TimeRampValues.set(data)
565
566
567 # VTOKEN METHODS
568 @export
569 def transfer(amount: float, to: str):
570 assert amount > 0, "Cannot send negative balances!"
571 assert balances[ctx.caller] >= amount, "Not enough VTOKENS to send!"
572 balances[ctx.caller] -= amount
573 balances[to] += amount
574
575
576 @export
577 def approve(amount: float, to: str):
578 assert amount > 0, "Cannot send negative balances!"
579 balances[ctx.caller, to] += amount
580
581
582 @export
583 def transfer_from(amount: float, to: str, main_account: str):
584 assert amount > 0, "Cannot send negative balances!"
585
586 assert (
587 balances[main_account, ctx.caller] >= amount
588 ), "Not enough coins approved to send! You have {} and are trying to spend {}".format(
589 balances[main_account, ctx.caller], amount
590 )
591 assert balances[main_account] >= amount, "Not enough coins to send!"
592 balances[main_account, ctx.caller] -= amount
593 balances[main_account] -= amount
594 balances[to] += amount
595
596
597 def returnAndBurnVToken(amount: float):
598 user = ctx.caller
599 assert (
600 balances[user] >= amount
601 ), "Your VTOKEN balance is too low to unstake, recover your VTOKENS and try again."
602 balances[user] -= amount
603
604
605 def mintVToken(amount: float):
606 user = ctx.signer
607 balances[user] += amount

Byte Code

e3000000000000000000000000060000004000000073bc030000640064016c005a0065015a0265005a0365005a0465056402640364048d025a0665056402640564048d025a0765056402640664048d025a0865056402640764048d025a0965056402640864048d025a0a65056402640964048d025a0b65056402640a64048d025a0c650d640b6402640c640d8d035a0e650d64006402640e640d8d035a0f65056402640f64048d025a10650d640b64026410640d8d035a1165056402641164048d025a1265056402641264048d025a1365056402641364048d025a1465056402641464048d025a15650d640b64026415640d8d035a1665056402641664048d025a1765056402641764048d025a1865056402641864048d025a1965056402641964048d025a1a650d64006402641a640d8d035a1b641b641c84005a1c651d64028301651e641d9c01641e641f840483015a1f651d64028301652064209c0164216422840483015a21651e6520652264239c036424642584045a23651d64028301651e6520652264239c0364266427840483015a24651e6520652064289c036429642a84045a25651d64028301651e641d9c01642b642c840483015a26651d64028301642d642e840083015a27642f643084005a28652964319c016432643384045a2a6434643584005a2b651e64369c016437643884045a2c651e651e64399c02643a643b84045a2d651e64369c01643c643d84045a2e651d64028301651e643e9c01643f6440840483015a2f651d64028301651e64419c0164426443840483015a30651d64028301651e64449c0164456446840483015a31651e64479c016448644984045a32651d640283016520644a9c01644b644c840483015a33651d640283016520644a9c01644d644e840483015a34651d64028301651e641d9c01644f6450840483015a35651e641d9c016451645284045a36651d64028301651e641d9c0164536454840483015a37651d64028301652264559c0164566457840483015a38651d64028301653965396539653964589c046459645a840483015a3a651d64028301653965396539653964589c04645b645c840483015a3b645d645e84005a3c651d64028301645f6460840083015a3d651d64028301652264619c0164626463840483015a3e653964649c016465646684045a3f651d64028301654064679c0164686469840483015a41651d64028301651e6520646a9c02646b646c840483015a42651d64028301651e6520646a9c02646d646e840483015a43651d64028301651e65206520646f9c0364706471840483015a44651e641d9c016472647384045a45651e641d9c016474647584045a46640153002976e9000000004eda15636f6e5f7374616b696e675f727377705f72737770da054f776e65722902da08636f6e7472616374da046e616d65da0f44657652657761726457616c6c6574da13456d697373696f6e52617465506572486f7572da0c446576526577617264506374da09537461727454696d65da07456e6454696d65da0f4f70656e466f72427573696e65737346da084465706f736974732903da0d64656661756c745f76616c756572040000007205000000da0b5769746864726177616c73da1143757272656e7445706f6368496e646578da0645706f636873da0d5374616b656442616c616e6365da1057697468647261776e42616c616e6365da0c45706f63684d696e54696d65da1545706f63684d6178526174696f496e637265617365da046d657461da15646563696d616c5f636f6e7665727465725f766172da0e54696d6552616d7056616c756573da0b55736554696d6552616d70da1054727573746564496d706f7274657273da0862616c616e636573630000000000000000000000000e00000043000000736801000074006a0174026a038301010074046a0174026a038301010074056a0164018301010074066a0164018301010074076a0164018301010074086a0164028301010074096a01642983010100740a6a01640783010100740b6a0164016408740c64098301640a9c036408640b740c640c8301640a9c03640b6406740c640d8301640a9c036406640e740c640f8301640a9c03640e6410740c64118301640a9c0364106412740c64138301640a9c0364126414740c64158301640a9c0364146416740c64178301640a9c0364166418740c64198301640a9c036418641a6408640a9c03670a83010100740d6401641b641c9c03740e64013c00640d740f641d3c00641e740f641f3c006420740f64213c006420740f64223c0074106a01641b8301010074116a01642a8301010074126a0174136a1364236410640b642464258d048301010074146a0174136a1364266410640b640164258d048301010074156a0164078301010064005300292b4e720100000069e8030000e91e000000e93c000000e918000000e90300000054e9010000007a03302e312903da056c6f776572da057570706572da0a6d756c7469706c696572e9020000007a03302e327a03302e33e9040000007a03302e34e9050000007a03302e35e9060000007a03302e36e9070000007a03302e37e9080000007a03302e38e9090000007a03302e39e90a00000069600d00002903da0474696d65da067374616b6564da0a616d745f7065725f6872da0776657273696f6eda287374616b696e675f736d6172745f65706f63685f636f6d706f756e64696e675f74696d6572616d70da0474797065da0f636f6e5f727377705f6c7374303031da0d5354414b494e475f544f4b454eda0b5949454c445f544f4b454e69e5070000e9120000002904da0479656172da056d6f6e7468da03646179da04686f757269e6070000690807000069c0a800006940fa0100679a9999999999b93f2916da075f5f4f776e6572da03736574da03637478da0663616c6c6572da115f5f44657652657761726457616c6c6574da135f5f43757272656e7445706f6368496e646578da0f5f5f5374616b656442616c616e6365da125f5f57697468647261776e42616c616e6365da175f5f45706f63684d6178526174696f496e637265617365da0e5f5f45706f63684d696e54696d65da0d5f5f55736554696d6552616d70da105f5f54696d6552616d7056616c756573da07646563696d616cda036e6f77da085f5f45706f636873da065f5f6d657461da155f5f456d697373696f6e52617465506572486f7572da0e5f5f446576526577617264506374da0b5f5f537461727454696d65da086461746574696d65da095f5f456e6454696d65da115f5f4f70656e466f72427573696e657373a900724f000000724f000000da00da045f5f5f5f2d000000733800000000010c010c010a010a010a010a010a010a010a011601100110010e010e010e010e010e010c01100108010801080108010a010a011801180172510000002901da06616d6f756e74630100000000000000030000000500000043000000733600000074006a017d0174027c0119007d027c0264016b08722474037c006402640164038d03530074047c006402640164038d0353006400530029044e46723c00000029037252000000da08757365725f637478da0d66726f6d5f636f6e74726163742905723b000000723c000000da0a5f5f4465706f73697473da125f5f6372656174654e65774465706f736974da0f696e6372656173654465706f73697429037252000000da0475736572da076465706f736974724f000000724f0000007250000000da106164645374616b696e67546f6b656e734c000000730e0000000002060108010801060108020601725a00000029017204000000630100000000000000050000000500000043000000734800000074006a017c0083017d017c016a0283007d0274036a047d0374057c0319007d047c0464016b08723674067c026402640364048d03530074077c026402640364048d0353006400530029054e46723c0000005429037252000000725300000072540000002908da0149da0d696d706f72745f6d6f64756c65da1c6578706f72745969656c64546f466f726569676e436f6e7472616374723b000000da067369676e657272550000007256000000725700000029057204000000da0e7969656c645f636f6e7472616374725200000072580000007259000000724f000000724f0000007250000000da187374616b6546726f6d436f6e747261637450726f6669747358000000731200000000020a01080106010801080106010802060172600000002903725200000072530000007254000000630300000000000000070000000500000043000000738a00000074006a01830064016b02731474026402830182017c0064036b047324740264048301820174036a047d037c0264056b08724474056a067c0074036a077c0364068d03010074086a0183007d047c047c0017007d0574086a097c0583010100740a7c0564078d017d067c06740b7c0064089c03740c7c033c00740d7c0064098d010100740c7c0319005300290a4e547a2854686973207374616b696e6720706f6f6c206973206e6f74206f70656e207269676874206e6f772e72010000007a19596f75206d757374207374616b6520736f6d657468696e672e4629037252000000da02746fda0c6d61696e5f6163636f756e742901da116e65775f7374616b65645f616d6f756e742903da0e7374617274696e675f65706f6368722b000000725200000029017252000000290e724e000000da03676574da0e417373657274696f6e4572726f72723b000000723c0000007232000000da0d7472616e736665725f66726f6dda0474686973723f000000723a000000da165f5f646563696465496e6372656d656e7445706f636872460000007255000000da0c5f5f6d696e7456546f6b656e29077252000000725300000072540000007258000000722c0000007263000000da0b65706f63685f696e646578724f000000724f0000007250000000725600000066000000731e000000000106010e011001060108010a010801080108010a010a0104010c010a0172560000006303000000000000000e0000000500000043000000735a0100007c0164016b08720e74006a016e0264027d0374026a03830064036b02732674046404830182017c0064056b057336740464068301820174057c0319007d047c0464076b09734e74046408830182017c0064056b0472707c0264076b08727074066a077c0074006a087c0364098d03010074097c0319007d0564057d0664057d0764057d0864077d097c06740a7c04640a8d0137007d067c04640b19007d097c04640c19007d077c067c0538007d067c0664056b0472e47c06740b6a03830014007d0a7c0a64056b0472dc740c6a0d740e6a0383007c0a640d8d0201007c067c0a18007d087c087c0717007c0017007d0b740f6a0383007d0c7c0c7c0817007c0017007d0d740f6a107c0d8301010074116a1074116a0383007c0617008301010074127c087c001700640e8d010100640574097c033c0074137c0d640f8d017c097c0b74147c09180064109c0474057c033c0074057c031900530029114e723c000000725e000000547a2854686973207374616b696e6720706f6f6c206973206e6f74206f70656e207269676874206e6f772e72010000007a24596f752063616e6e6f74207374616b652061206e656761746976652062616c616e63652e467a2354686973207573657220686173206e6f206465706f73697420746f2061646420746f2e290372520000007261000000726200000029017259000000722b0000007252000000290272610000007252000000290172520000002901726300000029047264000000722b0000007252000000da0b737465705f6f66667365742915723b000000723c000000724e000000726500000072660000007255000000723200000072670000007268000000da0d5f5f5769746864726177616c73da105f5f63616c63756c6174655969656c64724a0000007233000000da087472616e73666572723d000000723f000000723a0000007240000000726a00000072690000007246000000290e72520000007253000000725400000072580000007259000000da0f77697468647261776e5f7969656c64da107969656c645f746f5f68617276657374da0e6578697374696e675f7374616b65da10757365725f7969656c645f7368617265da0a73746172745f74696d65da096465765f7368617265da14746f74616c5f6465706f7369745f616d6f756e74da14676c6f62616c5f616d6f756e745f7374616b6564da116e65775f676c6f62616c5f7374616b6564724f000000724f000000725000000072570000007800000073440000000002120106010e0110010801100110010a010801080104010401040104010e0108010801080108010c010801120108010c0108010c010a0112010e010801020108011201725700000029037252000000da0674617267657472580000006303000000000000000a000000040000004300000073bc00000074007c0219007d037c0364016b097318740164028301820174027c0219007d0464037d057c0574037c0364048d0137007d057c057c0438007d057c007c056b0072467c006e027c057d067c0664036b04735a74016405830182017c0674046a05830014007d077c0764036b04728074066a0774086a0583007c0764068d0201007c067c0718007d0874066a077c017c0864068d0201007c047c06170074027c023c0074096a0583007c0617007d0974096a0a7c09830101007c08530029074e467a2b596f752068617665206e6f206465706f73697420746f207769746864726177207969656c642066726f6d2e7201000000290172590000007a295468657265206973206e6f207969656c6420746f2068617276657374207269676874206e6f77203a28290272610000007252000000290b72550000007266000000726d000000726e000000724a00000072650000007233000000726f000000723d0000007240000000723a000000290a72520000007279000000725800000072590000007270000000da116861727665737461626c655f7969656c6472710000007275000000da0a757365725f7368617265da146e65775f77697468647261776e5f616d6f756e74724f000000724f0000007250000000da135f5f73656e645969656c64546f5461726765749e0000007324000000000108011001080104010e0108010c01040110010c010801120108010e010c010c010a01727d00000063010000000000000002000000050000004300000073240000007c0064016b047310740064028301820174016a027d0174037c007c017c0164038d03530029044e72010000007a25596f752063616e6e6f7420686172766573742061206e656761746976652062616c616e6365290372520000007279000000725800000029047266000000723b000000723c000000727d000000290272520000007258000000724f000000724f0000007250000000da0d77697468647261775969656c64b30000007306000000000210010601727e00000063000000000000000009000000040000004300000073fa00000074006a017d0074027c0019007d017c0164016b09731e740364028301820174047c0019007d0264037d0364037d0464037d057c0474057c0164048d0137007d047c037c016405190037007d0374066a077c007c0364068d02010074087c0364078d0101007c047c0238007d047c0464036b0472b07c0474096a0a830014007d067c0664036b04729a740b6a07740c6a0a83007c0664068d0201007c047c0618007d05740b6a077c007c0564068d020100640174027c003c00640374047c003c00740d6a0a83007c0318007d07740d6a0e7c0783010100740f6a0a83007c0417007d08740f6a0e7c088301010074107c0764088d0101007c05530029094e467a1f596f752068617665206e6f206465706f73697420746f207769746864726177720100000029017259000000725200000029027261000000725200000029017252000000290172630000002911723b000000723c00000072550000007266000000726d000000726e0000007232000000726f000000da155f5f72657475726e416e644275726e56546f6b656e724a00000072650000007233000000723d000000723f000000723a000000724000000072690000002909725800000072590000007270000000da0f7374616b655f746f5f72657475726e7271000000727b00000072750000007263000000727c000000724f000000724f0000007250000000da167769746864726177546f6b656e73416e645969656c64ba0000007334000000000206010801100108010401040104010e010c010e010a01080108010c010801120108010e01080108010c010a010c010a010a01728100000063010000000000000011000000040000004300000073860100007c006a00640183017d017c006a00640283017d027c006a00640383017d037c006a00640483017d047c0464006b09723a7c027c0417007d026e087401740118007d04740283007d057c017d0664057d0764067d089001782a7c067c056b019001728074037c0619007d0974037c066406170019007d0a74046a00830072a074057401830174057c0964021900830118007c0417007d0b74067c0b6a0783017d0864057d0c7c017c056b0272be74057401830174057c02830118007d0c6e547c067c016b0272dc74057c0a64021900830174057c02830118007d0c6e367c067c056b0272fa74057401830174057c0964021900830118007d0c6e1874057c0a64021900830174057c0964021900830118007d0c64057d0d7c0364056b099001723a7c096407190064056b099001723a7c037c09640719001b007d0d7c09640819007d0e7c0c6a0874097c0e830114007d0f740a6a0b7c0d83010100740a6a0083007d0d7c0f7c0d14007c0814007d107c077c1037007d077c06640637007d06715857007c07530029094e7264000000722b0000007252000000726c0000007201000000721f000000722c000000722d000000290c72650000007246000000da165f5f67657443757272656e7445706f6368496e64657872470000007243000000da105f5f66697454696d65546f52616e6765da125f5f66696e6454696d6552616d7053746570da0464617973da077365636f6e6473da1a5f5f676574456d697373696f6e526174655065725365636f6e64da175f5f646563696d616c5f636f6e7665727465725f766172723a00000029117259000000da147374617274696e675f65706f63685f696e646578da126465706f7369745f73746172745f74696d657252000000726c000000da1363757272656e745f65706f63685f696e646578da10746869735f65706f63685f696e646578da0179da1474696d655f737465705f6d756c7469706c696572da0a746869735f65706f6368da0a6e6578745f65706f6368da0f74696d655f72616d705f64656c7461da0564656c7461da127063745f73686172655f6f665f7374616b65da16656d697373696f6e5f726174655f7065725f686f7572da17676c6f62616c5f7969656c645f746869735f65706f6368da186465706f7369745f7969656c645f746869735f65706f6368724f000000724f0000007250000000726e000000d8000000734e00000000010a010a010a010a0108010a02080106010401040104010e0108010c01080218010a0104010801120208010c010a01080116030c010c01040118010c010801060108010a0108020c0108010c01726e0000002901722b000000630100000000000000010000000200000043000000732e0000007c0074006a0183006b00721674006a0183007d006e147c0074026a0183006b04722a74026a0183007d007c00530029014e2903724b0000007265000000724d0000002901722b000000724f000000724f0000007250000000728300000008010000730a00000000010c010a010c0108017283000000630000000000000000010000000100000043000000730c00000074006a0183007d007c00530029014e2902723e00000072650000002901728b000000724f000000724f00000072500000007282000000100100007304000000000108017282000000290172630000006301000000000000000600000004000000430000007362000000740083007d0174017c0119007d027c02640119007d0374027c026402190018007d047c046a0364036b0472327c046a036e0264037d057c0574046a0583006b0573567c0364036b08735674067c007c0364048d02725e74077c0083017d017c01530029054e722c000000722b000000720100000029027263000000da11746869735f65706f63685f7374616b65642908728200000072470000007246000000728600000072420000007265000000da1e5f5f6d61785374616b65644368616e6765526174696f4578636565646564da105f5f696e6372656d656e7445706f636829067263000000726b000000728f00000072970000007292000000da0d64656c74615f7365636f6e6473724f000000724f0000007250000000726900000015010000731600000000010601080108010c0114010c010a01020108010801726900000029027263000000729700000063020000000000000005000000020000004300000073380000007c007c016b01720c7c006e027c017d027c007c016b05721c7c006e027c017d037c037c0218007d047c047c011b0074006a0183006b05530029014e290272410000007265000000290572630000007297000000da07736d616c6c6572da06626967676572da03646966724f000000724f0000007250000000729800000023010000730c00000000020c0104010c01040108017298000000630100000000000000030000000400000043000000733600000074006a0183007d017c01640117007d0274006a027c028301010074037c0074047c0119006402190064039c0374047c023c007c02530029044e721f000000722d0000002903722b000000722c000000722d0000002905723e0000007265000000723a0000007246000000724700000029037263000000da0d63757272656e745f65706f6368da0d6e65775f65706f63685f696478724f000000724f000000725000000072990000002d010000730c0000000001080108010a010401140172990000002901da0f616d6f756e745f7065725f686f75726301000000000000000300000004000000430000007340000000740083000100740183007d017c01640117007d0274026a037c028301010074047c0064028d010100740574066a0783007c0064039c0374087c023c006400530029044e721f000000290172520000002903722b000000722c000000722d0000002909da0d5f5f6173736572744f776e65727282000000723e000000723a000000da185f5f736574456d697373696f6e52617465506572486f75727246000000723f00000072650000007247000000290372a0000000729e000000729f000000724f000000724f0000007250000000da136368616e6765416d6f756e74506572486f757236010000730e00000000020601060108010a010a01080172a30000002901da0b6d696e5f7365636f6e647363010000000000000001000000020000004300000073240000007400830001007c0064016b057316740164028301820174026a037c00830101006400530029034e72010000007a21796f75206d7573742063686f6f7365206120706f7369746976652076616c75652e290472a100000072660000007242000000723a000000290172a4000000724f000000724f0000007250000000da0f73657445706f63684d696e54696d6541010000730600000000020601100172a50000002901da05726174696f63010000000000000001000000020000004300000073240000007400830001007c0064016b047316740164028301820174026a037c00830101006400530029034e72010000007a186d757374206265206120706f7369746976652076616c7565290472a100000072660000007241000000723a000000290172a6000000724f000000724f0000007250000000da1873657445706f63684d6178526174696f496e63726561736548010000730600000000020601100172a70000002901729400000063010000000000000003000000020000004300000073140000007c0064011b007d017c0164011b007d027c02530029024e721c000000724f00000029037294000000da18656d697373696f6e5f726174655f7065725f6d696e757465da18656d697373696f6e5f726174655f7065725f7365636f6e64724f000000724f000000725000000072870000004f010000730600000000010801080172870000002901da02766b630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e290372a10000007239000000723a000000290172aa000000724f000000724f0000007250000000da087365744f776e65725501000073040000000002060172ab000000630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e290372a1000000723d000000723a000000290172aa000000724f000000724f0000007250000000da0c73657444657657616c6c65745b01000073040000000002060172ac000000630100000000000000010000000200000043000000732c0000007400830001007c0064016b0072167c0064026b05731e740164038301820174026a037c00830101006400530029044e721f00000072010000007a26416d6f756e74206d75737420626520612076616c7565206265747765656e203020616e642031290472a10000007266000000724a000000723a00000029017252000000724f000000724f0000007250000000da0f73657444657652657761726450637461010000730600000000020601180172ad000000630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e290372a10000007249000000723a00000029017252000000724f000000724f000000725000000072a20000006801000073040000000001060172a2000000630100000000000000060000000600000043000000736a0000007400830001007c0064016b047316740164028301820174026a0383007d01740474056403190064046405640664078d047d027c0274066a0719007d037c037c0118007d047c007c046b0172507c006e027c047d0574086a097c05740a6a03830064088d0201006400530029094e72010000007a295969656c6420746f6b656e20616d6f756e74206d7573742062652067726561746572207468616e20307233000000721a0000007202000000da0e7969656c645f62616c616e6365732904da10666f726569676e5f636f6e7472616374da0c666f726569676e5f6e616d6572040000007205000000290272520000007261000000290b72a10000007266000000723f0000007265000000da0b466f726569676e486173687248000000723b00000072680000007233000000726f000000723900000029067252000000da0e7374616b65645f62616c616e6365da105f5f7969656c645f62616c616e636573da11746f74616c5f696e5f636f6e7472616374da0f746f74616c5f617661696c61626c65da11616d6f756e745f746f5f7265636f766572724f000000724f0000007250000000da117265636f7665725969656c64546f6b656e6d010000731600000000020601100108010801040108010a0108010c01040172b70000002901da0769735f6f70656e630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e290372a1000000724e000000723a000000290172b8000000724f000000724f0000007250000000da0c616c6c6f775374616b696e677c01000073040000000002060172b900000029047235000000723600000072370000007238000000630400000000000000050000000500000043000000732400000074008300010074016a017c007c017c027c0383047d0474026a037c04830101006400530029014e290472a1000000724c000000724b000000723a00000029057235000000723600000072370000007238000000722b000000724f000000724f0000007250000000da0c736574537461727454696d6582010000730600000000020601100172ba000000630400000000000000050000000500000043000000732400000074008300010074016a017c007c017c027c0383047d0474026a037c04830101006400530029014e290472a1000000724c000000724d000000723a00000029057235000000723600000072370000007238000000722b000000724f000000724f0000007250000000da0a736574456e6454696d6589010000730600000000020601100172bb000000630000000000000000000000000200000043000000731a00000074006a01830074026a036b02731674046401830182016400530029024e7a2c596f75206d75737420626520746865206f776e657220746f2063616c6c20746869732066756e6374696f6e2e290572390000007265000000723b000000723c0000007266000000724f000000724f000000724f000000725000000072a10000009001000073040000000001060172a1000000630000000000000000040000000400000043000000737e00000074006a017d0074027c0019007d0174027c00190064016b097322740364028301820164037d027c027c016404190037007d0274046a057c007c0264058d02010074067c0264068d010100640174027c003c00640374077c003c0074086a0983007c0218007d0374086a0a7c0383010100740b7c0364078d0101006400530029084e467a2754686973206163636f756e7420686173206e6f206465706f7369747320746f2072657475726e2e720100000072520000002902726100000072520000002901725200000029017263000000290c723b000000723c000000725500000072660000007232000000726f000000727f000000726d000000723f0000007265000000723a000000726900000029047258000000725900000072800000007263000000724f000000724f0000007250000000da14656d657267656e637952657475726e5374616b6595010000731a00000000020601080106010e0104010c010e010a01080108010c010a0172bc0000002901da026f6e630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e290372a10000007243000000723a000000290172bd000000724f000000724f0000007250000000da0e746f67676c6554696d6552616d70a601000073040000000002060172be00000029017285000000630100000000000000040000000300000043000000735a00000074006a0183007d0164007d0278287c0144005d207d037c03640119007c006b0172127c03640219007c006b0472127c037d02711257007c0264006b0872527c0174027c0183016403180019006404190053007c0264041900530029054e72200000007221000000721f0000007222000000290372440000007265000000da036c656e29047285000000da0a74696d655f72616d7073da0473746570da0173724f000000724f00000072500000007284000000ac01000073100000000001080104010a01180108010801140172840000002901da0464617461630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e290372a10000007244000000723a000000290172c3000000724f000000724f0000007250000000da1173657454696d6552616d7056616c756573b701000073040000000002060172c4000000290272520000007261000000630200000000000000020000000400000043000000734c0000007c0064016b0473107400640283018201740174026a0319007c006b0573267400640383018201740174026a03050019007c00380003003c0074017c01050019007c00370003003c006400530029044e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a1b4e6f7420656e6f7567682056544f4b454e5320746f2073656e642129047266000000da0a5f5f62616c616e636573723b000000723c000000290272520000007261000000724f000000724f0000007250000000726f000000bd01000073080000000002100116011201726f000000630200000000000000020000000400000043000000732a0000007c0064016b0473107400640283018201740174026a037c016602050019007c00370003003c006400530029034e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573212904726600000072c5000000723b000000723c000000290272520000007261000000724f000000724f0000007250000000da07617070726f7665c501000073040000000002100172c60000002903725200000072610000007262000000630300000000000000030000000500000043000000738a0000007c0064016b047310740064028301820174017c0274026a03660219007c006b05733c740064036a0474017c0274026a03660219007c0083028301820174017c0219007c006b057350740064048301820174017c0274026a036602050019007c00380003003c0074017c02050019007c00380003003c0074017c01050019007c00370003003c006400530029054e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a494e6f7420656e6f75676820636f696e7320617070726f76656420746f2073656e642120596f752068617665207b7d20616e642061726520747279696e6720746f207370656e64207b7d7a194e6f7420656e6f75676820636f696e7320746f2073656e64212905726600000072c5000000723b000000723c000000da06666f726d61742903725200000072610000007262000000724f000000724f00000072500000007267000000cb0100007310000000000210010c010c0114011401160110017267000000630100000000000000020000000400000043000000732e00000074006a017d0174027c0119007c006b05731a740364018301820174027c01050019007c00380003003c006400530029024e7a4e596f75722056544f4b454e2062616c616e636520697320746f6f206c6f7720746f20756e7374616b652c207265636f76657220796f75722056544f4b454e5320616e642074727920616761696e2e2904723b000000723c00000072c50000007266000000290272520000007258000000724f000000724f0000007250000000727f000000d701000073080000000001060106010e01727f000000630100000000000000020000000400000043000000731a00000074006a017d0174027c01050019007c00370003003c006400530029014e2903723b000000725e00000072c5000000290272520000007258000000724f000000724f0000007250000000726a000000de010000730400000000010601726a00000029477231000000da09696d706f72746c6962725b00000072320000007233000000da085661726961626c657239000000723d0000007249000000724a000000724b000000724d000000724e000000da04486173687255000000726d000000723e0000007247000000723f0000007240000000724200000072410000007248000000728800000072440000007243000000da125f5f54727573746564496d706f727465727372c50000007251000000da085f5f6578706f7274da05666c6f6174725a000000da037374727260000000da04626f6f6c72560000007257000000727d000000727e0000007281000000726e000000da03416e797283000000728200000072690000007298000000729900000072a300000072a500000072a7000000728700000072ab00000072ac00000072ad00000072a200000072b700000072b9000000da03696e7472ba00000072bb00000072a100000072bc00000072be0000007284000000da046c69737472c4000000726f00000072c60000007267000000727f000000726a000000724f000000724f000000724f0000007250000000da083c6d6f64756c653e0100000073be00000008010401040104010c0104010801040108010c020c010c01040108010601080106010801040108010601080104010801040108010c02040108010601080104010801040108010c010401080106010803081f0601100b0601100d121206011425121506011006101e08300e0808050e0e02010e090e090601100a06011006060110060e060601100506011005060110060e050601100e06011005060116060601160608051011060110050e0b0601100506011207060112050601140b0e07