tx · 4HRzwe8P96dfp9NAgksqBUxYLMMC77YmuFdv3uRLSoT7 3MwukwUkp3PsyCrkjMgqiAnSfc1hBD5FQhH: -0.02500000 Waves 2023.03.20 18:16 [2498495] smart account 3MwukwUkp3PsyCrkjMgqiAnSfc1hBD5FQhH > SELF 0.00000000 Waves
{ "type": 13, "id": "4HRzwe8P96dfp9NAgksqBUxYLMMC77YmuFdv3uRLSoT7", "fee": 2500000, "feeAssetId": null, "timestamp": 1679325381427, "version": 2, "chainId": 84, "sender": "3MwukwUkp3PsyCrkjMgqiAnSfc1hBD5FQhH", "senderPublicKey": "5JqBVJpMCyD7dJLJttqYjL6CmJc4zahBHSFjFb7qQTga", "proofs": [ "4wdRANejfHnctL7SJgm7J19t2D1Kq7ajbsBbEse2g9KFA5wVewbRVV538RVE5JVR7i9sAxBhtBi6aQEXFWewuNWT" ], "script": "base64:BgIhCAISBAoCAQESBgoECAgICBIDCgEYEgASAwoBCBIDCgEBRQADU0VQAgFfAA5fbWluTG9ja3BlcmlvZAABAA1fdW5pdERlY2ltYWxzAIDC1y8ADl9taW5Mb2NrQW1vdW50CQBoAgABBQ1fdW5pdERlY2ltYWxzAA5fbWF4TG9ja0Ftb3VudAkAaAIA6AcFDV91bml0RGVjaW1hbHMAA19EdACAuJkpAQRfUHB5AQpsb2NrUGVyaW9kCQBrAwUNX3VuaXREZWNpbWFscwDtAgUKbG9ja1BlcmlvZAANX2luY3JlbWVudFJlZgkAaAIAwIQ9BQ1fdW5pdERlY2ltYWxzAA5fcGVyY2VudGFnZUZlZQkAawMFDV91bml0RGVjaW1hbHMACgBkABpfcGVyY2VudGFnZVJlZHVjdGlvbkZhY3RvcgIpQ3VycmVudF9QZXJjZW50YWdlUmVkdWN0aW9uX0ZhY3Rvcl9Gb3JfTXIAA19NcgIMTWludGluZ19SYXRlAAxfc3Rhd0Fzc2V0SWQCDFN0YXdfQXNzZXRJZAAIX21hbmFnZXICB21hbmFnZXIABF9EZngCA0RmeAAVX2NpcmN1b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XdQTAUJbmV3X2luZGV4CAUNdG90YWxTdGF3TWludAJfMgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAwOtdg", "height": 2498495, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CrLHGCTHCs8B1kLdTHnpggzop83EfsPc2aa7vffZznjj Next: EUKnu2SVoYaqHEyVi9PTZsGtbJZ2i6DbdNaKpxusjn1w Diff:
Old | New | Differences | |
---|---|---|---|
73 | 73 | let _totalStawLP = "TotalStawLP" | |
74 | 74 | ||
75 | 75 | let _globalIndexCount = "IndexCount" | |
76 | + | ||
77 | + | let _daysAfterLockPeriod = "DaysAfterLockPeriodElasped" | |
76 | 78 | ||
77 | 79 | func _getI (key) = getInteger(this, key) | |
78 | 80 | ||
577 | 579 | let userTotalWavesLockedKey = makeString([callerAddress, _userTotalLocked], SEP) | |
578 | 580 | let userLeaseStateKey = makeString([callerAddress, transactionID, _userLeaseState], SEP) | |
579 | 581 | let leaseStateKey = makeString([callerAddress, transactionID, _userLeaseState], SEP) | |
582 | + | let daysAfterLockPeriodElaspedKey = makeString([callerAddress, transactionID, _daysAfterLockPeriod], SEP) | |
580 | 583 | let globalWavesRef = match _getRegistryEntryValue(_totalWavesRef) { | |
581 | 584 | case t: Int => | |
582 | 585 | t | |
681 | 684 | } | |
682 | 685 | if ((leaseState == leaseState)) | |
683 | 686 | then { | |
684 | - | let check1 = _throwIf((lockPeriodInMili > currentTimeStamp), "lock period for this entry has not elapsed") | |
685 | - | if ((check1 == check1)) | |
687 | + | let daysAfterLockPeriodElasped = match _getS(daysAfterLockPeriodElaspedKey) { | |
688 | + | case t: String => | |
689 | + | match _getRegistryEntryValue(daysAfterLockPeriodElaspedKey) { | |
690 | + | case z: Int => | |
691 | + | z | |
692 | + | case _ => | |
693 | + | 0 | |
694 | + | } | |
695 | + | case _ => | |
696 | + | 0 | |
697 | + | } | |
698 | + | if ((daysAfterLockPeriodElasped == daysAfterLockPeriodElasped)) | |
686 | 699 | then { | |
687 | - | let leaseAction = if ((currentLeaseState == "leased")) | |
688 | - | then $Tuple2(LeaseCancel(lockId), _writeStr(userLeaseStateKey, "cancelled")) | |
689 | - | else $Tuple2(_writeStr(userLeaseStateKey, "cancelled"), _writeStr(userLeaseStateKey, "cancelled")) | |
690 | - | if ((leaseAction == leaseAction)) | |
700 | + | let check1 = _throwIf((lockPeriodInMili > currentTimeStamp), "lock period for this entry has not elapsed") | |
701 | + | if ((check1 == check1)) | |
691 | 702 | then { | |
703 | + | let leaseAction = if ((currentLeaseState == "leased")) | |
704 | + | then $Tuple2(LeaseCancel(lockId), _writeStr(userLeaseStateKey, "cancelled")) | |
705 | + | else $Tuple2(_writeStr(userLeaseStateKey, "cancelled"), _writeStr(userLeaseStateKey, "cancelled")) | |
692 | 706 | let check2 = _throwIf(if ((0 == wavesAmount)) | |
693 | 707 | then true | |
694 | 708 | else (0 == stawLPAmount), "all claims exhausted for this trx") | |
697 | 711 | let emissionValuePerDT = (_emissionRateWaves(lockPeriod, collateral) * _Dt) | |
698 | 712 | let claimAction = { | |
699 | 713 | let timeStampDiff = (currentTimeStamp - lockPeriodInMili) | |
700 | - | let | |
714 | + | let xdays = (timeStampDiff / _Dt) | |
701 | 715 | if ((daysAfterLockPeriodElasped == 0)) | |
702 | 716 | then throw("less than 24hrs before first claim") | |
703 | - | else if (((timeStampDiff % _Dt) != 0)) | |
704 | - | then throw("already claimed or less than 24hrs before next claim") | |
705 | - | else if ((daysAfterLockPeriodElasped > lockPeriod)) | |
706 | - | then throw("all claims exhausted") | |
707 | - | else { | |
708 | - | let totalAmountClaimable = (daysAfterLockPeriodElasped * emissionValuePerDT) | |
709 | - | let check3_1 = _throwIf((totalAmountClaimable == totalWavesClaimed), "can only claim once in 24hrs") | |
710 | - | if ((check3_1 == check3_1)) | |
711 | - | then { | |
712 | - | let check3_2 = _throwIf(((totalAmountClaimable + totalWavesClaimed) > wavesAmount), "all claims exhausted") | |
713 | - | if ((check3_2 == check3_2)) | |
714 | - | then { | |
715 | - | let claimAmountToSend = if ((daysAfterLockPeriodElasped == 1)) | |
716 | - | then totalAmountClaimable | |
717 | - | else (totalAmountClaimable - totalWavesClaimed) | |
718 | - | let newTotalWavesClaim = totalAmountClaimable | |
719 | - | let newWavesAmount = if ((daysAfterLockPeriodElasped == 1)) | |
720 | - | then (wavesAmount - totalAmountClaimable) | |
721 | - | else (wavesAmount - (totalAmountClaimable - totalWavesClaimed)) | |
722 | - | let newStawLPAmount = if ((daysAfterLockPeriodElasped == 1)) | |
723 | - | then (stawLPAmount - totalAmountClaimable) | |
724 | - | else (stawLPAmount - (totalAmountClaimable - totalWavesClaimed)) | |
725 | - | let newGlobalWaveRef = (globalWavesRef - newWavesAmount) | |
726 | - | let newGlobalStawPL = (globalStawPL - newStawLPAmount) | |
727 | - | let newUserTotalWavesLocked = (userTotalWavesLocked - claimAmountToSend) | |
728 | - | let wavesAmountEntry = makeString(["%d", toString(newWavesAmount)], SEP) | |
729 | - | let stawLPAmountEntry = makeString(["%d", toString(newStawLPAmount)], SEP) | |
730 | - | let totalWavesClaimedEntry = makeString(["%d", toString(newTotalWavesClaim)], SEP) | |
731 | - | let newUserTotalWavesLockedEntry = makeString(["%d", toString(newUserTotalWavesLocked)], SEP) | |
732 | - | [leaseAction._1, leaseAction._2, _writeStr(wavesAmountKey, wavesAmountEntry), _writeStr(stawLPAmountKey, stawLPAmountEntry), _writeStr(totalWavesClaimedKey, totalWavesClaimedEntry), _writeStr(userTotalWavesLockedKey, newUserTotalWavesLockedEntry), _writeGlobalParam(_totalWavesRef, newGlobalWaveRef), _writeGlobalParam(_totalStawLP, newGlobalStawPL), ScriptTransfer(Address(i.caller.bytes), claimAmountToSend, unit)] | |
733 | - | } | |
734 | - | else throw("Strict value is not equal to itself.") | |
735 | - | } | |
736 | - | else throw("Strict value is not equal to itself.") | |
737 | - | } | |
717 | + | else if ((daysAfterLockPeriodElasped >= xdays)) | |
718 | + | then throw("24hrs or less before next claim") | |
719 | + | else { | |
720 | + | let totalAmountClaimable = (daysAfterLockPeriodElasped * emissionValuePerDT) | |
721 | + | let check3_1 = _throwIf((totalAmountClaimable == totalWavesClaimed), "can only claim once in 24hrs") | |
722 | + | if ((check3_1 == check3_1)) | |
723 | + | then { | |
724 | + | let check3_2 = _throwIf(((totalAmountClaimable + totalWavesClaimed) > wavesAmount), "all claims exhausted") | |
725 | + | if ((check3_2 == check3_2)) | |
726 | + | then { | |
727 | + | let claimAmountToSend = if ((daysAfterLockPeriodElasped == 1)) | |
728 | + | then totalAmountClaimable | |
729 | + | else (totalAmountClaimable - totalWavesClaimed) | |
730 | + | let newTotalWavesClaim = totalAmountClaimable | |
731 | + | let newWavesAmount = if ((daysAfterLockPeriodElasped == 1)) | |
732 | + | then (wavesAmount - totalAmountClaimable) | |
733 | + | else (wavesAmount - (totalAmountClaimable - totalWavesClaimed)) | |
734 | + | let newStawLPAmount = if ((daysAfterLockPeriodElasped == 1)) | |
735 | + | then (stawLPAmount - totalAmountClaimable) | |
736 | + | else (stawLPAmount - (totalAmountClaimable - totalWavesClaimed)) | |
737 | + | let newGlobalWaveRef = (globalWavesRef - newWavesAmount) | |
738 | + | let newGlobalStawPL = (globalStawPL - newStawLPAmount) | |
739 | + | let newUserTotalWavesLocked = (userTotalWavesLocked - claimAmountToSend) | |
740 | + | let wavesAmountEntry = makeString(["%d", toString(newWavesAmount)], SEP) | |
741 | + | let stawLPAmountEntry = makeString(["%d", toString(newStawLPAmount)], SEP) | |
742 | + | let totalWavesClaimedEntry = makeString(["%d", toString(newTotalWavesClaim)], SEP) | |
743 | + | let newUserTotalWavesLockedEntry = makeString(["%d", toString(newUserTotalWavesLocked)], SEP) | |
744 | + | let daysAfterLockPeriodElaspedEntry = makeString(["%d", toString(daysAfterLockPeriodElasped)], SEP) | |
745 | + | [leaseAction._1, leaseAction._2, _writeStr(wavesAmountKey, wavesAmountEntry), _writeStr(stawLPAmountKey, stawLPAmountEntry), _writeStr(totalWavesClaimedKey, totalWavesClaimedEntry), _writeStr(userTotalWavesLockedKey, newUserTotalWavesLockedEntry), _writeStr(daysAfterLockPeriodElaspedKey, daysAfterLockPeriodElaspedEntry), _writeGlobalParam(_totalWavesRef, newGlobalWaveRef), _writeGlobalParam(_totalStawLP, newGlobalStawPL), ScriptTransfer(Address(i.caller.bytes), claimAmountToSend, unit)] | |
746 | + | } | |
747 | + | else throw("Strict value is not equal to itself.") | |
748 | + | } | |
749 | + | else throw("Strict value is not equal to itself.") | |
750 | + | } | |
738 | 751 | } | |
739 | 752 | if ((claimAction == claimAction)) | |
740 | 753 | then claimAction |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "_" | |
5 | 5 | ||
6 | 6 | let _minLockperiod = 1 | |
7 | 7 | ||
8 | 8 | let _unitDecimals = 100000000 | |
9 | 9 | ||
10 | 10 | let _minLockAmount = (1 * _unitDecimals) | |
11 | 11 | ||
12 | 12 | let _maxLockAmount = (1000 * _unitDecimals) | |
13 | 13 | ||
14 | 14 | let _Dt = 86400000 | |
15 | 15 | ||
16 | 16 | func _Ppy (lockPeriod) = fraction(_unitDecimals, 365, lockPeriod) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | let _incrementRef = (1000000 * _unitDecimals) | |
20 | 20 | ||
21 | 21 | let _percentageFee = fraction(_unitDecimals, 10, 100) | |
22 | 22 | ||
23 | 23 | let _percentageReductionFactor = "Current_PercentageReduction_Factor_For_Mr" | |
24 | 24 | ||
25 | 25 | let _Mr = "Minting_Rate" | |
26 | 26 | ||
27 | 27 | let _stawAssetId = "Staw_AssetId" | |
28 | 28 | ||
29 | 29 | let _manager = "manager" | |
30 | 30 | ||
31 | 31 | let _Dfx = "Dfx" | |
32 | 32 | ||
33 | 33 | let _circulationIncrIndex = "CirculationIncrementIndex" | |
34 | 34 | ||
35 | 35 | let _lesseeAddress = "LeaseNode" | |
36 | 36 | ||
37 | 37 | let _userEmissionAmountClaimed = "EmissionAmountClaimed" | |
38 | 38 | ||
39 | 39 | let _userCanClaimEmissionAmount = "CanClaimEmissionAmount" | |
40 | 40 | ||
41 | 41 | let _userAddress = "WalletAddress" | |
42 | 42 | ||
43 | 43 | let _userLocalIndexCount = "TotalEntryIndexCount" | |
44 | 44 | ||
45 | 45 | let _userTotalLocked = "TotalLocked" | |
46 | 46 | ||
47 | 47 | let _lockDuration = "LockDuration" | |
48 | 48 | ||
49 | 49 | let _lockIndex = "GlobalLockIndex" | |
50 | 50 | ||
51 | 51 | let _lockId = "LockIdentifier" | |
52 | 52 | ||
53 | 53 | let _wavesAmount = "AmountInWaves" | |
54 | 54 | ||
55 | 55 | let _stawAmount = "AmountInStaw" | |
56 | 56 | ||
57 | 57 | let _stawLPAmount = "AmountInStawLP" | |
58 | 58 | ||
59 | 59 | let _txId = "TXID" | |
60 | 60 | ||
61 | 61 | let _lockAtHeight = "LockAtHeight" | |
62 | 62 | ||
63 | 63 | let _lockPeriodInMiliSec = "LocKPeriodInMilliSec" | |
64 | 64 | ||
65 | 65 | let _totalWavesClaimed = "TotalWavesClaimed" | |
66 | 66 | ||
67 | 67 | let _userLeaseState = "LeaseState" | |
68 | 68 | ||
69 | 69 | let _totalStaw = "TotalStawMinted" | |
70 | 70 | ||
71 | 71 | let _totalWavesRef = "TotalWavesLocked" | |
72 | 72 | ||
73 | 73 | let _totalStawLP = "TotalStawLP" | |
74 | 74 | ||
75 | 75 | let _globalIndexCount = "IndexCount" | |
76 | + | ||
77 | + | let _daysAfterLockPeriod = "DaysAfterLockPeriodElasped" | |
76 | 78 | ||
77 | 79 | func _getI (key) = getInteger(this, key) | |
78 | 80 | ||
79 | 81 | ||
80 | 82 | func _getS (key) = getString(this, key) | |
81 | 83 | ||
82 | 84 | ||
83 | 85 | func _getB (key) = getBoolean(this, key) | |
84 | 86 | ||
85 | 87 | ||
86 | 88 | func _getBV (key) = value(getBoolean(this, key)) | |
87 | 89 | ||
88 | 90 | ||
89 | 91 | func _getIV (key) = value(getInteger(this, key)) | |
90 | 92 | ||
91 | 93 | ||
92 | 94 | func _getSV (key) = value(getString(this, key)) | |
93 | 95 | ||
94 | 96 | ||
95 | 97 | func _setParamVal (key,defaultVal) = match defaultVal { | |
96 | 98 | case defaultVal: String => | |
97 | 99 | if (isDefined(_getS(key))) | |
98 | 100 | then _getSV(key) | |
99 | 101 | else defaultVal | |
100 | 102 | case defaultVal: Int => | |
101 | 103 | if (isDefined(_getI(key))) | |
102 | 104 | then _getIV(key) | |
103 | 105 | else defaultVal | |
104 | 106 | case defaultVal: Boolean => | |
105 | 107 | if (isDefined(_getB(key))) | |
106 | 108 | then _getBV(key) | |
107 | 109 | else defaultVal | |
108 | 110 | case _ => | |
109 | 111 | throw(("value type not supported for " + key)) | |
110 | 112 | } | |
111 | 113 | ||
112 | 114 | ||
113 | 115 | func _throwOrReturnS (val,error) = match val { | |
114 | 116 | case val: String => | |
115 | 117 | val | |
116 | 118 | case _ => | |
117 | 119 | throw(error) | |
118 | 120 | } | |
119 | 121 | ||
120 | 122 | ||
121 | 123 | func _throwOrReturnI (val,error) = match val { | |
122 | 124 | case val: Int => | |
123 | 125 | val | |
124 | 126 | case _ => | |
125 | 127 | throw(error) | |
126 | 128 | } | |
127 | 129 | ||
128 | 130 | ||
129 | 131 | func _throwOrReturnBool (val,error) = match val { | |
130 | 132 | case val: Boolean => | |
131 | 133 | val | |
132 | 134 | case _ => | |
133 | 135 | throw(error) | |
134 | 136 | } | |
135 | 137 | ||
136 | 138 | ||
137 | 139 | func _writeInt (key,value) = if ((0 > value)) | |
138 | 140 | then throw(((("writing negative value " + toString(value)) + " for key ") + key)) | |
139 | 141 | else IntegerEntry(key, value) | |
140 | 142 | ||
141 | 143 | ||
142 | 144 | func _writeStr (key,value) = if ((" " == value)) | |
143 | 145 | then throw(("writing an empty string " + value)) | |
144 | 146 | else StringEntry(key, value) | |
145 | 147 | ||
146 | 148 | ||
147 | 149 | func _throwIf (condition,error) = if (condition) | |
148 | 150 | then throw(error) | |
149 | 151 | else true | |
150 | 152 | ||
151 | 153 | ||
152 | 154 | func _writeGlobalParam (key,_value) = match _value { | |
153 | 155 | case _value: Int => | |
154 | 156 | let entry = makeString(["%d", toString(_value)], SEP) | |
155 | 157 | _writeStr(key, entry) | |
156 | 158 | case _value: String => | |
157 | 159 | let entry = makeString(["%s", _value], SEP) | |
158 | 160 | _writeStr(key, entry) | |
159 | 161 | case _value: Boolean => | |
160 | 162 | let entry = makeString(["%b", toString(_value)], SEP) | |
161 | 163 | _writeStr(key, entry) | |
162 | 164 | case _ => | |
163 | 165 | throw("type not supported") | |
164 | 166 | } | |
165 | 167 | ||
166 | 168 | ||
167 | 169 | func _getRegistryEntryValue (key) = { | |
168 | 170 | let _rawValue = _throwOrReturnS(_getS(key), ("entry not found for " + key)) | |
169 | 171 | if ((_rawValue == _rawValue)) | |
170 | 172 | then { | |
171 | 173 | let x = split(_rawValue, SEP) | |
172 | 174 | let formatSpecifier = takeRight(x[0], 1) | |
173 | 175 | let _valueString = x[(size(x) - 1)] | |
174 | 176 | let _value = if ((formatSpecifier == "s")) | |
175 | 177 | then _valueString | |
176 | 178 | else if ((formatSpecifier == "d")) | |
177 | 179 | then parseIntValue(_valueString) | |
178 | 180 | else if ((formatSpecifier == "b")) | |
179 | 181 | then fromBase58String(_valueString) | |
180 | 182 | else throw(("could not parse registry value for " + key)) | |
181 | 183 | _value | |
182 | 184 | } | |
183 | 185 | else throw("Strict value is not equal to itself.") | |
184 | 186 | } | |
185 | 187 | ||
186 | 188 | ||
187 | 189 | func _daysToMiliSec (days) = { | |
188 | 190 | let check = _throwIf((0 >= days), "invalid locking days!") | |
189 | 191 | if ((check == check)) | |
190 | 192 | then (days * _Dt) | |
191 | 193 | else throw("Strict value is not equal to itself.") | |
192 | 194 | } | |
193 | 195 | ||
194 | 196 | ||
195 | 197 | func _writeConstString (key,value) = if (!(isDefined(_getS(key)))) | |
196 | 198 | then _writeStr(key, value) | |
197 | 199 | else throw(("entry already initialized: " + key)) | |
198 | 200 | ||
199 | 201 | ||
200 | 202 | func _writeConstInteger (key,value) = if (!(isDefined(_getS(key)))) | |
201 | 203 | then _writeInt(key, value) | |
202 | 204 | else throw((" entry already initialized: " + key)) | |
203 | 205 | ||
204 | 206 | ||
205 | 207 | func _onlyManager (i) = { | |
206 | 208 | let manager = match _getRegistryEntryValue(_manager) { | |
207 | 209 | case val: String => | |
208 | 210 | val | |
209 | 211 | case _ => | |
210 | 212 | "failed to get manager" | |
211 | 213 | } | |
212 | 214 | if ((manager == manager)) | |
213 | 215 | then _throwIf((toBase58String(i.caller.bytes) != manager), "address not authorized") | |
214 | 216 | else throw("Strict value is not equal to itself.") | |
215 | 217 | } | |
216 | 218 | ||
217 | 219 | ||
218 | 220 | func _abs (val) = if ((0 > val)) | |
219 | 221 | then -(val) | |
220 | 222 | else val | |
221 | 223 | ||
222 | 224 | ||
223 | 225 | func _validateAddress (address,errorMsg) = match address { | |
224 | 226 | case address: String => | |
225 | 227 | let _address = addressFromString(address) | |
226 | 228 | match _address { | |
227 | 229 | case _address: Address => | |
228 | 230 | true | |
229 | 231 | case _ => | |
230 | 232 | match errorMsg { | |
231 | 233 | case msg: String => | |
232 | 234 | throw(msg) | |
233 | 235 | case _ => | |
234 | 236 | false | |
235 | 237 | } | |
236 | 238 | } | |
237 | 239 | case address: ByteVector => | |
238 | 240 | let _address = addressFromPublicKey(address) | |
239 | 241 | match _address { | |
240 | 242 | case _address: Address => | |
241 | 243 | true | |
242 | 244 | case _ => | |
243 | 245 | match errorMsg { | |
244 | 246 | case msg: String => | |
245 | 247 | throw(msg) | |
246 | 248 | case _ => | |
247 | 249 | false | |
248 | 250 | } | |
249 | 251 | } | |
250 | 252 | case _ => | |
251 | 253 | throw("invalid input type") | |
252 | 254 | } | |
253 | 255 | ||
254 | 256 | ||
255 | 257 | func _validateAsset (assetID,errorMsg) = match assetInfo(fromBase58String(assetID)) { | |
256 | 258 | case asset: Asset => | |
257 | 259 | true | |
258 | 260 | case _ => | |
259 | 261 | match errorMsg { | |
260 | 262 | case msg: String => | |
261 | 263 | throw(msg) | |
262 | 264 | case _ => | |
263 | 265 | false | |
264 | 266 | } | |
265 | 267 | } | |
266 | 268 | ||
267 | 269 | ||
268 | 270 | func _computeMr () = { | |
269 | 271 | let currentCircIndex = match _getRegistryEntryValue(_circulationIncrIndex) { | |
270 | 272 | case t: Int => | |
271 | 273 | t | |
272 | 274 | case _ => | |
273 | 275 | throw("circulation index not previously defined") | |
274 | 276 | } | |
275 | 277 | if ((currentCircIndex == currentCircIndex)) | |
276 | 278 | then { | |
277 | 279 | let stawAssetId = match _getRegistryEntryValue(_stawAssetId) { | |
278 | 280 | case t: String => | |
279 | 281 | t | |
280 | 282 | case _ => | |
281 | 283 | throw("asset id not previously defined") | |
282 | 284 | } | |
283 | 285 | if ((stawAssetId == stawAssetId)) | |
284 | 286 | then { | |
285 | 287 | let stawCirculatingSupply = match assetInfo(fromBase58String(stawAssetId)) { | |
286 | 288 | case asset: Asset => | |
287 | 289 | asset.quantity | |
288 | 290 | case _ => | |
289 | 291 | throw(("asset not found for " + stawAssetId)) | |
290 | 292 | } | |
291 | 293 | let unitIncrement = (_abs((stawCirculatingSupply - _incrementRef)) / _incrementRef) | |
292 | 294 | let newCirculationIncrIndex = if ((unitIncrement > currentCircIndex)) | |
293 | 295 | then (unitIncrement + currentCircIndex) | |
294 | 296 | else currentCircIndex | |
295 | 297 | let currentMr = match _getRegistryEntryValue(_Mr) { | |
296 | 298 | case t: Int => | |
297 | 299 | t | |
298 | 300 | case _ => | |
299 | 301 | throw("failed to get miniting rate") | |
300 | 302 | } | |
301 | 303 | if ((newCirculationIncrIndex == currentCircIndex)) | |
302 | 304 | then $Tuple2(currentMr, nil) | |
303 | 305 | else { | |
304 | 306 | let newreductionFactor = match _getRegistryEntryValue(_percentageReductionFactor) { | |
305 | 307 | case t: Int => | |
306 | 308 | t | |
307 | 309 | case _ => | |
308 | 310 | throw("failed to get percentage reduction factor") | |
309 | 311 | } | |
310 | 312 | let newCurrentMr = (currentMr - fraction(currentMr, newreductionFactor, 100)) | |
311 | 313 | let store1 = _writeGlobalParam(_Mr, newCurrentMr) | |
312 | 314 | let store2 = _writeGlobalParam(_percentageReductionFactor, newreductionFactor) | |
313 | 315 | let store3 = _writeGlobalParam(_circulationIncrIndex, newCirculationIncrIndex) | |
314 | 316 | $Tuple2(newCurrentMr, [store1, store2, store3]) | |
315 | 317 | } | |
316 | 318 | } | |
317 | 319 | else throw("Strict value is not equal to itself.") | |
318 | 320 | } | |
319 | 321 | else throw("Strict value is not equal to itself.") | |
320 | 322 | } | |
321 | 323 | ||
322 | 324 | ||
323 | 325 | func _updateGlobalEntry (wavesAmount,stawAmount,stawPL,indexCount) = { | |
324 | 326 | let _newGlobalTotalWavesAmtRef = match _getRegistryEntryValue(_totalWavesRef) { | |
325 | 327 | case t: Int => | |
326 | 328 | (t + wavesAmount) | |
327 | 329 | case _ => | |
328 | 330 | throw("failed to get global total waves") | |
329 | 331 | } | |
330 | 332 | if ((_newGlobalTotalWavesAmtRef == _newGlobalTotalWavesAmtRef)) | |
331 | 333 | then { | |
332 | 334 | let _newGlobalTotalStawMinted = match _getRegistryEntryValue(_totalStaw) { | |
333 | 335 | case t: Int => | |
334 | 336 | (t + stawAmount) | |
335 | 337 | case _ => | |
336 | 338 | throw("failed to get global total staw minted") | |
337 | 339 | } | |
338 | 340 | if ((_newGlobalTotalStawMinted == _newGlobalTotalStawMinted)) | |
339 | 341 | then { | |
340 | 342 | let _newGlobalTotalStawPL = match _getRegistryEntryValue(_totalStawLP) { | |
341 | 343 | case t: Int => | |
342 | 344 | (t + stawPL) | |
343 | 345 | case _ => | |
344 | 346 | throw("failed to get global total stawpl") | |
345 | 347 | } | |
346 | 348 | if ((_newGlobalTotalStawPL == _newGlobalTotalStawPL)) | |
347 | 349 | then { | |
348 | 350 | let _newGlobaIndexCount = match _getRegistryEntryValue(_globalIndexCount) { | |
349 | 351 | case t: Int => | |
350 | 352 | (t + indexCount) | |
351 | 353 | case _ => | |
352 | 354 | throw("failed to get global index count") | |
353 | 355 | } | |
354 | 356 | if ((_newGlobaIndexCount == _newGlobaIndexCount)) | |
355 | 357 | then [_writeGlobalParam(_totalWavesRef, _newGlobalTotalWavesAmtRef), _writeGlobalParam(_totalStaw, _newGlobalTotalStawMinted), _writeGlobalParam(_totalStawLP, _newGlobalTotalStawPL), _writeGlobalParam(_globalIndexCount, _newGlobaIndexCount)] | |
356 | 358 | else throw("Strict value is not equal to itself.") | |
357 | 359 | } | |
358 | 360 | else throw("Strict value is not equal to itself.") | |
359 | 361 | } | |
360 | 362 | else throw("Strict value is not equal to itself.") | |
361 | 363 | } | |
362 | 364 | else throw("Strict value is not equal to itself.") | |
363 | 365 | } | |
364 | 366 | ||
365 | 367 | ||
366 | 368 | func _registerUserEntry (transactionID,userAddress,lockDuration,lockDurationInMili,lockIndex,wavesAmount,stawAmount,stawLPAmount,lockAtHeight,lockId,totalLocked,localIndexCount,leaseState) = { | |
367 | 369 | let _txIdKey = makeString([userAddress, transactionID, _txId], SEP) | |
368 | 370 | let _lockDurationKey = makeString([userAddress, transactionID, _lockDuration], SEP) | |
369 | 371 | let _lockIndexKey = makeString([userAddress, transactionID, _lockIndex], SEP) | |
370 | 372 | let _wavesAmountKey = makeString([userAddress, transactionID, _wavesAmount], SEP) | |
371 | 373 | let _stawAmountKey = makeString([userAddress, transactionID, _stawAmount], SEP) | |
372 | 374 | let _stawLPAmountKey = makeString([userAddress, transactionID, _stawLPAmount], SEP) | |
373 | 375 | let _lockAtHeightKey = makeString([userAddress, transactionID, _lockAtHeight], SEP) | |
374 | 376 | let _lockIdKey = makeString([userAddress, transactionID, _lockId], SEP) | |
375 | 377 | let _totalLockedKey = makeString([userAddress, _userTotalLocked], SEP) | |
376 | 378 | let _localLockIndexKey = makeString([userAddress, _userLocalIndexCount], SEP) | |
377 | 379 | let _lockPeriodInMiliSecKey = makeString([userAddress, transactionID, _lockPeriodInMiliSec], SEP) | |
378 | 380 | let _totalWavesClaimedKey = makeString([userAddress, transactionID, _totalWavesClaimed], SEP) | |
379 | 381 | let _userLeaseStateKey = makeString([userAddress, transactionID, _userLeaseState], SEP) | |
380 | 382 | let trxIdEntry = makeString(["%s", transactionID], SEP) | |
381 | 383 | let lockDurationEntry = makeString(["%d", toString(lockDuration)], SEP) | |
382 | 384 | let lockIndexEntry = makeString(["%d", toString(lockIndex)], SEP) | |
383 | 385 | let wavesAmountEntry = makeString(["%d", toString(wavesAmount)], SEP) | |
384 | 386 | let stawAmountEntry = makeString(["%d", toString(stawAmount)], SEP) | |
385 | 387 | let stawLPAmountEntry = makeString(["%d", toString(stawLPAmount)], SEP) | |
386 | 388 | let lockAtHeightEntry = makeString(["%d", toString(lockAtHeight)], SEP) | |
387 | 389 | let lockIdEntry = makeString(["%b", lockId], SEP) | |
388 | 390 | let totalLockedEntry = makeString(["%d", toString(totalLocked)], SEP) | |
389 | 391 | let userLocalIndexEntry = makeString(["%d", toString(localIndexCount)], SEP) | |
390 | 392 | let lockPeriodInMiliSecEntry = makeString(["%d", toString(lockDurationInMili)], SEP) | |
391 | 393 | let totalWavesClaimedEntry = makeString(["%d", toString(0)], SEP) | |
392 | 394 | let userLeaseStateEntry = makeString(["%s", leaseState], SEP) | |
393 | 395 | [_writeConstString(_txIdKey, trxIdEntry), _writeConstString(_lockIndexKey, lockIndexEntry), _writeStr(_localLockIndexKey, userLocalIndexEntry), _writeStr(_totalLockedKey, totalLockedEntry), _writeConstString(_lockDurationKey, lockDurationEntry), _writeConstString(_lockPeriodInMiliSecKey, lockPeriodInMiliSecEntry), _writeConstString(_wavesAmountKey, wavesAmountEntry), _writeConstString(_stawAmountKey, stawAmountEntry), _writeStr(_stawLPAmountKey, stawLPAmountEntry), _writeStr(_totalWavesClaimedKey, totalWavesClaimedEntry), _writeConstString(_lockAtHeightKey, lockAtHeightEntry), _writeConstString(_lockIdKey, lockIdEntry), _writeStr(_userLeaseStateKey, userLeaseStateEntry)] | |
394 | 396 | } | |
395 | 397 | ||
396 | 398 | ||
397 | 399 | func _stawMF (lockPeriod,collateralWaves) = { | |
398 | 400 | let _adjustedMr = _computeMr() | |
399 | 401 | let ret = fraction(collateralWaves, (_Dt * _adjustedMr._1), _Ppy(lockPeriod)) | |
400 | 402 | if ((size(_adjustedMr._2) == 0)) | |
401 | 403 | then $Tuple2(ret, nil) | |
402 | 404 | else $Tuple2(ret, _adjustedMr._2) | |
403 | 405 | } | |
404 | 406 | ||
405 | 407 | ||
406 | 408 | func _emissionRateWaves (lockPeriod,collateral) = { | |
407 | 409 | let extensionFactor = fraction(lockPeriod, 15, 10) | |
408 | 410 | fraction(collateral, ((lockPeriod * extensionFactor) - lockPeriod), _Dt) | |
409 | 411 | } | |
410 | 412 | ||
411 | 413 | ||
412 | 414 | func _incrTotalStawLP (amount) = { | |
413 | 415 | let oldStawLP = _throwOrReturnI(_getI(_totalStawLP), "could not get the running StawLP") | |
414 | 416 | [_writeInt(_totalStawLP, (oldStawLP + amount))] | |
415 | 417 | } | |
416 | 418 | ||
417 | 419 | ||
418 | 420 | func _decrTotalStawLP (amount) = { | |
419 | 421 | let oldStawLP = _throwOrReturnI(_getI(_totalStawLP), "could not get the running StawLP") | |
420 | 422 | [_writeInt(_totalStawLP, (oldStawLP - amount))] | |
421 | 423 | } | |
422 | 424 | ||
423 | 425 | ||
424 | 426 | func _incrTotalWavesRef (amount) = { | |
425 | 427 | let oldWavesRef = _throwOrReturnI(_getI(_totalWavesRef), "could not get total locked waves") | |
426 | 428 | [_writeInt(_totalWavesRef, (oldWavesRef + amount))] | |
427 | 429 | } | |
428 | 430 | ||
429 | 431 | ||
430 | 432 | func _decrTotalWavesRef (amount) = { | |
431 | 433 | let oldWavesRef = _throwOrReturnI(_getI(_totalWavesRef), "could not get total locked waves") | |
432 | 434 | [_writeInt(_totalWavesRef, (oldWavesRef - amount))] | |
433 | 435 | } | |
434 | 436 | ||
435 | 437 | ||
436 | 438 | func _getNewTimeStamp (blockHeight) = { | |
437 | 439 | let time = match blockInfoByHeight(blockHeight) { | |
438 | 440 | case timeInfo: BlockInfo => | |
439 | 441 | timeInfo.timestamp | |
440 | 442 | case _ => | |
441 | 443 | throw("counld get timestamp") | |
442 | 444 | } | |
443 | 445 | time | |
444 | 446 | } | |
445 | 447 | ||
446 | 448 | ||
447 | 449 | @Callable(i) | |
448 | 450 | func getEmission (lockPeriod,collateral) = { | |
449 | 451 | let check1 = _onlyManager(i) | |
450 | 452 | if ((check1 == check1)) | |
451 | 453 | then $Tuple2(nil, _emissionRateWaves(lockPeriod, collateral)) | |
452 | 454 | else throw("Strict value is not equal to itself.") | |
453 | 455 | } | |
454 | 456 | ||
455 | 457 | ||
456 | 458 | ||
457 | 459 | @Callable(i) | |
458 | 460 | func init (manager,dfx,assetID,leaseNode) = { | |
459 | 461 | let managerAlreadyExists = if (isDefined(_getS(_manager))) | |
460 | 462 | then _onlyManager(i) | |
461 | 463 | else true | |
462 | 464 | if ((managerAlreadyExists == managerAlreadyExists)) | |
463 | 465 | then { | |
464 | 466 | let check1 = _validateAddress(manager, "invalid address") | |
465 | 467 | if ((check1 == check1)) | |
466 | 468 | then { | |
467 | 469 | let check2 = _validateAddress(dfx, "invalid address") | |
468 | 470 | if ((check2 == check2)) | |
469 | 471 | then { | |
470 | 472 | let check3 = _validateAddress(leaseNode, "invalid address") | |
471 | 473 | if ((check3 == check3)) | |
472 | 474 | then { | |
473 | 475 | let check4 = if (_validateAsset(assetID, "invalid asset")) | |
474 | 476 | then true | |
475 | 477 | else throw("invalid asset Id") | |
476 | 478 | if ((check4 == check4)) | |
477 | 479 | then { | |
478 | 480 | let circulationIndex = _setParamVal(_circulationIncrIndex, 0) | |
479 | 481 | let percentageReductionInMr = _setParamVal(_percentageReductionFactor, 0) | |
480 | 482 | let Mr = _setParamVal(_Mr, _unitDecimals) | |
481 | 483 | let totalStawMinted = _setParamVal(_totalStaw, 0) | |
482 | 484 | let totalStawLPInCirculation = _setParamVal(_totalStawLP, 0) | |
483 | 485 | let globalIndexCount = _setParamVal(_globalIndexCount, 0) | |
484 | 486 | let totalWavesRef = _setParamVal(_totalWavesRef, 0) | |
485 | 487 | [_writeGlobalParam(_manager, manager), _writeGlobalParam(_Dfx, dfx), _writeGlobalParam(_stawAssetId, assetID), _writeGlobalParam(_lesseeAddress, leaseNode), _writeGlobalParam(_circulationIncrIndex, circulationIndex), _writeGlobalParam(_Mr, Mr), _writeGlobalParam(_percentageReductionFactor, percentageReductionInMr), _writeGlobalParam(_totalWavesRef, totalWavesRef), _writeGlobalParam(_totalStawLP, totalStawLPInCirculation), _writeGlobalParam(_totalStaw, totalStawMinted), _writeGlobalParam(_globalIndexCount, globalIndexCount)] | |
486 | 488 | } | |
487 | 489 | else throw("Strict value is not equal to itself.") | |
488 | 490 | } | |
489 | 491 | else throw("Strict value is not equal to itself.") | |
490 | 492 | } | |
491 | 493 | else throw("Strict value is not equal to itself.") | |
492 | 494 | } | |
493 | 495 | else throw("Strict value is not equal to itself.") | |
494 | 496 | } | |
495 | 497 | else throw("Strict value is not equal to itself.") | |
496 | 498 | } | |
497 | 499 | ||
498 | 500 | ||
499 | 501 | ||
500 | 502 | @Callable(i) | |
501 | 503 | func modifyGlobalParams (val) = { | |
502 | 504 | let check1 = _onlyManager(i) | |
503 | 505 | if ((check1 == check1)) | |
504 | 506 | then { | |
505 | 507 | let errorMsg = makeString(["got", "list size of", toString(size(val)), "but expected [global_key, value] pair"], " ") | |
506 | 508 | let check2 = _throwIf((size(val) != 2), errorMsg) | |
507 | 509 | if ((check2 == check2)) | |
508 | 510 | then { | |
509 | 511 | let key = val[0] | |
510 | 512 | let valType = parseInt(val[1]) | |
511 | 513 | match valType { | |
512 | 514 | case x: Int => | |
513 | 515 | let validateKey = _throwIf((_getS(key) == unit), (("key " + key) + " not recognized")) | |
514 | 516 | if ((validateKey == validateKey)) | |
515 | 517 | then { | |
516 | 518 | let ensureValidPairs = match _getRegistryEntryValue(key) { | |
517 | 519 | case t: Int => | |
518 | 520 | true | |
519 | 521 | case _ => | |
520 | 522 | throw("invalid key-value pair") | |
521 | 523 | } | |
522 | 524 | if ((ensureValidPairs == ensureValidPairs)) | |
523 | 525 | then [_writeGlobalParam(key, x)] | |
524 | 526 | else throw("Strict value is not equal to itself.") | |
525 | 527 | } | |
526 | 528 | else throw("Strict value is not equal to itself.") | |
527 | 529 | case x: Unit => | |
528 | 530 | let validateKey = _throwIf((_getS(key) == unit), (("key " + key) + " not recognized")) | |
529 | 531 | if ((validateKey == validateKey)) | |
530 | 532 | then { | |
531 | 533 | let stringValue = val[1] | |
532 | 534 | let refAddress = _getRegistryEntryValue(_manager) | |
533 | 535 | let check4 = match refAddress { | |
534 | 536 | case strType: String => | |
535 | 537 | if ((size(strType) == size(stringValue))) | |
536 | 538 | then _validateAddress(stringValue, "string type for value not supported") | |
537 | 539 | else _validateAsset(stringValue, "string type for value not supported") | |
538 | 540 | case _ => | |
539 | 541 | false | |
540 | 542 | } | |
541 | 543 | if ((check4 == check4)) | |
542 | 544 | then [_writeGlobalParam(key, stringValue)] | |
543 | 545 | else throw("Strict value is not equal to itself.") | |
544 | 546 | } | |
545 | 547 | else throw("Strict value is not equal to itself.") | |
546 | 548 | case _ => | |
547 | 549 | throw(("failed to modify " + val[0])) | |
548 | 550 | } | |
549 | 551 | } | |
550 | 552 | else throw("Strict value is not equal to itself.") | |
551 | 553 | } | |
552 | 554 | else throw("Strict value is not equal to itself.") | |
553 | 555 | } | |
554 | 556 | ||
555 | 557 | ||
556 | 558 | ||
557 | 559 | @Callable(i) | |
558 | 560 | func revokeLock () = { | |
559 | 561 | let check1 = _onlyManager(i) | |
560 | 562 | if ((check1 == check1)) | |
561 | 563 | then nil | |
562 | 564 | else throw("Strict value is not equal to itself.") | |
563 | 565 | } | |
564 | 566 | ||
565 | 567 | ||
566 | 568 | ||
567 | 569 | @Callable(i) | |
568 | 570 | func claim (transactionID) = { | |
569 | 571 | let callerAddress = toBase58String(i.caller.bytes) | |
570 | 572 | let collateralKey = makeString([callerAddress, transactionID, _wavesAmount], SEP) | |
571 | 573 | let lockperiodKey = makeString([callerAddress, transactionID, _lockDuration], SEP) | |
572 | 574 | let lockIdKey = makeString([callerAddress, transactionID, _lockId], SEP) | |
573 | 575 | let lockperiodInMiliKey = makeString([callerAddress, transactionID, _lockPeriodInMiliSec], SEP) | |
574 | 576 | let totalWavesClaimedKey = makeString([callerAddress, transactionID, _totalWavesClaimed], SEP) | |
575 | 577 | let stawLPAmountKey = makeString([callerAddress, transactionID, _stawLPAmount], SEP) | |
576 | 578 | let wavesAmountKey = makeString([callerAddress, transactionID, _wavesAmount], SEP) | |
577 | 579 | let userTotalWavesLockedKey = makeString([callerAddress, _userTotalLocked], SEP) | |
578 | 580 | let userLeaseStateKey = makeString([callerAddress, transactionID, _userLeaseState], SEP) | |
579 | 581 | let leaseStateKey = makeString([callerAddress, transactionID, _userLeaseState], SEP) | |
582 | + | let daysAfterLockPeriodElaspedKey = makeString([callerAddress, transactionID, _daysAfterLockPeriod], SEP) | |
580 | 583 | let globalWavesRef = match _getRegistryEntryValue(_totalWavesRef) { | |
581 | 584 | case t: Int => | |
582 | 585 | t | |
583 | 586 | case _ => | |
584 | 587 | throw("failed to get global total waves") | |
585 | 588 | } | |
586 | 589 | if ((globalWavesRef == globalWavesRef)) | |
587 | 590 | then { | |
588 | 591 | let globalStawPL = match _getRegistryEntryValue(_totalStawLP) { | |
589 | 592 | case t: Int => | |
590 | 593 | t | |
591 | 594 | case _ => | |
592 | 595 | throw("failed to get global total waves") | |
593 | 596 | } | |
594 | 597 | if ((globalStawPL == globalStawPL)) | |
595 | 598 | then { | |
596 | 599 | let lockId = match _getRegistryEntryValue(lockIdKey) { | |
597 | 600 | case t: ByteVector => | |
598 | 601 | t | |
599 | 602 | case _ => | |
600 | 603 | throw("failed to get lease id") | |
601 | 604 | } | |
602 | 605 | if ((lockId == lockId)) | |
603 | 606 | then { | |
604 | 607 | let userTotalWavesLocked = match _getRegistryEntryValue(userTotalWavesLockedKey) { | |
605 | 608 | case t: Int => | |
606 | 609 | t | |
607 | 610 | case _ => | |
608 | 611 | throw("failed to get total waves locked by this address") | |
609 | 612 | } | |
610 | 613 | if ((userTotalWavesLocked == userTotalWavesLocked)) | |
611 | 614 | then { | |
612 | 615 | let wavesAmount = match _getRegistryEntryValue(wavesAmountKey) { | |
613 | 616 | case t: Int => | |
614 | 617 | t | |
615 | 618 | case _ => | |
616 | 619 | throw("failed to get total waves locked") | |
617 | 620 | } | |
618 | 621 | if ((wavesAmount == wavesAmount)) | |
619 | 622 | then { | |
620 | 623 | let totalWavesClaimed = match _getRegistryEntryValue(totalWavesClaimedKey) { | |
621 | 624 | case t: Int => | |
622 | 625 | t | |
623 | 626 | case _ => | |
624 | 627 | throw("failed to get total waves claimed") | |
625 | 628 | } | |
626 | 629 | if ((totalWavesClaimed == totalWavesClaimed)) | |
627 | 630 | then { | |
628 | 631 | let stawLPAmount = match _getRegistryEntryValue(stawLPAmountKey) { | |
629 | 632 | case t: Int => | |
630 | 633 | t | |
631 | 634 | case _ => | |
632 | 635 | throw("failed to get stawPL") | |
633 | 636 | } | |
634 | 637 | if ((stawLPAmount == stawLPAmount)) | |
635 | 638 | then { | |
636 | 639 | let lockPeriodInMili = match _getRegistryEntryValue(lockperiodInMiliKey) { | |
637 | 640 | case t: Int => | |
638 | 641 | t | |
639 | 642 | case _ => | |
640 | 643 | throw("failed to get lock period timespam") | |
641 | 644 | } | |
642 | 645 | if ((lockPeriodInMili == lockPeriodInMili)) | |
643 | 646 | then { | |
644 | 647 | let currentTimeStamp = match _getNewTimeStamp(height) { | |
645 | 648 | case t: Int => | |
646 | 649 | t | |
647 | 650 | case _ => | |
648 | 651 | throw("failed to get current timestamp") | |
649 | 652 | } | |
650 | 653 | if ((currentTimeStamp == currentTimeStamp)) | |
651 | 654 | then { | |
652 | 655 | let collateral = match _getRegistryEntryValue(collateralKey) { | |
653 | 656 | case t: Int => | |
654 | 657 | t | |
655 | 658 | case _ => | |
656 | 659 | throw("failed to get collateral") | |
657 | 660 | } | |
658 | 661 | if ((collateral == collateral)) | |
659 | 662 | then { | |
660 | 663 | let lockPeriod = match _getRegistryEntryValue(lockperiodKey) { | |
661 | 664 | case t: Int => | |
662 | 665 | t | |
663 | 666 | case _ => | |
664 | 667 | throw("failed to get lockPeriod") | |
665 | 668 | } | |
666 | 669 | if ((lockPeriod == lockPeriod)) | |
667 | 670 | then { | |
668 | 671 | let currentLeaseState = match _getRegistryEntryValue(userLeaseStateKey) { | |
669 | 672 | case t: String => | |
670 | 673 | t | |
671 | 674 | case _ => | |
672 | 675 | throw("failed to get lease state") | |
673 | 676 | } | |
674 | 677 | if ((currentLeaseState == currentLeaseState)) | |
675 | 678 | then { | |
676 | 679 | let leaseState = match _getRegistryEntryValue(leaseStateKey) { | |
677 | 680 | case t: String => | |
678 | 681 | t | |
679 | 682 | case _ => | |
680 | 683 | throw("failed to get lease state for user") | |
681 | 684 | } | |
682 | 685 | if ((leaseState == leaseState)) | |
683 | 686 | then { | |
684 | - | let check1 = _throwIf((lockPeriodInMili > currentTimeStamp), "lock period for this entry has not elapsed") | |
685 | - | if ((check1 == check1)) | |
687 | + | let daysAfterLockPeriodElasped = match _getS(daysAfterLockPeriodElaspedKey) { | |
688 | + | case t: String => | |
689 | + | match _getRegistryEntryValue(daysAfterLockPeriodElaspedKey) { | |
690 | + | case z: Int => | |
691 | + | z | |
692 | + | case _ => | |
693 | + | 0 | |
694 | + | } | |
695 | + | case _ => | |
696 | + | 0 | |
697 | + | } | |
698 | + | if ((daysAfterLockPeriodElasped == daysAfterLockPeriodElasped)) | |
686 | 699 | then { | |
687 | - | let leaseAction = if ((currentLeaseState == "leased")) | |
688 | - | then $Tuple2(LeaseCancel(lockId), _writeStr(userLeaseStateKey, "cancelled")) | |
689 | - | else $Tuple2(_writeStr(userLeaseStateKey, "cancelled"), _writeStr(userLeaseStateKey, "cancelled")) | |
690 | - | if ((leaseAction == leaseAction)) | |
700 | + | let check1 = _throwIf((lockPeriodInMili > currentTimeStamp), "lock period for this entry has not elapsed") | |
701 | + | if ((check1 == check1)) | |
691 | 702 | then { | |
703 | + | let leaseAction = if ((currentLeaseState == "leased")) | |
704 | + | then $Tuple2(LeaseCancel(lockId), _writeStr(userLeaseStateKey, "cancelled")) | |
705 | + | else $Tuple2(_writeStr(userLeaseStateKey, "cancelled"), _writeStr(userLeaseStateKey, "cancelled")) | |
692 | 706 | let check2 = _throwIf(if ((0 == wavesAmount)) | |
693 | 707 | then true | |
694 | 708 | else (0 == stawLPAmount), "all claims exhausted for this trx") | |
695 | 709 | if ((check2 == check2)) | |
696 | 710 | then { | |
697 | 711 | let emissionValuePerDT = (_emissionRateWaves(lockPeriod, collateral) * _Dt) | |
698 | 712 | let claimAction = { | |
699 | 713 | let timeStampDiff = (currentTimeStamp - lockPeriodInMili) | |
700 | - | let | |
714 | + | let xdays = (timeStampDiff / _Dt) | |
701 | 715 | if ((daysAfterLockPeriodElasped == 0)) | |
702 | 716 | then throw("less than 24hrs before first claim") | |
703 | - | else if (((timeStampDiff % _Dt) != 0)) | |
704 | - | then throw("already claimed or less than 24hrs before next claim") | |
705 | - | else if ((daysAfterLockPeriodElasped > lockPeriod)) | |
706 | - | then throw("all claims exhausted") | |
707 | - | else { | |
708 | - | let totalAmountClaimable = (daysAfterLockPeriodElasped * emissionValuePerDT) | |
709 | - | let check3_1 = _throwIf((totalAmountClaimable == totalWavesClaimed), "can only claim once in 24hrs") | |
710 | - | if ((check3_1 == check3_1)) | |
711 | - | then { | |
712 | - | let check3_2 = _throwIf(((totalAmountClaimable + totalWavesClaimed) > wavesAmount), "all claims exhausted") | |
713 | - | if ((check3_2 == check3_2)) | |
714 | - | then { | |
715 | - | let claimAmountToSend = if ((daysAfterLockPeriodElasped == 1)) | |
716 | - | then totalAmountClaimable | |
717 | - | else (totalAmountClaimable - totalWavesClaimed) | |
718 | - | let newTotalWavesClaim = totalAmountClaimable | |
719 | - | let newWavesAmount = if ((daysAfterLockPeriodElasped == 1)) | |
720 | - | then (wavesAmount - totalAmountClaimable) | |
721 | - | else (wavesAmount - (totalAmountClaimable - totalWavesClaimed)) | |
722 | - | let newStawLPAmount = if ((daysAfterLockPeriodElasped == 1)) | |
723 | - | then (stawLPAmount - totalAmountClaimable) | |
724 | - | else (stawLPAmount - (totalAmountClaimable - totalWavesClaimed)) | |
725 | - | let newGlobalWaveRef = (globalWavesRef - newWavesAmount) | |
726 | - | let newGlobalStawPL = (globalStawPL - newStawLPAmount) | |
727 | - | let newUserTotalWavesLocked = (userTotalWavesLocked - claimAmountToSend) | |
728 | - | let wavesAmountEntry = makeString(["%d", toString(newWavesAmount)], SEP) | |
729 | - | let stawLPAmountEntry = makeString(["%d", toString(newStawLPAmount)], SEP) | |
730 | - | let totalWavesClaimedEntry = makeString(["%d", toString(newTotalWavesClaim)], SEP) | |
731 | - | let newUserTotalWavesLockedEntry = makeString(["%d", toString(newUserTotalWavesLocked)], SEP) | |
732 | - | [leaseAction._1, leaseAction._2, _writeStr(wavesAmountKey, wavesAmountEntry), _writeStr(stawLPAmountKey, stawLPAmountEntry), _writeStr(totalWavesClaimedKey, totalWavesClaimedEntry), _writeStr(userTotalWavesLockedKey, newUserTotalWavesLockedEntry), _writeGlobalParam(_totalWavesRef, newGlobalWaveRef), _writeGlobalParam(_totalStawLP, newGlobalStawPL), ScriptTransfer(Address(i.caller.bytes), claimAmountToSend, unit)] | |
733 | - | } | |
734 | - | else throw("Strict value is not equal to itself.") | |
735 | - | } | |
736 | - | else throw("Strict value is not equal to itself.") | |
737 | - | } | |
717 | + | else if ((daysAfterLockPeriodElasped >= xdays)) | |
718 | + | then throw("24hrs or less before next claim") | |
719 | + | else { | |
720 | + | let totalAmountClaimable = (daysAfterLockPeriodElasped * emissionValuePerDT) | |
721 | + | let check3_1 = _throwIf((totalAmountClaimable == totalWavesClaimed), "can only claim once in 24hrs") | |
722 | + | if ((check3_1 == check3_1)) | |
723 | + | then { | |
724 | + | let check3_2 = _throwIf(((totalAmountClaimable + totalWavesClaimed) > wavesAmount), "all claims exhausted") | |
725 | + | if ((check3_2 == check3_2)) | |
726 | + | then { | |
727 | + | let claimAmountToSend = if ((daysAfterLockPeriodElasped == 1)) | |
728 | + | then totalAmountClaimable | |
729 | + | else (totalAmountClaimable - totalWavesClaimed) | |
730 | + | let newTotalWavesClaim = totalAmountClaimable | |
731 | + | let newWavesAmount = if ((daysAfterLockPeriodElasped == 1)) | |
732 | + | then (wavesAmount - totalAmountClaimable) | |
733 | + | else (wavesAmount - (totalAmountClaimable - totalWavesClaimed)) | |
734 | + | let newStawLPAmount = if ((daysAfterLockPeriodElasped == 1)) | |
735 | + | then (stawLPAmount - totalAmountClaimable) | |
736 | + | else (stawLPAmount - (totalAmountClaimable - totalWavesClaimed)) | |
737 | + | let newGlobalWaveRef = (globalWavesRef - newWavesAmount) | |
738 | + | let newGlobalStawPL = (globalStawPL - newStawLPAmount) | |
739 | + | let newUserTotalWavesLocked = (userTotalWavesLocked - claimAmountToSend) | |
740 | + | let wavesAmountEntry = makeString(["%d", toString(newWavesAmount)], SEP) | |
741 | + | let stawLPAmountEntry = makeString(["%d", toString(newStawLPAmount)], SEP) | |
742 | + | let totalWavesClaimedEntry = makeString(["%d", toString(newTotalWavesClaim)], SEP) | |
743 | + | let newUserTotalWavesLockedEntry = makeString(["%d", toString(newUserTotalWavesLocked)], SEP) | |
744 | + | let daysAfterLockPeriodElaspedEntry = makeString(["%d", toString(daysAfterLockPeriodElasped)], SEP) | |
745 | + | [leaseAction._1, leaseAction._2, _writeStr(wavesAmountKey, wavesAmountEntry), _writeStr(stawLPAmountKey, stawLPAmountEntry), _writeStr(totalWavesClaimedKey, totalWavesClaimedEntry), _writeStr(userTotalWavesLockedKey, newUserTotalWavesLockedEntry), _writeStr(daysAfterLockPeriodElaspedKey, daysAfterLockPeriodElaspedEntry), _writeGlobalParam(_totalWavesRef, newGlobalWaveRef), _writeGlobalParam(_totalStawLP, newGlobalStawPL), ScriptTransfer(Address(i.caller.bytes), claimAmountToSend, unit)] | |
746 | + | } | |
747 | + | else throw("Strict value is not equal to itself.") | |
748 | + | } | |
749 | + | else throw("Strict value is not equal to itself.") | |
750 | + | } | |
738 | 751 | } | |
739 | 752 | if ((claimAction == claimAction)) | |
740 | 753 | then claimAction | |
741 | 754 | else throw("Strict value is not equal to itself.") | |
742 | 755 | } | |
743 | 756 | else throw("Strict value is not equal to itself.") | |
744 | 757 | } | |
745 | 758 | else throw("Strict value is not equal to itself.") | |
746 | 759 | } | |
747 | 760 | else throw("Strict value is not equal to itself.") | |
748 | 761 | } | |
749 | 762 | else throw("Strict value is not equal to itself.") | |
750 | 763 | } | |
751 | 764 | else throw("Strict value is not equal to itself.") | |
752 | 765 | } | |
753 | 766 | else throw("Strict value is not equal to itself.") | |
754 | 767 | } | |
755 | 768 | else throw("Strict value is not equal to itself.") | |
756 | 769 | } | |
757 | 770 | else throw("Strict value is not equal to itself.") | |
758 | 771 | } | |
759 | 772 | else throw("Strict value is not equal to itself.") | |
760 | 773 | } | |
761 | 774 | else throw("Strict value is not equal to itself.") | |
762 | 775 | } | |
763 | 776 | else throw("Strict value is not equal to itself.") | |
764 | 777 | } | |
765 | 778 | else throw("Strict value is not equal to itself.") | |
766 | 779 | } | |
767 | 780 | else throw("Strict value is not equal to itself.") | |
768 | 781 | } | |
769 | 782 | else throw("Strict value is not equal to itself.") | |
770 | 783 | } | |
771 | 784 | else throw("Strict value is not equal to itself.") | |
772 | 785 | } | |
773 | 786 | else throw("Strict value is not equal to itself.") | |
774 | 787 | } | |
775 | 788 | ||
776 | 789 | ||
777 | 790 | ||
778 | 791 | @Callable(i) | |
779 | 792 | func mintStaw (lockPeriod) = { | |
780 | 793 | let callerAddress = toBase58String(i.caller.bytes) | |
781 | 794 | let trxID = toBase58String(i.transactionId) | |
782 | 795 | let check1 = _throwIf((1 != size(i.payments)), "no payments attached") | |
783 | 796 | if ((check1 == check1)) | |
784 | 797 | then { | |
785 | 798 | let check2 = if (isDefined(i.payments[0].assetId)) | |
786 | 799 | then throw("only waves supported") | |
787 | 800 | else true | |
788 | 801 | if ((check2 == check2)) | |
789 | 802 | then { | |
790 | 803 | let amountInWaves = i.payments[0].amount | |
791 | 804 | let check3 = if (if ((_minLockAmount > amountInWaves)) | |
792 | 805 | then true | |
793 | 806 | else (amountInWaves > _maxLockAmount)) | |
794 | 807 | then throw("lock amount out of range, minimum: 1 waves, maximum: 1000 waves") | |
795 | 808 | else true | |
796 | 809 | if ((check3 == check3)) | |
797 | 810 | then { | |
798 | 811 | let check4 = if ((_minLockperiod > lockPeriod)) | |
799 | 812 | then throw("minimum of 14 days lock period") | |
800 | 813 | else true | |
801 | 814 | if ((check4 == check4)) | |
802 | 815 | then { | |
803 | 816 | let totalStawMint = _stawMF(lockPeriod, amountInWaves) | |
804 | 817 | let stawPL = amountInWaves | |
805 | 818 | let fee = fraction(totalStawMint._1, 10, 100) | |
806 | 819 | let userGetStawAmount = (totalStawMint._1 - fee) | |
807 | 820 | let lockPeriodToMilisec = (_getNewTimeStamp(height) + _daysToMiliSec(lockPeriod)) | |
808 | 821 | if ((lockPeriodToMilisec == lockPeriodToMilisec)) | |
809 | 822 | then { | |
810 | 823 | let new_index = match _getRegistryEntryValue(_globalIndexCount) { | |
811 | 824 | case t: Int => | |
812 | 825 | (t + 1) | |
813 | 826 | case _ => | |
814 | 827 | throw("failed to get current global index count") | |
815 | 828 | } | |
816 | 829 | if ((new_index == new_index)) | |
817 | 830 | then { | |
818 | 831 | let addressFee = match _getRegistryEntryValue(_Dfx) { | |
819 | 832 | case t: String => | |
820 | 833 | Address(fromBase58String(t)) | |
821 | 834 | case _ => | |
822 | 835 | throw("failed to get dfx address") | |
823 | 836 | } | |
824 | 837 | if ((addressFee == addressFee)) | |
825 | 838 | then { | |
826 | 839 | let stawAssetId = match _getRegistryEntryValue(_stawAssetId) { | |
827 | 840 | case t: String => | |
828 | 841 | fromBase58String(t) | |
829 | 842 | case _ => | |
830 | 843 | throw("failed to get asset id") | |
831 | 844 | } | |
832 | 845 | if ((stawAssetId == stawAssetId)) | |
833 | 846 | then { | |
834 | 847 | let lessee = match _getRegistryEntryValue(_lesseeAddress) { | |
835 | 848 | case t: String => | |
836 | 849 | Address(fromBase58String(t)) | |
837 | 850 | case _ => | |
838 | 851 | throw("failed to get lease node address") | |
839 | 852 | } | |
840 | 853 | if ((lessee == lessee)) | |
841 | 854 | then { | |
842 | 855 | let userLockIndexKey = makeString([callerAddress, _userLocalIndexCount], SEP) | |
843 | 856 | let userTotalLockedKey = makeString([callerAddress, _userTotalLocked], SEP) | |
844 | 857 | let userIndexCount = match _getS(userLockIndexKey) { | |
845 | 858 | case x: String => | |
846 | 859 | match _getRegistryEntryValue(userLockIndexKey) { | |
847 | 860 | case t: Int => | |
848 | 861 | (t + 1) | |
849 | 862 | case _ => | |
850 | 863 | 0 | |
851 | 864 | } | |
852 | 865 | case _ => | |
853 | 866 | 0 | |
854 | 867 | } | |
855 | 868 | if ((userIndexCount == userIndexCount)) | |
856 | 869 | then { | |
857 | 870 | let userTotalLocked = match _getS(userTotalLockedKey) { | |
858 | 871 | case x: String => | |
859 | 872 | match _getRegistryEntryValue(userTotalLockedKey) { | |
860 | 873 | case t: Int => | |
861 | 874 | (t + amountInWaves) | |
862 | 875 | case _ => | |
863 | 876 | amountInWaves | |
864 | 877 | } | |
865 | 878 | case _ => | |
866 | 879 | amountInWaves | |
867 | 880 | } | |
868 | 881 | if ((userTotalLocked == userTotalLocked)) | |
869 | 882 | then { | |
870 | 883 | let leaseOut = Lease(lessee, amountInWaves) | |
871 | 884 | let leaseIdStr = toBase58String(calculateLeaseId(leaseOut)) | |
872 | 885 | ((([leaseOut, ScriptTransfer(addressFee, fee, stawAssetId), ScriptTransfer(Address(i.caller.bytes), userGetStawAmount, stawAssetId)] ++ _registerUserEntry(trxID, callerAddress, lockPeriod, lockPeriodToMilisec, new_index, amountInWaves, userGetStawAmount, stawPL, height, leaseIdStr, userTotalLocked, userIndexCount, "leased")) ++ _updateGlobalEntry(amountInWaves, totalStawMint._1, stawPL, new_index)) ++ totalStawMint._2) | |
873 | 886 | } | |
874 | 887 | else throw("Strict value is not equal to itself.") | |
875 | 888 | } | |
876 | 889 | else throw("Strict value is not equal to itself.") | |
877 | 890 | } | |
878 | 891 | else throw("Strict value is not equal to itself.") | |
879 | 892 | } | |
880 | 893 | else throw("Strict value is not equal to itself.") | |
881 | 894 | } | |
882 | 895 | else throw("Strict value is not equal to itself.") | |
883 | 896 | } | |
884 | 897 | else throw("Strict value is not equal to itself.") | |
885 | 898 | } | |
886 | 899 | else throw("Strict value is not equal to itself.") | |
887 | 900 | } | |
888 | 901 | else throw("Strict value is not equal to itself.") | |
889 | 902 | } | |
890 | 903 | else throw("Strict value is not equal to itself.") | |
891 | 904 | } | |
892 | 905 | else throw("Strict value is not equal to itself.") | |
893 | 906 | } | |
894 | 907 | else throw("Strict value is not equal to itself.") | |
895 | 908 | } | |
896 | 909 | ||
897 | 910 |
github/deemru/w8io/169f3d6 105.80 ms ◑