tx · 5ayAmJsFWojGf9ZqkKKanjQuT7gw8rUR7qBnUvUoVXFf

3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h:  -0.01000000 Waves

2024.02.05 13:48 [2962870] smart account 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h > SELF 0.00000000 Waves

{ "type": 13, "id": "5ayAmJsFWojGf9ZqkKKanjQuT7gw8rUR7qBnUvUoVXFf", "fee": 1000000, "feeAssetId": null, "timestamp": 1707130206110, "version": 2, "chainId": 84, "sender": "3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h", "senderPublicKey": "3z8Q6Zu3KppVmn6fJJvrLc1Wo3krVHSvfaNcerm82md2", "proofs": [ "1qYMHPRyzXoy9TwMpgPxLRj7TPuTtwhpYx2Z4Cy8S9JvuB9DUjRK9hqL3HCfz7ApDsXpoUjB1QWpzJrA8d7oB93" ], "script": "base64:BgIiCAISAwoBARIDCgEIEgQKAggIEgMKAQgSBAoCCAESAwoBASEADGNvbnRyYWN0RmlsZQIRbDJtcF9sZWFzaW5nLnJpZGUAA1NFUAICX18ABnNjYWxlOACAwtcvAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQABFrZXlQZXJpb2RPZmZzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICCG9mZnNldElkBQNuaWwFA1NFUAAVa2V5UGVyaW9kT2Zmc2V0SGVpZ2h0CQC5CQIJAMwIAgICJXMJAMwIAgIMb2Zmc2V0SGVpZ2h0BQNuaWwFA1NFUAAPa2V5UGVyaW9kTGVuZ3RoCQC5CQIJAMwIAgICJXMJAMwIAgIMcGVyaW9kTGVuZ3RoBQNuaWwFA1NFUAAOcGVyaW9kT2Zmc2V0SWQJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwURa2V5UGVyaW9kT2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VMaXN0AQULdXNlckFkZHJlc3MJAJQKAgUDbmlsCQCXCgUJAJUKAwUPY3VycmVudFBlcmlvZElkBRJwZXJpb2RPZmZzZXRIZWlnaHQFDHBlcmlvZExlbmd0aAUGbGVhc2VkBQh0b1VubG9jawUHdG9DbGFpbQUIbm9kZUxpc3QBaQEIc3Rha2VGb3ICC25vZGVBZGRyZXNzC3VzZXJBZGRyZXNzCQEPZ2V0U3Rha2VBY3Rpb25zAwULbm9kZUFkZHJlc3MFC3VzZXJBZGRyZXNzBQFpAWkBBXN0YWtlAQtub2RlQWRkcmVzcwQLdXNlckFkZHJlc3MJAKUIAQgFAWkGY2FsbGVyCQEPZ2V0U3Rha2VBY3Rpb25zAwULbm9kZUFkZHJlc3MFC3VzZXJBZGRyZXNzBQFpAWkBB3Vuc3Rha2UCC25vZGVBZGRyZXNzBmFtb3VudAQLdXNlckFkZHJlc3MJAKUIAQgFAWkGY2FsbGVyCQERZ2V0VW5zdGFrZUFjdGlvbnMDBQtub2RlQWRkcmVzcwULdXNlckFkZHJlc3MFBmFtb3VudAFpAQVjbGFpbQEGYW1vdW50BAt1c2VyQWRkcmVzcwkApQgBCAUBaQZjYWxsZXIJARdnZXRDbGFpbVVubG9ja2VkQWN0aW9ucwIFC3VzZXJBZGRyZXNzBQZhbW91bnQA3tUIjA==", "height": 2962870, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 74V1XRAQxoTomMbSbwJsNBBA6tNL3ghGWf2GutHSi9fa Next: GXqANHgwu7bmDdDXLT2WC9P85qgcbpcrh7RaLaWsYLkF Diff:
OldNewDifferences
268268 let toUnlock = $t093469418._3
269269 let toClaim = $t093469418._4
270270 let nodeList = getUserLeasingNodeList(userAddress)
271- $Tuple2(nil, $Tuple5(currentPeriodId, leased, toUnlock, toClaim, nodeList))
271+ $Tuple2(nil, $Tuple5($Tuple3(currentPeriodId, periodOffsetHeight, periodLength), leased, toUnlock, toClaim, nodeList))
272272 }
273273
274274
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, currentPeriodId, 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 $t072197291 = getUserBalances(userAddress)
205205 let periodId = $t072197291._1
206206 let leased = $t072197291._2
207207 let toUnlock = $t072197291._3
208208 let toClaim = $t072197291._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 $t078927964 = getUserBalances(userAddress)
222222 let periodId = $t078927964._1
223223 let leased = $t078927964._2
224224 let toUnlock = $t078927964._3
225225 let toClaim = $t078927964._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 getSetNewPeriodLengthActions (newPeriodLength) = {
243243 let check = [if ((newPeriodLength > 0))
244244 then true
245245 else throwErr("period length should be greater than 0")]
246246 if ((check == check))
247247 then if ((periodOffsetHeight == -1))
248248 then [IntegerEntry(keyPeriodLength, newPeriodLength), IntegerEntry(keyPeriodOffsetHeight, height)]
249249 else {
250250 let newPeriodOffsetId = (currentPeriodId + 1)
251251 let newOffsetHeight = ((periodLength * (newPeriodOffsetId - periodOffsetId)) + periodOffsetHeight)
252252 [IntegerEntry(keyPeriodOffsetId, newPeriodOffsetId), IntegerEntry(keyPeriodOffsetHeight, newOffsetHeight), IntegerEntry(keyPeriodLength, newPeriodLength)]
253253 }
254254 else throw("Strict value is not equal to itself.")
255255 }
256256
257257
258258 @Callable(i)
259259 func setNewPeriodLength (newPeriodLength) = getSetNewPeriodLengthActions(newPeriodLength)
260260
261261
262262
263263 @Callable(i)
264264 func getUserData (userAddress) = {
265265 let $t093469418 = getUserBalances(userAddress)
266266 let periodId = $t093469418._1
267267 let leased = $t093469418._2
268268 let toUnlock = $t093469418._3
269269 let toClaim = $t093469418._4
270270 let nodeList = getUserLeasingNodeList(userAddress)
271- $Tuple2(nil, $Tuple5(currentPeriodId, leased, toUnlock, toClaim, nodeList))
271+ $Tuple2(nil, $Tuple5($Tuple3(currentPeriodId, periodOffsetHeight, periodLength), leased, toUnlock, toClaim, nodeList))
272272 }
273273
274274
275275
276276 @Callable(i)
277277 func stakeFor (nodeAddress,userAddress) = getStakeActions(nodeAddress, userAddress, i)
278278
279279
280280
281281 @Callable(i)
282282 func stake (nodeAddress) = {
283283 let userAddress = toString(i.caller)
284284 getStakeActions(nodeAddress, userAddress, i)
285285 }
286286
287287
288288
289289 @Callable(i)
290290 func unstake (nodeAddress,amount) = {
291291 let userAddress = toString(i.caller)
292292 getUnstakeActions(nodeAddress, userAddress, amount)
293293 }
294294
295295
296296
297297 @Callable(i)
298298 func claim (amount) = {
299299 let userAddress = toString(i.caller)
300300 getClaimUnlockedActions(userAddress, amount)
301301 }
302302
303303

github/deemru/w8io/026f985 
41.29 ms