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