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