tx · 9aragTtCWGYsryKUKA59HJUjQhce68XyNSEapChTyZ6H 3N4yYqBkTUq1mDdHhvAd3St7spCbm84DytS: -0.02200000 Waves 2023.11.29 11:17 [2864443] smart account 3N4yYqBkTUq1mDdHhvAd3St7spCbm84DytS > SELF 0.00000000 Waves
{ "type": 13, "id": "9aragTtCWGYsryKUKA59HJUjQhce68XyNSEapChTyZ6H", "fee": 2200000, "feeAssetId": null, "timestamp": 1701245948027, "version": 1, "sender": "3N4yYqBkTUq1mDdHhvAd3St7spCbm84DytS", "senderPublicKey": "8h7G4haeVwXKNHXNHsWkC1miUp5CQtk3WmpBKazQPxRh", "proofs": [ "2VnJJE38cJXXv3e3AUk1oH3eK1xYPQs6iMLdfFC4JYvw1xCRuQZw8v9YERhfaX3pWGMvog43cWYhe63BNj5hSnN7" ], "script": "base64:BgI0CAISAwoBARIDCgEBEgASAwoBCBIDCgEBEgMKAQgSAwoBCBIECgIYERIDCgEIEgASAwoBCD0ADGNvbnRyYWN0RmlsZQIRbDJtcF9zdGFraW5nLnJpZGUAA1NFUAICX18ABnNjYWxlOACAwtcvAAdzY2FsZTE4AICAkLu61q3wDQANc2NhbGUxOEJpZ0ludAkAtgIBBQdzY2FsZTE4ABJBRERSRVNTX0JZVEVTX1NJWkUAGgANQkxPQ0tTX0lOX0RBWQCgCwEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAATa2V5RW1pc3Npb25QZXJCbG9jawkAuQkCCQDMCAICAiVzCQDMCAICEGVtaXNzaW9uUGVyQmxvY2sFA25pbAUDU0VQABlrZXlFbWlzc2lvblBlcmlvZEluQmxvY2tzCQC5CQIJAMwIAgICJXMJAMwIAgIWZW1pc3Npb25QZXJpb2RJbkJsb2NrcwUDbmlsBQNTRVAADWtleVN0YXJ0QmxvY2sJALkJAgkAzAgCA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Q1nZXRBZG1pbnNMaXN0AAUGUVVPUlVNBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQMFCGJ5QWRtaW5zBgUHYnlPd25lcuu3Az4=", "chainId": 84, "height": 2864443, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Bw7iWr352KqXzxkVJu15gda5Pzw74Kiv2tqrnDpWNhbw Next: PgAt8ZTB54Va2DyYPDnsX3TuK8ZfCa1xgqVCcgVRfhp Diff:
Old | New | Differences | |
---|---|---|---|
237 | 237 | func getUserStakingNodesData (userAddress) = { | |
238 | 238 | let nodesRaw = valueOrElse(getString(this, keyUserStakingNodes(userAddress)), "") | |
239 | 239 | let sharesRaw = valueOrElse(getString(this, keyUserStakingNodesShares(userAddress)), "") | |
240 | - | let nodesList = split(nodesRaw, SEP) | |
241 | - | let sharesStringList = split(sharesRaw, SEP) | |
242 | - | let sharesList = if ((sharesStringList == [""])) | |
240 | + | let nodesList = if ((nodesRaw == "")) | |
243 | 241 | then nil | |
244 | - | else { | |
245 | - | let $l = sharesStringList | |
246 | - | let $s = size($l) | |
247 | - | let $acc0 = nil | |
248 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
249 | - | then $a | |
250 | - | else stringListToIntListHelper($a, $l[$i]) | |
242 | + | else split(nodesRaw, SEP) | |
243 | + | let sharesStringList = if ((sharesRaw == "")) | |
244 | + | then nil | |
245 | + | else split(sharesRaw, SEP) | |
246 | + | let sharesList = { | |
247 | + | let $l = sharesStringList | |
248 | + | let $s = size($l) | |
249 | + | let $acc0 = nil | |
250 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
251 | + | then $a | |
252 | + | else stringListToIntListHelper($a, $l[$i]) | |
251 | 253 | ||
252 | - | ||
253 | - | ||
254 | - | ||
254 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
255 | + | then $a | |
256 | + | else throw("List size exceeds 20") | |
255 | 257 | ||
256 | - | ||
257 | - | ||
258 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
259 | + | } | |
258 | 260 | $Tuple2(nodesList, sharesList) | |
259 | 261 | } | |
260 | 262 | ||
445 | 447 | if ((check == check)) | |
446 | 448 | then { | |
447 | 449 | func getAirdropStateChanges (accum,assetAmount) = { | |
448 | - | let $ | |
449 | - | let result = $ | |
450 | - | let index = $ | |
451 | - | let totalLp = $ | |
450 | + | let $t01422714263 = accum | |
451 | + | let result = $t01422714263._1 | |
452 | + | let index = $t01422714263._2 | |
453 | + | let totalLp = $t01422714263._3 | |
452 | 454 | let addedLpAmount = calcLpFromAsset(assetAmount) | |
453 | 455 | let userLockedLpKey = keyUserLockedLpAmount(addressList[index]) | |
454 | 456 | let oldLpAmount = valueOrElse(getInteger(this, userLockedLpKey), 0) | |
455 | 457 | $Tuple3((result :+ IntegerEntry(userLockedLpKey, (oldLpAmount + addedLpAmount))), (index + 1), (totalLp + addedLpAmount)) | |
456 | 458 | } | |
457 | 459 | ||
458 | - | let $ | |
460 | + | let $t01459414703 = { | |
459 | 461 | let $l = amountList | |
460 | 462 | let $s = size($l) | |
461 | 463 | let $acc0 = $Tuple3(nil, 0, 0) | |
469 | 471 | ||
470 | 472 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90) | |
471 | 473 | } | |
472 | - | let airdropEntries = $ | |
473 | - | let _a = $ | |
474 | - | let addedTotalLockedLpAmount = $ | |
474 | + | let airdropEntries = $t01459414703._1 | |
475 | + | let _a = $t01459414703._2 | |
476 | + | let addedTotalLockedLpAmount = $t01459414703._3 | |
475 | 477 | ([IntegerEntry(keyTotalLockedLpAmount, (totalLockedLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalLpAmount, (totalLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalAssetAmount, (totalAssetAmount + amountListSum))] ++ airdropEntries) | |
476 | 478 | } | |
477 | 479 | else throw("Strict value is not equal to itself.") | |
487 | 489 | let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress) | |
488 | 490 | let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0) | |
489 | 491 | let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0) | |
490 | - | let $ | |
491 | - | let userStakingNodesList = $ | |
492 | - | let userStakingNodeSharesList = $ | |
492 | + | let $t01589115983 = getUserStakingNodesData(userAddress) | |
493 | + | let userStakingNodesList = $t01589115983._1 | |
494 | + | let userStakingNodeSharesList = $t01589115983._2 | |
493 | 495 | $Tuple2(nil, $Tuple9(userLpAmount, userAvailableAssetToWithdraw, getCurrentPrice(), userTotalStakedAmount, userTotalAssetWithdrawn, userLockedLpAmount, userLockedAssetAmount, userStakingNodesList, userStakingNodeSharesList)) | |
494 | 496 | } | |
495 | 497 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let contractFile = "l2mp_staking.ride" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | let scale8 = 100000000 | |
9 | 9 | ||
10 | 10 | let scale18 = 1000000000000000000 | |
11 | 11 | ||
12 | 12 | let scale18BigInt = toBigInt(scale18) | |
13 | 13 | ||
14 | 14 | let ADDRESS_BYTES_SIZE = 26 | |
15 | 15 | ||
16 | 16 | let BLOCKS_IN_DAY = 1440 | |
17 | 17 | ||
18 | 18 | func throwErr (msg) = throw(((contractFile + ": ") + msg)) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | let keyAssetId = makeString(["%s", "assetId"], SEP) | |
22 | 22 | ||
23 | 23 | let keyEmissionPerBlock = makeString(["%s", "emissionPerBlock"], SEP) | |
24 | 24 | ||
25 | 25 | let keyEmissionPeriodInBlocks = makeString(["%s", "emissionPeriodInBlocks"], SEP) | |
26 | 26 | ||
27 | 27 | let keyStartBlock = makeString(["%s", "startBlock"], SEP) | |
28 | 28 | ||
29 | 29 | let keyTotalLpAmount = makeString(["%s", "totalLpAmount"], SEP) | |
30 | 30 | ||
31 | 31 | let keyTotalAssetAmount = makeString(["%s", "totalAssetAmount"], SEP) | |
32 | 32 | ||
33 | 33 | let keyTotalLockedLpAmount = makeString(["%s", "totalLockedLpAmount"], SEP) | |
34 | 34 | ||
35 | 35 | func keyUserLpAmount (userAddress) = makeString(["%s%s", "userLpAmount", userAddress], SEP) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func keyUserLockedLpAmount (userAddress) = makeString(["%s%s", "userLockedLpAmount", userAddress], SEP) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func keyUserStakingNodes (userAddress) = makeString(["%s%s", "userStakingNodes", userAddress], SEP) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keyUserStakingNodesShares (userAddress) = makeString(["%s%s", "userStakingNodesShares", userAddress], SEP) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keyUserTotalAssetWithdrawn (userAddress) = makeString(["%s%s", "totalAssetWithdrawn", userAddress], SEP) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keyUserTotalAssetStaked (userAddress) = makeString(["%s%s", "totalAssetStaked", userAddress], SEP) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func keyHistory (type,userAddress,txId) = makeString(["%s%s%s", type, userAddress, toBase58String(txId)], SEP) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func formatHistory (totalProfit,price,totalAssetAmount,totalLpAmount) = makeString(["%d%d%d%d", toString(totalProfit), toString(price), toString(totalAssetAmount), toString(totalLpAmount)], SEP) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | let totalLpAmount = valueOrElse(getInteger(this, keyTotalLpAmount), 0) | |
60 | 60 | ||
61 | 61 | let totalAssetAmount = valueOrElse(getInteger(this, keyTotalAssetAmount), 0) | |
62 | 62 | ||
63 | 63 | let totalLockedLpAmount = valueOrElse(getInteger(this, keyTotalLockedLpAmount), 0) | |
64 | 64 | ||
65 | 65 | let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES") | |
66 | 66 | ||
67 | 67 | let assetIdBytes = if ((assetIdString == "WAVES")) | |
68 | 68 | then unit | |
69 | 69 | else fromBase58String(assetIdString) | |
70 | 70 | ||
71 | 71 | let emissionPeriodInBlocks = valueOrElse(getInteger(this, keyEmissionPeriodInBlocks), BLOCKS_IN_DAY) | |
72 | 72 | ||
73 | 73 | let emissionPerPeriod = (valueOrElse(getInteger(this, keyEmissionPerBlock), 0) * emissionPeriodInBlocks) | |
74 | 74 | ||
75 | 75 | let ADMIN_LIST_SIZE = 5 | |
76 | 76 | ||
77 | 77 | let QUORUM = 3 | |
78 | 78 | ||
79 | 79 | let TXID_BYTES_LENGTH = 32 | |
80 | 80 | ||
81 | 81 | func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyAllowedTxId () = makeString(["%s", "txId"], SEP) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getAdminVote (prefix,admin) = { | |
94 | 94 | let voteKey = keyFullAdminVote(prefix, admin) | |
95 | 95 | valueOrElse(getInteger(voteKey), 0) | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getAdminsList () = match getString(this, keyAdminAddressList()) { | |
100 | 100 | case s: String => | |
101 | 101 | split(s, SEP) | |
102 | 102 | case _ => | |
103 | 103 | nil | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func isInAdminList (address) = containsElement(getAdminsList(), address) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func genVotesKeysHelper (a,adminAddress) = { | |
111 | 111 | let $t035553579 = a | |
112 | 112 | let result = $t035553579._1 | |
113 | 113 | let prefix = $t035553579._2 | |
114 | 114 | $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix) | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func genVotesKeys (keyPrefix) = { | |
119 | 119 | let adminList = keyAdminAddressList() | |
120 | 120 | let $t037263810 = { | |
121 | 121 | let $l = getAdminsList() | |
122 | 122 | let $s = size($l) | |
123 | 123 | let $acc0 = $Tuple2(nil, keyPrefix) | |
124 | 124 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
125 | 125 | then $a | |
126 | 126 | else genVotesKeysHelper($a, $l[$i]) | |
127 | 127 | ||
128 | 128 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
129 | 129 | then $a | |
130 | 130 | else throw("List size exceeds 5") | |
131 | 131 | ||
132 | 132 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
133 | 133 | } | |
134 | 134 | let result = $t037263810._1 | |
135 | 135 | let prefix = $t037263810._2 | |
136 | 136 | result | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0)) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func countVotes (prefix) = { | |
144 | 144 | let votes = genVotesKeys(prefix) | |
145 | 145 | let $l = votes | |
146 | 146 | let $s = size($l) | |
147 | 147 | let $acc0 = 0 | |
148 | 148 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
149 | 149 | then $a | |
150 | 150 | else countVotesHelper($a, $l[$i]) | |
151 | 151 | ||
152 | 152 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
153 | 153 | then $a | |
154 | 154 | else throw("List size exceeds 5") | |
155 | 155 | ||
156 | 156 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func clearVotesHelper (result,key) = (result :+ DeleteEntry(key)) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func getClearVoteEntries (prefix) = { | |
164 | 164 | let votes = genVotesKeys(prefix) | |
165 | 165 | let $l = votes | |
166 | 166 | let $s = size($l) | |
167 | 167 | let $acc0 = nil | |
168 | 168 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
169 | 169 | then $a | |
170 | 170 | else clearVotesHelper($a, $l[$i]) | |
171 | 171 | ||
172 | 172 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
173 | 173 | then $a | |
174 | 174 | else throw("List size exceeds 5") | |
175 | 175 | ||
176 | 176 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = { | |
181 | 181 | let voteKey = keyFullAdminVote(keyPrefix, callerAddressString) | |
182 | 182 | let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString) | |
183 | 183 | let err = if (!(isInAdminList(callerAddressString))) | |
184 | 184 | then throwErr((("Address: " + callerAddressString) + " not in Admin list")) | |
185 | 185 | else if ((adminCurrentVote == 1)) | |
186 | 186 | then throwErr((voteKey + " you already voted")) | |
187 | 187 | else unit | |
188 | 188 | if ((err == err)) | |
189 | 189 | then { | |
190 | 190 | let votes = countVotes(keyPrefix) | |
191 | 191 | if (((votes + 1) >= minVotes)) | |
192 | 192 | then { | |
193 | 193 | let clearVoteEntries = getClearVoteEntries(keyPrefix) | |
194 | 194 | (clearVoteEntries ++ voteResult) | |
195 | 195 | } | |
196 | 196 | else [IntegerEntry(voteKey, 1)] | |
197 | 197 | } | |
198 | 198 | else throw("Strict value is not equal to itself.") | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func stringListToIntListHelper (acc,value) = (acc :+ parseIntValue(value)) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func calcTotalProfitForHeight (h) = { | |
206 | 206 | let startBlock = valueOrElse(getInteger(this, keyStartBlock), height) | |
207 | 207 | let startPeriod = fraction(startBlock, 1, emissionPeriodInBlocks) | |
208 | 208 | let elapsedPeriods = ((h / emissionPeriodInBlocks) - startPeriod) | |
209 | 209 | max([0, (emissionPerPeriod * elapsedPeriods)]) | |
210 | 210 | } | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func calcTotalProfit () = calcTotalProfitForHeight(height) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func getTotalAssetAmountWithProfitOrMaxAvailable () = { | |
217 | 217 | let totalAssetAmountWithProfit = (totalAssetAmount + calcTotalProfit()) | |
218 | 218 | let totalAmount = match assetIdBytes { | |
219 | 219 | case u: Unit => | |
220 | 220 | min([totalAssetAmountWithProfit, wavesBalance(this).available]) | |
221 | 221 | case b: ByteVector => | |
222 | 222 | min([totalAssetAmountWithProfit, assetBalance(this, b)]) | |
223 | 223 | case _ => | |
224 | 224 | throw("Match error") | |
225 | 225 | } | |
226 | 226 | if ((totalLpAmount == 0)) | |
227 | 227 | then 0 | |
228 | 228 | else totalAmount | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func getCurrentPrice () = if ((totalLpAmount != 0)) | |
233 | 233 | then fraction(toBigInt(getTotalAssetAmountWithProfitOrMaxAvailable()), scale18BigInt, toBigInt(totalLpAmount)) | |
234 | 234 | else scale18BigInt | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func getUserStakingNodesData (userAddress) = { | |
238 | 238 | let nodesRaw = valueOrElse(getString(this, keyUserStakingNodes(userAddress)), "") | |
239 | 239 | let sharesRaw = valueOrElse(getString(this, keyUserStakingNodesShares(userAddress)), "") | |
240 | - | let nodesList = split(nodesRaw, SEP) | |
241 | - | let sharesStringList = split(sharesRaw, SEP) | |
242 | - | let sharesList = if ((sharesStringList == [""])) | |
240 | + | let nodesList = if ((nodesRaw == "")) | |
243 | 241 | then nil | |
244 | - | else { | |
245 | - | let $l = sharesStringList | |
246 | - | let $s = size($l) | |
247 | - | let $acc0 = nil | |
248 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
249 | - | then $a | |
250 | - | else stringListToIntListHelper($a, $l[$i]) | |
242 | + | else split(nodesRaw, SEP) | |
243 | + | let sharesStringList = if ((sharesRaw == "")) | |
244 | + | then nil | |
245 | + | else split(sharesRaw, SEP) | |
246 | + | let sharesList = { | |
247 | + | let $l = sharesStringList | |
248 | + | let $s = size($l) | |
249 | + | let $acc0 = nil | |
250 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
251 | + | then $a | |
252 | + | else stringListToIntListHelper($a, $l[$i]) | |
251 | 253 | ||
252 | - | ||
253 | - | ||
254 | - | ||
254 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
255 | + | then $a | |
256 | + | else throw("List size exceeds 20") | |
255 | 257 | ||
256 | - | ||
257 | - | ||
258 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
259 | + | } | |
258 | 260 | $Tuple2(nodesList, sharesList) | |
259 | 261 | } | |
260 | 262 | ||
261 | 263 | ||
262 | 264 | func calcAssetFromLp (lpAmount) = max([0, toInt(fraction(toBigInt(lpAmount), getCurrentPrice(), scale18BigInt))]) | |
263 | 265 | ||
264 | 266 | ||
265 | 267 | func calcLpFromAsset (assetAmount) = max([0, toInt(fraction(toBigInt(assetAmount), scale18BigInt, getCurrentPrice()))]) | |
266 | 268 | ||
267 | 269 | ||
268 | 270 | func getUserLpAmount (userAddress) = valueOrElse(getInteger(this, keyUserLpAmount(userAddress)), 0) | |
269 | 271 | ||
270 | 272 | ||
271 | 273 | func getUserLockedLpAmount (userAddress) = valueOrElse(getInteger(this, keyUserLockedLpAmount(userAddress)), 0) | |
272 | 274 | ||
273 | 275 | ||
274 | 276 | func getUserAvailableAssetsToWithdraw (userAddress) = { | |
275 | 277 | let userLpAmount = getUserLpAmount(userAddress) | |
276 | 278 | calcAssetFromLp(userLpAmount) | |
277 | 279 | } | |
278 | 280 | ||
279 | 281 | ||
280 | 282 | func getStakeActions (i,userAddress) = { | |
281 | 283 | let checks = [if ((size(i.payments) == 1)) | |
282 | 284 | then true | |
283 | 285 | else throwErr("should include 1 payment"), if ((i.payments[0].assetId == assetIdBytes)) | |
284 | 286 | then true | |
285 | 287 | else throwErr(("payment should be in " + assetIdString)), if ((i.payments[0].amount > 0)) | |
286 | 288 | then true | |
287 | 289 | else "payment amount should be greater than 0", if ((size(fromBase58String(userAddress)) == ADDRESS_BYTES_SIZE)) | |
288 | 290 | then true | |
289 | 291 | else throwErr("user address is not valid")] | |
290 | 292 | if ((checks == checks)) | |
291 | 293 | then { | |
292 | 294 | let paymentAmount = i.payments[0].amount | |
293 | 295 | let paymentLpAmount = toInt(fraction(toBigInt(paymentAmount), scale18BigInt, getCurrentPrice())) | |
294 | 296 | let userLpAmount = getUserLpAmount(userAddress) | |
295 | 297 | let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0) | |
296 | 298 | let newTotalLpAmount = (totalLpAmount + paymentLpAmount) | |
297 | 299 | let newTotalAssetAmount = toInt(fraction(toBigInt(newTotalLpAmount), getCurrentPrice(), scale18BigInt)) | |
298 | 300 | let newUserLpAmount = (userLpAmount + paymentLpAmount) | |
299 | 301 | let newUserTotalStakedAmount = (userTotalStakedAmount + paymentAmount) | |
300 | 302 | [StringEntry(keyHistory("stake", userAddress, i.transactionId), formatHistory(calcTotalProfit(), getCurrentPrice(), totalLpAmount, totalAssetAmount)), IntegerEntry(keyTotalLpAmount, newTotalLpAmount), IntegerEntry(keyTotalAssetAmount, newTotalAssetAmount), IntegerEntry(keyUserLpAmount(userAddress), newUserLpAmount), IntegerEntry(keyUserTotalAssetStaked(userAddress), newUserTotalStakedAmount), IntegerEntry(keyStartBlock, height)] | |
301 | 303 | } | |
302 | 304 | else throw("Strict value is not equal to itself.") | |
303 | 305 | } | |
304 | 306 | ||
305 | 307 | ||
306 | 308 | func getWithdrawActions (i,lpAssetWithdrawAmount) = { | |
307 | 309 | let userAddress = toString(i.caller) | |
308 | 310 | let userLpAmount = getUserLpAmount(userAddress) | |
309 | 311 | let check = [if ((lpAssetWithdrawAmount > 0)) | |
310 | 312 | then true | |
311 | 313 | else throwErr("LP amount should be more than 0"), if ((userLpAmount >= lpAssetWithdrawAmount)) | |
312 | 314 | then true | |
313 | 315 | else throwErr((("cannot withdraw more than available LP (" + toString(userLpAmount)) + ")"))] | |
314 | 316 | if ((check == check)) | |
315 | 317 | then { | |
316 | 318 | let newUserLpAmount = (userLpAmount - lpAssetWithdrawAmount) | |
317 | 319 | let withdrawAssetAmount = toInt(fraction(toBigInt(lpAssetWithdrawAmount), getCurrentPrice(), scale18BigInt)) | |
318 | 320 | let newTotalLpAmount = (totalLpAmount - lpAssetWithdrawAmount) | |
319 | 321 | let newTotalAssetAmount = toInt(fraction(toBigInt(newTotalLpAmount), getCurrentPrice(), scale18BigInt)) | |
320 | 322 | let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0) | |
321 | 323 | let newUserTotalAssetWithdrawn = (userTotalAssetWithdrawn + withdrawAssetAmount) | |
322 | 324 | [StringEntry(keyHistory("withdraw", userAddress, i.transactionId), formatHistory(calcTotalProfit(), getCurrentPrice(), totalLpAmount, totalAssetAmount)), IntegerEntry(keyTotalLpAmount, newTotalLpAmount), IntegerEntry(keyTotalAssetAmount, newTotalAssetAmount), IntegerEntry(keyUserLpAmount(userAddress), newUserLpAmount), IntegerEntry(keyUserTotalAssetWithdrawn(userAddress), newUserTotalAssetWithdrawn), IntegerEntry(keyStartBlock, height), ScriptTransfer(i.caller, withdrawAssetAmount, assetIdBytes)] | |
323 | 325 | } | |
324 | 326 | else throw("Strict value is not equal to itself.") | |
325 | 327 | } | |
326 | 328 | ||
327 | 329 | ||
328 | 330 | func getSetStakingNodeActions (userAddress,nodeAddress,nodeShare) = { | |
329 | 331 | let check = [if ((size(fromBase58String(userAddress)) == ADDRESS_BYTES_SIZE)) | |
330 | 332 | then true | |
331 | 333 | else throwErr("user address is not valid"), if ((size(fromBase58String(nodeAddress)) == ADDRESS_BYTES_SIZE)) | |
332 | 334 | then true | |
333 | 335 | else throwErr("node address is not valid")] | |
334 | 336 | if ((check == check)) | |
335 | 337 | then [StringEntry(keyUserStakingNodes(userAddress), nodeAddress), StringEntry(keyUserStakingNodesShares(userAddress), toString(nodeShare))] | |
336 | 338 | else throw("Strict value is not equal to itself.") | |
337 | 339 | } | |
338 | 340 | ||
339 | 341 | ||
340 | 342 | @Callable(i) | |
341 | 343 | func setEmissionPerBlock (emissionPerBlock) = { | |
342 | 344 | let check = [if ((i.caller == this)) | |
343 | 345 | then true | |
344 | 346 | else throwErr("permission denied")] | |
345 | 347 | if ((check == check)) | |
346 | 348 | then [IntegerEntry(keyTotalAssetAmount, getTotalAssetAmountWithProfitOrMaxAvailable()), IntegerEntry(keyStartBlock, height), IntegerEntry(keyEmissionPerBlock, max([0, emissionPerBlock]))] | |
347 | 349 | else throw("Strict value is not equal to itself.") | |
348 | 350 | } | |
349 | 351 | ||
350 | 352 | ||
351 | 353 | ||
352 | 354 | @Callable(i) | |
353 | 355 | func setEmissionPeriodInBlocks (p) = { | |
354 | 356 | let check = [if ((p > 0)) | |
355 | 357 | then true | |
356 | 358 | else throwErr("emission period should be greater than 0"), if ((i.caller == this)) | |
357 | 359 | then true | |
358 | 360 | else throwErr("permission denied")] | |
359 | 361 | if ((check == check)) | |
360 | 362 | then [IntegerEntry(keyTotalAssetAmount, getTotalAssetAmountWithProfitOrMaxAvailable()), IntegerEntry(keyStartBlock, height), IntegerEntry(keyEmissionPeriodInBlocks, p)] | |
361 | 363 | else throw("Strict value is not equal to itself.") | |
362 | 364 | } | |
363 | 365 | ||
364 | 366 | ||
365 | 367 | ||
366 | 368 | @Callable(i) | |
367 | 369 | func stake () = { | |
368 | 370 | let userAddress = toString(i.caller) | |
369 | 371 | getStakeActions(i, userAddress) | |
370 | 372 | } | |
371 | 373 | ||
372 | 374 | ||
373 | 375 | ||
374 | 376 | @Callable(i) | |
375 | 377 | func stakeFor (userAddress) = getStakeActions(i, userAddress) | |
376 | 378 | ||
377 | 379 | ||
378 | 380 | ||
379 | 381 | @Callable(i) | |
380 | 382 | func withdraw (withdrawAssetAmount) = { | |
381 | 383 | let userAddress = toString(i.caller) | |
382 | 384 | let userLpAmount = getUserLpAmount(userAddress) | |
383 | 385 | let lpAmountToWithdraw = toInt(fraction(toBigInt(withdrawAssetAmount), scale18BigInt, getCurrentPrice())) | |
384 | 386 | let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress) | |
385 | 387 | let minWithdrawAssetAmount = toInt(fraction(getCurrentPrice(), toBigInt(1), scale18BigInt, CEILING)) | |
386 | 388 | let check = [if ((withdrawAssetAmount > 0)) | |
387 | 389 | then true | |
388 | 390 | else throwErr("withdraw amount should be more than 0"), if ((userAvailableAssetToWithdraw >= withdrawAssetAmount)) | |
389 | 391 | then true | |
390 | 392 | else throwErr((("cannot withdraw more than available (" + toString(userAvailableAssetToWithdraw)) + ")")), if ((withdrawAssetAmount >= minWithdrawAssetAmount)) | |
391 | 393 | then true | |
392 | 394 | else throwErr((("withdraw amount is too small. Min: (" + toString(minWithdrawAssetAmount)) + ")"))] | |
393 | 395 | if ((check == check)) | |
394 | 396 | then getWithdrawActions(i, min([userLpAmount, (lpAmountToWithdraw + 1)])) | |
395 | 397 | else throw("Strict value is not equal to itself.") | |
396 | 398 | } | |
397 | 399 | ||
398 | 400 | ||
399 | 401 | ||
400 | 402 | @Callable(i) | |
401 | 403 | func setStakingNode (nodeAddress) = { | |
402 | 404 | let userAddress = toString(i.caller) | |
403 | 405 | getSetStakingNodeActions(userAddress, nodeAddress, 100) | |
404 | 406 | } | |
405 | 407 | ||
406 | 408 | ||
407 | 409 | ||
408 | 410 | @Callable(i) | |
409 | 411 | func stakeAndSetStakingNode (nodeAddress) = { | |
410 | 412 | let userAddress = toString(i.caller) | |
411 | 413 | (getStakeActions(i, userAddress) ++ getSetStakingNodeActions(userAddress, nodeAddress, 100)) | |
412 | 414 | } | |
413 | 415 | ||
414 | 416 | ||
415 | 417 | ||
416 | 418 | @Callable(i) | |
417 | 419 | func airdrop (addressList,amountList) = { | |
418 | 420 | func sum (accum,next) = (accum + next) | |
419 | 421 | ||
420 | 422 | let amountListSum = { | |
421 | 423 | let $l = amountList | |
422 | 424 | let $s = size($l) | |
423 | 425 | let $acc0 = 0 | |
424 | 426 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
425 | 427 | then $a | |
426 | 428 | else sum($a, $l[$i]) | |
427 | 429 | ||
428 | 430 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
429 | 431 | then $a | |
430 | 432 | else throw("List size exceeds 90") | |
431 | 433 | ||
432 | 434 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90) | |
433 | 435 | } | |
434 | 436 | let check = [if ((size(i.payments) == 1)) | |
435 | 437 | then true | |
436 | 438 | else throwErr("should include 1 payment"), if ((i.payments[0].assetId == assetIdBytes)) | |
437 | 439 | then true | |
438 | 440 | else throwErr(("payment should be in " + assetIdString)), if ((i.payments[0].amount > 0)) | |
439 | 441 | then true | |
440 | 442 | else "payment amount should be greater than 0", if ((size(addressList) == size(amountList))) | |
441 | 443 | then true | |
442 | 444 | else throwErr("addressList should be same size as amountList"), if ((i.payments[0].amount >= amountListSum)) | |
443 | 445 | then true | |
444 | 446 | else throwErr("payment amount is less than sum of amountList")] | |
445 | 447 | if ((check == check)) | |
446 | 448 | then { | |
447 | 449 | func getAirdropStateChanges (accum,assetAmount) = { | |
448 | - | let $ | |
449 | - | let result = $ | |
450 | - | let index = $ | |
451 | - | let totalLp = $ | |
450 | + | let $t01422714263 = accum | |
451 | + | let result = $t01422714263._1 | |
452 | + | let index = $t01422714263._2 | |
453 | + | let totalLp = $t01422714263._3 | |
452 | 454 | let addedLpAmount = calcLpFromAsset(assetAmount) | |
453 | 455 | let userLockedLpKey = keyUserLockedLpAmount(addressList[index]) | |
454 | 456 | let oldLpAmount = valueOrElse(getInteger(this, userLockedLpKey), 0) | |
455 | 457 | $Tuple3((result :+ IntegerEntry(userLockedLpKey, (oldLpAmount + addedLpAmount))), (index + 1), (totalLp + addedLpAmount)) | |
456 | 458 | } | |
457 | 459 | ||
458 | - | let $ | |
460 | + | let $t01459414703 = { | |
459 | 461 | let $l = amountList | |
460 | 462 | let $s = size($l) | |
461 | 463 | let $acc0 = $Tuple3(nil, 0, 0) | |
462 | 464 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
463 | 465 | then $a | |
464 | 466 | else getAirdropStateChanges($a, $l[$i]) | |
465 | 467 | ||
466 | 468 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
467 | 469 | then $a | |
468 | 470 | else throw("List size exceeds 90") | |
469 | 471 | ||
470 | 472 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90) | |
471 | 473 | } | |
472 | - | let airdropEntries = $ | |
473 | - | let _a = $ | |
474 | - | let addedTotalLockedLpAmount = $ | |
474 | + | let airdropEntries = $t01459414703._1 | |
475 | + | let _a = $t01459414703._2 | |
476 | + | let addedTotalLockedLpAmount = $t01459414703._3 | |
475 | 477 | ([IntegerEntry(keyTotalLockedLpAmount, (totalLockedLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalLpAmount, (totalLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalAssetAmount, (totalAssetAmount + amountListSum))] ++ airdropEntries) | |
476 | 478 | } | |
477 | 479 | else throw("Strict value is not equal to itself.") | |
478 | 480 | } | |
479 | 481 | ||
480 | 482 | ||
481 | 483 | ||
482 | 484 | @Callable(i) | |
483 | 485 | func getUserAssetsREADONLY (userAddress) = { | |
484 | 486 | let userLpAmount = getUserLpAmount(userAddress) | |
485 | 487 | let userLockedLpAmount = getUserLockedLpAmount(userAddress) | |
486 | 488 | let userLockedAssetAmount = calcAssetFromLp(userLockedLpAmount) | |
487 | 489 | let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress) | |
488 | 490 | let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0) | |
489 | 491 | let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0) | |
490 | - | let $ | |
491 | - | let userStakingNodesList = $ | |
492 | - | let userStakingNodeSharesList = $ | |
492 | + | let $t01589115983 = getUserStakingNodesData(userAddress) | |
493 | + | let userStakingNodesList = $t01589115983._1 | |
494 | + | let userStakingNodeSharesList = $t01589115983._2 | |
493 | 495 | $Tuple2(nil, $Tuple9(userLpAmount, userAvailableAssetToWithdraw, getCurrentPrice(), userTotalStakedAmount, userTotalAssetWithdrawn, userLockedLpAmount, userLockedAssetAmount, userStakingNodesList, userStakingNodeSharesList)) | |
494 | 496 | } | |
495 | 497 | ||
496 | 498 | ||
497 | 499 | ||
498 | 500 | @Callable(i) | |
499 | 501 | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple5(totalLpAmount, getTotalAssetAmountWithProfitOrMaxAvailable(), getCurrentPrice(), totalLockedLpAmount, calcAssetFromLp(totalLockedLpAmount))) | |
500 | 502 | ||
501 | 503 | ||
502 | 504 | ||
503 | 505 | @Callable(i) | |
504 | 506 | func voteForTxId (txId) = { | |
505 | 507 | let callerAddressString = toBase58String(i.caller.bytes) | |
506 | 508 | let keyPrefix = keyAllowedTxIdVotePrefix(txId) | |
507 | 509 | let result = [StringEntry(keyAllowedTxId(), txId)] | |
508 | 510 | let allowedTxIdOption = getString(this, keyAllowedTxId()) | |
509 | 511 | let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH)) | |
510 | 512 | then true | |
511 | 513 | else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit)) | |
512 | 514 | then true | |
513 | 515 | else (value(allowedTxIdOption) != txId)) | |
514 | 516 | then true | |
515 | 517 | else throwErr((txId + " is already allowed"))] | |
516 | 518 | if ((err == err)) | |
517 | 519 | then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result) | |
518 | 520 | else throw("Strict value is not equal to itself.") | |
519 | 521 | } | |
520 | 522 | ||
521 | 523 | ||
522 | 524 | @Verifier(tx) | |
523 | 525 | func verify () = { | |
524 | 526 | let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), ""))) | |
525 | 527 | let byOwner = if ((size(getAdminsList()) >= QUORUM)) | |
526 | 528 | then false | |
527 | 529 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
528 | 530 | if (byAdmins) | |
529 | 531 | then true | |
530 | 532 | else byOwner | |
531 | 533 | } | |
532 | 534 |
github/deemru/w8io/169f3d6 83.27 ms ◑