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