tx · BnxhjRvsFxx5GWYAGufgqtCv1BbJxM2tH3hs67eYkZd7

3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h:  -0.01100000 Waves

2024.02.12 18:53 [2973243] smart account 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h > SELF 0.00000000 Waves

{ "type": 13, "id": "BnxhjRvsFxx5GWYAGufgqtCv1BbJxM2tH3hs67eYkZd7", "fee": 1100000, "feeAssetId": null, "timestamp": 1707753278988, "version": 2, "chainId": 84, "sender": "3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h", "senderPublicKey": "3z8Q6Zu3KppVmn6fJJvrLc1Wo3krVHSvfaNcerm82md2", "proofs": [ "44gWbr1hoa99SMgSeBrDVutpkDNHzEaQtMBxkDWGprtrFpubuWnFnfv3zZtZndhfn54bNExfNZVxf23kcr5rttJy" ], "script": "base64:BgIvCAISAwoBARIDCgEIEgMKAQgSBAoCCAgSAwoBCBIECgIIARIECgIIARIDCgEBEgAeAAxjb250cmFjdEZpbGUCEWwybXBfbGVhc2luZy5yaWRlAANTRVACAl9fAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQABFrZXlQZXJpb2RPZmZzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICCG9mZnNldElkBQNuaWwFA1NFUAAVa2V5UGVyaW9kT2Zmc2V0SGVpZ2h0CQC5CQIJAMwIAgICJXMJAMwIAgIMb2Zmc2V0SGVpZ2h0BQNuaWwFA1NFUAAPa2V5UGVyaW9kTGVuZ3RoCQC5CQIJAMwIAgICJXMJAMwIAgIMcGVyaW9kTGVuZ3RoBQNuaWwFA1NFUAAOcGVyaW9kT2Zmc2V0SWQJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwURa2V5UGVyaW9kT2Zmc2V0SWQAAAAMcG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VzcwULdXNlckFkZHJlc3MFBmFtb3VudAFpAQVjbGFpbQEGYW1vdW50BAt1c2VyQWRkcmVzcwkApQgBCAUBaQZjYWxsZXIJARdnZXRDbGFpbVVubG9ja2VkQWN0aW9ucwIFC3VzZXJBZGRyZXNzBQZhbW91bnQBaQEIY2xhaW1BbGwABAt1c2VyQWRkcmVzcwkApQgBCAUBaQZjYWxsZXIEDSR0MDExMzA2MTEzNjYJARVnZXRVc2VyVG9DbGFpbUJhbGFuY2UBBQt1c2VyQWRkcmVzcwQHdG9DbGFpbQgFDSR0MDExMzA2MTEzNjYCXzEECHRvVW5sb2NrCAUNJHQwMTEzMDYxMTM2NgJfMgQGY2hlY2tzCQDMCAIDCQBmAgUHdG9DbGFpbQAABgkBCHRocm93RXJyAQIQbm90aGluZyB0byBjbGFpbQUDbmlsAwkAAAIFBmNoZWNrcwUGY2hlY2tzCQEXZ2V0Q2xhaW1VbmxvY2tlZEFjdGlvbnMCBQt1c2VyQWRkcmVzcwUHdG9DbGFpbQkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgCRieHP", "height": 2973243, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 78wCSZXshmt5KwAVGPkv6nGCgo7PRKLS1Wa3roxGAkZi Next: ovpcsZnbKjoEq79eq2Ycohf1Zj8USiv3BW2zLRdw1PQ Diff:
OldNewDifferences
232232 let newUserNextLeased = (userNextLeased + userLeasingAmount)
233233 let newToUnlock = max([0, (toUnlock - userLeasingAmount)])
234234 let newToClaim = min([toClaim, (toClaim + (toUnlock - userLeasingAmount))])
235-[getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, nodeNextLeased), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, newToClaim, newToUnlock)]
235+[getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, newToClaim, newToUnlock)]
236236 }
237237 else throw("Strict value is not equal to itself.")
238238 }
245245 if ((check == check))
246246 then if ((periodOffsetHeight == -1))
247247 then [IntegerEntry(keyPeriodLength, newPeriodLength), IntegerEntry(keyPeriodOffsetHeight, height)]
248- else {
249- let newPeriodOffsetId = (currentPeriodId + 1)
250- let newOffsetHeight = ((periodLength * (newPeriodOffsetId - periodOffsetId)) + periodOffsetHeight)
251-[IntegerEntry(keyPeriodOffsetId, newPeriodOffsetId), IntegerEntry(keyPeriodOffsetHeight, newOffsetHeight), IntegerEntry(keyPeriodLength, newPeriodLength)]
252- }
248+ else [IntegerEntry(keyPeriodOffsetId, (currentPeriodId + 1)), IntegerEntry(keyPeriodOffsetHeight, nextPeriodHeight), IntegerEntry(keyPeriodLength, newPeriodLength)]
253249 else throw("Strict value is not equal to itself.")
254250 }
255251
261257
262258 @Callable(i)
263259 func getNodeDataREADONLY (nodeAddress) = {
264- let $t01026110325 = getLeasingNodeData(nodeAddress)
265- let currentLease = $t01026110325._1
266- let nextLeased = $t01026110325._2
260+ let $t01010810172 = getLeasingNodeData(nodeAddress)
261+ let currentLease = $t01010810172._1
262+ let nextLeased = $t01010810172._2
267263 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
268264 }
269265
271267
272268 @Callable(i)
273269 func getUserDataREADONLY (userAddress) = {
274- let $t01048110541 = getUserToClaimBalance(userAddress)
275- let toClaim = $t01048110541._1
276- let toUnlock = $t01048110541._2
270+ let $t01032810388 = getUserToClaimBalance(userAddress)
271+ let toClaim = $t01032810388._1
272+ let toUnlock = $t01032810388._2
277273 $Tuple2(nil, $Tuple5(currentPeriodHeight, toClaim, nextPeriodHeight, toUnlock, height))
278274 }
279275
319315 @Callable(i)
320316 func claimAll () = {
321317 let userAddress = toString(i.caller)
322- let $t01145911519 = getUserToClaimBalance(userAddress)
323- let toClaim = $t01145911519._1
324- let toUnlock = $t01145911519._2
325- getClaimUnlockedActions(userAddress, toClaim)
318+ let $t01130611366 = getUserToClaimBalance(userAddress)
319+ let toClaim = $t01130611366._1
320+ let toUnlock = $t01130611366._2
321+ let checks = [if ((toClaim > 0))
322+ then true
323+ else throwErr("nothing to claim")]
324+ if ((checks == checks))
325+ then getClaimUnlockedActions(userAddress, toClaim)
326+ else throw("Strict value is not equal to itself.")
326327 }
327328
328329
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 func throwErr (msg) = throw(((contractFile + ": ") + msg))
99
1010
1111 let keyAssetId = makeString(["%s", "assetId"], SEP)
1212
1313 let keyPeriodOffsetId = makeString(["%s", "offsetId"], SEP)
1414
1515 let keyPeriodOffsetHeight = makeString(["%s", "offsetHeight"], SEP)
1616
1717 let keyPeriodLength = makeString(["%s", "periodLength"], SEP)
1818
1919 let periodOffsetId = valueOrElse(getInteger(this, keyPeriodOffsetId), 0)
2020
2121 let periodLength = valueOrElse(getInteger(this, keyPeriodLength), 10000)
2222
2323 let periodOffsetHeight = valueOrElse(getInteger(this, keyPeriodOffsetHeight), -1)
2424
2525 let currentPeriodId = if (if ((height > periodOffsetHeight))
2626 then (periodOffsetHeight != -1)
2727 else false)
2828 then (((height - periodOffsetHeight) / periodLength) + periodOffsetId)
2929 else max([0, (periodOffsetId - 1)])
3030
3131 let currentPeriodHeight = (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
3232
3333 let nextPeriodHeight = (currentPeriodHeight + periodLength)
3434
3535 func keyLeasingNodeData (nodeAddress) = makeString(["%s", nodeAddress], SEP)
3636
3737
3838 func keyUserToClaim (userAddress) = makeString(["%s%s", "toClaim", userAddress], SEP)
3939
4040
4141 func keyUserLeasingNodeData (userAddress,nodeAddress) = makeString(["%s%s", nodeAddress, userAddress], SEP)
4242
4343
4444 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
4545
4646 let assetIdBytes = if ((assetIdString == "WAVES"))
4747 then unit
4848 else fromBase58String(assetIdString)
4949
5050 func isValidAddress (address) = match addressFromString(address) {
5151 case a: Address =>
5252 true
5353 case _ =>
5454 false
5555 }
5656
5757
5858 func getLeasingNodeEntry (nodeAddress,currentLeased,nextLeased) = {
5959 let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(currentLeased), toString(nextPeriodHeight), toString(nextLeased)], SEP)
6060 StringEntry(keyLeasingNodeData(nodeAddress), valueString)
6161 }
6262
6363
6464 func getLeasingNodeData (nodeAddress) = {
6565 let leasingNodeDataStringRaw = getString(this, keyLeasingNodeData(nodeAddress))
6666 match leasingNodeDataStringRaw {
6767 case ds: String =>
6868 let dataList = split(ds, SEP)
6969 let nodeCurrentPeriod = parseIntValue(dataList[1])
7070 let nodeCurrentLeased = parseIntValue(dataList[2])
7171 let nodeNextPeriod = parseIntValue(dataList[3])
7272 let nodeNextLeased = parseIntValue(dataList[4])
7373 if ((nodeNextPeriod > height))
7474 then $Tuple2(nodeCurrentLeased, nodeNextLeased)
7575 else $Tuple2(nodeNextLeased, nodeNextLeased)
7676 case _ =>
7777 $Tuple2(0, 0)
7878 }
7979 }
8080
8181
8282 func getUserLeasingEntry (nodeAddress,userAddress,userCurrentLeased,userNextLeased) = {
8383 let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(userCurrentLeased), toString(nextPeriodHeight), toString(userNextLeased)], SEP)
8484 StringEntry(keyUserLeasingNodeData(userAddress, nodeAddress), valueString)
8585 }
8686
8787
8888 func getUserLeasingData (nodeAddress,userAddress) = {
8989 let leasingUserDataStringRaw = getString(this, keyUserLeasingNodeData(userAddress, nodeAddress))
9090 match leasingUserDataStringRaw {
9191 case ds: String =>
9292 let dataList = split(ds, SEP)
9393 let userCurrentPeriod = parseIntValue(dataList[1])
9494 let userCurrentLeased = parseIntValue(dataList[2])
9595 let userNextPeriod = parseIntValue(dataList[3])
9696 let userNextLeased = parseIntValue(dataList[4])
9797 if ((userNextPeriod > height))
9898 then $Tuple2(userCurrentLeased, userNextLeased)
9999 else $Tuple2(userNextLeased, userNextLeased)
100100 case _ =>
101101 $Tuple2(0, 0)
102102 }
103103 }
104104
105105
106106 func getUserToClaimEntry (userAddress,toClaim,toUnlock) = {
107107 let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(toClaim), toString(nextPeriodHeight), toString(toUnlock)], SEP)
108108 StringEntry(keyUserToClaim(userAddress), valueString)
109109 }
110110
111111
112112 func getUserToClaimBalance (userAddress) = {
113113 let userToClaimDataStringRaw = getString(this, keyUserToClaim(userAddress))
114114 match userToClaimDataStringRaw {
115115 case ds: String =>
116116 let dataList = split(ds, SEP)
117117 let currentPeriod = parseIntValue(dataList[1])
118118 let toClaim = parseIntValue(dataList[2])
119119 let nextPeriod = parseIntValue(dataList[3])
120120 let toUnlock = parseIntValue(dataList[4])
121121 if ((nextPeriod > height))
122122 then $Tuple2(toClaim, toUnlock)
123123 else $Tuple2((toClaim + toUnlock), 0)
124124 case _ =>
125125 $Tuple2(0, 0)
126126 }
127127 }
128128
129129
130130 func getStakeActions (nodeAddress,userAddress,i) = {
131131 let checks = [if ((size(i.payments) == 1))
132132 then true
133133 else throwErr("payment size should be exactly 1"), if ((i.payments[0].assetId == assetIdBytes))
134134 then true
135135 else throwErr(makeString(["payment assetId should be:", assetIdString], " ")), if (isValidAddress(nodeAddress))
136136 then true
137137 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
138138 then true
139139 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
140140 if ((checks == checks))
141141 then {
142142 let userLeasingAmount = i.payments[0].amount
143143 let $t055095582 = getLeasingNodeData(nodeAddress)
144144 let nodeCurrentLeased = $t055095582._1
145145 let nodeNextLeased = $t055095582._2
146146 let newNodeNextLease = (nodeNextLeased + userLeasingAmount)
147147 let $t056505736 = getUserLeasingData(nodeAddress, userAddress)
148148 let userCurrentLeased = $t056505736._1
149149 let userNextLeased = $t056505736._2
150150 let newUserNextLeased = (userNextLeased + userLeasingAmount)
151151 [getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased)]
152152 }
153153 else throw("Strict value is not equal to itself.")
154154 }
155155
156156
157157 func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = {
158158 let $t060806153 = getLeasingNodeData(nodeAddress)
159159 let nodeCurrentLeased = $t060806153._1
160160 let nodeNextLeased = $t060806153._2
161161 let $t061586244 = getUserLeasingData(nodeAddress, userAddress)
162162 let userCurrentLeased = $t061586244._1
163163 let userNextLeased = $t061586244._2
164164 let checks = [if ((unstakeAmount > 0))
165165 then true
166166 else throwErr("unstake amount should be greater than 0"), if ((userNextLeased >= unstakeAmount))
167167 then true
168168 else throwErr("unstake amount should be less or equal user staked amount"), if ((nodeNextLeased >= unstakeAmount))
169169 then true
170170 else throwErr("unstake amount should be less or equal node staked amount"), if (isValidAddress(nodeAddress))
171171 then true
172172 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
173173 then true
174174 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
175175 if ((checks == checks))
176176 then {
177177 let newNodeNextLease = (nodeNextLeased - unstakeAmount)
178178 let newUserNextLeased = (userNextLeased - unstakeAmount)
179179 let $t069377042 = getUserToClaimBalance(userAddress)
180180 let toClaim = $t069377042._1
181181 let toUnlock = $t069377042._2
182182 let newToUnlock = (toUnlock + unstakeAmount)
183183 [getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, toClaim, newToUnlock)]
184184 }
185185 else throw("Strict value is not equal to itself.")
186186 }
187187
188188
189189 func getClaimUnlockedActions (userAddress,claimAmount) = {
190190 let $t074177477 = getUserToClaimBalance(userAddress)
191191 let toClaim = $t074177477._1
192192 let toUnlock = $t074177477._2
193193 let checks = [if ((claimAmount > 0))
194194 then true
195195 else throwErr("claim amount should be greater than 0"), if ((toClaim >= claimAmount))
196196 then true
197197 else throwErr("claim amount should be less or equal unlocked amount"), if (isValidAddress(userAddress))
198198 then true
199199 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
200200 if ((checks == checks))
201201 then {
202202 let newToClaim = (toClaim - claimAmount)
203203 [getUserToClaimEntry(userAddress, newToClaim, toUnlock), ScriptTransfer(addressFromStringValue(userAddress), claimAmount, assetIdBytes)]
204204 }
205205 else throw("Strict value is not equal to itself.")
206206 }
207207
208208
209209 func getStakeFromUnlockedActions (nodeAddress,userAddress,userLeasingAmount) = {
210210 let $t081178177 = getUserToClaimBalance(userAddress)
211211 let toClaim = $t081178177._1
212212 let toUnlock = $t081178177._2
213213 let available = (toUnlock + toClaim)
214214 let checks = [if ((userLeasingAmount > 0))
215215 then true
216216 else throwErr("amount should be greater than 0"), if ((available >= userLeasingAmount))
217217 then true
218218 else throwErr("amount should be less or equal to available"), if (isValidAddress(nodeAddress))
219219 then true
220220 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
221221 then true
222222 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
223223 if ((checks == checks))
224224 then {
225225 let $t086548727 = getLeasingNodeData(nodeAddress)
226226 let nodeCurrentLeased = $t086548727._1
227227 let nodeNextLeased = $t086548727._2
228228 let newNodeNextLease = (nodeNextLeased + userLeasingAmount)
229229 let $t087958881 = getUserLeasingData(nodeAddress, userAddress)
230230 let userCurrentLeased = $t087958881._1
231231 let userNextLeased = $t087958881._2
232232 let newUserNextLeased = (userNextLeased + userLeasingAmount)
233233 let newToUnlock = max([0, (toUnlock - userLeasingAmount)])
234234 let newToClaim = min([toClaim, (toClaim + (toUnlock - userLeasingAmount))])
235-[getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, nodeNextLeased), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, newToClaim, newToUnlock)]
235+[getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, newToClaim, newToUnlock)]
236236 }
237237 else throw("Strict value is not equal to itself.")
238238 }
239239
240240
241241 func getSetNewPeriodLengthActions (newPeriodLength) = {
242242 let check = [if ((newPeriodLength > 0))
243243 then true
244244 else throwErr("period length should be greater than 0")]
245245 if ((check == check))
246246 then if ((periodOffsetHeight == -1))
247247 then [IntegerEntry(keyPeriodLength, newPeriodLength), IntegerEntry(keyPeriodOffsetHeight, height)]
248- else {
249- let newPeriodOffsetId = (currentPeriodId + 1)
250- let newOffsetHeight = ((periodLength * (newPeriodOffsetId - periodOffsetId)) + periodOffsetHeight)
251-[IntegerEntry(keyPeriodOffsetId, newPeriodOffsetId), IntegerEntry(keyPeriodOffsetHeight, newOffsetHeight), IntegerEntry(keyPeriodLength, newPeriodLength)]
252- }
248+ else [IntegerEntry(keyPeriodOffsetId, (currentPeriodId + 1)), IntegerEntry(keyPeriodOffsetHeight, nextPeriodHeight), IntegerEntry(keyPeriodLength, newPeriodLength)]
253249 else throw("Strict value is not equal to itself.")
254250 }
255251
256252
257253 @Callable(i)
258254 func setNewPeriodLength (newPeriodLength) = getSetNewPeriodLengthActions(newPeriodLength)
259255
260256
261257
262258 @Callable(i)
263259 func getNodeDataREADONLY (nodeAddress) = {
264- let $t01026110325 = getLeasingNodeData(nodeAddress)
265- let currentLease = $t01026110325._1
266- let nextLeased = $t01026110325._2
260+ let $t01010810172 = getLeasingNodeData(nodeAddress)
261+ let currentLease = $t01010810172._1
262+ let nextLeased = $t01010810172._2
267263 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
268264 }
269265
270266
271267
272268 @Callable(i)
273269 func getUserDataREADONLY (userAddress) = {
274- let $t01048110541 = getUserToClaimBalance(userAddress)
275- let toClaim = $t01048110541._1
276- let toUnlock = $t01048110541._2
270+ let $t01032810388 = getUserToClaimBalance(userAddress)
271+ let toClaim = $t01032810388._1
272+ let toUnlock = $t01032810388._2
277273 $Tuple2(nil, $Tuple5(currentPeriodHeight, toClaim, nextPeriodHeight, toUnlock, height))
278274 }
279275
280276
281277
282278 @Callable(i)
283279 func stakeFor (nodeAddress,userAddress) = getStakeActions(nodeAddress, userAddress, i)
284280
285281
286282
287283 @Callable(i)
288284 func stake (nodeAddress) = {
289285 let userAddress = toString(i.caller)
290286 getStakeActions(nodeAddress, userAddress, i)
291287 }
292288
293289
294290
295291 @Callable(i)
296292 func stakeFromUnlocked (nodeAddress,amount) = {
297293 let userAddress = toString(i.caller)
298294 getStakeFromUnlockedActions(nodeAddress, userAddress, amount)
299295 }
300296
301297
302298
303299 @Callable(i)
304300 func unstake (nodeAddress,amount) = {
305301 let userAddress = toString(i.caller)
306302 getUnstakeActions(nodeAddress, userAddress, amount)
307303 }
308304
309305
310306
311307 @Callable(i)
312308 func claim (amount) = {
313309 let userAddress = toString(i.caller)
314310 getClaimUnlockedActions(userAddress, amount)
315311 }
316312
317313
318314
319315 @Callable(i)
320316 func claimAll () = {
321317 let userAddress = toString(i.caller)
322- let $t01145911519 = getUserToClaimBalance(userAddress)
323- let toClaim = $t01145911519._1
324- let toUnlock = $t01145911519._2
325- getClaimUnlockedActions(userAddress, toClaim)
318+ let $t01130611366 = getUserToClaimBalance(userAddress)
319+ let toClaim = $t01130611366._1
320+ let toUnlock = $t01130611366._2
321+ let checks = [if ((toClaim > 0))
322+ then true
323+ else throwErr("nothing to claim")]
324+ if ((checks == checks))
325+ then getClaimUnlockedActions(userAddress, toClaim)
326+ else throw("Strict value is not equal to itself.")
326327 }
327328
328329

github/deemru/w8io/026f985 
42.79 ms