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