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