tx · 4mfmucrfLYY4DZbuAa3tZvDYz9f5Gsj1dzz1boPzd6bF

3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h:  -0.02700000 Waves

2024.10.21 16:37 [3336681] smart account 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h > SELF 0.00000000 Waves

{ "type": 13, "id": "4mfmucrfLYY4DZbuAa3tZvDYz9f5Gsj1dzz1boPzd6bF", "fee": 2700000, "feeAssetId": null, "timestamp": 1729517874106, "version": 1, "sender": "3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h", "senderPublicKey": "3z8Q6Zu3KppVmn6fJJvrLc1Wo3krVHSvfaNcerm82md2", "proofs": [ "pTzb6VATqzdKh3niivxoFt11NYGztBdww7jFEwi5emvvBtyYPW9bqbKUD7fakN851kqchJqvMabT6h4xY18UWxS" ], "script": "base64:BgJQCAISAwoBARIAEgMKAQQSAwoBBBIDCgEIEgQKAggIEgMKAQgSBAoCCAgSAwoBCBIECgIIARIECgIIARIDCgEBEgASAwoBCBIDCgEBEgMKAQhPAAxjb250cmFjdEZpbGUCEWwybXBfbGVhc2luZy5yaWRlAANTRVACAl9fABJCTE9DS1NfSU5fSU5URVJWQUwA6AcABnNjYWxlOACAwtcvAAdzY2FsZTE2CQBoAgUGc2NhbGU4BQZzY2FsZTgBCHRocm93RXJyAQNtc2cJAAIBCQCsAgIJAKwCAgUMY29udHJhY3RGaWxlAgI6IAUDbXNnAAxrZXlMMkFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAAMa2V5Rm9yY2VTdG9wCQC5CQIJAMwIAgICJXMJAMwIAgIJZm9yY2VTdG9wBQNuaWwFA1NFUAAPa2V5Rm9yY2VPdXRTdG9wCQC5CQIJAMwIAgICJXMJAMwIAgIMZm9yY2VPdXRTdG9wBQNuaWwFA1NFUAAPa2V5VW5pdHNBc3NldElkCQC5CQIJAMwIAgICJXMJAMwIAgIMdW5pdHNBc3NldElkBQ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AIFBHRoaXMJAQ5rZXlBbGxvd2VkVHhJZAACAAQHYnlPd25lcgMJAGcCCQCQAwEJAQ1nZXRBZG1pbnNMaXN0AAUGUVVPUlVNBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQMFCGJ5QWRtaW5zBgUHYnlPd25lcsNpSxg=", "chainId": 84, "height": 3336681, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9zGTEQEbiEoghPBeaxnVGUGK299DNztiy5Zypb4YWedX Next: EDS2JzwHfQLX9WX6Se6unA3uHm3JRq83rz1KVeNngGg9 Diff:
OldNewDifferences
88 let BLOCKS_IN_INTERVAL = 1000
99
1010 let scale8 = 100000000
11+
12+let scale16 = (scale8 * scale8)
1113
1214 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1315
2022
2123 let keyUnitsAssetId = makeString(["%s", "unitsAssetId"], SEP)
2224
23-let keyUnitsPerBlockScale8 = makeString(["%s", "unitsPerBlock"], SEP)
25+let keyUnitsPerBlockScale16 = makeString(["%s", "unitsPerBlockScale16"], SEP)
2426
2527 let keyPeriodOffsetId = makeString(["%s", "offsetId"], SEP)
2628
176178
177179
178180 func genVotesKeysHelper (a,adminAddress) = {
179- let $t051475171 = a
180- let result = $t051475171._1
181- let prefix = $t051475171._2
181+ let $t051855209 = a
182+ let result = $t051855209._1
183+ let prefix = $t051855209._2
182184 $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
183185 }
184186
185187
186188 func genVotesKeys (keyPrefix) = {
187189 let adminList = keyAdminAddressList()
188- let $t053185402 = {
190+ let $t053565440 = {
189191 let $l = getAdminsList()
190192 let $s = size($l)
191193 let $acc0 = $Tuple2(nil, keyPrefix)
199201
200202 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
201203 }
202- let result = $t053185402._1
203- let prefix = $t053185402._2
204+ let result = $t053565440._1
205+ let prefix = $t053565440._2
204206 result
205207 }
206208
354356 func calculateUnitsToClaim (userAddress) = {
355357 let claimedBlockKey = keyUnitsClaimedBlock(userAddress)
356358 let claimedBlock = valueOrElse(getInteger(this, claimedBlockKey), unitsClaimStartHeight)
357- let unitsPerBlockScale8 = valueOrElse(getInteger(this, keyUnitsPerBlockScale8), 0)
359+ let unitsPerBlockScale16 = valueOrElse(getInteger(this, keyUnitsPerBlockScale16), 0)
358360 let currentBlock = min([(unitsClaimStartHeight + unitsClaimInterval), height])
359361 let blocksPassed = (currentBlock - claimedBlock)
360362 let amountStaked = getUserTotalLocked(userAddress)
361363 let l2ToBurn = fraction(amountStaked, blocksPassed, unitsClaimInterval)
362- let unitsToClaimNow = fraction(l2ToBurn, unitsPerBlockScale8, (scale8 * scale8))
364+ let unitsToClaimNow = fraction(l2ToBurn, unitsPerBlockScale16, scale16)
363365 $Tuple3(unitsToClaimNow, l2ToBurn, currentBlock)
364366 }
365367
369371 let unlockedUnits = valueOrElse(getInteger(this, kUnlockedUnits), 0)
370372 let kL2ToBurn = keyL2ToBurn(userAddress)
371373 let l2ToBurn = valueOrElse(getInteger(this, kL2ToBurn), 0)
372- let $t01132911414 = calculateUnitsToClaim(userAddress)
373- let unitsToClaimNow = $t01132911414._1
374- let l2ToBurnNow = $t01132911414._2
375- let currentBlock = $t01132911414._3
374+ let $t01136411449 = calculateUnitsToClaim(userAddress)
375+ let unitsToClaimNow = $t01136411449._1
376+ let l2ToBurnNow = $t01136411449._2
377+ let currentBlock = $t01136411449._3
376378 if ((0 >= unitsToClaimNow))
377379 then nil
378380 else [IntegerEntry(keyUnitsClaimedBlock(userAddress), currentBlock), IntegerEntry(kL2ToBurn, (l2ToBurn + l2ToBurnNow)), IntegerEntry(kUnlockedUnits, (unlockedUnits + unitsToClaimNow))]
380382
381383
382384 func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = {
383- let $t01180911882 = getLeasingNodeData(nodeAddress)
384- let nodeCurrentLeased = $t01180911882._1
385- let nodeNextLeased = $t01180911882._2
386- let $t01188711973 = getUserLeasingData(nodeAddress, userAddress)
387- let userCurrentLeased = $t01188711973._1
388- let userNextLeased = $t01188711973._2
385+ let $t01184411917 = getLeasingNodeData(nodeAddress)
386+ let nodeCurrentLeased = $t01184411917._1
387+ let nodeNextLeased = $t01184411917._2
388+ let $t01192212008 = getUserLeasingData(nodeAddress, userAddress)
389+ let userCurrentLeased = $t01192212008._1
390+ let userNextLeased = $t01192212008._2
389391 let checks = [if (!(isForceStop))
390392 then true
391393 else throwErr("contract is temporary stopped"), if (!(isForceOutStop))
405407 then {
406408 let newNodeNextLease = (nodeNextLeased - unstakeAmount)
407409 let newUserNextLeased = (userNextLeased - unstakeAmount)
408- let $t01285712917 = getUserToClaimBalance(userAddress)
409- let toClaim = $t01285712917._1
410- let toUnlock = $t01285712917._2
410+ let $t01289212952 = getUserToClaimBalance(userAddress)
411+ let toClaim = $t01289212952._1
412+ let toUnlock = $t01289212952._2
411413 let newToUnlock = (toUnlock + unstakeAmount)
412414 let userTotalLocked = getUserTotalLocked(userAddress)
413415 let newUserTotalLocked = (userTotalLocked - unstakeAmount)
419421
420422
421423 func getClaimUnlockedActions (userAddress,claimAmount) = {
422- let $t01373613796 = getUserToClaimBalance(userAddress)
423- let toClaim = $t01373613796._1
424- let toUnlock = $t01373613796._2
424+ let $t01377113831 = getUserToClaimBalance(userAddress)
425+ let toClaim = $t01377113831._1
426+ let toUnlock = $t01377113831._2
425427 let checks = [if (!(isForceStop))
426428 then true
427429 else throwErr("contract is temporary stopped"), if (!(isForceOutStop))
443445
444446
445447 func getStakeForActions (userAddress,i) = {
446- let $t01456214622 = getUserToClaimBalance(userAddress)
447- let toClaim = $t01456214622._1
448- let toUnlock = $t01456214622._2
448+ let $t01459714657 = getUserToClaimBalance(userAddress)
449+ let toClaim = $t01459714657._1
450+ let toUnlock = $t01459714657._2
449451 let checks = [if (!(isForceStop))
450452 then true
451453 else throwErr("contract is temporary stopped"), if ((1 >= size(i.payments)))
467469
468470
469471 func getStakeActions (nodeAddress,userAddress,userLeasingAmount,i) = {
470- let $t01535415414 = getUserToClaimBalance(userAddress)
471- let toClaim = $t01535415414._1
472- let toUnlock = $t01535415414._2
472+ let $t01538915449 = getUserToClaimBalance(userAddress)
473+ let toClaim = $t01538915449._1
474+ let toUnlock = $t01538915449._2
473475 let paymentAmount = if ((size(i.payments) == 0))
474476 then 0
475477 else i.payments[0].amount
495497 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
496498 if ((checks == checks))
497499 then {
498- let $t01648916562 = getLeasingNodeData(nodeAddress)
499- let nodeCurrentLeased = $t01648916562._1
500- let nodeNextLeased = $t01648916562._2
500+ let $t01652416597 = getLeasingNodeData(nodeAddress)
501+ let nodeCurrentLeased = $t01652416597._1
502+ let nodeNextLeased = $t01652416597._2
501503 let newNodeNextLease = (nodeNextLeased + userLeasingAmount)
502- let $t01663016716 = getUserLeasingData(nodeAddress, userAddress)
503- let userCurrentLeased = $t01663016716._1
504- let userNextLeased = $t01663016716._2
504+ let $t01666516751 = getUserLeasingData(nodeAddress, userAddress)
505+ let userCurrentLeased = $t01666516751._1
506+ let userNextLeased = $t01666516751._2
505507 let newUserNextLeased = (userNextLeased + userLeasingAmount)
506508 let fromUnlockedAmount = (userLeasingAmount - paymentAmount)
507509 let newToUnlock = max([0, (toUnlock - fromUnlockedAmount)])
538540
539541
540542 func getUnitsClaimData (userAddress) = {
541- let $t01860118686 = calculateUnitsToClaim(userAddress)
542- let unlockedUnitNow = $t01860118686._1
543- let l2ToBurnNow = $t01860118686._2
544- let currentBlock = $t01860118686._3
543+ let $t01863618721 = calculateUnitsToClaim(userAddress)
544+ let unlockedUnitNow = $t01863618721._1
545+ let l2ToBurnNow = $t01863618721._2
546+ let currentBlock = $t01863618721._3
545547 let unlockedUnitsPrev = valueOrElse(getInteger(this, keyUnlockedUnits(userAddress)), 0)
546548 let unitsToSend = (unlockedUnitNow + unlockedUnitsPrev)
547549 let l2ToBurnPrev = valueOrElse(getInteger(this, keyL2ToBurn(userAddress)), 0)
553555
554556
555557 func getClaimUnitsActions (userAddress) = {
556- let $t01927819386 = getUnitsClaimData(userAddress)
557- let unitsToSend = $t01927819386._1
558- let totalUnitsClaimed = $t01927819386._2
559- let l2ToBurn = $t01927819386._3
560- let totalL2Burned = $t01927819386._4
561- let claimedBlock = $t01927819386._5
558+ let $t01931319421 = getUnitsClaimData(userAddress)
559+ let unitsToSend = $t01931319421._1
560+ let totalUnitsClaimed = $t01931319421._2
561+ let l2ToBurn = $t01931319421._3
562+ let totalL2Burned = $t01931319421._4
563+ let claimedBlock = $t01931319421._5
562564 let check = [if ((unitsToSend > 0))
563565 then true
564566 else throwErr("nothing to claim")]
622624
623625 @Callable(i)
624626 func getNodeDataREADONLY (nodeAddress) = {
625- let $t02111821182 = getLeasingNodeData(nodeAddress)
626- let currentLease = $t02111821182._1
627- let nextLeased = $t02111821182._2
627+ let $t02115321217 = getLeasingNodeData(nodeAddress)
628+ let currentLease = $t02115321217._1
629+ let nextLeased = $t02115321217._2
628630 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
629631 }
630632
632634
633635 @Callable(i)
634636 func getUserLeasingDataREADONLY (nodeAddress,userAddress) = {
635- let $t02155221629 = getUserLeasingData(nodeAddress, userAddress)
636- let currentLease = $t02155221629._1
637- let nextLeased = $t02155221629._2
637+ let $t02158721664 = getUserLeasingData(nodeAddress, userAddress)
638+ let currentLease = $t02158721664._1
639+ let nextLeased = $t02158721664._2
638640 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
639641 }
640642
642644
643645 @Callable(i)
644646 func getUserDataREADONLY (userAddress) = {
645- let $t02214522205 = getUserToClaimBalance(userAddress)
646- let toClaim = $t02214522205._1
647- let toUnlock = $t02214522205._2
647+ let $t02218022240 = getUserToClaimBalance(userAddress)
648+ let toClaim = $t02218022240._1
649+ let toUnlock = $t02218022240._2
648650 let userTotalLocked = getUserTotalLocked(userAddress)
649- let $t02226822376 = getUnitsClaimData(userAddress)
650- let unitsToSend = $t02226822376._1
651- let totalUnitsClaimed = $t02226822376._2
652- let l2ToBurn = $t02226822376._3
653- let totalL2Burned = $t02226822376._4
654- let claimedBlock = $t02226822376._5
651+ let $t02230322411 = getUnitsClaimData(userAddress)
652+ let unitsToSend = $t02230322411._1
653+ let totalUnitsClaimed = $t02230322411._2
654+ let l2ToBurn = $t02230322411._3
655+ let totalL2Burned = $t02230322411._4
656+ let claimedBlock = $t02230322411._5
655657 $Tuple2(nil, $Tuple11(currentPeriodHeight, toClaim, nextPeriodHeight, toUnlock, userTotalLocked, height, unitsToSend, totalUnitsClaimed, l2ToBurn, totalL2Burned, claimedBlock))
656658 }
657659
697699 @Callable(i)
698700 func claimAll () = {
699701 let userAddress = toString(i.caller)
700- let $t02356823628 = getUserToClaimBalance(userAddress)
701- let toClaim = $t02356823628._1
702- let toUnlock = $t02356823628._2
702+ let $t02360323663 = getUserToClaimBalance(userAddress)
703+ let toClaim = $t02360323663._1
704+ let toUnlock = $t02360323663._2
703705 let checks = [if ((toClaim > 0))
704706 then true
705707 else throwErr("nothing to claim")]
719721 func startUnitsVesting (unitsClaimInterval) = {
720722 let totalL2 = 100000000000000000
721723 let totalUnits = i.payments[0].amount
722- let unitsPerBlockScale8 = (fraction(totalL2, scale8, totalUnits) / unitsClaimInterval)
724+ let unitsPerBlockScale16 = (fraction(totalUnits, scale16, totalL2) / unitsClaimInterval)
723725 let check = [if (isInAdminList(toString(i.caller)))
724726 then true
725727 else throwErr("caller is not in adminList"), if ((size(i.payments) == 1))
726728 then true
727- else throwErr("should be 1 payment"), if ((unitsPerBlockScale8 > 0))
729+ else throwErr("should be 1 payment"), if ((unitsPerBlockScale16 > 0))
728730 then true
729731 else throwErr("units per block should be greated than 0")]
730732 if ((check == check))
731- then [IntegerEntry(keyUnitsPerBlockScale8, unitsPerBlockScale8), IntegerEntry(keyUnitsClaimStartHeight, height), IntegerEntry(keyUnitsClaimInterval, unitsClaimInterval), StringEntry(keyUnitsAssetId, assetBytesToString(i.payments[0].assetId))]
733+ then [IntegerEntry(keyUnitsPerBlockScale16, unitsPerBlockScale16), IntegerEntry(keyUnitsClaimStartHeight, height), IntegerEntry(keyUnitsClaimInterval, unitsClaimInterval), StringEntry(keyUnitsAssetId, assetBytesToString(i.payments[0].assetId))]
732734 else throw("Strict value is not equal to itself.")
733735 }
734736
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFile = "l2mp_leasing.ride"
55
66 let SEP = "__"
77
88 let BLOCKS_IN_INTERVAL = 1000
99
1010 let scale8 = 100000000
11+
12+let scale16 = (scale8 * scale8)
1113
1214 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1315
1416
1517 let keyL2AssetId = makeString(["%s", "assetId"], SEP)
1618
1719 let keyForceStop = makeString(["%s", "forceStop"], SEP)
1820
1921 let keyForceOutStop = makeString(["%s", "forceOutStop"], SEP)
2022
2123 let keyUnitsAssetId = makeString(["%s", "unitsAssetId"], SEP)
2224
23-let keyUnitsPerBlockScale8 = makeString(["%s", "unitsPerBlock"], SEP)
25+let keyUnitsPerBlockScale16 = makeString(["%s", "unitsPerBlockScale16"], SEP)
2426
2527 let keyPeriodOffsetId = makeString(["%s", "offsetId"], SEP)
2628
2729 let keyPeriodOffsetHeight = makeString(["%s", "offsetHeight"], SEP)
2830
2931 let keyPeriodLength = makeString(["%s", "periodLength"], SEP)
3032
3133 let keyUnitsClaimStartHeight = makeString(["%s", "unitsClaimStartHeight"], SEP)
3234
3335 let keyUnitsClaimInterval = makeString(["%s", "unitsClaimInterval"], SEP)
3436
3537 let periodOffsetId = valueOrElse(getInteger(this, keyPeriodOffsetId), 0)
3638
3739 let periodLength = valueOrElse(getInteger(this, keyPeriodLength), 10000)
3840
3941 let periodOffsetHeight = valueOrElse(getInteger(this, keyPeriodOffsetHeight), -1)
4042
4143 let currentPeriodId = if (if ((height > periodOffsetHeight))
4244 then (periodOffsetHeight != -1)
4345 else false)
4446 then (((height - periodOffsetHeight) / periodLength) + periodOffsetId)
4547 else max([0, (periodOffsetId - 1)])
4648
4749 let currentPeriodHeight = if (if ((periodOffsetHeight == -1))
4850 then true
4951 else if ((currentPeriodId == 0))
5052 then (periodOffsetHeight > height)
5153 else false)
5254 then 0
5355 else (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
5456
5557 let nextPeriodHeight = if (if ((periodOffsetHeight == -1))
5658 then true
5759 else if ((currentPeriodId == 0))
5860 then (periodOffsetHeight > height)
5961 else false)
6062 then 0
6163 else (currentPeriodHeight + periodLength)
6264
6365 let unitsClaimStartHeight = valueOrElse(getInteger(this, keyUnitsClaimStartHeight), height)
6466
6567 let unitsClaimInterval = valueOrElse(getInteger(this, keyUnitsClaimInterval), 0)
6668
6769 func keyLeasingNodeData (nodeAddress) = makeString(["%s", nodeAddress], SEP)
6870
6971
7072 func keyUserLeasingNodeData (userAddress,nodeAddress) = makeString(["%s%s", nodeAddress, userAddress], SEP)
7173
7274
7375 func keyUserToClaim (userAddress) = makeString(["%s%s", "toClaim", userAddress], SEP)
7476
7577
7678 func keyUserTotalLocked (userAddress) = makeString(["%s%s", "userTotalLocked", userAddress], SEP)
7779
7880
7981 func keyUnitsClaimedBlock (userAddress) = makeString(["%s%s", "unitsClaimedBlock", userAddress], SEP)
8082
8183
8284 func keyUnlockedUnits (userAddress) = makeString(["%s%s", "unlockedUnits", userAddress], SEP)
8385
8486
8587 func keyTotalUnitsClaimed (userAddress) = makeString(["%s%s", "totalUnitsClaimed", userAddress], SEP)
8688
8789
8890 func keyL2ToBurn (userAddress) = makeString(["%s%s", "l2ToBurn", userAddress], SEP)
8991
9092
9193 func keyL2BurnedTotal (userAddress) = makeString(["%s%s", "l2BurnedTotal", userAddress], SEP)
9294
9395
9496 func keyNodeLeasingByHeight (nodeAddress) = {
9597 let h = if ((periodOffsetHeight == -1))
9698 then 0
9799 else height
98100 makeString(["%s%d", nodeAddress, toString(h)], SEP)
99101 }
100102
101103
102104 func keyUserLeasingByHeight (nodeAddress,userAddress) = {
103105 let h = if ((periodOffsetHeight == -1))
104106 then 0
105107 else height
106108 makeString(["%s%s%d", nodeAddress, userAddress, toString(h)], SEP)
107109 }
108110
109111
110112 func assetStringToBytes (assetIdString) = if ((assetIdString == "WAVES"))
111113 then unit
112114 else fromBase58String(assetIdString)
113115
114116
115117 func assetBytesToString (assetId) = match assetId {
116118 case a: ByteVector =>
117119 toBase58String(a)
118120 case _ =>
119121 "WAVES"
120122 }
121123
122124
123125 let l2AssetIdString = valueOrElse(getString(this, keyL2AssetId), "WAVES")
124126
125127 let unitsAssetIdString = valueOrElse(getString(this, keyUnitsAssetId), "WAVES")
126128
127129 let l2AssetIdBytes = assetStringToBytes(l2AssetIdString)
128130
129131 let unitsAssetIdBytes = assetStringToBytes(unitsAssetIdString)
130132
131133 let isForceStop = valueOrElse(getBoolean(this, keyForceStop), false)
132134
133135 let isForceOutStop = valueOrElse(getBoolean(this, keyForceOutStop), false)
134136
135137 func isValidAddress (address) = match addressFromString(address) {
136138 case a: Address =>
137139 true
138140 case _ =>
139141 false
140142 }
141143
142144
143145 let ADMIN_LIST_SIZE = 5
144146
145147 let QUORUM = 3
146148
147149 let TXID_BYTES_LENGTH = 32
148150
149151 func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP)
150152
151153
152154 func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP)
153155
154156
155157 func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP)
156158
157159
158160 func keyAllowedTxId () = makeString(["%s", "txId"], SEP)
159161
160162
161163 func getAdminVote (prefix,admin) = {
162164 let voteKey = keyFullAdminVote(prefix, admin)
163165 valueOrElse(getInteger(voteKey), 0)
164166 }
165167
166168
167169 func getAdminsList () = match getString(this, keyAdminAddressList()) {
168170 case s: String =>
169171 split(s, SEP)
170172 case _ =>
171173 nil
172174 }
173175
174176
175177 func isInAdminList (address) = containsElement(getAdminsList(), address)
176178
177179
178180 func genVotesKeysHelper (a,adminAddress) = {
179- let $t051475171 = a
180- let result = $t051475171._1
181- let prefix = $t051475171._2
181+ let $t051855209 = a
182+ let result = $t051855209._1
183+ let prefix = $t051855209._2
182184 $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
183185 }
184186
185187
186188 func genVotesKeys (keyPrefix) = {
187189 let adminList = keyAdminAddressList()
188- let $t053185402 = {
190+ let $t053565440 = {
189191 let $l = getAdminsList()
190192 let $s = size($l)
191193 let $acc0 = $Tuple2(nil, keyPrefix)
192194 func $f0_1 ($a,$i) = if (($i >= $s))
193195 then $a
194196 else genVotesKeysHelper($a, $l[$i])
195197
196198 func $f0_2 ($a,$i) = if (($i >= $s))
197199 then $a
198200 else throw("List size exceeds 5")
199201
200202 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
201203 }
202- let result = $t053185402._1
203- let prefix = $t053185402._2
204+ let result = $t053565440._1
205+ let prefix = $t053565440._2
204206 result
205207 }
206208
207209
208210 func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0))
209211
210212
211213 func countVotes (prefix) = {
212214 let votes = genVotesKeys(prefix)
213215 let $l = votes
214216 let $s = size($l)
215217 let $acc0 = 0
216218 func $f0_1 ($a,$i) = if (($i >= $s))
217219 then $a
218220 else countVotesHelper($a, $l[$i])
219221
220222 func $f0_2 ($a,$i) = if (($i >= $s))
221223 then $a
222224 else throw("List size exceeds 5")
223225
224226 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
225227 }
226228
227229
228230 func clearVotesHelper (result,key) = (result :+ DeleteEntry(key))
229231
230232
231233 func getClearVoteEntries (prefix) = {
232234 let votes = genVotesKeys(prefix)
233235 let $l = votes
234236 let $s = size($l)
235237 let $acc0 = nil
236238 func $f0_1 ($a,$i) = if (($i >= $s))
237239 then $a
238240 else clearVotesHelper($a, $l[$i])
239241
240242 func $f0_2 ($a,$i) = if (($i >= $s))
241243 then $a
242244 else throw("List size exceeds 5")
243245
244246 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
245247 }
246248
247249
248250 func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = {
249251 let voteKey = keyFullAdminVote(keyPrefix, callerAddressString)
250252 let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString)
251253 let err = if (!(isInAdminList(callerAddressString)))
252254 then throwErr((("Address: " + callerAddressString) + " not in Admin list"))
253255 else if ((adminCurrentVote == 1))
254256 then throwErr((voteKey + " you already voted"))
255257 else unit
256258 if ((err == err))
257259 then {
258260 let votes = countVotes(keyPrefix)
259261 if (((votes + 1) >= minVotes))
260262 then {
261263 let clearVoteEntries = getClearVoteEntries(keyPrefix)
262264 (clearVoteEntries ++ voteResult)
263265 }
264266 else [IntegerEntry(voteKey, 1)]
265267 }
266268 else throw("Strict value is not equal to itself.")
267269 }
268270
269271
270272 func getLeasingNodeEntry (nodeAddress,currentLeased,nextLeased) = {
271273 let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(currentLeased), toString(nextPeriodHeight), toString(nextLeased)], SEP)
272274 StringEntry(keyLeasingNodeData(nodeAddress), valueString)
273275 }
274276
275277
276278 func getLeasingNodeData (nodeAddress) = {
277279 let leasingNodeDataStringRaw = getString(this, keyLeasingNodeData(nodeAddress))
278280 match leasingNodeDataStringRaw {
279281 case ds: String =>
280282 let dataList = split(ds, SEP)
281283 let nodeCurrentPeriod = parseIntValue(dataList[1])
282284 let nodeCurrentLeased = parseIntValue(dataList[2])
283285 let nodeNextPeriod = parseIntValue(dataList[3])
284286 let nodeNextLeased = parseIntValue(dataList[4])
285287 if (if ((nodeNextPeriod > height))
286288 then true
287289 else (periodOffsetHeight == -1))
288290 then $Tuple2(nodeCurrentLeased, nodeNextLeased)
289291 else $Tuple2(nodeNextLeased, nodeNextLeased)
290292 case _ =>
291293 $Tuple2(0, 0)
292294 }
293295 }
294296
295297
296298 func getUserLeasingEntry (nodeAddress,userAddress,userCurrentLeased,userNextLeased) = {
297299 let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(userCurrentLeased), toString(nextPeriodHeight), toString(userNextLeased)], SEP)
298300 StringEntry(keyUserLeasingNodeData(userAddress, nodeAddress), valueString)
299301 }
300302
301303
302304 func getUserLeasingData (nodeAddress,userAddress) = {
303305 let leasingUserDataStringRaw = getString(this, keyUserLeasingNodeData(userAddress, nodeAddress))
304306 match leasingUserDataStringRaw {
305307 case ds: String =>
306308 let dataList = split(ds, SEP)
307309 let userCurrentPeriod = parseIntValue(dataList[1])
308310 let userCurrentLeased = parseIntValue(dataList[2])
309311 let userNextPeriod = parseIntValue(dataList[3])
310312 let userNextLeased = parseIntValue(dataList[4])
311313 if (if ((userNextPeriod > height))
312314 then true
313315 else (periodOffsetHeight == -1))
314316 then $Tuple2(userCurrentLeased, userNextLeased)
315317 else $Tuple2(userNextLeased, userNextLeased)
316318 case _ =>
317319 $Tuple2(0, 0)
318320 }
319321 }
320322
321323
322324 func getUserToClaimEntry (userAddress,toClaim,toUnlock) = {
323325 let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(toClaim), toString(nextPeriodHeight), toString(toUnlock)], SEP)
324326 StringEntry(keyUserToClaim(userAddress), valueString)
325327 }
326328
327329
328330 func getUserToClaimBalance (userAddress) = {
329331 let userToClaimDataStringRaw = getString(this, keyUserToClaim(userAddress))
330332 match userToClaimDataStringRaw {
331333 case ds: String =>
332334 let dataList = split(ds, SEP)
333335 let currentPeriod = parseIntValue(dataList[1])
334336 let toClaim = parseIntValue(dataList[2])
335337 let nextPeriod = parseIntValue(dataList[3])
336338 let toUnlock = parseIntValue(dataList[4])
337339 if (if ((nextPeriod > height))
338340 then true
339341 else (currentPeriodId == 0))
340342 then $Tuple2(toClaim, toUnlock)
341343 else $Tuple2((toClaim + toUnlock), 0)
342344 case _ =>
343345 $Tuple2(0, 0)
344346 }
345347 }
346348
347349
348350 func getUserTotalLockedEntry (userAddress,userTotalLocked) = IntegerEntry(keyUserTotalLocked(userAddress), userTotalLocked)
349351
350352
351353 func getUserTotalLocked (userAddress) = valueOrElse(getInteger(this, keyUserTotalLocked(userAddress)), 0)
352354
353355
354356 func calculateUnitsToClaim (userAddress) = {
355357 let claimedBlockKey = keyUnitsClaimedBlock(userAddress)
356358 let claimedBlock = valueOrElse(getInteger(this, claimedBlockKey), unitsClaimStartHeight)
357- let unitsPerBlockScale8 = valueOrElse(getInteger(this, keyUnitsPerBlockScale8), 0)
359+ let unitsPerBlockScale16 = valueOrElse(getInteger(this, keyUnitsPerBlockScale16), 0)
358360 let currentBlock = min([(unitsClaimStartHeight + unitsClaimInterval), height])
359361 let blocksPassed = (currentBlock - claimedBlock)
360362 let amountStaked = getUserTotalLocked(userAddress)
361363 let l2ToBurn = fraction(amountStaked, blocksPassed, unitsClaimInterval)
362- let unitsToClaimNow = fraction(l2ToBurn, unitsPerBlockScale8, (scale8 * scale8))
364+ let unitsToClaimNow = fraction(l2ToBurn, unitsPerBlockScale16, scale16)
363365 $Tuple3(unitsToClaimNow, l2ToBurn, currentBlock)
364366 }
365367
366368
367369 func getUnlockUnitsAction (userAddress) = {
368370 let kUnlockedUnits = keyUnlockedUnits(userAddress)
369371 let unlockedUnits = valueOrElse(getInteger(this, kUnlockedUnits), 0)
370372 let kL2ToBurn = keyL2ToBurn(userAddress)
371373 let l2ToBurn = valueOrElse(getInteger(this, kL2ToBurn), 0)
372- let $t01132911414 = calculateUnitsToClaim(userAddress)
373- let unitsToClaimNow = $t01132911414._1
374- let l2ToBurnNow = $t01132911414._2
375- let currentBlock = $t01132911414._3
374+ let $t01136411449 = calculateUnitsToClaim(userAddress)
375+ let unitsToClaimNow = $t01136411449._1
376+ let l2ToBurnNow = $t01136411449._2
377+ let currentBlock = $t01136411449._3
376378 if ((0 >= unitsToClaimNow))
377379 then nil
378380 else [IntegerEntry(keyUnitsClaimedBlock(userAddress), currentBlock), IntegerEntry(kL2ToBurn, (l2ToBurn + l2ToBurnNow)), IntegerEntry(kUnlockedUnits, (unlockedUnits + unitsToClaimNow))]
379381 }
380382
381383
382384 func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = {
383- let $t01180911882 = getLeasingNodeData(nodeAddress)
384- let nodeCurrentLeased = $t01180911882._1
385- let nodeNextLeased = $t01180911882._2
386- let $t01188711973 = getUserLeasingData(nodeAddress, userAddress)
387- let userCurrentLeased = $t01188711973._1
388- let userNextLeased = $t01188711973._2
385+ let $t01184411917 = getLeasingNodeData(nodeAddress)
386+ let nodeCurrentLeased = $t01184411917._1
387+ let nodeNextLeased = $t01184411917._2
388+ let $t01192212008 = getUserLeasingData(nodeAddress, userAddress)
389+ let userCurrentLeased = $t01192212008._1
390+ let userNextLeased = $t01192212008._2
389391 let checks = [if (!(isForceStop))
390392 then true
391393 else throwErr("contract is temporary stopped"), if (!(isForceOutStop))
392394 then true
393395 else throwErr("unstake is temporary disabled"), if ((unstakeAmount > 0))
394396 then true
395397 else throwErr("unstake amount should be greater than 0"), if ((userNextLeased >= unstakeAmount))
396398 then true
397399 else throwErr("unstake amount should be less or equal user staked amount"), if ((nodeNextLeased >= unstakeAmount))
398400 then true
399401 else throwErr("unstake amount should be less or equal node staked amount"), if (isValidAddress(nodeAddress))
400402 then true
401403 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
402404 then true
403405 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
404406 if ((checks == checks))
405407 then {
406408 let newNodeNextLease = (nodeNextLeased - unstakeAmount)
407409 let newUserNextLeased = (userNextLeased - unstakeAmount)
408- let $t01285712917 = getUserToClaimBalance(userAddress)
409- let toClaim = $t01285712917._1
410- let toUnlock = $t01285712917._2
410+ let $t01289212952 = getUserToClaimBalance(userAddress)
411+ let toClaim = $t01289212952._1
412+ let toUnlock = $t01289212952._2
411413 let newToUnlock = (toUnlock + unstakeAmount)
412414 let userTotalLocked = getUserTotalLocked(userAddress)
413415 let newUserTotalLocked = (userTotalLocked - unstakeAmount)
414416 let unitsUnlockedActions = getUnlockUnitsAction(userAddress)
415417 ([getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, toClaim, newToUnlock), getUserTotalLockedEntry(userAddress, newUserTotalLocked), IntegerEntry(keyNodeLeasingByHeight(nodeAddress), newNodeNextLease), IntegerEntry(keyUserLeasingByHeight(nodeAddress, userAddress), newUserNextLeased)] ++ unitsUnlockedActions)
416418 }
417419 else throw("Strict value is not equal to itself.")
418420 }
419421
420422
421423 func getClaimUnlockedActions (userAddress,claimAmount) = {
422- let $t01373613796 = getUserToClaimBalance(userAddress)
423- let toClaim = $t01373613796._1
424- let toUnlock = $t01373613796._2
424+ let $t01377113831 = getUserToClaimBalance(userAddress)
425+ let toClaim = $t01377113831._1
426+ let toUnlock = $t01377113831._2
425427 let checks = [if (!(isForceStop))
426428 then true
427429 else throwErr("contract is temporary stopped"), if (!(isForceOutStop))
428430 then true
429431 else throwErr("claim is temporary disabled"), if ((claimAmount > 0))
430432 then true
431433 else throwErr("claim amount should be greater than 0"), if ((toClaim >= claimAmount))
432434 then true
433435 else throwErr("claim amount should be less or equal unlocked amount"), if (isValidAddress(userAddress))
434436 then true
435437 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
436438 if ((checks == checks))
437439 then {
438440 let newToClaim = (toClaim - claimAmount)
439441 [getUserToClaimEntry(userAddress, newToClaim, toUnlock), ScriptTransfer(addressFromStringValue(userAddress), claimAmount, l2AssetIdBytes)]
440442 }
441443 else throw("Strict value is not equal to itself.")
442444 }
443445
444446
445447 func getStakeForActions (userAddress,i) = {
446- let $t01456214622 = getUserToClaimBalance(userAddress)
447- let toClaim = $t01456214622._1
448- let toUnlock = $t01456214622._2
448+ let $t01459714657 = getUserToClaimBalance(userAddress)
449+ let toClaim = $t01459714657._1
450+ let toUnlock = $t01459714657._2
449451 let checks = [if (!(isForceStop))
450452 then true
451453 else throwErr("contract is temporary stopped"), if ((1 >= size(i.payments)))
452454 then true
453455 else throwErr("maximum 1 payment"), if (if ((size(i.payments) == 0))
454456 then true
455457 else (i.payments[0].assetId == l2AssetIdBytes))
456458 then true
457459 else throwErr(makeString(["payment assetId should be:", l2AssetIdString], " ")), if (isValidAddress(userAddress))
458460 then true
459461 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
460462 if ((checks == checks))
461463 then {
462464 let newToClaim = (toClaim + i.payments[0].amount)
463465 [getUserToClaimEntry(userAddress, newToClaim, toUnlock)]
464466 }
465467 else throw("Strict value is not equal to itself.")
466468 }
467469
468470
469471 func getStakeActions (nodeAddress,userAddress,userLeasingAmount,i) = {
470- let $t01535415414 = getUserToClaimBalance(userAddress)
471- let toClaim = $t01535415414._1
472- let toUnlock = $t01535415414._2
472+ let $t01538915449 = getUserToClaimBalance(userAddress)
473+ let toClaim = $t01538915449._1
474+ let toUnlock = $t01538915449._2
473475 let paymentAmount = if ((size(i.payments) == 0))
474476 then 0
475477 else i.payments[0].amount
476478 let available = ((toUnlock + toClaim) + paymentAmount)
477479 let checks = [if (!(isForceStop))
478480 then true
479481 else throwErr("contract is temporary stopped"), if ((1 >= size(i.payments)))
480482 then true
481483 else throwErr("maximum 1 payment"), if (if ((size(i.payments) == 0))
482484 then true
483485 else (i.payments[0].assetId == l2AssetIdBytes))
484486 then true
485487 else throwErr(makeString(["payment assetId should be:", l2AssetIdString], " ")), if ((userLeasingAmount > 0))
486488 then true
487489 else throwErr("amount should be greater than 0"), if ((available >= userLeasingAmount))
488490 then true
489491 else throwErr("amount should be less or equal (payment + available) amount"), if ((userLeasingAmount >= paymentAmount))
490492 then true
491493 else throw("amount should be greater or equal payment amount"), if (isValidAddress(nodeAddress))
492494 then true
493495 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
494496 then true
495497 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
496498 if ((checks == checks))
497499 then {
498- let $t01648916562 = getLeasingNodeData(nodeAddress)
499- let nodeCurrentLeased = $t01648916562._1
500- let nodeNextLeased = $t01648916562._2
500+ let $t01652416597 = getLeasingNodeData(nodeAddress)
501+ let nodeCurrentLeased = $t01652416597._1
502+ let nodeNextLeased = $t01652416597._2
501503 let newNodeNextLease = (nodeNextLeased + userLeasingAmount)
502- let $t01663016716 = getUserLeasingData(nodeAddress, userAddress)
503- let userCurrentLeased = $t01663016716._1
504- let userNextLeased = $t01663016716._2
504+ let $t01666516751 = getUserLeasingData(nodeAddress, userAddress)
505+ let userCurrentLeased = $t01666516751._1
506+ let userNextLeased = $t01666516751._2
505507 let newUserNextLeased = (userNextLeased + userLeasingAmount)
506508 let fromUnlockedAmount = (userLeasingAmount - paymentAmount)
507509 let newToUnlock = max([0, (toUnlock - fromUnlockedAmount)])
508510 let newToClaim = min([toClaim, (toClaim + (toUnlock - fromUnlockedAmount))])
509511 let userTotalLocked = getUserTotalLocked(userAddress)
510512 let newUserTotalLocked = (userTotalLocked + userLeasingAmount)
511513 let unitsUnlockedActions = getUnlockUnitsAction(userAddress)
512514 ([getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, newToClaim, newToUnlock), getUserTotalLockedEntry(userAddress, newUserTotalLocked), IntegerEntry(keyNodeLeasingByHeight(nodeAddress), newNodeNextLease), IntegerEntry(keyUserLeasingByHeight(nodeAddress, userAddress), newUserNextLeased)] ++ unitsUnlockedActions)
513515 }
514516 else throw("Strict value is not equal to itself.")
515517 }
516518
517519
518520 func getStakeFromPaymentActions (nodeAddress,userAddress,i) = {
519521 let checks = [if ((size(i.payments) == 1))
520522 then true
521523 else throwErr("payment size should be exactly 1")]
522524 if ((checks == checks))
523525 then getStakeActions(nodeAddress, userAddress, i.payments[0].amount, i)
524526 else throw("Strict value is not equal to itself.")
525527 }
526528
527529
528530 func getSetNewPeriodLengthActions (newPeriodLength) = {
529531 let check = [if ((newPeriodLength > 0))
530532 then true
531533 else throwErr("period length should be greater than 0")]
532534 if ((check == check))
533535 then if ((periodOffsetHeight == -1))
534536 then [IntegerEntry(keyPeriodLength, newPeriodLength), IntegerEntry(keyPeriodOffsetHeight, height)]
535537 else [IntegerEntry(keyPeriodOffsetId, (currentPeriodId + 1)), IntegerEntry(keyPeriodOffsetHeight, nextPeriodHeight), IntegerEntry(keyPeriodLength, newPeriodLength)]
536538 else throw("Strict value is not equal to itself.")
537539 }
538540
539541
540542 func getUnitsClaimData (userAddress) = {
541- let $t01860118686 = calculateUnitsToClaim(userAddress)
542- let unlockedUnitNow = $t01860118686._1
543- let l2ToBurnNow = $t01860118686._2
544- let currentBlock = $t01860118686._3
543+ let $t01863618721 = calculateUnitsToClaim(userAddress)
544+ let unlockedUnitNow = $t01863618721._1
545+ let l2ToBurnNow = $t01863618721._2
546+ let currentBlock = $t01863618721._3
545547 let unlockedUnitsPrev = valueOrElse(getInteger(this, keyUnlockedUnits(userAddress)), 0)
546548 let unitsToSend = (unlockedUnitNow + unlockedUnitsPrev)
547549 let l2ToBurnPrev = valueOrElse(getInteger(this, keyL2ToBurn(userAddress)), 0)
548550 let l2ToBurn = (l2ToBurnPrev + l2ToBurnNow)
549551 let totalUnitsClaimed = valueOrElse(getInteger(this, keyTotalUnitsClaimed(userAddress)), 0)
550552 let totalL2Burned = valueOrElse(getInteger(this, keyL2BurnedTotal(userAddress)), 0)
551553 $Tuple5(unitsToSend, totalUnitsClaimed, l2ToBurn, totalL2Burned, currentBlock)
552554 }
553555
554556
555557 func getClaimUnitsActions (userAddress) = {
556- let $t01927819386 = getUnitsClaimData(userAddress)
557- let unitsToSend = $t01927819386._1
558- let totalUnitsClaimed = $t01927819386._2
559- let l2ToBurn = $t01927819386._3
560- let totalL2Burned = $t01927819386._4
561- let claimedBlock = $t01927819386._5
558+ let $t01931319421 = getUnitsClaimData(userAddress)
559+ let unitsToSend = $t01931319421._1
560+ let totalUnitsClaimed = $t01931319421._2
561+ let l2ToBurn = $t01931319421._3
562+ let totalL2Burned = $t01931319421._4
563+ let claimedBlock = $t01931319421._5
562564 let check = [if ((unitsToSend > 0))
563565 then true
564566 else throwErr("nothing to claim")]
565567 if ((check == check))
566568 then {
567569 let burnAction = match l2AssetIdBytes {
568570 case id: ByteVector =>
569571 [Burn(id, l2ToBurn)]
570572 case _ =>
571573 nil
572574 }
573575 ([IntegerEntry(keyUnitsClaimedBlock(userAddress), claimedBlock), IntegerEntry(keyTotalUnitsClaimed(userAddress), (totalUnitsClaimed + unitsToSend)), IntegerEntry(keyL2BurnedTotal(userAddress), (totalL2Burned + l2ToBurn)), IntegerEntry(keyUnlockedUnits(userAddress), 0), IntegerEntry(keyL2ToBurn(userAddress), 0), ScriptTransfer(addressFromStringValue(userAddress), unitsToSend, unitsAssetIdBytes)] ++ burnAction)
574576 }
575577 else throw("Strict value is not equal to itself.")
576578 }
577579
578580
579581 @Callable(i)
580582 func setNewPeriodLength (newPeriodLength) = {
581583 let checks = [if (isInAdminList(toString(i.caller)))
582584 then true
583585 else throwErr("caller is not in adminList")]
584586 if ((checks == checks))
585587 then getSetNewPeriodLengthActions(newPeriodLength)
586588 else throw("Strict value is not equal to itself.")
587589 }
588590
589591
590592
591593 @Callable(i)
592594 func claimUnits () = {
593595 let userAddress = toString(i.caller)
594596 getClaimUnitsActions(userAddress)
595597 }
596598
597599
598600
599601 @Callable(i)
600602 func setForceStopFlag (stop) = {
601603 let check = [if (isInAdminList(toString(i.caller)))
602604 then true
603605 else throwErr("caller is not in adminList")]
604606 if ((check == check))
605607 then [BooleanEntry(keyForceStop, stop)]
606608 else throw("Strict value is not equal to itself.")
607609 }
608610
609611
610612
611613 @Callable(i)
612614 func setForceOutStopFlag (stop) = {
613615 let check = [if (isInAdminList(toString(i.caller)))
614616 then true
615617 else throwErr("caller is not in adminList")]
616618 if ((check == check))
617619 then [BooleanEntry(keyForceOutStop, stop)]
618620 else throw("Strict value is not equal to itself.")
619621 }
620622
621623
622624
623625 @Callable(i)
624626 func getNodeDataREADONLY (nodeAddress) = {
625- let $t02111821182 = getLeasingNodeData(nodeAddress)
626- let currentLease = $t02111821182._1
627- let nextLeased = $t02111821182._2
627+ let $t02115321217 = getLeasingNodeData(nodeAddress)
628+ let currentLease = $t02115321217._1
629+ let nextLeased = $t02115321217._2
628630 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
629631 }
630632
631633
632634
633635 @Callable(i)
634636 func getUserLeasingDataREADONLY (nodeAddress,userAddress) = {
635- let $t02155221629 = getUserLeasingData(nodeAddress, userAddress)
636- let currentLease = $t02155221629._1
637- let nextLeased = $t02155221629._2
637+ let $t02158721664 = getUserLeasingData(nodeAddress, userAddress)
638+ let currentLease = $t02158721664._1
639+ let nextLeased = $t02158721664._2
638640 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
639641 }
640642
641643
642644
643645 @Callable(i)
644646 func getUserDataREADONLY (userAddress) = {
645- let $t02214522205 = getUserToClaimBalance(userAddress)
646- let toClaim = $t02214522205._1
647- let toUnlock = $t02214522205._2
647+ let $t02218022240 = getUserToClaimBalance(userAddress)
648+ let toClaim = $t02218022240._1
649+ let toUnlock = $t02218022240._2
648650 let userTotalLocked = getUserTotalLocked(userAddress)
649- let $t02226822376 = getUnitsClaimData(userAddress)
650- let unitsToSend = $t02226822376._1
651- let totalUnitsClaimed = $t02226822376._2
652- let l2ToBurn = $t02226822376._3
653- let totalL2Burned = $t02226822376._4
654- let claimedBlock = $t02226822376._5
651+ let $t02230322411 = getUnitsClaimData(userAddress)
652+ let unitsToSend = $t02230322411._1
653+ let totalUnitsClaimed = $t02230322411._2
654+ let l2ToBurn = $t02230322411._3
655+ let totalL2Burned = $t02230322411._4
656+ let claimedBlock = $t02230322411._5
655657 $Tuple2(nil, $Tuple11(currentPeriodHeight, toClaim, nextPeriodHeight, toUnlock, userTotalLocked, height, unitsToSend, totalUnitsClaimed, l2ToBurn, totalL2Burned, claimedBlock))
656658 }
657659
658660
659661
660662 @Callable(i)
661663 func leaseByAddress (nodeAddress,userAddress) = getStakeFromPaymentActions(nodeAddress, userAddress, i)
662664
663665
664666
665667 @Callable(i)
666668 func lease (nodeAddress) = {
667669 let userAddress = toString(i.caller)
668670 getStakeFromPaymentActions(nodeAddress, userAddress, i)
669671 }
670672
671673
672674
673675 @Callable(i)
674676 func leaseFromLocked (nodeAddress,amount) = {
675677 let userAddress = toString(i.caller)
676678 getStakeActions(nodeAddress, userAddress, amount, i)
677679 }
678680
679681
680682
681683 @Callable(i)
682684 func cancelLease (nodeAddress,amount) = {
683685 let userAddress = toString(i.caller)
684686 getUnstakeActions(nodeAddress, userAddress, amount)
685687 }
686688
687689
688690
689691 @Callable(i)
690692 func claim (amount) = {
691693 let userAddress = toString(i.caller)
692694 getClaimUnlockedActions(userAddress, amount)
693695 }
694696
695697
696698
697699 @Callable(i)
698700 func claimAll () = {
699701 let userAddress = toString(i.caller)
700- let $t02356823628 = getUserToClaimBalance(userAddress)
701- let toClaim = $t02356823628._1
702- let toUnlock = $t02356823628._2
702+ let $t02360323663 = getUserToClaimBalance(userAddress)
703+ let toClaim = $t02360323663._1
704+ let toUnlock = $t02360323663._2
703705 let checks = [if ((toClaim > 0))
704706 then true
705707 else throwErr("nothing to claim")]
706708 if ((checks == checks))
707709 then getClaimUnlockedActions(userAddress, toClaim)
708710 else throw("Strict value is not equal to itself.")
709711 }
710712
711713
712714
713715 @Callable(i)
714716 func stakeFor (userAddress) = getStakeForActions(userAddress, i)
715717
716718
717719
718720 @Callable(i)
719721 func startUnitsVesting (unitsClaimInterval) = {
720722 let totalL2 = 100000000000000000
721723 let totalUnits = i.payments[0].amount
722- let unitsPerBlockScale8 = (fraction(totalL2, scale8, totalUnits) / unitsClaimInterval)
724+ let unitsPerBlockScale16 = (fraction(totalUnits, scale16, totalL2) / unitsClaimInterval)
723725 let check = [if (isInAdminList(toString(i.caller)))
724726 then true
725727 else throwErr("caller is not in adminList"), if ((size(i.payments) == 1))
726728 then true
727- else throwErr("should be 1 payment"), if ((unitsPerBlockScale8 > 0))
729+ else throwErr("should be 1 payment"), if ((unitsPerBlockScale16 > 0))
728730 then true
729731 else throwErr("units per block should be greated than 0")]
730732 if ((check == check))
731- then [IntegerEntry(keyUnitsPerBlockScale8, unitsPerBlockScale8), IntegerEntry(keyUnitsClaimStartHeight, height), IntegerEntry(keyUnitsClaimInterval, unitsClaimInterval), StringEntry(keyUnitsAssetId, assetBytesToString(i.payments[0].assetId))]
733+ then [IntegerEntry(keyUnitsPerBlockScale16, unitsPerBlockScale16), IntegerEntry(keyUnitsClaimStartHeight, height), IntegerEntry(keyUnitsClaimInterval, unitsClaimInterval), StringEntry(keyUnitsAssetId, assetBytesToString(i.payments[0].assetId))]
732734 else throw("Strict value is not equal to itself.")
733735 }
734736
735737
736738
737739 @Callable(i)
738740 func voteForTxId (txId) = {
739741 let callerAddressString = toBase58String(i.caller.bytes)
740742 let keyPrefix = keyAllowedTxIdVotePrefix(txId)
741743 let result = [StringEntry(keyAllowedTxId(), txId)]
742744 let allowedTxIdOption = getString(this, keyAllowedTxId())
743745 let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH))
744746 then true
745747 else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit))
746748 then true
747749 else (value(allowedTxIdOption) != txId))
748750 then true
749751 else throwErr((txId + " is already allowed"))]
750752 if ((err == err))
751753 then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result)
752754 else throw("Strict value is not equal to itself.")
753755 }
754756
755757
756758 @Verifier(tx)
757759 func verify () = {
758760 let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), "")))
759761 let byOwner = if ((size(getAdminsList()) >= QUORUM))
760762 then false
761763 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
762764 if (byAdmins)
763765 then true
764766 else byOwner
765767 }
766768

github/deemru/w8io/169f3d6 
104.01 ms