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