tx · 6aEtkic7w2kjoqE2KDr9ihPFQHfxwFKF9L5D11sWxXGK

3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h:  -0.01100000 Waves

2024.02.05 17:15 [2963067] smart account 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h > SELF 0.00000000 Waves

{ "type": 13, "id": "6aEtkic7w2kjoqE2KDr9ihPFQHfxwFKF9L5D11sWxXGK", "fee": 1100000, "feeAssetId": null, "timestamp": 1707142583517, "version": 2, "chainId": 84, "sender": "3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h", "senderPublicKey": "3z8Q6Zu3KppVmn6fJJvrLc1Wo3krVHSvfaNcerm82md2", "proofs": [ "2fnPGowErQiUwPon7QTh1bU1Z8mV7GXp4csur2dE5byYMpcLWt8gCCFJ3hHS24tMh6B8bk3EVA2NgcAqS7pHXSDz" ], "script": "base64:BgIqCAISAwoBARIDCgEIEgQKAggIEgMKAQgSBAoCCAESBAoCCAESAwoBARIAIgAMY29udHJhY3RGaWxlAhFsMm1wX2xlYXNpbmcucmlkZQADU0VQAgJfXwAGc2NhbGU4AIDC1y8BCHRocm93RXJyAQNtc2cJAAIBCQCsAgIJAKwCAgUMY29udHJhY3RGaWxlAgI6IAUDbXNnAAprZXlBc3NldElkCQC5CQIJAMwIAgICJXMJAMwIAgIHYXNzZXRJZAUDbmlsBQNTRVAAEWtleVBlcmlvZE9mZnNldElkCQC5CQIJAMwIAgICJXMJAMwIAgIIb2Zmc2V0SWQFA25pbAUDU0VQABVrZXlQZXJpb2RPZmZzZXRIZWlnaHQJALkJAgkAzAgCAgIlcwkAzAgCAgxvZmZzZXRIZWlnaHQFA25pbAUDU0VQAA9rZXlQZXJpb2RMZW5ndGgJALkJAgkAzAgCAgIlcwkAzAgCAgxwZXJpb2RMZW5ndGgFA25pbAUDU0VQAA5wZXJpb2RPZmZzZXRJZAkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzBRFrZXlQZXJpb2RPZmZzZXRJ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mxvY2tlZEFjdGlvbnMCBQt1c2VyQWRkcmVzcwUHdG9DbGFpbQBwXdPC", "height": 2963067, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BNTmFe1gxhB7dFTPouzucf7hfw552fVJ1i7BpTZ6L4AY Next: HrB96xP1V5rTpGr9vnLL1r6Q3Pyyp2S4Y4REcEa8Swpi Diff:
OldNewDifferences
340340 }
341341
342342
343+
344+@Callable(i)
345+func claimAll () = {
346+ let userAddress = toString(i.caller)
347+ let $t01182911901 = getUserBalances(userAddress)
348+ let periodId = $t01182911901._1
349+ let leased = $t01182911901._2
350+ let toUnlock = $t01182911901._3
351+ let toClaim = $t01182911901._4
352+ getClaimUnlockedActions(userAddress, toClaim)
353+ }
354+
355+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFile = "l2mp_leasing.ride"
55
66 let SEP = "__"
77
88 let scale8 = 100000000
99
1010 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1111
1212
1313 let keyAssetId = makeString(["%s", "assetId"], SEP)
1414
1515 let keyPeriodOffsetId = makeString(["%s", "offsetId"], SEP)
1616
1717 let keyPeriodOffsetHeight = makeString(["%s", "offsetHeight"], SEP)
1818
1919 let keyPeriodLength = makeString(["%s", "periodLength"], SEP)
2020
2121 let periodOffsetId = valueOrElse(getInteger(this, keyPeriodOffsetId), 0)
2222
2323 let periodLength = valueOrElse(getInteger(this, keyPeriodLength), 10000)
2424
2525 let periodOffsetHeight = valueOrElse(getInteger(this, keyPeriodOffsetHeight), -1)
2626
2727 let currentPeriodId = if (if ((height > periodOffsetHeight))
2828 then (periodOffsetHeight != -1)
2929 else false)
3030 then (((height - periodOffsetHeight) / periodLength) + periodOffsetId)
3131 else max([0, (periodOffsetId - 1)])
3232
3333 func keyLeasingNodeData (nodeAddress) = makeString(["%s", "leasingNode", nodeAddress], SEP)
3434
3535
3636 func keyUserLeasingNodeList (userAddress) = makeString(["%s%s", "userLeasingNodeList", userAddress], SEP)
3737
3838
3939 func keyUserLeasingNodeData (userAddress,nodeAddress) = makeString(["%s%s", "userLeasingNodeData", userAddress, nodeAddress], SEP)
4040
4141
4242 func keyUserBalances (userAddress) = makeString(["%s%s", "userBalances", userAddress], SEP)
4343
4444
4545 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
4646
4747 let assetIdBytes = if ((assetIdString == "WAVES"))
4848 then unit
4949 else fromBase58String(assetIdString)
5050
5151 func isValidAddress (address) = match addressFromString(address) {
5252 case a: Address =>
5353 true
5454 case _ =>
5555 false
5656 }
5757
5858
5959 func getLeasingNodeEntry (nodeAddress,totalLeased) = {
6060 let valueString = makeString(["%d", toString(totalLeased)], SEP)
6161 StringEntry(keyLeasingNodeData(nodeAddress), valueString)
6262 }
6363
6464
6565 func getLeasingNodeData (nodeAddress) = {
6666 let leasingDataStringRaw = getString(this, keyLeasingNodeData(nodeAddress))
6767 match leasingDataStringRaw {
6868 case ds: String =>
6969 let dataList = split(ds, SEP)
7070 let totalLeased = parseIntValue(dataList[1])
7171 totalLeased
7272 case _ =>
7373 0
7474 }
7575 }
7676
7777
7878 func getUserLeasingEntry (nodeAddress,userAddress,totalUserLeased) = {
7979 let valueString = makeString(["%d", toString(totalUserLeased)], SEP)
8080 StringEntry(keyUserLeasingNodeData(userAddress, nodeAddress), valueString)
8181 }
8282
8383
8484 func getUserLeasingData (nodeAddress,userAddress) = {
8585 let leasingDataStringRaw = getString(this, keyUserLeasingNodeData(userAddress, nodeAddress))
8686 match leasingDataStringRaw {
8787 case ds: String =>
8888 let dataList = split(ds, SEP)
8989 let totalLeased = parseIntValue(dataList[1])
9090 totalLeased
9191 case _ =>
9292 0
9393 }
9494 }
9595
9696
9797 func getUserBalancesEntry (userAddress,periodId,leased,toUnlock,toClaim) = {
9898 let valueString = makeString(["%d%d%d%d", toString(periodId), toString(leased), toString(toUnlock), toString(toClaim)], SEP)
9999 StringEntry(keyUserBalances(userAddress), valueString)
100100 }
101101
102102
103103 func getUserBalances (userAddress) = {
104104 let leasingDataStringRaw = getString(this, keyUserBalances(userAddress))
105105 match leasingDataStringRaw {
106106 case ds: String =>
107107 let dataList = split(ds, SEP)
108108 let periodId = parseIntValue(dataList[1])
109109 let leased = parseIntValue(dataList[2])
110110 let toUnlock = parseIntValue(dataList[3])
111111 let toClaim = parseIntValue(dataList[4])
112112 if (((currentPeriodId - periodId) > 0))
113113 then $Tuple4(periodId, leased, 0, (toClaim + toUnlock))
114114 else $Tuple4(periodId, leased, toUnlock, toClaim)
115115 case _ =>
116116 $Tuple4(0, 0, 0, 0)
117117 }
118118 }
119119
120120
121121 func getUserLeasingNodeList (userAddress) = {
122122 let leasingDataStringRaw = getString(this, keyUserLeasingNodeList(userAddress))
123123 match leasingDataStringRaw {
124124 case ds: String =>
125125 let dataList = split_51C(ds, SEP)
126126 dataList
127127 case _ =>
128128 nil
129129 }
130130 }
131131
132132
133133 func getUserNodeListEntry (userAddress,nodeList) = if ((size(nodeList) == 0))
134134 then DeleteEntry(keyUserLeasingNodeList(userAddress))
135135 else StringEntry(keyUserLeasingNodeList(userAddress), makeString_11C(nodeList, SEP))
136136
137137
138138 func addNodeToNodeList (userAddress,nodeAddress) = {
139139 let nodeList = getUserLeasingNodeList(userAddress)
140140 if (containsElement(nodeList, nodeAddress))
141141 then nodeList
142142 else (nodeList :+ nodeAddress)
143143 }
144144
145145
146146 func removeNodeFromNodeList (userAddress,nodeAddress) = {
147147 let nodeList = getUserLeasingNodeList(userAddress)
148148 match indexOf(nodeList, nodeAddress) {
149149 case index: Int =>
150150 removeByIndex(nodeList, index)
151151 case _ =>
152152 nodeList
153153 }
154154 }
155155
156156
157157 func getStakeActions (nodeAddress,userAddress,i) = {
158158 let checks = [if ((size(i.payments) == 1))
159159 then true
160160 else throwErr("payment size should be exactly 1"), if ((i.payments[0].assetId == assetIdBytes))
161161 then true
162162 else throwErr(makeString(["payment assetId should be:", assetIdString], " ")), if (isValidAddress(nodeAddress))
163163 then true
164164 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
165165 then true
166166 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
167167 if ((checks == checks))
168168 then {
169169 let userLeasingAmount = i.payments[0].amount
170170 let totalNodeLeased = getLeasingNodeData(nodeAddress)
171171 let newTotalLease = (totalNodeLeased + userLeasingAmount)
172172 let userTotalLeased = getUserLeasingData(nodeAddress, userAddress)
173173 let newUserTotalLease = (userTotalLeased + userLeasingAmount)
174174 let $t058645936 = getUserBalances(userAddress)
175175 let periodId = $t058645936._1
176176 let leased = $t058645936._2
177177 let toUnlock = $t058645936._3
178178 let toClaim = $t058645936._4
179179 let newLeased = (leased + userLeasingAmount)
180180 [getLeasingNodeEntry(nodeAddress, newTotalLease), getUserLeasingEntry(nodeAddress, userAddress, newUserTotalLease), getUserBalancesEntry(userAddress, periodId, newLeased, toUnlock, toClaim), getUserNodeListEntry(userAddress, addNodeToNodeList(userAddress, nodeAddress))]
181181 }
182182 else throw("Strict value is not equal to itself.")
183183 }
184184
185185
186186 func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = {
187187 let totalNodeLeased = getLeasingNodeData(nodeAddress)
188188 let userTotalLeased = getUserLeasingData(nodeAddress, userAddress)
189189 let checks = [if ((unstakeAmount > 0))
190190 then true
191191 else throwErr("unstake amount should be greater than 0"), if ((userTotalLeased >= unstakeAmount))
192192 then true
193193 else throwErr("unstake amount should be less or equal user staked amount"), if ((totalNodeLeased >= unstakeAmount))
194194 then true
195195 else throwErr("unstake amount should be less or equal node staked amount"), if (isValidAddress(nodeAddress))
196196 then true
197197 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
198198 then true
199199 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
200200 if ((checks == checks))
201201 then {
202202 let newTotalLease = (totalNodeLeased - unstakeAmount)
203203 let newUserTotalLease = (userTotalLeased - unstakeAmount)
204204 let $t072127284 = getUserBalances(userAddress)
205205 let periodId = $t072127284._1
206206 let leased = $t072127284._2
207207 let toUnlock = $t072127284._3
208208 let toClaim = $t072127284._4
209209 let newLeased = (leased - unstakeAmount)
210210 let newToUnlock = (toUnlock + unstakeAmount)
211211 let removeNodeActions = if ((newUserTotalLease == 0))
212212 then [getUserNodeListEntry(userAddress, removeNodeFromNodeList(userAddress, nodeAddress))]
213213 else nil
214214 ([getLeasingNodeEntry(nodeAddress, newTotalLease), getUserLeasingEntry(nodeAddress, userAddress, newUserTotalLease), getUserBalancesEntry(userAddress, currentPeriodId, newLeased, newToUnlock, toClaim)] ++ removeNodeActions)
215215 }
216216 else throw("Strict value is not equal to itself.")
217217 }
218218
219219
220220 func getClaimUnlockedActions (userAddress,claimAmount) = {
221221 let $t078857957 = getUserBalances(userAddress)
222222 let periodId = $t078857957._1
223223 let leased = $t078857957._2
224224 let toUnlock = $t078857957._3
225225 let toClaim = $t078857957._4
226226 let checks = [if ((claimAmount > 0))
227227 then true
228228 else throwErr("claim amount should be greater than 0"), if ((toClaim >= claimAmount))
229229 then true
230230 else throwErr("claim amount should be less or equal unlocked amount"), if (isValidAddress(userAddress))
231231 then true
232232 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
233233 if ((checks == checks))
234234 then {
235235 let newToClaim = (toClaim - claimAmount)
236236 [getUserBalancesEntry(userAddress, currentPeriodId, leased, toUnlock, newToClaim)]
237237 }
238238 else throw("Strict value is not equal to itself.")
239239 }
240240
241241
242242 func getStakeFromUnlockedActions (nodeAddress,userAddress,userLeasingAmount) = {
243243 let $t085348606 = getUserBalances(userAddress)
244244 let periodId = $t085348606._1
245245 let leased = $t085348606._2
246246 let toUnlock = $t085348606._3
247247 let toClaim = $t085348606._4
248248 let available = (toUnlock + toClaim)
249249 let checks = [if ((userLeasingAmount > 0))
250250 then true
251251 else throwErr("amount should be greater than 0"), if ((available >= userLeasingAmount))
252252 then true
253253 else throwErr("amount should be less or equal to available"), if (isValidAddress(nodeAddress))
254254 then true
255255 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
256256 then true
257257 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
258258 if ((checks == checks))
259259 then {
260260 let totalNodeLeased = getLeasingNodeData(nodeAddress)
261261 let newTotalLease = (totalNodeLeased + userLeasingAmount)
262262 let userTotalLeased = getUserLeasingData(nodeAddress, userAddress)
263263 let newUserTotalLease = (userTotalLeased + userLeasingAmount)
264264 let newLeased = (leased + userLeasingAmount)
265265 let newToUnlock = max([0, (toUnlock - userLeasingAmount)])
266266 let newToClaim = min([toClaim, (toClaim + (toUnlock - userLeasingAmount))])
267267 [getLeasingNodeEntry(nodeAddress, newTotalLease), getUserLeasingEntry(nodeAddress, userAddress, newUserTotalLease), getUserBalancesEntry(userAddress, periodId, newLeased, newToUnlock, newToClaim), getUserNodeListEntry(userAddress, addNodeToNodeList(userAddress, nodeAddress))]
268268 }
269269 else throw("Strict value is not equal to itself.")
270270 }
271271
272272
273273 func getSetNewPeriodLengthActions (newPeriodLength) = {
274274 let check = [if ((newPeriodLength > 0))
275275 then true
276276 else throwErr("period length should be greater than 0")]
277277 if ((check == check))
278278 then if ((periodOffsetHeight == -1))
279279 then [IntegerEntry(keyPeriodLength, newPeriodLength), IntegerEntry(keyPeriodOffsetHeight, height)]
280280 else {
281281 let newPeriodOffsetId = (currentPeriodId + 1)
282282 let newOffsetHeight = ((periodLength * (newPeriodOffsetId - periodOffsetId)) + periodOffsetHeight)
283283 [IntegerEntry(keyPeriodOffsetId, newPeriodOffsetId), IntegerEntry(keyPeriodOffsetHeight, newOffsetHeight), IntegerEntry(keyPeriodLength, newPeriodLength)]
284284 }
285285 else throw("Strict value is not equal to itself.")
286286 }
287287
288288
289289 @Callable(i)
290290 func setNewPeriodLength (newPeriodLength) = getSetNewPeriodLengthActions(newPeriodLength)
291291
292292
293293
294294 @Callable(i)
295295 func getUserData (userAddress) = {
296296 let $t01075810830 = getUserBalances(userAddress)
297297 let periodId = $t01075810830._1
298298 let leased = $t01075810830._2
299299 let toUnlock = $t01075810830._3
300300 let toClaim = $t01075810830._4
301301 let nodeList = getUserLeasingNodeList(userAddress)
302302 $Tuple2(nil, $Tuple6($Tuple2(currentPeriodId, periodLength), leased, toUnlock, toClaim, (toUnlock + toClaim), nodeList))
303303 }
304304
305305
306306
307307 @Callable(i)
308308 func stakeFor (nodeAddress,userAddress) = getStakeActions(nodeAddress, userAddress, i)
309309
310310
311311
312312 @Callable(i)
313313 func stake (nodeAddress) = {
314314 let userAddress = toString(i.caller)
315315 getStakeActions(nodeAddress, userAddress, i)
316316 }
317317
318318
319319
320320 @Callable(i)
321321 func stakeFromUnlocked (nodeAddress,amount) = {
322322 let userAddress = toString(i.caller)
323323 getStakeFromUnlockedActions(nodeAddress, userAddress, amount)
324324 }
325325
326326
327327
328328 @Callable(i)
329329 func unstake (nodeAddress,amount) = {
330330 let userAddress = toString(i.caller)
331331 getUnstakeActions(nodeAddress, userAddress, amount)
332332 }
333333
334334
335335
336336 @Callable(i)
337337 func claim (amount) = {
338338 let userAddress = toString(i.caller)
339339 getClaimUnlockedActions(userAddress, amount)
340340 }
341341
342342
343+
344+@Callable(i)
345+func claimAll () = {
346+ let userAddress = toString(i.caller)
347+ let $t01182911901 = getUserBalances(userAddress)
348+ let periodId = $t01182911901._1
349+ let leased = $t01182911901._2
350+ let toUnlock = $t01182911901._3
351+ let toClaim = $t01182911901._4
352+ getClaimUnlockedActions(userAddress, toClaim)
353+ }
354+
355+

github/deemru/w8io/169f3d6 
118.10 ms