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