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