tx · 78ZRJE5SEf8VWZnkdFEczDQBQYeuQZeDpWDhh6cQ7dG1

3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h:  -0.01000000 Waves

2024.02.05 13:31 [2962854] smart account 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h > SELF 0.00000000 Waves

{ "type": 13, "id": "78ZRJE5SEf8VWZnkdFEczDQBQYeuQZeDpWDhh6cQ7dG1", "fee": 1000000, "feeAssetId": null, "timestamp": 1707129129619, "version": 2, "chainId": 84, "sender": "3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h", "senderPublicKey": "3z8Q6Zu3KppVmn6fJJvrLc1Wo3krVHSvfaNcerm82md2", "proofs": [ "2bBPGsaFEmVgdDeb5TbSgdmNCZ28RmkA11hXNpqNY1w7162VuotFz89DKMfGhUS98ujrTkjsX5bkpxwW6Q3cP223" ], "script": "base64:BgIiCAISAwoBARIDCgEIEgQKAggIEgMKAQgSBAoCCAESAwoBASEADGNvbnRyYWN0RmlsZQIRbDJtcF9sZWFzaW5nLnJpZGUAA1NFUAICX18ABnNjYWxlOACAwtcvAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQABFrZXlQZXJpb2RPZmZzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICCG9mZnNldElkBQNuaWwFA1NFUAAVa2V5UGVyaW9kT2Zmc2V0SGVpZ2h0CQC5CQIJAMwIAgICJXMJAMwIAgIMb2Zmc2V0SGVpZ2h0BQNuaWwFA1NFUAAPa2V5UGVyaW9kTGVuZ3RoCQC5CQIJAMwIAgICJXMJAMwIAgIMcGVyaW9kTGVuZ3RoBQNuaWwFA1NFUAAOcGVyaW9kT2Zmc2V0SWQJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwURa2V5UGVyaW9kT2Zmc2V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QNuaWwJAJcKBQUPY3VycmVudFBlcmlvZElkBQZsZWFzZWQFCHRvVW5sb2NrBQd0b0NsYWltBQhub2RlTGlzdAFpAQhzdGFrZUZvcgILbm9kZUFkZHJlc3MLdXNlckFkZHJlc3MJAQ9nZXRTdGFrZUFjdGlvbnMDBQtub2RlQWRkcmVzcwULdXNlckFkZHJlc3MFAWkBaQEFc3Rha2UBC25vZGVBZGRyZXNzBAt1c2VyQWRkcmVzcwkApQgBCAUBaQZjYWxsZXIJAQ9nZXRTdGFrZUFjdGlvbnMDBQtub2RlQWRkcmVzcwULdXNlckFkZHJlc3MFAWkBaQEHdW5zdGFrZQILbm9kZUFkZHJlc3MGYW1vdW50BAt1c2VyQWRkcmVzcwkApQgBCAUBaQZjYWxsZXIJARFnZXRVbnN0YWtlQWN0aW9ucwMFC25vZGVBZGRyZXNzBQt1c2VyQWRkcmVzcwUGYW1vdW50AWkBBWNsYWltAQZhbW91bnQEC3VzZXJBZGRyZXNzCQClCAEIBQFpBmNhbGxlcgkBF2dldENsYWltVW5sb2NrZWRBY3Rpb25zAgULdXNlckFkZHJlc3MFBmFtb3VudAC1bxJd", "height": 2962854, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GDTPtt3d2tK8zGC9QiCdh1wkh9ZpreoWp2ywPnwcma4E Next: 74V1XRAQxoTomMbSbwJsNBBA6tNL3ghGWf2GutHSi9fa Diff:
OldNewDifferences
2424
2525 let periodOffsetHeight = valueOrElse(getInteger(this, keyPeriodOffsetHeight), -1)
2626
27-let currentPeriodId = if ((height > periodOffsetHeight))
27+let currentPeriodId = if (if ((height > periodOffsetHeight))
28+ then (periodOffsetHeight != -1)
29+ else false)
2830 then (((height - periodOffsetHeight) / periodLength) + periodOffsetId)
2931 else periodOffsetId
3032
169171 let newTotalLease = (totalNodeLeased + userLeasingAmount)
170172 let userTotalLeased = getUserLeasingData(nodeAddress, userAddress)
171173 let newUserTotalLease = (userTotalLeased + userLeasingAmount)
172- let $t058225894 = getUserBalances(userAddress)
173- let periodId = $t058225894._1
174- let leased = $t058225894._2
175- let toUnlock = $t058225894._3
176- let toClaim = $t058225894._4
174+ let $t058505922 = getUserBalances(userAddress)
175+ let periodId = $t058505922._1
176+ let leased = $t058505922._2
177+ let toUnlock = $t058505922._3
178+ let toClaim = $t058505922._4
177179 let newLeased = (leased + userLeasingAmount)
178180 [getLeasingNodeEntry(nodeAddress, newTotalLease), getUserLeasingEntry(nodeAddress, userAddress, newUserTotalLease), getUserBalancesEntry(userAddress, currentPeriodId, newLeased, toUnlock, toClaim), getUserNodeListEntry(userAddress, addNodeToNodeList(userAddress, nodeAddress))]
179181 }
199201 then {
200202 let newTotalLease = (totalNodeLeased - unstakeAmount)
201203 let newUserTotalLease = (userTotalLeased - unstakeAmount)
202- let $t071777249 = getUserBalances(userAddress)
203- let periodId = $t071777249._1
204- let leased = $t071777249._2
205- let toUnlock = $t071777249._3
206- let toClaim = $t071777249._4
204+ let $t072057277 = getUserBalances(userAddress)
205+ let periodId = $t072057277._1
206+ let leased = $t072057277._2
207+ let toUnlock = $t072057277._3
208+ let toClaim = $t072057277._4
207209 let newLeased = (leased - unstakeAmount)
208210 let newToUnlock = (toUnlock + unstakeAmount)
209211 let removeNodeActions = if ((newUserTotalLease == 0))
216218
217219
218220 func getClaimUnlockedActions (userAddress,claimAmount) = {
219- let $t078507922 = getUserBalances(userAddress)
220- let periodId = $t078507922._1
221- let leased = $t078507922._2
222- let toUnlock = $t078507922._3
223- let toClaim = $t078507922._4
221+ let $t078787950 = getUserBalances(userAddress)
222+ let periodId = $t078787950._1
223+ let leased = $t078787950._2
224+ let toUnlock = $t078787950._3
225+ let toClaim = $t078787950._4
224226 let checks = [if ((claimAmount > 0))
225227 then true
226228 else throwErr("claim amount should be greater than 0"), if ((toClaim >= claimAmount))
260262
261263 @Callable(i)
262264 func getUserData (userAddress) = {
263- let $t093049376 = getUserBalances(userAddress)
264- let periodId = $t093049376._1
265- let leased = $t093049376._2
266- let toUnlock = $t093049376._3
267- let toClaim = $t093049376._4
265+ let $t093329404 = getUserBalances(userAddress)
266+ let periodId = $t093329404._1
267+ let leased = $t093329404._2
268+ let toUnlock = $t093329404._3
269+ let toClaim = $t093329404._4
268270 let nodeList = getUserLeasingNodeList(userAddress)
269271 $Tuple2(nil, $Tuple5(currentPeriodId, leased, toUnlock, toClaim, nodeList))
270272 }
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
27-let currentPeriodId = if ((height > periodOffsetHeight))
27+let currentPeriodId = if (if ((height > periodOffsetHeight))
28+ then (periodOffsetHeight != -1)
29+ else false)
2830 then (((height - periodOffsetHeight) / periodLength) + periodOffsetId)
2931 else periodOffsetId
3032
3133 func keyLeasingNodeData (nodeAddress) = makeString(["%s", "leasingNode", nodeAddress], SEP)
3234
3335
3436 func keyUserLeasingNodeList (userAddress) = makeString(["%s%s", "userLeasingNodeList", userAddress], SEP)
3537
3638
3739 func keyUserLeasingNodeData (userAddress,nodeAddress) = makeString(["%s%s", "userLeasingNodeData", userAddress, nodeAddress], SEP)
3840
3941
4042 func keyUserBalances (userAddress) = makeString(["%s%s", "userBalances", userAddress], SEP)
4143
4244
4345 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
4446
4547 let assetIdBytes = if ((assetIdString == "WAVES"))
4648 then unit
4749 else fromBase58String(assetIdString)
4850
4951 func isValidAddress (address) = match addressFromString(address) {
5052 case a: Address =>
5153 true
5254 case _ =>
5355 false
5456 }
5557
5658
5759 func getLeasingNodeEntry (nodeAddress,totalLeased) = {
5860 let valueString = makeString(["%d", toString(totalLeased)], SEP)
5961 StringEntry(keyLeasingNodeData(nodeAddress), valueString)
6062 }
6163
6264
6365 func getLeasingNodeData (nodeAddress) = {
6466 let leasingDataStringRaw = getString(this, keyLeasingNodeData(nodeAddress))
6567 match leasingDataStringRaw {
6668 case ds: String =>
6769 let dataList = split(ds, SEP)
6870 let totalLeased = parseIntValue(dataList[1])
6971 totalLeased
7072 case _ =>
7173 0
7274 }
7375 }
7476
7577
7678 func getUserLeasingEntry (nodeAddress,userAddress,totalUserLeased) = {
7779 let valueString = makeString(["%d", toString(totalUserLeased)], SEP)
7880 StringEntry(keyUserLeasingNodeData(userAddress, nodeAddress), valueString)
7981 }
8082
8183
8284 func getUserLeasingData (nodeAddress,userAddress) = {
8385 let leasingDataStringRaw = getString(this, keyUserLeasingNodeData(userAddress, nodeAddress))
8486 match leasingDataStringRaw {
8587 case ds: String =>
8688 let dataList = split(ds, SEP)
8789 let totalLeased = parseIntValue(dataList[1])
8890 totalLeased
8991 case _ =>
9092 0
9193 }
9294 }
9395
9496
9597 func getUserBalancesEntry (userAddress,periodId,leased,toUnlock,toClaim) = {
9698 let valueString = makeString(["%d%d%d%d", toString(periodId), toString(leased), toString(toUnlock), toString(toClaim)], SEP)
9799 StringEntry(keyUserBalances(userAddress), valueString)
98100 }
99101
100102
101103 func getUserBalances (userAddress) = {
102104 let leasingDataStringRaw = getString(this, keyUserBalances(userAddress))
103105 match leasingDataStringRaw {
104106 case ds: String =>
105107 let dataList = split(ds, SEP)
106108 let periodId = parseIntValue(dataList[1])
107109 let leased = parseIntValue(dataList[2])
108110 let toUnlock = parseIntValue(dataList[3])
109111 let toClaim = parseIntValue(dataList[4])
110112 if (((currentPeriodId - periodId) > 0))
111113 then $Tuple4(periodId, leased, 0, (toClaim + toUnlock))
112114 else $Tuple4(periodId, leased, toUnlock, toClaim)
113115 case _ =>
114116 $Tuple4(0, 0, 0, 0)
115117 }
116118 }
117119
118120
119121 func getUserLeasingNodeList (userAddress) = {
120122 let leasingDataStringRaw = getString(this, keyUserLeasingNodeList(userAddress))
121123 match leasingDataStringRaw {
122124 case ds: String =>
123125 let dataList = split_51C(ds, SEP)
124126 dataList
125127 case _ =>
126128 nil
127129 }
128130 }
129131
130132
131133 func getUserNodeListEntry (userAddress,nodeList) = if ((size(nodeList) == 0))
132134 then DeleteEntry(keyUserLeasingNodeList(userAddress))
133135 else StringEntry(keyUserLeasingNodeList(userAddress), makeString_11C(nodeList, SEP))
134136
135137
136138 func addNodeToNodeList (userAddress,nodeAddress) = {
137139 let nodeList = getUserLeasingNodeList(userAddress)
138140 if (containsElement(nodeList, nodeAddress))
139141 then nodeList
140142 else (nodeList :+ nodeAddress)
141143 }
142144
143145
144146 func removeNodeFromNodeList (userAddress,nodeAddress) = {
145147 let nodeList = getUserLeasingNodeList(userAddress)
146148 match indexOf(nodeList, nodeAddress) {
147149 case index: Int =>
148150 removeByIndex(nodeList, index)
149151 case _ =>
150152 nodeList
151153 }
152154 }
153155
154156
155157 func getStakeActions (nodeAddress,userAddress,i) = {
156158 let checks = [if ((size(i.payments) == 1))
157159 then true
158160 else throwErr("payment size should be exactly 1"), if ((i.payments[0].assetId == assetIdBytes))
159161 then true
160162 else throwErr(makeString(["payment assetId should be:", assetIdString], " ")), if (isValidAddress(nodeAddress))
161163 then true
162164 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
163165 then true
164166 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
165167 if ((checks == checks))
166168 then {
167169 let userLeasingAmount = i.payments[0].amount
168170 let totalNodeLeased = getLeasingNodeData(nodeAddress)
169171 let newTotalLease = (totalNodeLeased + userLeasingAmount)
170172 let userTotalLeased = getUserLeasingData(nodeAddress, userAddress)
171173 let newUserTotalLease = (userTotalLeased + userLeasingAmount)
172- let $t058225894 = getUserBalances(userAddress)
173- let periodId = $t058225894._1
174- let leased = $t058225894._2
175- let toUnlock = $t058225894._3
176- let toClaim = $t058225894._4
174+ let $t058505922 = getUserBalances(userAddress)
175+ let periodId = $t058505922._1
176+ let leased = $t058505922._2
177+ let toUnlock = $t058505922._3
178+ let toClaim = $t058505922._4
177179 let newLeased = (leased + userLeasingAmount)
178180 [getLeasingNodeEntry(nodeAddress, newTotalLease), getUserLeasingEntry(nodeAddress, userAddress, newUserTotalLease), getUserBalancesEntry(userAddress, currentPeriodId, newLeased, toUnlock, toClaim), getUserNodeListEntry(userAddress, addNodeToNodeList(userAddress, nodeAddress))]
179181 }
180182 else throw("Strict value is not equal to itself.")
181183 }
182184
183185
184186 func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = {
185187 let totalNodeLeased = getLeasingNodeData(nodeAddress)
186188 let userTotalLeased = getUserLeasingData(nodeAddress, userAddress)
187189 let checks = [if ((unstakeAmount > 0))
188190 then true
189191 else throwErr("unstake amount should be greater than 0"), if ((userTotalLeased >= unstakeAmount))
190192 then true
191193 else throwErr("unstake amount should be less or equal user staked amount"), if ((totalNodeLeased >= unstakeAmount))
192194 then true
193195 else throwErr("unstake amount should be less or equal node staked amount"), if (isValidAddress(nodeAddress))
194196 then true
195197 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
196198 then true
197199 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
198200 if ((checks == checks))
199201 then {
200202 let newTotalLease = (totalNodeLeased - unstakeAmount)
201203 let newUserTotalLease = (userTotalLeased - unstakeAmount)
202- let $t071777249 = getUserBalances(userAddress)
203- let periodId = $t071777249._1
204- let leased = $t071777249._2
205- let toUnlock = $t071777249._3
206- let toClaim = $t071777249._4
204+ let $t072057277 = getUserBalances(userAddress)
205+ let periodId = $t072057277._1
206+ let leased = $t072057277._2
207+ let toUnlock = $t072057277._3
208+ let toClaim = $t072057277._4
207209 let newLeased = (leased - unstakeAmount)
208210 let newToUnlock = (toUnlock + unstakeAmount)
209211 let removeNodeActions = if ((newUserTotalLease == 0))
210212 then [getUserNodeListEntry(userAddress, removeNodeFromNodeList(userAddress, nodeAddress))]
211213 else nil
212214 ([getLeasingNodeEntry(nodeAddress, newTotalLease), getUserLeasingEntry(nodeAddress, userAddress, newUserTotalLease), getUserBalancesEntry(userAddress, currentPeriodId, newLeased, newToUnlock, toClaim)] ++ removeNodeActions)
213215 }
214216 else throw("Strict value is not equal to itself.")
215217 }
216218
217219
218220 func getClaimUnlockedActions (userAddress,claimAmount) = {
219- let $t078507922 = getUserBalances(userAddress)
220- let periodId = $t078507922._1
221- let leased = $t078507922._2
222- let toUnlock = $t078507922._3
223- let toClaim = $t078507922._4
221+ let $t078787950 = getUserBalances(userAddress)
222+ let periodId = $t078787950._1
223+ let leased = $t078787950._2
224+ let toUnlock = $t078787950._3
225+ let toClaim = $t078787950._4
224226 let checks = [if ((claimAmount > 0))
225227 then true
226228 else throwErr("claim amount should be greater than 0"), if ((toClaim >= claimAmount))
227229 then true
228230 else throwErr("claim amount should be less or equal unlocked amount"), if (isValidAddress(userAddress))
229231 then true
230232 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
231233 if ((checks == checks))
232234 then {
233235 let newToClaim = (toClaim - claimAmount)
234236 [getUserBalancesEntry(userAddress, currentPeriodId, leased, toUnlock, newToClaim)]
235237 }
236238 else throw("Strict value is not equal to itself.")
237239 }
238240
239241
240242 func getSetNewPeriodLengthActions (newPeriodLength) = {
241243 let check = [if ((newPeriodLength > 0))
242244 then true
243245 else throwErr("period length should be greater than 0")]
244246 if ((check == check))
245247 then if ((periodOffsetHeight == -1))
246248 then [IntegerEntry(keyPeriodLength, newPeriodLength), IntegerEntry(keyPeriodOffsetHeight, height)]
247249 else {
248250 let newPeriodOffsetId = (currentPeriodId + 1)
249251 let newOffsetHeight = ((periodLength * (newPeriodOffsetId - periodOffsetId)) + periodOffsetHeight)
250252 [IntegerEntry(keyPeriodOffsetId, newPeriodOffsetId), IntegerEntry(keyPeriodOffsetHeight, newOffsetHeight), IntegerEntry(keyPeriodLength, newPeriodLength)]
251253 }
252254 else throw("Strict value is not equal to itself.")
253255 }
254256
255257
256258 @Callable(i)
257259 func setNewPeriodLength (newPeriodLength) = getSetNewPeriodLengthActions(newPeriodLength)
258260
259261
260262
261263 @Callable(i)
262264 func getUserData (userAddress) = {
263- let $t093049376 = getUserBalances(userAddress)
264- let periodId = $t093049376._1
265- let leased = $t093049376._2
266- let toUnlock = $t093049376._3
267- let toClaim = $t093049376._4
265+ let $t093329404 = getUserBalances(userAddress)
266+ let periodId = $t093329404._1
267+ let leased = $t093329404._2
268+ let toUnlock = $t093329404._3
269+ let toClaim = $t093329404._4
268270 let nodeList = getUserLeasingNodeList(userAddress)
269271 $Tuple2(nil, $Tuple5(currentPeriodId, leased, toUnlock, toClaim, nodeList))
270272 }
271273
272274
273275
274276 @Callable(i)
275277 func stakeFor (nodeAddress,userAddress) = getStakeActions(nodeAddress, userAddress, i)
276278
277279
278280
279281 @Callable(i)
280282 func stake (nodeAddress) = {
281283 let userAddress = toString(i.caller)
282284 getStakeActions(nodeAddress, userAddress, i)
283285 }
284286
285287
286288
287289 @Callable(i)
288290 func unstake (nodeAddress,amount) = {
289291 let userAddress = toString(i.caller)
290292 getUnstakeActions(nodeAddress, userAddress, amount)
291293 }
292294
293295
294296
295297 @Callable(i)
296298 func claim (amount) = {
297299 let userAddress = toString(i.caller)
298300 getClaimUnlockedActions(userAddress, amount)
299301 }
300302
301303

github/deemru/w8io/026f985 
35.03 ms