tx · 89BvCeFYBQokQWxnR2LjsG8tV5deDHdfmQa3sRZzP1ds 3MwukwUkp3PsyCrkjMgqiAnSfc1hBD5FQhH: -0.02600000 Waves 2023.03.21 15:20 [2499767] smart account 3MwukwUkp3PsyCrkjMgqiAnSfc1hBD5FQhH > SELF 0.00000000 Waves
{ "type": 13, "id": "89BvCeFYBQokQWxnR2LjsG8tV5deDHdfmQa3sRZzP1ds", "fee": 2600000, "feeAssetId": null, "timestamp": 1679401259159, "version": 2, "chainId": 84, "sender": "3MwukwUkp3PsyCrkjMgqiAnSfc1hBD5FQhH", "senderPublicKey": "5JqBVJpMCyD7dJLJttqYjL6CmJc4zahBHSFjFb7qQTga", "proofs": [ "4Gw231FTBPH49rvhUzSFxs7duyS1kxtSCnueTyMuBgsqw9v5M4GTkdNsE3sLpezSjqdpjUvg8hAToy7DbkWWVEGx" ], "script": "base64:BgIhCAISBAoCAQESBgoECAgICBIDCgEYEgASAwoBCBIDCgEBRgADU0VQAgFfAA5fbWluTG9ja3BlcmlvZAABAA1fdW5pdERlY2ltYWxzAIDC1y8ADl9taW5Mb2NrQW1vdW50CQBoAgABBQ1fdW5pdERlY2ltYWxzAA5fbWF4TG9ja0Ftb3VudAkAaAIA6AcFDV91bml0RGVjaW1hbHMAA19EdACAuJkpAQRfUHB5AQpsb2NrUGVyaW9kCQBrAwUNX3VuaXREZWNpbWFscwDtAgUKbG9ja1BlcmlvZAANX2luY3JlbWVudFJlZgDAhD0ADl9wZXJjZW50YWdlRmVlCQBrAwUNX3VuaXREZWNpbWFscwAKAGQAGl9wZXJjZW50YWdlUmVkdWN0aW9uRmFjdG9yAilDdXJyZW50X1BlcmNlbnRhZ2VSZWR1Y3Rpb25fRmFjdG9yX0Zvcl9NcgADX01yAgxNaW50aW5nX1JhdGUADF9zdGF3QXNzZXRJZAIMU3Rhd19Bc3NldElkAAhfbWFuYWdlcgIHbWFuYWdlcgAEX0RmeAIDRGZ4ABVfY2lyY3VsYXRpb25JbmNySW5kZXgC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FEXVzZXJHZXRTdGF3QW1vdW50BQZzdGF3UEwFBmhlaWdodAUKbGVhc2VJZFN0cgUPdXNlclRvdGFsTG9ja2VkBQ51c2VySW5kZXhDb3VudAIGbGVhc2VkCQESX3VwZGF0ZUdsb2JhbEVudHJ5BAUNYW1vdW50SW5XYXZlcwgFDXRvdGFsU3Rhd01pbnQCXzEFBnN0YXdQTAUJbmV3X2luZGV4CAUNdG90YWxTdGF3TWludAJfMgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgBTxFot", "height": 2499767, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EpVdmF2w9bPsvaoq4LeXWzMaMTfKvoFBVThjYx6vF4N3 Next: meEohJXz5oMDLVnnc8nHWdTgY4moNt11HSq8KWSJaqT 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) * _Dt) | |
410 | + | let r = (fraction(_Dt, collateral, (extensionFactor - lockPeriod)) / 2) | |
411 | + | let emissionRate = (fraction(_unitDecimals, r, 1) * _Dt) | |
411 | 412 | emissionRate | |
412 | 413 | } | |
413 | 414 |
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) * _Dt) | |
410 | + | let r = (fraction(_Dt, collateral, (extensionFactor - lockPeriod)) / 2) | |
411 | + | let emissionRate = (fraction(_unitDecimals, r, 1) * _Dt) | |
411 | 412 | emissionRate | |
412 | 413 | } | |
413 | 414 | ||
414 | 415 | ||
415 | 416 | func _incrTotalStawLP (amount) = { | |
416 | 417 | let oldStawLP = _throwOrReturnI(_getI(_totalStawLP), "could not get the running StawLP") | |
417 | 418 | [_writeInt(_totalStawLP, (oldStawLP + amount))] | |
418 | 419 | } | |
419 | 420 | ||
420 | 421 | ||
421 | 422 | func _decrTotalStawLP (amount) = { | |
422 | 423 | let oldStawLP = _throwOrReturnI(_getI(_totalStawLP), "could not get the running StawLP") | |
423 | 424 | [_writeInt(_totalStawLP, (oldStawLP - amount))] | |
424 | 425 | } | |
425 | 426 | ||
426 | 427 | ||
427 | 428 | func _incrTotalWavesRef (amount) = { | |
428 | 429 | let oldWavesRef = _throwOrReturnI(_getI(_totalWavesRef), "could not get total locked waves") | |
429 | 430 | [_writeInt(_totalWavesRef, (oldWavesRef + amount))] | |
430 | 431 | } | |
431 | 432 | ||
432 | 433 | ||
433 | 434 | func _decrTotalWavesRef (amount) = { | |
434 | 435 | let oldWavesRef = _throwOrReturnI(_getI(_totalWavesRef), "could not get total locked waves") | |
435 | 436 | [_writeInt(_totalWavesRef, (oldWavesRef - amount))] | |
436 | 437 | } | |
437 | 438 | ||
438 | 439 | ||
439 | 440 | func _getNewTimeStamp (blockHeight) = { | |
440 | 441 | let time = match blockInfoByHeight(blockHeight) { | |
441 | 442 | case timeInfo: BlockInfo => | |
442 | 443 | timeInfo.timestamp | |
443 | 444 | case _ => | |
444 | 445 | throw("counld get timestamp") | |
445 | 446 | } | |
446 | 447 | time | |
447 | 448 | } | |
448 | 449 | ||
449 | 450 | ||
450 | 451 | func getAssetQuantity (assetID) = match assetInfo(fromBase58String(assetID)) { | |
451 | 452 | case t: Asset => | |
452 | 453 | t.quantity | |
453 | 454 | case _ => | |
454 | 455 | throw("asset not found") | |
455 | 456 | } | |
456 | 457 | ||
457 | 458 | ||
458 | 459 | @Callable(i) | |
459 | 460 | func getEmission (lockPeriod,collateral) = { | |
460 | 461 | let check1 = _onlyManager(i) | |
461 | 462 | if ((check1 == check1)) | |
462 | 463 | then $Tuple2(nil, _emissionRateWaves(lockPeriod, collateral)) | |
463 | 464 | else throw("Strict value is not equal to itself.") | |
464 | 465 | } | |
465 | 466 | ||
466 | 467 | ||
467 | 468 | ||
468 | 469 | @Callable(i) | |
469 | 470 | func init (manager,dfx,assetID,leaseNode) = { | |
470 | 471 | let managerAlreadyExists = if (isDefined(_getS(_manager))) | |
471 | 472 | then _onlyManager(i) | |
472 | 473 | else true | |
473 | 474 | if ((managerAlreadyExists == managerAlreadyExists)) | |
474 | 475 | then { | |
475 | 476 | let check1 = _validateAddress(manager, "invalid address") | |
476 | 477 | if ((check1 == check1)) | |
477 | 478 | then { | |
478 | 479 | let check2 = _validateAddress(dfx, "invalid address") | |
479 | 480 | if ((check2 == check2)) | |
480 | 481 | then { | |
481 | 482 | let check3 = _validateAddress(leaseNode, "invalid address") | |
482 | 483 | if ((check3 == check3)) | |
483 | 484 | then { | |
484 | 485 | let check4 = if (_validateAsset(assetID, "invalid asset")) | |
485 | 486 | then true | |
486 | 487 | else throw("invalid asset Id") | |
487 | 488 | if ((check4 == check4)) | |
488 | 489 | then { | |
489 | 490 | let circulationIndex = _setParamVal(_circulationIncrIndex, 0) | |
490 | 491 | let percentageReductionInMr = _setParamVal(_percentageReductionFactor, 0) | |
491 | 492 | let Mr = _setParamVal(_Mr, _unitDecimals) | |
492 | 493 | let totalStawMinted = _setParamVal(_totalStaw, 0) | |
493 | 494 | let totalStawLPInCirculation = _setParamVal(_totalStawLP, 0) | |
494 | 495 | let globalIndexCount = _setParamVal(_globalIndexCount, 0) | |
495 | 496 | let totalWavesRef = _setParamVal(_totalWavesRef, 0) | |
496 | 497 | [_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)] | |
497 | 498 | } | |
498 | 499 | else throw("Strict value is not equal to itself.") | |
499 | 500 | } | |
500 | 501 | else throw("Strict value is not equal to itself.") | |
501 | 502 | } | |
502 | 503 | else throw("Strict value is not equal to itself.") | |
503 | 504 | } | |
504 | 505 | else throw("Strict value is not equal to itself.") | |
505 | 506 | } | |
506 | 507 | else throw("Strict value is not equal to itself.") | |
507 | 508 | } | |
508 | 509 | ||
509 | 510 | ||
510 | 511 | ||
511 | 512 | @Callable(i) | |
512 | 513 | func modifyGlobalParams (val) = { | |
513 | 514 | let check1 = _onlyManager(i) | |
514 | 515 | if ((check1 == check1)) | |
515 | 516 | then { | |
516 | 517 | let errorMsg = makeString(["got", "list size of", toString(size(val)), "but expected [global_key, value] pair"], " ") | |
517 | 518 | let check2 = _throwIf((size(val) != 2), errorMsg) | |
518 | 519 | if ((check2 == check2)) | |
519 | 520 | then { | |
520 | 521 | let key = val[0] | |
521 | 522 | let valType = parseInt(val[1]) | |
522 | 523 | match valType { | |
523 | 524 | case x: Int => | |
524 | 525 | let validateKey = _throwIf((_getS(key) == unit), (("key " + key) + " not recognized")) | |
525 | 526 | if ((validateKey == validateKey)) | |
526 | 527 | then { | |
527 | 528 | let ensureValidPairs = match _getRegistryEntryValue(key) { | |
528 | 529 | case t: Int => | |
529 | 530 | true | |
530 | 531 | case _ => | |
531 | 532 | throw("invalid key-value pair") | |
532 | 533 | } | |
533 | 534 | if ((ensureValidPairs == ensureValidPairs)) | |
534 | 535 | then [_writeGlobalParam(key, x)] | |
535 | 536 | else throw("Strict value is not equal to itself.") | |
536 | 537 | } | |
537 | 538 | else throw("Strict value is not equal to itself.") | |
538 | 539 | case x: Unit => | |
539 | 540 | let validateKey = _throwIf((_getS(key) == unit), (("key " + key) + " not recognized")) | |
540 | 541 | if ((validateKey == validateKey)) | |
541 | 542 | then { | |
542 | 543 | let stringValue = val[1] | |
543 | 544 | let refAddress = _getRegistryEntryValue(_manager) | |
544 | 545 | let check4 = match refAddress { | |
545 | 546 | case strType: String => | |
546 | 547 | if ((size(strType) == size(stringValue))) | |
547 | 548 | then _validateAddress(stringValue, "string type for value not supported") | |
548 | 549 | else _validateAsset(stringValue, "string type for value not supported") | |
549 | 550 | case _ => | |
550 | 551 | false | |
551 | 552 | } | |
552 | 553 | if ((check4 == check4)) | |
553 | 554 | then [_writeGlobalParam(key, stringValue)] | |
554 | 555 | else throw("Strict value is not equal to itself.") | |
555 | 556 | } | |
556 | 557 | else throw("Strict value is not equal to itself.") | |
557 | 558 | case _ => | |
558 | 559 | throw(("failed to modify " + val[0])) | |
559 | 560 | } | |
560 | 561 | } | |
561 | 562 | else throw("Strict value is not equal to itself.") | |
562 | 563 | } | |
563 | 564 | else throw("Strict value is not equal to itself.") | |
564 | 565 | } | |
565 | 566 | ||
566 | 567 | ||
567 | 568 | ||
568 | 569 | @Callable(i) | |
569 | 570 | func revokeLock () = { | |
570 | 571 | let check1 = _onlyManager(i) | |
571 | 572 | if ((check1 == check1)) | |
572 | 573 | then nil | |
573 | 574 | else throw("Strict value is not equal to itself.") | |
574 | 575 | } | |
575 | 576 | ||
576 | 577 | ||
577 | 578 | ||
578 | 579 | @Callable(i) | |
579 | 580 | func claim (transactionID) = { | |
580 | 581 | let callerAddress = toBase58String(i.caller.bytes) | |
581 | 582 | let collateralKey = makeString([callerAddress, transactionID, _wavesAmount], SEP) | |
582 | 583 | let lockperiodKey = makeString([callerAddress, transactionID, _lockDuration], SEP) | |
583 | 584 | let lockIdKey = makeString([callerAddress, transactionID, _lockId], SEP) | |
584 | 585 | let lockperiodInMiliKey = makeString([callerAddress, transactionID, _lockPeriodInMiliSec], SEP) | |
585 | 586 | let totalWavesClaimedKey = makeString([callerAddress, transactionID, _totalWavesClaimed], SEP) | |
586 | 587 | let stawLPAmountKey = makeString([callerAddress, transactionID, _stawLPAmount], SEP) | |
587 | 588 | let wavesAmountKey = makeString([callerAddress, transactionID, _wavesAmount], SEP) | |
588 | 589 | let userTotalWavesLockedKey = makeString([callerAddress, _userTotalLocked], SEP) | |
589 | 590 | let userLeaseStateKey = makeString([callerAddress, transactionID, _userLeaseState], SEP) | |
590 | 591 | let leaseStateKey = makeString([callerAddress, transactionID, _userLeaseState], SEP) | |
591 | 592 | let daysAfterLockPeriodElaspedKey = makeString([callerAddress, transactionID, _daysAfterLockPeriod], SEP) | |
592 | 593 | let globalWavesRef = match _getRegistryEntryValue(_totalWavesRef) { | |
593 | 594 | case t: Int => | |
594 | 595 | t | |
595 | 596 | case _ => | |
596 | 597 | throw("failed to get global total waves") | |
597 | 598 | } | |
598 | 599 | if ((globalWavesRef == globalWavesRef)) | |
599 | 600 | then { | |
600 | 601 | let globalStawPL = match _getRegistryEntryValue(_totalStawLP) { | |
601 | 602 | case t: Int => | |
602 | 603 | t | |
603 | 604 | case _ => | |
604 | 605 | throw("failed to get global total waves") | |
605 | 606 | } | |
606 | 607 | if ((globalStawPL == globalStawPL)) | |
607 | 608 | then { | |
608 | 609 | let lockId = match _getRegistryEntryValue(lockIdKey) { | |
609 | 610 | case t: ByteVector => | |
610 | 611 | t | |
611 | 612 | case _ => | |
612 | 613 | throw("failed to get lease id") | |
613 | 614 | } | |
614 | 615 | if ((lockId == lockId)) | |
615 | 616 | then { | |
616 | 617 | let userTotalWavesLocked = match _getRegistryEntryValue(userTotalWavesLockedKey) { | |
617 | 618 | case t: Int => | |
618 | 619 | t | |
619 | 620 | case _ => | |
620 | 621 | throw("failed to get total waves locked by this address") | |
621 | 622 | } | |
622 | 623 | if ((userTotalWavesLocked == userTotalWavesLocked)) | |
623 | 624 | then { | |
624 | 625 | let wavesAmount = match _getRegistryEntryValue(wavesAmountKey) { | |
625 | 626 | case t: Int => | |
626 | 627 | t | |
627 | 628 | case _ => | |
628 | 629 | throw("failed to get total waves locked") | |
629 | 630 | } | |
630 | 631 | if ((wavesAmount == wavesAmount)) | |
631 | 632 | then { | |
632 | 633 | let totalWavesClaimed = match _getRegistryEntryValue(totalWavesClaimedKey) { | |
633 | 634 | case t: Int => | |
634 | 635 | t | |
635 | 636 | case _ => | |
636 | 637 | throw("failed to get total waves claimed") | |
637 | 638 | } | |
638 | 639 | if ((totalWavesClaimed == totalWavesClaimed)) | |
639 | 640 | then { | |
640 | 641 | let stawLPAmount = match _getRegistryEntryValue(stawLPAmountKey) { | |
641 | 642 | case t: Int => | |
642 | 643 | t | |
643 | 644 | case _ => | |
644 | 645 | throw("failed to get stawPL") | |
645 | 646 | } | |
646 | 647 | if ((stawLPAmount == stawLPAmount)) | |
647 | 648 | then { | |
648 | 649 | let lockPeriodInMili = match _getRegistryEntryValue(lockperiodInMiliKey) { | |
649 | 650 | case t: Int => | |
650 | 651 | t | |
651 | 652 | case _ => | |
652 | 653 | throw("failed to get lock period timespam") | |
653 | 654 | } | |
654 | 655 | if ((lockPeriodInMili == lockPeriodInMili)) | |
655 | 656 | then { | |
656 | 657 | let currentTimeStamp = match _getNewTimeStamp(height) { | |
657 | 658 | case t: Int => | |
658 | 659 | t | |
659 | 660 | case _ => | |
660 | 661 | throw("failed to get current timestamp") | |
661 | 662 | } | |
662 | 663 | if ((currentTimeStamp == currentTimeStamp)) | |
663 | 664 | then { | |
664 | 665 | let collateral = match _getRegistryEntryValue(collateralKey) { | |
665 | 666 | case t: Int => | |
666 | 667 | t | |
667 | 668 | case _ => | |
668 | 669 | throw("failed to get collateral") | |
669 | 670 | } | |
670 | 671 | if ((collateral == collateral)) | |
671 | 672 | then { | |
672 | 673 | let lockPeriod = match _getRegistryEntryValue(lockperiodKey) { | |
673 | 674 | case t: Int => | |
674 | 675 | t | |
675 | 676 | case _ => | |
676 | 677 | throw("failed to get lockPeriod") | |
677 | 678 | } | |
678 | 679 | if ((lockPeriod == lockPeriod)) | |
679 | 680 | then { | |
680 | 681 | let currentLeaseState = match _getRegistryEntryValue(userLeaseStateKey) { | |
681 | 682 | case t: String => | |
682 | 683 | t | |
683 | 684 | case _ => | |
684 | 685 | throw("failed to get lease state") | |
685 | 686 | } | |
686 | 687 | if ((currentLeaseState == currentLeaseState)) | |
687 | 688 | then { | |
688 | 689 | let leaseState = match _getRegistryEntryValue(leaseStateKey) { | |
689 | 690 | case t: String => | |
690 | 691 | t | |
691 | 692 | case _ => | |
692 | 693 | throw("failed to get lease state for user") | |
693 | 694 | } | |
694 | 695 | if ((leaseState == leaseState)) | |
695 | 696 | then { | |
696 | 697 | let daysAfterLockPeriodElasped = match _getS(daysAfterLockPeriodElaspedKey) { | |
697 | 698 | case t: String => | |
698 | 699 | match _getRegistryEntryValue(daysAfterLockPeriodElaspedKey) { | |
699 | 700 | case z: Int => | |
700 | 701 | z | |
701 | 702 | case _ => | |
702 | 703 | 0 | |
703 | 704 | } | |
704 | 705 | case _ => | |
705 | 706 | 0 | |
706 | 707 | } | |
707 | 708 | if ((daysAfterLockPeriodElasped == daysAfterLockPeriodElasped)) | |
708 | 709 | then { | |
709 | 710 | let check1 = _throwIf((lockPeriodInMili > currentTimeStamp), "lock period for this entry has not elapsed") | |
710 | 711 | if ((check1 == check1)) | |
711 | 712 | then { | |
712 | 713 | let leaseAction = if ((currentLeaseState == "leased")) | |
713 | 714 | then $Tuple2(LeaseCancel(lockId), _writeStr(userLeaseStateKey, "cancelled")) | |
714 | 715 | else $Tuple2(_writeStr(userLeaseStateKey, "cancelled"), _writeStr(userLeaseStateKey, "cancelled")) | |
715 | 716 | let check2 = _throwIf(if ((0 == wavesAmount)) | |
716 | 717 | then true | |
717 | 718 | else (0 == stawLPAmount), "all claims exhausted for this trx") | |
718 | 719 | if ((check2 == check2)) | |
719 | 720 | then { | |
720 | 721 | let emissionValuePerDT = _emissionRateWaves(lockPeriod, collateral) | |
721 | 722 | let claimAction = { | |
722 | 723 | let timeStampDiff = (currentTimeStamp - lockPeriodInMili) | |
723 | 724 | let xdays = (timeStampDiff / _Dt) | |
724 | 725 | if ((xdays == 0)) | |
725 | 726 | then throw("less than 24hrs before first claim") | |
726 | 727 | else if ((daysAfterLockPeriodElasped >= xdays)) | |
727 | 728 | then throw("24hrs or less before next claim") | |
728 | 729 | else { | |
729 | 730 | let totalAmountClaimable = (daysAfterLockPeriodElasped * emissionValuePerDT) | |
730 | 731 | let check3_1 = _throwIf((totalAmountClaimable == totalWavesClaimed), "can only claim once in 24hrs") | |
731 | 732 | if ((check3_1 == check3_1)) | |
732 | 733 | then { | |
733 | 734 | let check3_2 = _throwIf(((totalAmountClaimable + totalWavesClaimed) > wavesAmount), "all claims exhausted") | |
734 | 735 | if ((check3_2 == check3_2)) | |
735 | 736 | then { | |
736 | 737 | let claimAmountToSend = if ((daysAfterLockPeriodElasped == 1)) | |
737 | 738 | then totalAmountClaimable | |
738 | 739 | else (totalAmountClaimable - totalWavesClaimed) | |
739 | 740 | let newTotalWavesClaim = totalAmountClaimable | |
740 | 741 | let newWavesAmount = if ((daysAfterLockPeriodElasped == 1)) | |
741 | 742 | then (wavesAmount - totalAmountClaimable) | |
742 | 743 | else (wavesAmount - (totalAmountClaimable - totalWavesClaimed)) | |
743 | 744 | let newStawLPAmount = if ((daysAfterLockPeriodElasped == 1)) | |
744 | 745 | then (stawLPAmount - totalAmountClaimable) | |
745 | 746 | else (stawLPAmount - (totalAmountClaimable - totalWavesClaimed)) | |
746 | 747 | let newGlobalWaveRef = (globalWavesRef - newWavesAmount) | |
747 | 748 | let newGlobalStawPL = (globalStawPL - newStawLPAmount) | |
748 | 749 | let newUserTotalWavesLocked = (userTotalWavesLocked - claimAmountToSend) | |
749 | 750 | let wavesAmountEntry = makeString(["%d", toString(newWavesAmount)], SEP) | |
750 | 751 | let stawLPAmountEntry = makeString(["%d", toString(newStawLPAmount)], SEP) | |
751 | 752 | let totalWavesClaimedEntry = makeString(["%d", toString(newTotalWavesClaim)], SEP) | |
752 | 753 | let newUserTotalWavesLockedEntry = makeString(["%d", toString(newUserTotalWavesLocked)], SEP) | |
753 | 754 | let daysAfterLockPeriodElaspedEntry = makeString(["%d", toString(xdays)], SEP) | |
754 | 755 | [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)] | |
755 | 756 | } | |
756 | 757 | else throw("Strict value is not equal to itself.") | |
757 | 758 | } | |
758 | 759 | else throw("Strict value is not equal to itself.") | |
759 | 760 | } | |
760 | 761 | } | |
761 | 762 | if ((claimAction == claimAction)) | |
762 | 763 | then claimAction | |
763 | 764 | else throw("Strict value is not equal to itself.") | |
764 | 765 | } | |
765 | 766 | else throw("Strict value is not equal to itself.") | |
766 | 767 | } | |
767 | 768 | else throw("Strict value is not equal to itself.") | |
768 | 769 | } | |
769 | 770 | else throw("Strict value is not equal to itself.") | |
770 | 771 | } | |
771 | 772 | else throw("Strict value is not equal to itself.") | |
772 | 773 | } | |
773 | 774 | else throw("Strict value is not equal to itself.") | |
774 | 775 | } | |
775 | 776 | else throw("Strict value is not equal to itself.") | |
776 | 777 | } | |
777 | 778 | else throw("Strict value is not equal to itself.") | |
778 | 779 | } | |
779 | 780 | else throw("Strict value is not equal to itself.") | |
780 | 781 | } | |
781 | 782 | else throw("Strict value is not equal to itself.") | |
782 | 783 | } | |
783 | 784 | else throw("Strict value is not equal to itself.") | |
784 | 785 | } | |
785 | 786 | else throw("Strict value is not equal to itself.") | |
786 | 787 | } | |
787 | 788 | else throw("Strict value is not equal to itself.") | |
788 | 789 | } | |
789 | 790 | else throw("Strict value is not equal to itself.") | |
790 | 791 | } | |
791 | 792 | else throw("Strict value is not equal to itself.") | |
792 | 793 | } | |
793 | 794 | else throw("Strict value is not equal to itself.") | |
794 | 795 | } | |
795 | 796 | else throw("Strict value is not equal to itself.") | |
796 | 797 | } | |
797 | 798 | ||
798 | 799 | ||
799 | 800 | ||
800 | 801 | @Callable(i) | |
801 | 802 | func mintStaw (lockPeriod) = { | |
802 | 803 | let callerAddress = toBase58String(i.caller.bytes) | |
803 | 804 | let trxID = toBase58String(i.transactionId) | |
804 | 805 | let check1 = _throwIf((1 != size(i.payments)), "no payments attached") | |
805 | 806 | if ((check1 == check1)) | |
806 | 807 | then { | |
807 | 808 | let check2 = if (isDefined(i.payments[0].assetId)) | |
808 | 809 | then throw("only waves supported") | |
809 | 810 | else true | |
810 | 811 | if ((check2 == check2)) | |
811 | 812 | then { | |
812 | 813 | let amountInWaves = i.payments[0].amount | |
813 | 814 | let check3 = if (if ((_minLockAmount > amountInWaves)) | |
814 | 815 | then true | |
815 | 816 | else (amountInWaves > _maxLockAmount)) | |
816 | 817 | then throw("lock amount out of range, minimum: 1 waves, maximum: 1000 waves") | |
817 | 818 | else true | |
818 | 819 | if ((check3 == check3)) | |
819 | 820 | then { | |
820 | 821 | let check4 = if ((_minLockperiod > lockPeriod)) | |
821 | 822 | then throw("minimum of 14 days lock period") | |
822 | 823 | else true | |
823 | 824 | if ((check4 == check4)) | |
824 | 825 | then { | |
825 | 826 | let totalStawMint = _stawMF(lockPeriod, amountInWaves) | |
826 | 827 | let stawPL = amountInWaves | |
827 | 828 | let fee = fraction(totalStawMint._1, 10, 100) | |
828 | 829 | let userGetStawAmount = (totalStawMint._1 - fee) | |
829 | 830 | let lockPeriodToMilisec = (_getNewTimeStamp(height) + _daysToMiliSec(lockPeriod)) | |
830 | 831 | if ((lockPeriodToMilisec == lockPeriodToMilisec)) | |
831 | 832 | then { | |
832 | 833 | let new_index = match _getRegistryEntryValue(_globalIndexCount) { | |
833 | 834 | case t: Int => | |
834 | 835 | (t + 1) | |
835 | 836 | case _ => | |
836 | 837 | throw("failed to get current global index count") | |
837 | 838 | } | |
838 | 839 | if ((new_index == new_index)) | |
839 | 840 | then { | |
840 | 841 | let addressFee = match _getRegistryEntryValue(_Dfx) { | |
841 | 842 | case t: String => | |
842 | 843 | Address(fromBase58String(t)) | |
843 | 844 | case _ => | |
844 | 845 | throw("failed to get dfx address") | |
845 | 846 | } | |
846 | 847 | if ((addressFee == addressFee)) | |
847 | 848 | then { | |
848 | 849 | let stawAssetId = match _getRegistryEntryValue(_stawAssetId) { | |
849 | 850 | case t: String => | |
850 | 851 | fromBase58String(t) | |
851 | 852 | case _ => | |
852 | 853 | throw("failed to get asset id") | |
853 | 854 | } | |
854 | 855 | if ((stawAssetId == stawAssetId)) | |
855 | 856 | then { | |
856 | 857 | let lessee = match _getRegistryEntryValue(_lesseeAddress) { | |
857 | 858 | case t: String => | |
858 | 859 | Address(fromBase58String(t)) | |
859 | 860 | case _ => | |
860 | 861 | throw("failed to get lease node address") | |
861 | 862 | } | |
862 | 863 | if ((lessee == lessee)) | |
863 | 864 | then { | |
864 | 865 | let userLockIndexKey = makeString([callerAddress, _userLocalIndexCount], SEP) | |
865 | 866 | let userTotalLockedKey = makeString([callerAddress, _userTotalLocked], SEP) | |
866 | 867 | let userIndexCount = match _getS(userLockIndexKey) { | |
867 | 868 | case x: String => | |
868 | 869 | match _getRegistryEntryValue(userLockIndexKey) { | |
869 | 870 | case t: Int => | |
870 | 871 | (t + 1) | |
871 | 872 | case _ => | |
872 | 873 | 1 | |
873 | 874 | } | |
874 | 875 | case _ => | |
875 | 876 | 1 | |
876 | 877 | } | |
877 | 878 | if ((userIndexCount == userIndexCount)) | |
878 | 879 | then { | |
879 | 880 | let userTotalLocked = match _getS(userTotalLockedKey) { | |
880 | 881 | case x: String => | |
881 | 882 | match _getRegistryEntryValue(userTotalLockedKey) { | |
882 | 883 | case t: Int => | |
883 | 884 | (t + amountInWaves) | |
884 | 885 | case _ => | |
885 | 886 | amountInWaves | |
886 | 887 | } | |
887 | 888 | case _ => | |
888 | 889 | amountInWaves | |
889 | 890 | } | |
890 | 891 | if ((userTotalLocked == userTotalLocked)) | |
891 | 892 | then { | |
892 | 893 | let leaseOut = Lease(lessee, amountInWaves) | |
893 | 894 | let leaseIdStr = toBase58String(calculateLeaseId(leaseOut)) | |
894 | 895 | ((([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) | |
895 | 896 | } | |
896 | 897 | else throw("Strict value is not equal to itself.") | |
897 | 898 | } | |
898 | 899 | else throw("Strict value is not equal to itself.") | |
899 | 900 | } | |
900 | 901 | else throw("Strict value is not equal to itself.") | |
901 | 902 | } | |
902 | 903 | else throw("Strict value is not equal to itself.") | |
903 | 904 | } | |
904 | 905 | else throw("Strict value is not equal to itself.") | |
905 | 906 | } | |
906 | 907 | else throw("Strict value is not equal to itself.") | |
907 | 908 | } | |
908 | 909 | else throw("Strict value is not equal to itself.") | |
909 | 910 | } | |
910 | 911 | else throw("Strict value is not equal to itself.") | |
911 | 912 | } | |
912 | 913 | else throw("Strict value is not equal to itself.") | |
913 | 914 | } | |
914 | 915 | else throw("Strict value is not equal to itself.") | |
915 | 916 | } | |
916 | 917 | else throw("Strict value is not equal to itself.") | |
917 | 918 | } | |
918 | 919 | ||
919 | 920 |
github/deemru/w8io/169f3d6 147.76 ms ◑