tx · GXqANHgwu7bmDdDXLT2WC9P85qgcbpcrh7RaLaWsYLkF 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h: -0.01000000 Waves 2024.02.05 13:51 [2962871] smart account 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h > SELF 0.00000000 Waves
{ "type": 13, "id": "GXqANHgwu7bmDdDXLT2WC9P85qgcbpcrh7RaLaWsYLkF", "fee": 1000000, "feeAssetId": null, "timestamp": 1707130239376, "version": 2, "chainId": 84, "sender": "3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h", "senderPublicKey": "3z8Q6Zu3KppVmn6fJJvrLc1Wo3krVHSvfaNcerm82md2", "proofs": [ "mGqntWuowc3eLkUw6TaUCgt6FLmTGHWNkLLZ6LAxuURFDW9kMu58CrbRWLbtPu7Rqr3xJCp1Sto7d3SDeYKbc7h" ], "script": "base64:BgIiCAISAwoBARIDCgEIEgQKAggIEgMKAQgSBAoCCAESAwoBASEADGNvbnRyYWN0RmlsZQIRbDJtcF9sZWFzaW5nLnJpZGUAA1NFUAICX18ABnNjYWxlOACAwtcvAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQABFrZXlQZXJpb2RPZmZzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICCG9mZnNldElkBQNuaWwFA1NFUAAVa2V5UGVyaW9kT2Zmc2V0SGVpZ2h0CQC5CQIJAMwIAgICJXMJAMwIAgIMb2Zmc2V0SGVpZ2h0BQNuaWwFA1NFUAAPa2V5UGVyaW9kTGVuZ3RoCQC5CQIJAMwIAgICJXMJAMwIAgIMcGVyaW9kTGVuZ3RoBQNuaWwFA1NFUAAOcGVyaW9kT2Zmc2V0SWQJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwURa2V5UGVyaW9kT2Zmc2V0S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QULdXNlckFkZHJlc3MJAJQKAgUDbmlsCQCXCgUJAJYKBAUPY3VycmVudFBlcmlvZElkBRJwZXJpb2RPZmZzZXRIZWlnaHQFBmhlaWdodAUMcGVyaW9kTGVuZ3RoBQZsZWFzZWQFCHRvVW5sb2NrBQd0b0NsYWltBQhub2RlTGlzdAFpAQhzdGFrZUZvcgILbm9kZUFkZHJlc3MLdXNlckFkZHJlc3MJAQ9nZXRTdGFrZUFjdGlvbnMDBQtub2RlQWRkcmVzcwULdXNlckFkZHJlc3MFAWkBaQEFc3Rha2UBC25vZGVBZGRyZXNzBAt1c2VyQWRkcmVzcwkApQgBCAUBaQZjYWxsZXIJAQ9nZXRTdGFrZUFjdGlvbnMDBQtub2RlQWRkcmVzcwULdXNlckFkZHJlc3MFAWkBaQEHdW5zdGFrZQILbm9kZUFkZHJlc3MGYW1vdW50BAt1c2VyQWRkcmVzcwkApQgBCAUBaQZjYWxsZXIJARFnZXRVbnN0YWtlQWN0aW9ucwMFC25vZGVBZGRyZXNzBQt1c2VyQWRkcmVzcwUGYW1vdW50AWkBBWNsYWltAQZhbW91bnQEC3VzZXJBZGRyZXNzCQClCAEIBQFpBmNhbGxlcgkBF2dldENsYWltVW5sb2NrZWRBY3Rpb25zAgULdXNlckFkZHJlc3MFBmFtb3VudAD1hh7x", "height": 2962871, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5ayAmJsFWojGf9ZqkKKanjQuT7gw8rUR7qBnUvUoVXFf Next: BNTmFe1gxhB7dFTPouzucf7hfw552fVJ1i7BpTZ6L4AY Diff:
Old | New | Differences | |
---|---|---|---|
268 | 268 | let toUnlock = $t093469418._3 | |
269 | 269 | let toClaim = $t093469418._4 | |
270 | 270 | let nodeList = getUserLeasingNodeList(userAddress) | |
271 | - | $Tuple2(nil, $Tuple5($ | |
271 | + | $Tuple2(nil, $Tuple5($Tuple4(currentPeriodId, periodOffsetHeight, height, periodLength), leased, toUnlock, toClaim, nodeList)) | |
272 | 272 | } | |
273 | 273 | ||
274 | 274 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let contractFile = "l2mp_leasing.ride" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | let scale8 = 100000000 | |
9 | 9 | ||
10 | 10 | func throwErr (msg) = throw(((contractFile + ": ") + msg)) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | let keyAssetId = makeString(["%s", "assetId"], SEP) | |
14 | 14 | ||
15 | 15 | let keyPeriodOffsetId = makeString(["%s", "offsetId"], SEP) | |
16 | 16 | ||
17 | 17 | let keyPeriodOffsetHeight = makeString(["%s", "offsetHeight"], SEP) | |
18 | 18 | ||
19 | 19 | let keyPeriodLength = makeString(["%s", "periodLength"], SEP) | |
20 | 20 | ||
21 | 21 | let periodOffsetId = valueOrElse(getInteger(this, keyPeriodOffsetId), 0) | |
22 | 22 | ||
23 | 23 | let periodLength = valueOrElse(getInteger(this, keyPeriodLength), 10000) | |
24 | 24 | ||
25 | 25 | let periodOffsetHeight = valueOrElse(getInteger(this, keyPeriodOffsetHeight), -1) | |
26 | 26 | ||
27 | 27 | let currentPeriodId = if (if ((height > periodOffsetHeight)) | |
28 | 28 | then (periodOffsetHeight != -1) | |
29 | 29 | else false) | |
30 | 30 | then (((height - periodOffsetHeight) / periodLength) + periodOffsetId) | |
31 | 31 | else max([0, (periodOffsetId - 1)]) | |
32 | 32 | ||
33 | 33 | func keyLeasingNodeData (nodeAddress) = makeString(["%s", "leasingNode", nodeAddress], SEP) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyUserLeasingNodeList (userAddress) = makeString(["%s%s", "userLeasingNodeList", userAddress], SEP) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func keyUserLeasingNodeData (userAddress,nodeAddress) = makeString(["%s%s", "userLeasingNodeData", userAddress, nodeAddress], SEP) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func keyUserBalances (userAddress) = makeString(["%s%s", "userBalances", userAddress], SEP) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES") | |
46 | 46 | ||
47 | 47 | let assetIdBytes = if ((assetIdString == "WAVES")) | |
48 | 48 | then unit | |
49 | 49 | else fromBase58String(assetIdString) | |
50 | 50 | ||
51 | 51 | func isValidAddress (address) = match addressFromString(address) { | |
52 | 52 | case a: Address => | |
53 | 53 | true | |
54 | 54 | case _ => | |
55 | 55 | false | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getLeasingNodeEntry (nodeAddress,totalLeased) = { | |
60 | 60 | let valueString = makeString(["%d", toString(totalLeased)], SEP) | |
61 | 61 | StringEntry(keyLeasingNodeData(nodeAddress), valueString) | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func getLeasingNodeData (nodeAddress) = { | |
66 | 66 | let leasingDataStringRaw = getString(this, keyLeasingNodeData(nodeAddress)) | |
67 | 67 | match leasingDataStringRaw { | |
68 | 68 | case ds: String => | |
69 | 69 | let dataList = split(ds, SEP) | |
70 | 70 | let totalLeased = parseIntValue(dataList[1]) | |
71 | 71 | totalLeased | |
72 | 72 | case _ => | |
73 | 73 | 0 | |
74 | 74 | } | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getUserLeasingEntry (nodeAddress,userAddress,totalUserLeased) = { | |
79 | 79 | let valueString = makeString(["%d", toString(totalUserLeased)], SEP) | |
80 | 80 | StringEntry(keyUserLeasingNodeData(userAddress, nodeAddress), valueString) | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getUserLeasingData (nodeAddress,userAddress) = { | |
85 | 85 | let leasingDataStringRaw = getString(this, keyUserLeasingNodeData(userAddress, nodeAddress)) | |
86 | 86 | match leasingDataStringRaw { | |
87 | 87 | case ds: String => | |
88 | 88 | let dataList = split(ds, SEP) | |
89 | 89 | let totalLeased = parseIntValue(dataList[1]) | |
90 | 90 | totalLeased | |
91 | 91 | case _ => | |
92 | 92 | 0 | |
93 | 93 | } | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getUserBalancesEntry (userAddress,periodId,leased,toUnlock,toClaim) = { | |
98 | 98 | let valueString = makeString(["%d%d%d%d", toString(periodId), toString(leased), toString(toUnlock), toString(toClaim)], SEP) | |
99 | 99 | StringEntry(keyUserBalances(userAddress), valueString) | |
100 | 100 | } | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getUserBalances (userAddress) = { | |
104 | 104 | let leasingDataStringRaw = getString(this, keyUserBalances(userAddress)) | |
105 | 105 | match leasingDataStringRaw { | |
106 | 106 | case ds: String => | |
107 | 107 | let dataList = split(ds, SEP) | |
108 | 108 | let periodId = parseIntValue(dataList[1]) | |
109 | 109 | let leased = parseIntValue(dataList[2]) | |
110 | 110 | let toUnlock = parseIntValue(dataList[3]) | |
111 | 111 | let toClaim = parseIntValue(dataList[4]) | |
112 | 112 | if (((currentPeriodId - periodId) > 0)) | |
113 | 113 | then $Tuple4(periodId, leased, 0, (toClaim + toUnlock)) | |
114 | 114 | else $Tuple4(periodId, leased, toUnlock, toClaim) | |
115 | 115 | case _ => | |
116 | 116 | $Tuple4(0, 0, 0, 0) | |
117 | 117 | } | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func getUserLeasingNodeList (userAddress) = { | |
122 | 122 | let leasingDataStringRaw = getString(this, keyUserLeasingNodeList(userAddress)) | |
123 | 123 | match leasingDataStringRaw { | |
124 | 124 | case ds: String => | |
125 | 125 | let dataList = split_51C(ds, SEP) | |
126 | 126 | dataList | |
127 | 127 | case _ => | |
128 | 128 | nil | |
129 | 129 | } | |
130 | 130 | } | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func getUserNodeListEntry (userAddress,nodeList) = if ((size(nodeList) == 0)) | |
134 | 134 | then DeleteEntry(keyUserLeasingNodeList(userAddress)) | |
135 | 135 | else StringEntry(keyUserLeasingNodeList(userAddress), makeString_11C(nodeList, SEP)) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func addNodeToNodeList (userAddress,nodeAddress) = { | |
139 | 139 | let nodeList = getUserLeasingNodeList(userAddress) | |
140 | 140 | if (containsElement(nodeList, nodeAddress)) | |
141 | 141 | then nodeList | |
142 | 142 | else (nodeList :+ nodeAddress) | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func removeNodeFromNodeList (userAddress,nodeAddress) = { | |
147 | 147 | let nodeList = getUserLeasingNodeList(userAddress) | |
148 | 148 | match indexOf(nodeList, nodeAddress) { | |
149 | 149 | case index: Int => | |
150 | 150 | removeByIndex(nodeList, index) | |
151 | 151 | case _ => | |
152 | 152 | nodeList | |
153 | 153 | } | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func getStakeActions (nodeAddress,userAddress,i) = { | |
158 | 158 | let checks = [if ((size(i.payments) == 1)) | |
159 | 159 | then true | |
160 | 160 | else throwErr("payment size should be exactly 1"), if ((i.payments[0].assetId == assetIdBytes)) | |
161 | 161 | then true | |
162 | 162 | else throwErr(makeString(["payment assetId should be:", assetIdString], " ")), if (isValidAddress(nodeAddress)) | |
163 | 163 | then true | |
164 | 164 | else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress)) | |
165 | 165 | then true | |
166 | 166 | else throwErr(makeString(["user address is not valid:", userAddress], " "))] | |
167 | 167 | if ((checks == checks)) | |
168 | 168 | then { | |
169 | 169 | let userLeasingAmount = i.payments[0].amount | |
170 | 170 | let totalNodeLeased = getLeasingNodeData(nodeAddress) | |
171 | 171 | let newTotalLease = (totalNodeLeased + userLeasingAmount) | |
172 | 172 | let userTotalLeased = getUserLeasingData(nodeAddress, userAddress) | |
173 | 173 | let newUserTotalLease = (userTotalLeased + userLeasingAmount) | |
174 | 174 | let $t058645936 = getUserBalances(userAddress) | |
175 | 175 | let periodId = $t058645936._1 | |
176 | 176 | let leased = $t058645936._2 | |
177 | 177 | let toUnlock = $t058645936._3 | |
178 | 178 | let toClaim = $t058645936._4 | |
179 | 179 | let newLeased = (leased + userLeasingAmount) | |
180 | 180 | [getLeasingNodeEntry(nodeAddress, newTotalLease), getUserLeasingEntry(nodeAddress, userAddress, newUserTotalLease), getUserBalancesEntry(userAddress, currentPeriodId, newLeased, toUnlock, toClaim), getUserNodeListEntry(userAddress, addNodeToNodeList(userAddress, nodeAddress))] | |
181 | 181 | } | |
182 | 182 | else throw("Strict value is not equal to itself.") | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = { | |
187 | 187 | let totalNodeLeased = getLeasingNodeData(nodeAddress) | |
188 | 188 | let userTotalLeased = getUserLeasingData(nodeAddress, userAddress) | |
189 | 189 | let checks = [if ((unstakeAmount > 0)) | |
190 | 190 | then true | |
191 | 191 | else throwErr("unstake amount should be greater than 0"), if ((userTotalLeased >= unstakeAmount)) | |
192 | 192 | then true | |
193 | 193 | else throwErr("unstake amount should be less or equal user staked amount"), if ((totalNodeLeased >= unstakeAmount)) | |
194 | 194 | then true | |
195 | 195 | else throwErr("unstake amount should be less or equal node staked amount"), if (isValidAddress(nodeAddress)) | |
196 | 196 | then true | |
197 | 197 | else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress)) | |
198 | 198 | then true | |
199 | 199 | else throwErr(makeString(["user address is not valid:", userAddress], " "))] | |
200 | 200 | if ((checks == checks)) | |
201 | 201 | then { | |
202 | 202 | let newTotalLease = (totalNodeLeased - unstakeAmount) | |
203 | 203 | let newUserTotalLease = (userTotalLeased - unstakeAmount) | |
204 | 204 | let $t072197291 = getUserBalances(userAddress) | |
205 | 205 | let periodId = $t072197291._1 | |
206 | 206 | let leased = $t072197291._2 | |
207 | 207 | let toUnlock = $t072197291._3 | |
208 | 208 | let toClaim = $t072197291._4 | |
209 | 209 | let newLeased = (leased - unstakeAmount) | |
210 | 210 | let newToUnlock = (toUnlock + unstakeAmount) | |
211 | 211 | let removeNodeActions = if ((newUserTotalLease == 0)) | |
212 | 212 | then [getUserNodeListEntry(userAddress, removeNodeFromNodeList(userAddress, nodeAddress))] | |
213 | 213 | else nil | |
214 | 214 | ([getLeasingNodeEntry(nodeAddress, newTotalLease), getUserLeasingEntry(nodeAddress, userAddress, newUserTotalLease), getUserBalancesEntry(userAddress, currentPeriodId, newLeased, newToUnlock, toClaim)] ++ removeNodeActions) | |
215 | 215 | } | |
216 | 216 | else throw("Strict value is not equal to itself.") | |
217 | 217 | } | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func getClaimUnlockedActions (userAddress,claimAmount) = { | |
221 | 221 | let $t078927964 = getUserBalances(userAddress) | |
222 | 222 | let periodId = $t078927964._1 | |
223 | 223 | let leased = $t078927964._2 | |
224 | 224 | let toUnlock = $t078927964._3 | |
225 | 225 | let toClaim = $t078927964._4 | |
226 | 226 | let checks = [if ((claimAmount > 0)) | |
227 | 227 | then true | |
228 | 228 | else throwErr("claim amount should be greater than 0"), if ((toClaim >= claimAmount)) | |
229 | 229 | then true | |
230 | 230 | else throwErr("claim amount should be less or equal unlocked amount"), if (isValidAddress(userAddress)) | |
231 | 231 | then true | |
232 | 232 | else throwErr(makeString(["user address is not valid:", userAddress], " "))] | |
233 | 233 | if ((checks == checks)) | |
234 | 234 | then { | |
235 | 235 | let newToClaim = (toClaim - claimAmount) | |
236 | 236 | [getUserBalancesEntry(userAddress, currentPeriodId, leased, toUnlock, newToClaim)] | |
237 | 237 | } | |
238 | 238 | else throw("Strict value is not equal to itself.") | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func getSetNewPeriodLengthActions (newPeriodLength) = { | |
243 | 243 | let check = [if ((newPeriodLength > 0)) | |
244 | 244 | then true | |
245 | 245 | else throwErr("period length should be greater than 0")] | |
246 | 246 | if ((check == check)) | |
247 | 247 | then if ((periodOffsetHeight == -1)) | |
248 | 248 | then [IntegerEntry(keyPeriodLength, newPeriodLength), IntegerEntry(keyPeriodOffsetHeight, height)] | |
249 | 249 | else { | |
250 | 250 | let newPeriodOffsetId = (currentPeriodId + 1) | |
251 | 251 | let newOffsetHeight = ((periodLength * (newPeriodOffsetId - periodOffsetId)) + periodOffsetHeight) | |
252 | 252 | [IntegerEntry(keyPeriodOffsetId, newPeriodOffsetId), IntegerEntry(keyPeriodOffsetHeight, newOffsetHeight), IntegerEntry(keyPeriodLength, newPeriodLength)] | |
253 | 253 | } | |
254 | 254 | else throw("Strict value is not equal to itself.") | |
255 | 255 | } | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | @Callable(i) | |
259 | 259 | func setNewPeriodLength (newPeriodLength) = getSetNewPeriodLengthActions(newPeriodLength) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | ||
263 | 263 | @Callable(i) | |
264 | 264 | func getUserData (userAddress) = { | |
265 | 265 | let $t093469418 = getUserBalances(userAddress) | |
266 | 266 | let periodId = $t093469418._1 | |
267 | 267 | let leased = $t093469418._2 | |
268 | 268 | let toUnlock = $t093469418._3 | |
269 | 269 | let toClaim = $t093469418._4 | |
270 | 270 | let nodeList = getUserLeasingNodeList(userAddress) | |
271 | - | $Tuple2(nil, $Tuple5($ | |
271 | + | $Tuple2(nil, $Tuple5($Tuple4(currentPeriodId, periodOffsetHeight, height, periodLength), leased, toUnlock, toClaim, nodeList)) | |
272 | 272 | } | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | ||
276 | 276 | @Callable(i) | |
277 | 277 | func stakeFor (nodeAddress,userAddress) = getStakeActions(nodeAddress, userAddress, i) | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | ||
281 | 281 | @Callable(i) | |
282 | 282 | func stake (nodeAddress) = { | |
283 | 283 | let userAddress = toString(i.caller) | |
284 | 284 | getStakeActions(nodeAddress, userAddress, i) | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | ||
289 | 289 | @Callable(i) | |
290 | 290 | func unstake (nodeAddress,amount) = { | |
291 | 291 | let userAddress = toString(i.caller) | |
292 | 292 | getUnstakeActions(nodeAddress, userAddress, amount) | |
293 | 293 | } | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | ||
297 | 297 | @Callable(i) | |
298 | 298 | func claim (amount) = { | |
299 | 299 | let userAddress = toString(i.caller) | |
300 | 300 | getClaimUnlockedActions(userAddress, amount) | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 |
github/deemru/w8io/026f985 40.43 ms ◑