tx · EC5cKbZcMw8SvPwc9G5Yaya3kyyGaF88bt4oEMT6zFiX 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h: -0.02000000 Waves 2024.02.28 15:07 [2996059] smart account 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h > SELF 0.00000000 Waves
{ "type": 13, "id": "EC5cKbZcMw8SvPwc9G5Yaya3kyyGaF88bt4oEMT6zFiX", "fee": 2000000, "feeAssetId": null, "timestamp": 1709122129245, "version": 2, "chainId": 84, "sender": "3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h", "senderPublicKey": "3z8Q6Zu3KppVmn6fJJvrLc1Wo3krVHSvfaNcerm82md2", "proofs": [ "2h2wyscnxMzEHGPotaETfV9BQTyXU4kemueS1QgdWrjAoorrVjKS8tawMiw6xAEhyTTfg36aM462saunHhrVcFMu" ], "script": "base64:BgI/CAISAwoBARIDCgEEEgMKAQgSBAoCCAgSAwoBCBIECgIICBIDCgEIEgQKAggBEgQKAggBEgMKAQESABIDCgEINgAMY29udHJhY3RGaWxlAhFsMm1wX2xlYXNpbmcucmlkZQADU0VQAgJfXwEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAAMa2V5Rm9yY2VTdG9wCQC5CQIJAMwIAgICJXMJAMwIAgIJZm9yY2VTdG9wBQNuaWwFA1NFUAARa2V5UGVyaW9kT2Zmc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAghvZmZzZXRJZAUDbmlsBQNTRVAAFWtleVBlcmlvZE9mZnNldEhlaWdodAkAuQkCCQDMCAICAiVzCQDMCAICDG9mZnNldEhlaWdodAUDbmlsBQNTRVAAD2tleVBlcmlvZExlbmd0aAkAuQkCCQDMCAICAiVzCQDMCAICDHBlcmlvZExlbmd0aAUDbmlsBQNTRVAADnBlcmlvZE9mZnN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AMJAAACBQNlcnIFA2VycgkBDHZvdGVJTlRFUk5BTAQFE2NhbGxlckFkZHJlc3NTdHJpbmcFCWtleVByZWZpeAUGUVVPUlVNBQZyZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAhieUFkbWlucwkAAAIIBQJ0eAJpZAkA2QQBCQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMJAQ5rZXlBbGxvd2VkVHhJZAACAAQHYnlPd25lcgMJAGcCCQCQAwEJAQ1nZXRBZG1pbnNMaXN0AAUGUVVPUlVNBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQMFCGJ5QWRtaW5zBgUHYnlPd25lcjiin48=", "height": 2996059, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Eq56WCGh3F9nBWG3GPZyzW4ZMkWDGdEu68J349QgDa5c Next: 6Vuk1Cyykzh3aLD34UKE3CvGpBQYNkDTgvSMZLCe3gEm Diff:
Old | New | Differences | |
---|---|---|---|
226 | 226 | let nodeNextLeased = parseIntValue(dataList[4]) | |
227 | 227 | if (if ((nodeNextPeriod > height)) | |
228 | 228 | then true | |
229 | - | else ( | |
229 | + | else (currentPeriodId == 0)) | |
230 | 230 | then $Tuple2(nodeCurrentLeased, nodeNextLeased) | |
231 | 231 | else $Tuple2(nodeNextLeased, nodeNextLeased) | |
232 | 232 | case _ => | |
252 | 252 | let userNextLeased = parseIntValue(dataList[4]) | |
253 | 253 | if (if ((userNextPeriod > height)) | |
254 | 254 | then true | |
255 | - | else ( | |
255 | + | else (currentPeriodId == 0)) | |
256 | 256 | then $Tuple2(userCurrentLeased, userNextLeased) | |
257 | 257 | else $Tuple2(userNextLeased, userNextLeased) | |
258 | 258 | case _ => | |
278 | 278 | let toUnlock = parseIntValue(dataList[4]) | |
279 | 279 | if (if ((nextPeriod > height)) | |
280 | 280 | then true | |
281 | - | else ( | |
281 | + | else (currentPeriodId == 0)) | |
282 | 282 | then $Tuple2(toClaim, toUnlock) | |
283 | 283 | else $Tuple2((toClaim + toUnlock), 0) | |
284 | 284 | case _ => | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = { | |
297 | - | let $ | |
298 | - | let nodeCurrentLeased = $ | |
299 | - | let nodeNextLeased = $ | |
300 | - | let $ | |
301 | - | let userCurrentLeased = $ | |
302 | - | let userNextLeased = $ | |
297 | + | let $t087358808 = getLeasingNodeData(nodeAddress) | |
298 | + | let nodeCurrentLeased = $t087358808._1 | |
299 | + | let nodeNextLeased = $t087358808._2 | |
300 | + | let $t088138899 = getUserLeasingData(nodeAddress, userAddress) | |
301 | + | let userCurrentLeased = $t088138899._1 | |
302 | + | let userNextLeased = $t088138899._2 | |
303 | 303 | let checks = [if (!(isForceStop)) | |
304 | 304 | then true | |
305 | 305 | else throwErr("contract is temporary stopped"), if ((unstakeAmount > 0)) | |
317 | 317 | then { | |
318 | 318 | let newNodeNextLease = (nodeNextLeased - unstakeAmount) | |
319 | 319 | let newUserNextLeased = (userNextLeased - unstakeAmount) | |
320 | - | let $ | |
321 | - | let toClaim = $ | |
322 | - | let toUnlock = $ | |
320 | + | let $t097129772 = getUserToClaimBalance(userAddress) | |
321 | + | let toClaim = $t097129772._1 | |
322 | + | let toUnlock = $t097129772._2 | |
323 | 323 | let newToUnlock = (toUnlock + unstakeAmount) | |
324 | 324 | let userTotalLocked = getUserTotalLocked(userAddress) | |
325 | 325 | let newUserTotalLocked = (userTotalLocked - unstakeAmount) | |
330 | 330 | ||
331 | 331 | ||
332 | 332 | func getClaimUnlockedActions (userAddress,claimAmount) = { | |
333 | - | let $ | |
334 | - | let toClaim = $ | |
335 | - | let toUnlock = $ | |
333 | + | let $t01050110561 = getUserToClaimBalance(userAddress) | |
334 | + | let toClaim = $t01050110561._1 | |
335 | + | let toUnlock = $t01050110561._2 | |
336 | 336 | let checks = [if (!(isForceStop)) | |
337 | 337 | then true | |
338 | 338 | else throwErr("contract is temporary stopped"), if ((claimAmount > 0)) | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | func getStakeActions (nodeAddress,userAddress,userLeasingAmount,i) = { | |
355 | - | let $ | |
356 | - | let toClaim = $ | |
357 | - | let toUnlock = $ | |
355 | + | let $t01132211382 = getUserToClaimBalance(userAddress) | |
356 | + | let toClaim = $t01132211382._1 | |
357 | + | let toUnlock = $t01132211382._2 | |
358 | 358 | let paymentAmount = if ((size(i.payments) == 0)) | |
359 | 359 | then 0 | |
360 | 360 | else i.payments[0].amount | |
380 | 380 | else throwErr(makeString(["user address is not valid:", userAddress], " "))] | |
381 | 381 | if ((checks == checks)) | |
382 | 382 | then { | |
383 | - | let $ | |
384 | - | let nodeCurrentLeased = $ | |
385 | - | let nodeNextLeased = $ | |
383 | + | let $t01245312526 = getLeasingNodeData(nodeAddress) | |
384 | + | let nodeCurrentLeased = $t01245312526._1 | |
385 | + | let nodeNextLeased = $t01245312526._2 | |
386 | 386 | let newNodeNextLease = (nodeNextLeased + userLeasingAmount) | |
387 | - | let $ | |
388 | - | let userCurrentLeased = $ | |
389 | - | let userNextLeased = $ | |
387 | + | let $t01259412680 = getUserLeasingData(nodeAddress, userAddress) | |
388 | + | let userCurrentLeased = $t01259412680._1 | |
389 | + | let userNextLeased = $t01259412680._2 | |
390 | 390 | let newUserNextLeased = (userNextLeased + userLeasingAmount) | |
391 | 391 | let fromUnlockedAmount = (userLeasingAmount - paymentAmount) | |
392 | 392 | let newToUnlock = max([0, (toUnlock - fromUnlockedAmount)]) | |
447 | 447 | ||
448 | 448 | @Callable(i) | |
449 | 449 | func getNodeDataREADONLY (nodeAddress) = { | |
450 | - | let $ | |
451 | - | let currentLease = $ | |
452 | - | let nextLeased = $ | |
450 | + | let $t01512315187 = getLeasingNodeData(nodeAddress) | |
451 | + | let currentLease = $t01512315187._1 | |
452 | + | let nextLeased = $t01512315187._2 | |
453 | 453 | $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height)) | |
454 | 454 | } | |
455 | 455 | ||
457 | 457 | ||
458 | 458 | @Callable(i) | |
459 | 459 | func getUserLeasingDataREADONLY (nodeAddress,userAddress) = { | |
460 | - | let $ | |
461 | - | let currentLease = $ | |
462 | - | let nextLeased = $ | |
460 | + | let $t01555715634 = getUserLeasingData(nodeAddress, userAddress) | |
461 | + | let currentLease = $t01555715634._1 | |
462 | + | let nextLeased = $t01555715634._2 | |
463 | 463 | $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height)) | |
464 | 464 | } | |
465 | 465 | ||
467 | 467 | ||
468 | 468 | @Callable(i) | |
469 | 469 | func getUserDataREADONLY (userAddress) = { | |
470 | - | let $ | |
471 | - | let toClaim = $ | |
472 | - | let toUnlock = $ | |
470 | + | let $t01599716057 = getUserToClaimBalance(userAddress) | |
471 | + | let toClaim = $t01599716057._1 | |
472 | + | let toUnlock = $t01599716057._2 | |
473 | 473 | let userTotalLocked = getUserTotalLocked(userAddress) | |
474 | 474 | $Tuple2(nil, $Tuple6(currentPeriodHeight, toClaim, nextPeriodHeight, toUnlock, userTotalLocked, height)) | |
475 | 475 | } | |
516 | 516 | @Callable(i) | |
517 | 517 | func claimAll () = { | |
518 | 518 | let userAddress = toString(i.caller) | |
519 | - | let $ | |
520 | - | let toClaim = $ | |
521 | - | let toUnlock = $ | |
519 | + | let $t01707117131 = getUserToClaimBalance(userAddress) | |
520 | + | let toClaim = $t01707117131._1 | |
521 | + | let toUnlock = $t01707117131._2 | |
522 | 522 | let checks = [if ((toClaim > 0)) | |
523 | 523 | then true | |
524 | 524 | else throwErr("nothing to claim")] |
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 | func throwErr (msg) = throw(((contractFile + ": ") + msg)) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | let keyAssetId = makeString(["%s", "assetId"], SEP) | |
12 | 12 | ||
13 | 13 | let keyForceStop = makeString(["%s", "forceStop"], 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 | let currentPeriodHeight = if ((periodOffsetHeight == -1)) | |
34 | 34 | then 0 | |
35 | 35 | else (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength)) | |
36 | 36 | ||
37 | 37 | let nextPeriodHeight = if ((periodOffsetHeight == -1)) | |
38 | 38 | then 0 | |
39 | 39 | else (currentPeriodHeight + periodLength) | |
40 | 40 | ||
41 | 41 | func keyLeasingNodeData (nodeAddress) = makeString(["%s", nodeAddress], SEP) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keyUserLeasingNodeData (userAddress,nodeAddress) = makeString(["%s%s", nodeAddress, userAddress], SEP) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keyUserToClaim (userAddress) = makeString(["%s%s", "toClaim", userAddress], SEP) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keyUserTotalLocked (userAddress) = makeString(["%s%s", "userTotalLocked", userAddress], SEP) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func keyNodeLeasingByHeight (nodeAddress) = { | |
54 | 54 | let h = if ((periodOffsetHeight == -1)) | |
55 | 55 | then 0 | |
56 | 56 | else height | |
57 | 57 | makeString(["%s%d", nodeAddress, toString(h)], SEP) | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keyUserLeasingByHeight (nodeAddress,userAddress) = { | |
62 | 62 | let h = if ((periodOffsetHeight == -1)) | |
63 | 63 | then 0 | |
64 | 64 | else height | |
65 | 65 | makeString(["%s%s%d", nodeAddress, userAddress, toString(h)], SEP) | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES") | |
70 | 70 | ||
71 | 71 | let assetIdBytes = if ((assetIdString == "WAVES")) | |
72 | 72 | then unit | |
73 | 73 | else fromBase58String(assetIdString) | |
74 | 74 | ||
75 | 75 | let isForceStop = valueOrElse(getBoolean(this, keyForceStop), false) | |
76 | 76 | ||
77 | 77 | func isValidAddress (address) = match addressFromString(address) { | |
78 | 78 | case a: Address => | |
79 | 79 | true | |
80 | 80 | case _ => | |
81 | 81 | false | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | let ADMIN_LIST_SIZE = 5 | |
86 | 86 | ||
87 | 87 | let QUORUM = 3 | |
88 | 88 | ||
89 | 89 | let TXID_BYTES_LENGTH = 32 | |
90 | 90 | ||
91 | 91 | func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyAllowedTxId () = makeString(["%s", "txId"], SEP) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getAdminVote (prefix,admin) = { | |
104 | 104 | let voteKey = keyFullAdminVote(prefix, admin) | |
105 | 105 | valueOrElse(getInteger(voteKey), 0) | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func getAdminsList () = match getString(this, keyAdminAddressList()) { | |
110 | 110 | case s: String => | |
111 | 111 | split(s, SEP) | |
112 | 112 | case _ => | |
113 | 113 | nil | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func isInAdminList (address) = containsElement(getAdminsList(), address) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func genVotesKeysHelper (a,adminAddress) = { | |
121 | 121 | let $t034483472 = a | |
122 | 122 | let result = $t034483472._1 | |
123 | 123 | let prefix = $t034483472._2 | |
124 | 124 | $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix) | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func genVotesKeys (keyPrefix) = { | |
129 | 129 | let adminList = keyAdminAddressList() | |
130 | 130 | let $t036193703 = { | |
131 | 131 | let $l = getAdminsList() | |
132 | 132 | let $s = size($l) | |
133 | 133 | let $acc0 = $Tuple2(nil, keyPrefix) | |
134 | 134 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
135 | 135 | then $a | |
136 | 136 | else genVotesKeysHelper($a, $l[$i]) | |
137 | 137 | ||
138 | 138 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
139 | 139 | then $a | |
140 | 140 | else throw("List size exceeds 5") | |
141 | 141 | ||
142 | 142 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
143 | 143 | } | |
144 | 144 | let result = $t036193703._1 | |
145 | 145 | let prefix = $t036193703._2 | |
146 | 146 | result | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0)) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func countVotes (prefix) = { | |
154 | 154 | let votes = genVotesKeys(prefix) | |
155 | 155 | let $l = votes | |
156 | 156 | let $s = size($l) | |
157 | 157 | let $acc0 = 0 | |
158 | 158 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
159 | 159 | then $a | |
160 | 160 | else countVotesHelper($a, $l[$i]) | |
161 | 161 | ||
162 | 162 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
163 | 163 | then $a | |
164 | 164 | else throw("List size exceeds 5") | |
165 | 165 | ||
166 | 166 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func clearVotesHelper (result,key) = (result :+ DeleteEntry(key)) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func getClearVoteEntries (prefix) = { | |
174 | 174 | let votes = genVotesKeys(prefix) | |
175 | 175 | let $l = votes | |
176 | 176 | let $s = size($l) | |
177 | 177 | let $acc0 = nil | |
178 | 178 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
179 | 179 | then $a | |
180 | 180 | else clearVotesHelper($a, $l[$i]) | |
181 | 181 | ||
182 | 182 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
183 | 183 | then $a | |
184 | 184 | else throw("List size exceeds 5") | |
185 | 185 | ||
186 | 186 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = { | |
191 | 191 | let voteKey = keyFullAdminVote(keyPrefix, callerAddressString) | |
192 | 192 | let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString) | |
193 | 193 | let err = if (!(isInAdminList(callerAddressString))) | |
194 | 194 | then throwErr((("Address: " + callerAddressString) + " not in Admin list")) | |
195 | 195 | else if ((adminCurrentVote == 1)) | |
196 | 196 | then throwErr((voteKey + " you already voted")) | |
197 | 197 | else unit | |
198 | 198 | if ((err == err)) | |
199 | 199 | then { | |
200 | 200 | let votes = countVotes(keyPrefix) | |
201 | 201 | if (((votes + 1) >= minVotes)) | |
202 | 202 | then { | |
203 | 203 | let clearVoteEntries = getClearVoteEntries(keyPrefix) | |
204 | 204 | (clearVoteEntries ++ voteResult) | |
205 | 205 | } | |
206 | 206 | else [IntegerEntry(voteKey, 1)] | |
207 | 207 | } | |
208 | 208 | else throw("Strict value is not equal to itself.") | |
209 | 209 | } | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func getLeasingNodeEntry (nodeAddress,currentLeased,nextLeased) = { | |
213 | 213 | let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(currentLeased), toString(nextPeriodHeight), toString(nextLeased)], SEP) | |
214 | 214 | StringEntry(keyLeasingNodeData(nodeAddress), valueString) | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func getLeasingNodeData (nodeAddress) = { | |
219 | 219 | let leasingNodeDataStringRaw = getString(this, keyLeasingNodeData(nodeAddress)) | |
220 | 220 | match leasingNodeDataStringRaw { | |
221 | 221 | case ds: String => | |
222 | 222 | let dataList = split(ds, SEP) | |
223 | 223 | let nodeCurrentPeriod = parseIntValue(dataList[1]) | |
224 | 224 | let nodeCurrentLeased = parseIntValue(dataList[2]) | |
225 | 225 | let nodeNextPeriod = parseIntValue(dataList[3]) | |
226 | 226 | let nodeNextLeased = parseIntValue(dataList[4]) | |
227 | 227 | if (if ((nodeNextPeriod > height)) | |
228 | 228 | then true | |
229 | - | else ( | |
229 | + | else (currentPeriodId == 0)) | |
230 | 230 | then $Tuple2(nodeCurrentLeased, nodeNextLeased) | |
231 | 231 | else $Tuple2(nodeNextLeased, nodeNextLeased) | |
232 | 232 | case _ => | |
233 | 233 | $Tuple2(0, 0) | |
234 | 234 | } | |
235 | 235 | } | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | func getUserLeasingEntry (nodeAddress,userAddress,userCurrentLeased,userNextLeased) = { | |
239 | 239 | let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(userCurrentLeased), toString(nextPeriodHeight), toString(userNextLeased)], SEP) | |
240 | 240 | StringEntry(keyUserLeasingNodeData(userAddress, nodeAddress), valueString) | |
241 | 241 | } | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | func getUserLeasingData (nodeAddress,userAddress) = { | |
245 | 245 | let leasingUserDataStringRaw = getString(this, keyUserLeasingNodeData(userAddress, nodeAddress)) | |
246 | 246 | match leasingUserDataStringRaw { | |
247 | 247 | case ds: String => | |
248 | 248 | let dataList = split(ds, SEP) | |
249 | 249 | let userCurrentPeriod = parseIntValue(dataList[1]) | |
250 | 250 | let userCurrentLeased = parseIntValue(dataList[2]) | |
251 | 251 | let userNextPeriod = parseIntValue(dataList[3]) | |
252 | 252 | let userNextLeased = parseIntValue(dataList[4]) | |
253 | 253 | if (if ((userNextPeriod > height)) | |
254 | 254 | then true | |
255 | - | else ( | |
255 | + | else (currentPeriodId == 0)) | |
256 | 256 | then $Tuple2(userCurrentLeased, userNextLeased) | |
257 | 257 | else $Tuple2(userNextLeased, userNextLeased) | |
258 | 258 | case _ => | |
259 | 259 | $Tuple2(0, 0) | |
260 | 260 | } | |
261 | 261 | } | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | func getUserToClaimEntry (userAddress,toClaim,toUnlock) = { | |
265 | 265 | let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(toClaim), toString(nextPeriodHeight), toString(toUnlock)], SEP) | |
266 | 266 | StringEntry(keyUserToClaim(userAddress), valueString) | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func getUserToClaimBalance (userAddress) = { | |
271 | 271 | let userToClaimDataStringRaw = getString(this, keyUserToClaim(userAddress)) | |
272 | 272 | match userToClaimDataStringRaw { | |
273 | 273 | case ds: String => | |
274 | 274 | let dataList = split(ds, SEP) | |
275 | 275 | let currentPeriod = parseIntValue(dataList[1]) | |
276 | 276 | let toClaim = parseIntValue(dataList[2]) | |
277 | 277 | let nextPeriod = parseIntValue(dataList[3]) | |
278 | 278 | let toUnlock = parseIntValue(dataList[4]) | |
279 | 279 | if (if ((nextPeriod > height)) | |
280 | 280 | then true | |
281 | - | else ( | |
281 | + | else (currentPeriodId == 0)) | |
282 | 282 | then $Tuple2(toClaim, toUnlock) | |
283 | 283 | else $Tuple2((toClaim + toUnlock), 0) | |
284 | 284 | case _ => | |
285 | 285 | $Tuple2(0, 0) | |
286 | 286 | } | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | func getUserTotalLockedEntry (userAddress,userTotalLocked) = IntegerEntry(keyUserTotalLocked(userAddress), userTotalLocked) | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | func getUserTotalLocked (userAddress) = valueOrElse(getInteger(this, keyUserTotalLocked(userAddress)), 0) | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = { | |
297 | - | let $ | |
298 | - | let nodeCurrentLeased = $ | |
299 | - | let nodeNextLeased = $ | |
300 | - | let $ | |
301 | - | let userCurrentLeased = $ | |
302 | - | let userNextLeased = $ | |
297 | + | let $t087358808 = getLeasingNodeData(nodeAddress) | |
298 | + | let nodeCurrentLeased = $t087358808._1 | |
299 | + | let nodeNextLeased = $t087358808._2 | |
300 | + | let $t088138899 = getUserLeasingData(nodeAddress, userAddress) | |
301 | + | let userCurrentLeased = $t088138899._1 | |
302 | + | let userNextLeased = $t088138899._2 | |
303 | 303 | let checks = [if (!(isForceStop)) | |
304 | 304 | then true | |
305 | 305 | else throwErr("contract is temporary stopped"), if ((unstakeAmount > 0)) | |
306 | 306 | then true | |
307 | 307 | else throwErr("unstake amount should be greater than 0"), if ((userNextLeased >= unstakeAmount)) | |
308 | 308 | then true | |
309 | 309 | else throwErr("unstake amount should be less or equal user staked amount"), if ((nodeNextLeased >= unstakeAmount)) | |
310 | 310 | then true | |
311 | 311 | else throwErr("unstake amount should be less or equal node staked amount"), if (isValidAddress(nodeAddress)) | |
312 | 312 | then true | |
313 | 313 | else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress)) | |
314 | 314 | then true | |
315 | 315 | else throwErr(makeString(["user address is not valid:", userAddress], " "))] | |
316 | 316 | if ((checks == checks)) | |
317 | 317 | then { | |
318 | 318 | let newNodeNextLease = (nodeNextLeased - unstakeAmount) | |
319 | 319 | let newUserNextLeased = (userNextLeased - unstakeAmount) | |
320 | - | let $ | |
321 | - | let toClaim = $ | |
322 | - | let toUnlock = $ | |
320 | + | let $t097129772 = getUserToClaimBalance(userAddress) | |
321 | + | let toClaim = $t097129772._1 | |
322 | + | let toUnlock = $t097129772._2 | |
323 | 323 | let newToUnlock = (toUnlock + unstakeAmount) | |
324 | 324 | let userTotalLocked = getUserTotalLocked(userAddress) | |
325 | 325 | let newUserTotalLocked = (userTotalLocked - unstakeAmount) | |
326 | 326 | [getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, toClaim, newToUnlock), getUserTotalLockedEntry(userAddress, newUserTotalLocked), IntegerEntry(keyNodeLeasingByHeight(nodeAddress), newNodeNextLease), IntegerEntry(keyUserLeasingByHeight(nodeAddress, userAddress), newUserNextLeased)] | |
327 | 327 | } | |
328 | 328 | else throw("Strict value is not equal to itself.") | |
329 | 329 | } | |
330 | 330 | ||
331 | 331 | ||
332 | 332 | func getClaimUnlockedActions (userAddress,claimAmount) = { | |
333 | - | let $ | |
334 | - | let toClaim = $ | |
335 | - | let toUnlock = $ | |
333 | + | let $t01050110561 = getUserToClaimBalance(userAddress) | |
334 | + | let toClaim = $t01050110561._1 | |
335 | + | let toUnlock = $t01050110561._2 | |
336 | 336 | let checks = [if (!(isForceStop)) | |
337 | 337 | then true | |
338 | 338 | else throwErr("contract is temporary stopped"), if ((claimAmount > 0)) | |
339 | 339 | then true | |
340 | 340 | else throwErr("claim amount should be greater than 0"), if ((toClaim >= claimAmount)) | |
341 | 341 | then true | |
342 | 342 | else throwErr("claim amount should be less or equal unlocked amount"), if (isValidAddress(userAddress)) | |
343 | 343 | then true | |
344 | 344 | else throwErr(makeString(["user address is not valid:", userAddress], " "))] | |
345 | 345 | if ((checks == checks)) | |
346 | 346 | then { | |
347 | 347 | let newToClaim = (toClaim - claimAmount) | |
348 | 348 | [getUserToClaimEntry(userAddress, newToClaim, toUnlock), ScriptTransfer(addressFromStringValue(userAddress), claimAmount, assetIdBytes)] | |
349 | 349 | } | |
350 | 350 | else throw("Strict value is not equal to itself.") | |
351 | 351 | } | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | func getStakeActions (nodeAddress,userAddress,userLeasingAmount,i) = { | |
355 | - | let $ | |
356 | - | let toClaim = $ | |
357 | - | let toUnlock = $ | |
355 | + | let $t01132211382 = getUserToClaimBalance(userAddress) | |
356 | + | let toClaim = $t01132211382._1 | |
357 | + | let toUnlock = $t01132211382._2 | |
358 | 358 | let paymentAmount = if ((size(i.payments) == 0)) | |
359 | 359 | then 0 | |
360 | 360 | else i.payments[0].amount | |
361 | 361 | let available = ((toUnlock + toClaim) + paymentAmount) | |
362 | 362 | let checks = [if (!(isForceStop)) | |
363 | 363 | then true | |
364 | 364 | else throwErr("contract is temporary stopped"), if ((1 >= size(i.payments))) | |
365 | 365 | then true | |
366 | 366 | else throwErr("maximum 1 payment"), if (if ((size(i.payments) == 0)) | |
367 | 367 | then true | |
368 | 368 | else (i.payments[0].assetId == assetIdBytes)) | |
369 | 369 | then true | |
370 | 370 | else throwErr(makeString(["payment assetId should be:", assetIdString], " ")), if ((userLeasingAmount > 0)) | |
371 | 371 | then true | |
372 | 372 | else throwErr("amount should be greater than 0"), if ((available >= userLeasingAmount)) | |
373 | 373 | then true | |
374 | 374 | else throwErr("amount should be less or equal (payment + available) amount"), if ((userLeasingAmount >= paymentAmount)) | |
375 | 375 | then true | |
376 | 376 | else throw("amount should be greater or equal payment amount"), if (isValidAddress(nodeAddress)) | |
377 | 377 | then true | |
378 | 378 | else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress)) | |
379 | 379 | then true | |
380 | 380 | else throwErr(makeString(["user address is not valid:", userAddress], " "))] | |
381 | 381 | if ((checks == checks)) | |
382 | 382 | then { | |
383 | - | let $ | |
384 | - | let nodeCurrentLeased = $ | |
385 | - | let nodeNextLeased = $ | |
383 | + | let $t01245312526 = getLeasingNodeData(nodeAddress) | |
384 | + | let nodeCurrentLeased = $t01245312526._1 | |
385 | + | let nodeNextLeased = $t01245312526._2 | |
386 | 386 | let newNodeNextLease = (nodeNextLeased + userLeasingAmount) | |
387 | - | let $ | |
388 | - | let userCurrentLeased = $ | |
389 | - | let userNextLeased = $ | |
387 | + | let $t01259412680 = getUserLeasingData(nodeAddress, userAddress) | |
388 | + | let userCurrentLeased = $t01259412680._1 | |
389 | + | let userNextLeased = $t01259412680._2 | |
390 | 390 | let newUserNextLeased = (userNextLeased + userLeasingAmount) | |
391 | 391 | let fromUnlockedAmount = (userLeasingAmount - paymentAmount) | |
392 | 392 | let newToUnlock = max([0, (toUnlock - fromUnlockedAmount)]) | |
393 | 393 | let newToClaim = min([toClaim, (toClaim + (toUnlock - fromUnlockedAmount))]) | |
394 | 394 | let userTotalLocked = getUserTotalLocked(userAddress) | |
395 | 395 | let newUserTotalLocked = (userTotalLocked + userLeasingAmount) | |
396 | 396 | [getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, newToClaim, newToUnlock), getUserTotalLockedEntry(userAddress, newUserTotalLocked), IntegerEntry(keyNodeLeasingByHeight(nodeAddress), newNodeNextLease), IntegerEntry(keyUserLeasingByHeight(nodeAddress, userAddress), newUserNextLeased)] | |
397 | 397 | } | |
398 | 398 | else throw("Strict value is not equal to itself.") | |
399 | 399 | } | |
400 | 400 | ||
401 | 401 | ||
402 | 402 | func getStakeFromPaymentActions (nodeAddress,userAddress,i) = { | |
403 | 403 | let checks = [if ((size(i.payments) == 1)) | |
404 | 404 | then true | |
405 | 405 | else throwErr("payment size should be exactly 1")] | |
406 | 406 | if ((checks == checks)) | |
407 | 407 | then getStakeActions(nodeAddress, userAddress, i.payments[0].amount, i) | |
408 | 408 | else throw("Strict value is not equal to itself.") | |
409 | 409 | } | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | func getSetNewPeriodLengthActions (newPeriodLength) = { | |
413 | 413 | let check = [if ((newPeriodLength > 0)) | |
414 | 414 | then true | |
415 | 415 | else throwErr("period length should be greater than 0")] | |
416 | 416 | if ((check == check)) | |
417 | 417 | then if ((periodOffsetHeight == -1)) | |
418 | 418 | then [IntegerEntry(keyPeriodLength, newPeriodLength), IntegerEntry(keyPeriodOffsetHeight, height)] | |
419 | 419 | else [IntegerEntry(keyPeriodOffsetId, (currentPeriodId + 1)), IntegerEntry(keyPeriodOffsetHeight, nextPeriodHeight), IntegerEntry(keyPeriodLength, newPeriodLength)] | |
420 | 420 | else throw("Strict value is not equal to itself.") | |
421 | 421 | } | |
422 | 422 | ||
423 | 423 | ||
424 | 424 | @Callable(i) | |
425 | 425 | func setNewPeriodLength (newPeriodLength) = { | |
426 | 426 | let checks = [if (isInAdminList(toString(i.caller))) | |
427 | 427 | then true | |
428 | 428 | else throwErr("caller is not in adminList")] | |
429 | 429 | if ((checks == checks)) | |
430 | 430 | then getSetNewPeriodLengthActions(newPeriodLength) | |
431 | 431 | else throw("Strict value is not equal to itself.") | |
432 | 432 | } | |
433 | 433 | ||
434 | 434 | ||
435 | 435 | ||
436 | 436 | @Callable(i) | |
437 | 437 | func setForceStopFlag (stop) = { | |
438 | 438 | let check = [if (isInAdminList(toString(i.caller))) | |
439 | 439 | then true | |
440 | 440 | else throwErr("caller is not in adminList")] | |
441 | 441 | if ((check == check)) | |
442 | 442 | then [BooleanEntry(keyForceStop, stop)] | |
443 | 443 | else throw("Strict value is not equal to itself.") | |
444 | 444 | } | |
445 | 445 | ||
446 | 446 | ||
447 | 447 | ||
448 | 448 | @Callable(i) | |
449 | 449 | func getNodeDataREADONLY (nodeAddress) = { | |
450 | - | let $ | |
451 | - | let currentLease = $ | |
452 | - | let nextLeased = $ | |
450 | + | let $t01512315187 = getLeasingNodeData(nodeAddress) | |
451 | + | let currentLease = $t01512315187._1 | |
452 | + | let nextLeased = $t01512315187._2 | |
453 | 453 | $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height)) | |
454 | 454 | } | |
455 | 455 | ||
456 | 456 | ||
457 | 457 | ||
458 | 458 | @Callable(i) | |
459 | 459 | func getUserLeasingDataREADONLY (nodeAddress,userAddress) = { | |
460 | - | let $ | |
461 | - | let currentLease = $ | |
462 | - | let nextLeased = $ | |
460 | + | let $t01555715634 = getUserLeasingData(nodeAddress, userAddress) | |
461 | + | let currentLease = $t01555715634._1 | |
462 | + | let nextLeased = $t01555715634._2 | |
463 | 463 | $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height)) | |
464 | 464 | } | |
465 | 465 | ||
466 | 466 | ||
467 | 467 | ||
468 | 468 | @Callable(i) | |
469 | 469 | func getUserDataREADONLY (userAddress) = { | |
470 | - | let $ | |
471 | - | let toClaim = $ | |
472 | - | let toUnlock = $ | |
470 | + | let $t01599716057 = getUserToClaimBalance(userAddress) | |
471 | + | let toClaim = $t01599716057._1 | |
472 | + | let toUnlock = $t01599716057._2 | |
473 | 473 | let userTotalLocked = getUserTotalLocked(userAddress) | |
474 | 474 | $Tuple2(nil, $Tuple6(currentPeriodHeight, toClaim, nextPeriodHeight, toUnlock, userTotalLocked, height)) | |
475 | 475 | } | |
476 | 476 | ||
477 | 477 | ||
478 | 478 | ||
479 | 479 | @Callable(i) | |
480 | 480 | func leaseByAddress (nodeAddress,userAddress) = getStakeFromPaymentActions(nodeAddress, userAddress, i) | |
481 | 481 | ||
482 | 482 | ||
483 | 483 | ||
484 | 484 | @Callable(i) | |
485 | 485 | func lease (nodeAddress) = { | |
486 | 486 | let userAddress = toString(i.caller) | |
487 | 487 | getStakeFromPaymentActions(nodeAddress, userAddress, i) | |
488 | 488 | } | |
489 | 489 | ||
490 | 490 | ||
491 | 491 | ||
492 | 492 | @Callable(i) | |
493 | 493 | func leaseFromLocked (nodeAddress,amount) = { | |
494 | 494 | let userAddress = toString(i.caller) | |
495 | 495 | getStakeActions(nodeAddress, userAddress, amount, i) | |
496 | 496 | } | |
497 | 497 | ||
498 | 498 | ||
499 | 499 | ||
500 | 500 | @Callable(i) | |
501 | 501 | func cancelLease (nodeAddress,amount) = { | |
502 | 502 | let userAddress = toString(i.caller) | |
503 | 503 | getUnstakeActions(nodeAddress, userAddress, amount) | |
504 | 504 | } | |
505 | 505 | ||
506 | 506 | ||
507 | 507 | ||
508 | 508 | @Callable(i) | |
509 | 509 | func claim (amount) = { | |
510 | 510 | let userAddress = toString(i.caller) | |
511 | 511 | getClaimUnlockedActions(userAddress, amount) | |
512 | 512 | } | |
513 | 513 | ||
514 | 514 | ||
515 | 515 | ||
516 | 516 | @Callable(i) | |
517 | 517 | func claimAll () = { | |
518 | 518 | let userAddress = toString(i.caller) | |
519 | - | let $ | |
520 | - | let toClaim = $ | |
521 | - | let toUnlock = $ | |
519 | + | let $t01707117131 = getUserToClaimBalance(userAddress) | |
520 | + | let toClaim = $t01707117131._1 | |
521 | + | let toUnlock = $t01707117131._2 | |
522 | 522 | let checks = [if ((toClaim > 0)) | |
523 | 523 | then true | |
524 | 524 | else throwErr("nothing to claim")] | |
525 | 525 | if ((checks == checks)) | |
526 | 526 | then getClaimUnlockedActions(userAddress, toClaim) | |
527 | 527 | else throw("Strict value is not equal to itself.") | |
528 | 528 | } | |
529 | 529 | ||
530 | 530 | ||
531 | 531 | ||
532 | 532 | @Callable(i) | |
533 | 533 | func voteForTxId (txId) = { | |
534 | 534 | let callerAddressString = toBase58String(i.caller.bytes) | |
535 | 535 | let keyPrefix = keyAllowedTxIdVotePrefix(txId) | |
536 | 536 | let result = [StringEntry(keyAllowedTxId(), txId)] | |
537 | 537 | let allowedTxIdOption = getString(this, keyAllowedTxId()) | |
538 | 538 | let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH)) | |
539 | 539 | then true | |
540 | 540 | else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit)) | |
541 | 541 | then true | |
542 | 542 | else (value(allowedTxIdOption) != txId)) | |
543 | 543 | then true | |
544 | 544 | else throwErr((txId + " is already allowed"))] | |
545 | 545 | if ((err == err)) | |
546 | 546 | then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result) | |
547 | 547 | else throw("Strict value is not equal to itself.") | |
548 | 548 | } | |
549 | 549 | ||
550 | 550 | ||
551 | 551 | @Verifier(tx) | |
552 | 552 | func verify () = { | |
553 | 553 | let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), ""))) | |
554 | 554 | let byOwner = if ((size(getAdminsList()) >= QUORUM)) | |
555 | 555 | then false | |
556 | 556 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
557 | 557 | if (byAdmins) | |
558 | 558 | then true | |
559 | 559 | else byOwner | |
560 | 560 | } | |
561 | 561 |
github/deemru/w8io/026f985 61.54 ms ◑