tx · 3dxeni6bLD49miRxpLaMicqPQbjBJV7gTgAQJn4xx97C 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1: -0.01200000 Waves 2024.01.10 13:42 [2925296] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves
{ "type": 13, "id": "3dxeni6bLD49miRxpLaMicqPQbjBJV7gTgAQJn4xx97C", "fee": 1200000, "feeAssetId": null, "timestamp": 1704883354356, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "2wz1mh623YKwWv4qB1WoZyYvjnnHzam2xcJWa95BvgvyfFKWZ89JnP4eNKYTgovF6uSihwbXk4GZX4KP96NvR4xq" ], "script": "base64:BgIbCAISBgoECAEBARIDCgEIEgMKAQgSABIDCgEIHQAMY29udHJhY3RGaWxlAhB2ZXN0aW5nX25lby5yaWRlAANTRVACAl9fAAhJRFNfTElTVAkAzAgCAAAJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQkAzAgCAAYJAMwIAgAHCQDMCAIACAkAzAgCAAkJAMwIAgAKCQDMCAIACwkAzAgCAAwJAMwIAgANCQDMCAIADgkAzAgCAA8JAMwIAgAQCQDMCAIAEQkAzAgCABIJAMwIAgATCQDMCAIAFAkAzAgCABUJAMwIAgAWCQDMCAIAFwkAzAgCABgJAMwIAgAZCQDMCAIAGgkAzAgCABsJAMwIAgAcCQDMCAIAHQUDbmlsABFNQVhfVkVTVElOR19DT1VOVAkAkAMBBQhJRFNfTElTVAEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAANYXNzZXRJZFN0cmluZwkBC3ZhbHVlT3J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QgBCAUBaQZjYWxsZXIECyR0MDk4MjU5ODkwCQESZ2V0Q2xhaW1BbGxBY3Rpb25zAQULdXNlckFkZHJlc3MEDGNsYWltQWN0aW9ucwgFCyR0MDk4MjU5ODkwAl8xBAt0b3RhbEFtb3VudAgFCyR0MDk4MjU5ODkwAl8yBA5oaXN0b3J5QWN0aW9ucwkAzAgCCQELU3RyaW5nRW50cnkCCQERa2V5VmVzdGluZ0hpc3RvcnkDAgdjbGFpbWVkBQt1c2VyQWRkcmVzcwkA2AQBCAUBaQ10cmFuc2FjdGlvbklkCQCkAwEFC3RvdGFsQW1vdW50BQNuaWwDCQBmAgULdG90YWxBbW91bnQAAAkAzggCBQxjbGFpbUFjdGlvbnMFDmhpc3RvcnlBY3Rpb25zCQEIdGhyb3dFcnIBAhBub3RoaW5nIHRvIGNsYWltAWkBEHVzZXJJbmZvUkVBRE9OTFkBC3VzZXJBZGRyZXNzBA0kdDAxMDIzMDEwMjg1CQESZ2V0Q2xhaW1BbGxBY3Rpb25zAQULdXNlckFkZHJlc3MEAl9hCAUNJHQwMTAyMzAxMDI4NQJfMQQLdG90YWxBbW91bnQIBQ0kdDAxMDIzMDEwMjg1Al8yBBFhY2N1bXVsYXRlZEFtb3VudAkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzCQESa2V5VXNlckFjY3VtdWxhdGVkAQULdXNlckFkZHJlc3MAAAkAlAoCBQNuaWwJAJUKAwULdG90YWxBbW91bnQFEWFjY3VtdWxhdGVkQW1vdW50CQESZ2V0VmVzdGluZ1VzZXJJbmZvAQULdXNlckFkZHJlc3MAeP7mCw==", "height": 2925296, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CkgHYNohvEGrMyFwELrdSCFm3db3aSTuNXcxBUaBPnVw Next: DZzX9CgaF2xRFZ6oAHDynpCyNcv8vpCYfUj1PBHCGtQ3 Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | then unit | |
21 | 21 | else fromBase58String(assetIdString) | |
22 | 22 | ||
23 | - | let keyAdminList = makeString(["%s", " | |
23 | + | let keyAdminList = makeString(["%s", "adminAddressList"], SEP) | |
24 | 24 | ||
25 | 25 | let keyBanList = makeString(["%s", "banList"], SEP) | |
26 | 26 | ||
113 | 113 | ||
114 | 114 | ||
115 | 115 | func getUserUnlockedAmount (userAddress,id) = { | |
116 | - | let $ | |
117 | - | let vestingAmount = $ | |
118 | - | let startBlock = $ | |
119 | - | let lockLength = $ | |
120 | - | let $ | |
121 | - | let unlockedAmount = $ | |
122 | - | let remainingAmount = $ | |
116 | + | let $t032183297 = parseUserVesting(userAddress, id) | |
117 | + | let vestingAmount = $t032183297._1 | |
118 | + | let startBlock = $t032183297._2 | |
119 | + | let lockLength = $t032183297._3 | |
120 | + | let $t033003397 = calcUnlockedAmount(vestingAmount, startBlock, lockLength) | |
121 | + | let unlockedAmount = $t033003397._1 | |
122 | + | let remainingAmount = $t033003397._2 | |
123 | 123 | $Tuple2(unlockedAmount, remainingAmount) | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getUpdateVestingActions (userAddress,id) = { | |
128 | - | let $ | |
129 | - | let vestingAmount = $ | |
130 | - | let startBlock = $ | |
131 | - | let lockLength = $ | |
132 | - | let $ | |
133 | - | let unlockedAmount = $ | |
134 | - | let remainingAmount = $ | |
128 | + | let $t035043583 = parseUserVesting(userAddress, id) | |
129 | + | let vestingAmount = $t035043583._1 | |
130 | + | let startBlock = $t035043583._2 | |
131 | + | let lockLength = $t035043583._3 | |
132 | + | let $t035863664 = getUserUnlockedAmount(userAddress, id) | |
133 | + | let unlockedAmount = $t035863664._1 | |
134 | + | let remainingAmount = $t035863664._2 | |
135 | 135 | let remainingBlocks = max([((startBlock + lockLength) - height), 0]) | |
136 | 136 | let updateVestingActions = if ((unlockedAmount != 0)) | |
137 | 137 | then if ((remainingBlocks != 0)) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getUserClaimActions (userAddress,id) = { | |
146 | - | let $ | |
147 | - | let updateVestingActions = $ | |
148 | - | let unlockedAmount = $ | |
146 | + | let $t041284213 = getUpdateVestingActions(userAddress, id) | |
147 | + | let updateVestingActions = $t041284213._1 | |
148 | + | let unlockedAmount = $t041284213._2 | |
149 | 149 | let transferActions = if ((unlockedAmount != 0)) | |
150 | 150 | then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)] | |
151 | 151 | else nil | |
155 | 155 | ||
156 | 156 | func getAllUserClaimActions (userAddress) = { | |
157 | 157 | func actionsHelper (acc,id) = { | |
158 | - | let $ | |
159 | - | let allVestingsClaimActions = $ | |
160 | - | let sum = $ | |
161 | - | let $ | |
162 | - | let vestingClaimActions = $ | |
163 | - | let claimAmount = $ | |
158 | + | let $t045874627 = acc | |
159 | + | let allVestingsClaimActions = $t045874627._1 | |
160 | + | let sum = $t045874627._2 | |
161 | + | let $t046324709 = getUserClaimActions(userAddress, id) | |
162 | + | let vestingClaimActions = $t046324709._1 | |
163 | + | let claimAmount = $t046324709._2 | |
164 | 164 | $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount)) | |
165 | 165 | } | |
166 | 166 | ||
181 | 181 | ||
182 | 182 | func getMoveAllUnlockedToAccumulatorActions (userAddress) = { | |
183 | 183 | func actionsHelper (acc,id) = { | |
184 | - | let $ | |
185 | - | let updateAllVestingsActions = $ | |
186 | - | let sum = $ | |
187 | - | let $ | |
188 | - | let updateVestingActions = $ | |
189 | - | let unlockedAmount = $ | |
184 | + | let $t050025043 = acc | |
185 | + | let updateAllVestingsActions = $t050025043._1 | |
186 | + | let sum = $t050025043._2 | |
187 | + | let $t050485133 = getUpdateVestingActions(userAddress, id) | |
188 | + | let updateVestingActions = $t050485133._1 | |
189 | + | let unlockedAmount = $t050485133._2 | |
190 | 190 | $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount)) | |
191 | 191 | } | |
192 | 192 | ||
193 | - | let $ | |
193 | + | let $t052195307 = { | |
194 | 194 | let $l = IDS_LIST | |
195 | 195 | let $s = size($l) | |
196 | 196 | let $acc0 = $Tuple2(nil, 0) | |
204 | 204 | ||
205 | 205 | $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($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) | |
206 | 206 | } | |
207 | - | let updateAllVestingsActions = $ | |
208 | - | let unlockedSum = $ | |
207 | + | let updateAllVestingsActions = $t052195307._1 | |
208 | + | let unlockedSum = $t052195307._2 | |
209 | 209 | let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0) | |
210 | 210 | let updateAccumulatedActions = if ((unlockedSum != 0)) | |
211 | 211 | then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))] | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func getClaimAllActions (userAddress) = { | |
226 | - | let $ | |
226 | + | let $t060756208 = if (!(containsElement(banList, userAddress))) | |
227 | 227 | then getAllUserClaimActions(userAddress) | |
228 | 228 | else $Tuple2(nil, 0) | |
229 | - | let claimActions = $ | |
230 | - | let unlockedAmount = $ | |
231 | - | let $ | |
232 | - | let claimAccumulatedActions = $ | |
233 | - | let accumulatedAmount = $ | |
229 | + | let claimActions = $t060756208._1 | |
230 | + | let unlockedAmount = $t060756208._2 | |
231 | + | let $t062116301 = getClaimAccumulatedActions(userAddress) | |
232 | + | let claimAccumulatedActions = $t062116301._1 | |
233 | + | let accumulatedAmount = $t062116301._2 | |
234 | 234 | let totalAmount = (unlockedAmount + accumulatedAmount) | |
235 | 235 | $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount) | |
236 | 236 | } | |
238 | 238 | ||
239 | 239 | func getVestingUserInfo (userAddress) = { | |
240 | 240 | func helper (acc,id) = { | |
241 | - | let $ | |
242 | - | let vestingAmount = $ | |
243 | - | let startBlock = $ | |
244 | - | let lockLength = $ | |
245 | - | let $ | |
246 | - | let unlockedAmount = $ | |
247 | - | let remainingAmount = $ | |
241 | + | let $t065156594 = parseUserVesting(userAddress, id) | |
242 | + | let vestingAmount = $t065156594._1 | |
243 | + | let startBlock = $t065156594._2 | |
244 | + | let lockLength = $t065156594._3 | |
245 | + | let $t065996677 = getUserUnlockedAmount(userAddress, id) | |
246 | + | let unlockedAmount = $t065996677._1 | |
247 | + | let remainingAmount = $t065996677._2 | |
248 | 248 | if (if ((vestingAmount == 0)) | |
249 | 249 | then true | |
250 | 250 | else containsElement(banList, userAddress)) | |
269 | 269 | ||
270 | 270 | func getAvailableVestingId (userAddress) = { | |
271 | 271 | func helper (availableId,id) = { | |
272 | - | let $ | |
273 | - | let vestingAmount = $ | |
274 | - | let startBlock = $ | |
275 | - | let lockLength = $ | |
272 | + | let $t070017080 = parseUserVesting(userAddress, id) | |
273 | + | let vestingAmount = $t070017080._1 | |
274 | + | let startBlock = $t070017080._2 | |
275 | + | let lockLength = $t070017080._3 | |
276 | 276 | if ((vestingAmount > 0)) | |
277 | 277 | then availableId | |
278 | 278 | else if ((availableId == -1)) | |
338 | 338 | else throwErr(makeString(["user already in a ban list:", userAddress], " "))] | |
339 | 339 | if ((checks == checks)) | |
340 | 340 | then { | |
341 | - | let $ | |
342 | - | let moveToAccumulatedActions = $ | |
343 | - | let _a = $ | |
341 | + | let $t088878975 = getMoveAllUnlockedToAccumulatorActions(userAddress) | |
342 | + | let moveToAccumulatedActions = $t088878975._1 | |
343 | + | let _a = $t088878975._2 | |
344 | 344 | let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))] | |
345 | 345 | (moveToAccumulatedActions ++ addToBanListActions) | |
346 | 346 | } | |
378 | 378 | @Callable(i) | |
379 | 379 | func claimAll () = { | |
380 | 380 | let userAddress = toString(i.caller) | |
381 | - | let $ | |
382 | - | let claimActions = $ | |
383 | - | let totalAmount = $ | |
381 | + | let $t098259890 = getClaimAllActions(userAddress) | |
382 | + | let claimActions = $t098259890._1 | |
383 | + | let totalAmount = $t098259890._2 | |
384 | 384 | let historyActions = [StringEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), toString(totalAmount))] | |
385 | 385 | if ((totalAmount > 0)) | |
386 | 386 | then (claimActions ++ historyActions) | |
391 | 391 | ||
392 | 392 | @Callable(i) | |
393 | 393 | func userInfoREADONLY (userAddress) = { | |
394 | - | let $ | |
395 | - | let _a = $ | |
396 | - | let totalAmount = $ | |
394 | + | let $t01023010285 = getClaimAllActions(userAddress) | |
395 | + | let _a = $t01023010285._1 | |
396 | + | let totalAmount = $t01023010285._2 | |
397 | 397 | let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0) | |
398 | 398 | $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress))) | |
399 | 399 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let contractFile = "vesting_neo.ride" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | let IDS_LIST = [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] | |
9 | 9 | ||
10 | 10 | let MAX_VESTING_COUNT = size(IDS_LIST) | |
11 | 11 | ||
12 | 12 | func throwErr (msg) = throw(((contractFile + ": ") + msg)) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | let keyAssetId = makeString(["%s", "assetId"], SEP) | |
16 | 16 | ||
17 | 17 | let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES") | |
18 | 18 | ||
19 | 19 | let assetIdBytes = if ((assetIdString == "WAVES")) | |
20 | 20 | then unit | |
21 | 21 | else fromBase58String(assetIdString) | |
22 | 22 | ||
23 | - | let keyAdminList = makeString(["%s", " | |
23 | + | let keyAdminList = makeString(["%s", "adminAddressList"], SEP) | |
24 | 24 | ||
25 | 25 | let keyBanList = makeString(["%s", "banList"], SEP) | |
26 | 26 | ||
27 | 27 | let adminList = match getString(this, keyAdminList) { | |
28 | 28 | case s: String => | |
29 | 29 | split(s, SEP) | |
30 | 30 | case _ => | |
31 | 31 | nil | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | let banList = match getString(this, keyBanList) { | |
35 | 35 | case s: String => | |
36 | 36 | if ((s == "")) | |
37 | 37 | then nil | |
38 | 38 | else split_51C(s, SEP) | |
39 | 39 | case _ => | |
40 | 40 | nil | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | func isValidAddressString (addressString) = match addressFromString(addressString) { | |
44 | 44 | case a: Address => | |
45 | 45 | true | |
46 | 46 | case _ => | |
47 | 47 | false | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyUserVesting (userAddress,id) = { | |
52 | 52 | let checks = [if (isValidAddressString(userAddress)) | |
53 | 53 | then true | |
54 | 54 | else throwErr(makeString(["address is not valid:", userAddress], " ")), if (if ((id >= 0)) | |
55 | 55 | then (MAX_VESTING_COUNT > id) | |
56 | 56 | else false) | |
57 | 57 | then true | |
58 | 58 | else throwErr(makeString(["id should be less than", toString(MAX_VESTING_COUNT), "got:", toString(id)], " "))] | |
59 | 59 | if ((checks == checks)) | |
60 | 60 | then makeString(["%s%s%d", "vesting", userAddress, toString(id)], SEP) | |
61 | 61 | else throw("Strict value is not equal to itself.") | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func keyUserAccumulated (userAddress) = { | |
66 | 66 | let checks = [if (isValidAddressString(userAddress)) | |
67 | 67 | then true | |
68 | 68 | else throwErr(makeString(["address is not valid:", userAddress], " "))] | |
69 | 69 | if ((checks == checks)) | |
70 | 70 | then makeString(["%s%s", "accumulated", userAddress], SEP) | |
71 | 71 | else throw("Strict value is not equal to itself.") | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func formatUserVesting (vestingAmount,startBlock,lockLength) = { | |
76 | 76 | let checks = [if ((vestingAmount >= 0)) | |
77 | 77 | then true | |
78 | 78 | else throwErr("vesting amount cannot be negative"), if ((startBlock >= 0)) | |
79 | 79 | then true | |
80 | 80 | else throwErr("start block cannot be negative"), if ((lockLength >= 0)) | |
81 | 81 | then true | |
82 | 82 | else throwErr("lock length cannot be negative")] | |
83 | 83 | if ((checks == checks)) | |
84 | 84 | then makeString(["%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP) | |
85 | 85 | else throw("Strict value is not equal to itself.") | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func parseUserVesting (userAddress,id) = match getString(this, keyUserVesting(userAddress, id)) { | |
90 | 90 | case rawString: String => | |
91 | 91 | let splitString = split(rawString, SEP) | |
92 | 92 | let vestingAmount = parseIntValue(splitString[1]) | |
93 | 93 | let startBlock = parseIntValue(splitString[2]) | |
94 | 94 | let lockLength = parseIntValue(splitString[3]) | |
95 | 95 | $Tuple3(vestingAmount, startBlock, lockLength) | |
96 | 96 | case _ => | |
97 | 97 | $Tuple3(0, 0, 0) | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyVestingHistory (action,userAddress,txId) = makeString(["%s%s%s%s", "history", userAddress, action, txId], SEP) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func calcUnlockedAmount (amount,startBlock,lockLength) = { | |
105 | 105 | let elapsedBlocks = (height - startBlock) | |
106 | 106 | let unlockedAmount = if (if ((lockLength != 0)) | |
107 | 107 | then (elapsedBlocks > 0) | |
108 | 108 | else false) | |
109 | 109 | then min([fraction(amount, elapsedBlocks, lockLength), amount]) | |
110 | 110 | else 0 | |
111 | 111 | $Tuple2(unlockedAmount, (amount - unlockedAmount)) | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func getUserUnlockedAmount (userAddress,id) = { | |
116 | - | let $ | |
117 | - | let vestingAmount = $ | |
118 | - | let startBlock = $ | |
119 | - | let lockLength = $ | |
120 | - | let $ | |
121 | - | let unlockedAmount = $ | |
122 | - | let remainingAmount = $ | |
116 | + | let $t032183297 = parseUserVesting(userAddress, id) | |
117 | + | let vestingAmount = $t032183297._1 | |
118 | + | let startBlock = $t032183297._2 | |
119 | + | let lockLength = $t032183297._3 | |
120 | + | let $t033003397 = calcUnlockedAmount(vestingAmount, startBlock, lockLength) | |
121 | + | let unlockedAmount = $t033003397._1 | |
122 | + | let remainingAmount = $t033003397._2 | |
123 | 123 | $Tuple2(unlockedAmount, remainingAmount) | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getUpdateVestingActions (userAddress,id) = { | |
128 | - | let $ | |
129 | - | let vestingAmount = $ | |
130 | - | let startBlock = $ | |
131 | - | let lockLength = $ | |
132 | - | let $ | |
133 | - | let unlockedAmount = $ | |
134 | - | let remainingAmount = $ | |
128 | + | let $t035043583 = parseUserVesting(userAddress, id) | |
129 | + | let vestingAmount = $t035043583._1 | |
130 | + | let startBlock = $t035043583._2 | |
131 | + | let lockLength = $t035043583._3 | |
132 | + | let $t035863664 = getUserUnlockedAmount(userAddress, id) | |
133 | + | let unlockedAmount = $t035863664._1 | |
134 | + | let remainingAmount = $t035863664._2 | |
135 | 135 | let remainingBlocks = max([((startBlock + lockLength) - height), 0]) | |
136 | 136 | let updateVestingActions = if ((unlockedAmount != 0)) | |
137 | 137 | then if ((remainingBlocks != 0)) | |
138 | 138 | then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))] | |
139 | 139 | else [DeleteEntry(keyUserVesting(userAddress, id))] | |
140 | 140 | else nil | |
141 | 141 | $Tuple2(updateVestingActions, unlockedAmount) | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getUserClaimActions (userAddress,id) = { | |
146 | - | let $ | |
147 | - | let updateVestingActions = $ | |
148 | - | let unlockedAmount = $ | |
146 | + | let $t041284213 = getUpdateVestingActions(userAddress, id) | |
147 | + | let updateVestingActions = $t041284213._1 | |
148 | + | let unlockedAmount = $t041284213._2 | |
149 | 149 | let transferActions = if ((unlockedAmount != 0)) | |
150 | 150 | then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)] | |
151 | 151 | else nil | |
152 | 152 | $Tuple2((updateVestingActions ++ transferActions), unlockedAmount) | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func getAllUserClaimActions (userAddress) = { | |
157 | 157 | func actionsHelper (acc,id) = { | |
158 | - | let $ | |
159 | - | let allVestingsClaimActions = $ | |
160 | - | let sum = $ | |
161 | - | let $ | |
162 | - | let vestingClaimActions = $ | |
163 | - | let claimAmount = $ | |
158 | + | let $t045874627 = acc | |
159 | + | let allVestingsClaimActions = $t045874627._1 | |
160 | + | let sum = $t045874627._2 | |
161 | + | let $t046324709 = getUserClaimActions(userAddress, id) | |
162 | + | let vestingClaimActions = $t046324709._1 | |
163 | + | let claimAmount = $t046324709._2 | |
164 | 164 | $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount)) | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | let $l = IDS_LIST | |
168 | 168 | let $s = size($l) | |
169 | 169 | let $acc0 = $Tuple2(nil, 0) | |
170 | 170 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
171 | 171 | then $a | |
172 | 172 | else actionsHelper($a, $l[$i]) | |
173 | 173 | ||
174 | 174 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
175 | 175 | then $a | |
176 | 176 | else throw("List size exceeds 30") | |
177 | 177 | ||
178 | 178 | $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($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) | |
179 | 179 | } | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func getMoveAllUnlockedToAccumulatorActions (userAddress) = { | |
183 | 183 | func actionsHelper (acc,id) = { | |
184 | - | let $ | |
185 | - | let updateAllVestingsActions = $ | |
186 | - | let sum = $ | |
187 | - | let $ | |
188 | - | let updateVestingActions = $ | |
189 | - | let unlockedAmount = $ | |
184 | + | let $t050025043 = acc | |
185 | + | let updateAllVestingsActions = $t050025043._1 | |
186 | + | let sum = $t050025043._2 | |
187 | + | let $t050485133 = getUpdateVestingActions(userAddress, id) | |
188 | + | let updateVestingActions = $t050485133._1 | |
189 | + | let unlockedAmount = $t050485133._2 | |
190 | 190 | $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount)) | |
191 | 191 | } | |
192 | 192 | ||
193 | - | let $ | |
193 | + | let $t052195307 = { | |
194 | 194 | let $l = IDS_LIST | |
195 | 195 | let $s = size($l) | |
196 | 196 | let $acc0 = $Tuple2(nil, 0) | |
197 | 197 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
198 | 198 | then $a | |
199 | 199 | else actionsHelper($a, $l[$i]) | |
200 | 200 | ||
201 | 201 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
202 | 202 | then $a | |
203 | 203 | else throw("List size exceeds 30") | |
204 | 204 | ||
205 | 205 | $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($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) | |
206 | 206 | } | |
207 | - | let updateAllVestingsActions = $ | |
208 | - | let unlockedSum = $ | |
207 | + | let updateAllVestingsActions = $t052195307._1 | |
208 | + | let unlockedSum = $t052195307._2 | |
209 | 209 | let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0) | |
210 | 210 | let updateAccumulatedActions = if ((unlockedSum != 0)) | |
211 | 211 | then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))] | |
212 | 212 | else nil | |
213 | 213 | $Tuple2((updateAllVestingsActions ++ updateAccumulatedActions), unlockedSum) | |
214 | 214 | } | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func getClaimAccumulatedActions (userAddress) = { | |
218 | 218 | let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0) | |
219 | 219 | if ((oldAccumulated != 0)) | |
220 | 220 | then $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), oldAccumulated, assetIdBytes), DeleteEntry(keyUserAccumulated(userAddress))], oldAccumulated) | |
221 | 221 | else $Tuple2(nil, 0) | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func getClaimAllActions (userAddress) = { | |
226 | - | let $ | |
226 | + | let $t060756208 = if (!(containsElement(banList, userAddress))) | |
227 | 227 | then getAllUserClaimActions(userAddress) | |
228 | 228 | else $Tuple2(nil, 0) | |
229 | - | let claimActions = $ | |
230 | - | let unlockedAmount = $ | |
231 | - | let $ | |
232 | - | let claimAccumulatedActions = $ | |
233 | - | let accumulatedAmount = $ | |
229 | + | let claimActions = $t060756208._1 | |
230 | + | let unlockedAmount = $t060756208._2 | |
231 | + | let $t062116301 = getClaimAccumulatedActions(userAddress) | |
232 | + | let claimAccumulatedActions = $t062116301._1 | |
233 | + | let accumulatedAmount = $t062116301._2 | |
234 | 234 | let totalAmount = (unlockedAmount + accumulatedAmount) | |
235 | 235 | $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount) | |
236 | 236 | } | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | func getVestingUserInfo (userAddress) = { | |
240 | 240 | func helper (acc,id) = { | |
241 | - | let $ | |
242 | - | let vestingAmount = $ | |
243 | - | let startBlock = $ | |
244 | - | let lockLength = $ | |
245 | - | let $ | |
246 | - | let unlockedAmount = $ | |
247 | - | let remainingAmount = $ | |
241 | + | let $t065156594 = parseUserVesting(userAddress, id) | |
242 | + | let vestingAmount = $t065156594._1 | |
243 | + | let startBlock = $t065156594._2 | |
244 | + | let lockLength = $t065156594._3 | |
245 | + | let $t065996677 = getUserUnlockedAmount(userAddress, id) | |
246 | + | let unlockedAmount = $t065996677._1 | |
247 | + | let remainingAmount = $t065996677._2 | |
248 | 248 | if (if ((vestingAmount == 0)) | |
249 | 249 | then true | |
250 | 250 | else containsElement(banList, userAddress)) | |
251 | 251 | then acc | |
252 | 252 | else (acc :+ [vestingAmount, (startBlock + lockLength), unlockedAmount, remainingAmount]) | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | let $l = IDS_LIST | |
256 | 256 | let $s = size($l) | |
257 | 257 | let $acc0 = nil | |
258 | 258 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
259 | 259 | then $a | |
260 | 260 | else helper($a, $l[$i]) | |
261 | 261 | ||
262 | 262 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
263 | 263 | then $a | |
264 | 264 | else throw("List size exceeds 30") | |
265 | 265 | ||
266 | 266 | $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($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) | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func getAvailableVestingId (userAddress) = { | |
271 | 271 | func helper (availableId,id) = { | |
272 | - | let $ | |
273 | - | let vestingAmount = $ | |
274 | - | let startBlock = $ | |
275 | - | let lockLength = $ | |
272 | + | let $t070017080 = parseUserVesting(userAddress, id) | |
273 | + | let vestingAmount = $t070017080._1 | |
274 | + | let startBlock = $t070017080._2 | |
275 | + | let lockLength = $t070017080._3 | |
276 | 276 | if ((vestingAmount > 0)) | |
277 | 277 | then availableId | |
278 | 278 | else if ((availableId == -1)) | |
279 | 279 | then id | |
280 | 280 | else min([availableId, id]) | |
281 | 281 | } | |
282 | 282 | ||
283 | 283 | let availableId = { | |
284 | 284 | let $l = IDS_LIST | |
285 | 285 | let $s = size($l) | |
286 | 286 | let $acc0 = -1 | |
287 | 287 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
288 | 288 | then $a | |
289 | 289 | else helper($a, $l[$i]) | |
290 | 290 | ||
291 | 291 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
292 | 292 | then $a | |
293 | 293 | else throw("List size exceeds 30") | |
294 | 294 | ||
295 | 295 | $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($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) | |
296 | 296 | } | |
297 | 297 | if ((availableId == -1)) | |
298 | 298 | then throwErr(makeString(["user exceeded max active vesting count: ", userAddress], " ")) | |
299 | 299 | else availableId | |
300 | 300 | } | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))] | |
304 | 304 | ||
305 | 305 | ||
306 | 306 | @Callable(i) | |
307 | 307 | func vestingForUser (userAddress,vestingAmount,startBlock,lockLength) = { | |
308 | 308 | let check = [if ((size(i.payments) == 1)) | |
309 | 309 | then true | |
310 | 310 | else throwErr("should be with exactly 1 payment"), if ((i.payments[0].assetId == assetIdBytes)) | |
311 | 311 | then true | |
312 | 312 | else throwErr(makeString(["payment assetId should be: ", assetIdString], " ")), if ((i.payments[0].amount == vestingAmount)) | |
313 | 313 | then true | |
314 | 314 | else throwErr("payment amount should be equal to vestingAmount"), if (if ((adminList == nil)) | |
315 | 315 | then true | |
316 | 316 | else containsElement(adminList, toString(i.caller))) | |
317 | 317 | then true | |
318 | 318 | else throwErr("you must be admin")] | |
319 | 319 | if ((check == check)) | |
320 | 320 | then { | |
321 | 321 | let id = getAvailableVestingId(userAddress) | |
322 | 322 | let historyActions = [StringEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), makeString([toString(vestingAmount), toString(startBlock), toString(lockLength), toString(id)], SEP))] | |
323 | 323 | (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions) | |
324 | 324 | } | |
325 | 325 | else throw("Strict value is not equal to itself.") | |
326 | 326 | } | |
327 | 327 | ||
328 | 328 | ||
329 | 329 | ||
330 | 330 | @Callable(i) | |
331 | 331 | func ban (userAddress) = { | |
332 | 332 | let checks = [if (if ((adminList == nil)) | |
333 | 333 | then true | |
334 | 334 | else containsElement(adminList, toString(i.caller))) | |
335 | 335 | then true | |
336 | 336 | else throwErr("you must be admin"), if (!(containsElement(banList, userAddress))) | |
337 | 337 | then true | |
338 | 338 | else throwErr(makeString(["user already in a ban list:", userAddress], " "))] | |
339 | 339 | if ((checks == checks)) | |
340 | 340 | then { | |
341 | - | let $ | |
342 | - | let moveToAccumulatedActions = $ | |
343 | - | let _a = $ | |
341 | + | let $t088878975 = getMoveAllUnlockedToAccumulatorActions(userAddress) | |
342 | + | let moveToAccumulatedActions = $t088878975._1 | |
343 | + | let _a = $t088878975._2 | |
344 | 344 | let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))] | |
345 | 345 | (moveToAccumulatedActions ++ addToBanListActions) | |
346 | 346 | } | |
347 | 347 | else throw("Strict value is not equal to itself.") | |
348 | 348 | } | |
349 | 349 | ||
350 | 350 | ||
351 | 351 | ||
352 | 352 | @Callable(i) | |
353 | 353 | func unban (userAddress) = { | |
354 | 354 | let checks = [if (if ((adminList == nil)) | |
355 | 355 | then true | |
356 | 356 | else containsElement(adminList, toString(i.caller))) | |
357 | 357 | then true | |
358 | 358 | else throwErr("you must be admin"), if (containsElement(banList, userAddress)) | |
359 | 359 | then true | |
360 | 360 | else throwErr(makeString(["user not in a ban list:", userAddress], " "))] | |
361 | 361 | if ((checks == checks)) | |
362 | 362 | then { | |
363 | 363 | let newBanList = match indexOf(banList, userAddress) { | |
364 | 364 | case ind: Int => | |
365 | 365 | removeByIndex(banList, ind) | |
366 | 366 | case _ => | |
367 | 367 | throwErr("user address index in ban list is not found") | |
368 | 368 | } | |
369 | 369 | if ((newBanList == nil)) | |
370 | 370 | then [DeleteEntry(keyBanList)] | |
371 | 371 | else [StringEntry(keyBanList, makeString_11C(newBanList, "__"))] | |
372 | 372 | } | |
373 | 373 | else throw("Strict value is not equal to itself.") | |
374 | 374 | } | |
375 | 375 | ||
376 | 376 | ||
377 | 377 | ||
378 | 378 | @Callable(i) | |
379 | 379 | func claimAll () = { | |
380 | 380 | let userAddress = toString(i.caller) | |
381 | - | let $ | |
382 | - | let claimActions = $ | |
383 | - | let totalAmount = $ | |
381 | + | let $t098259890 = getClaimAllActions(userAddress) | |
382 | + | let claimActions = $t098259890._1 | |
383 | + | let totalAmount = $t098259890._2 | |
384 | 384 | let historyActions = [StringEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), toString(totalAmount))] | |
385 | 385 | if ((totalAmount > 0)) | |
386 | 386 | then (claimActions ++ historyActions) | |
387 | 387 | else throwErr("nothing to claim") | |
388 | 388 | } | |
389 | 389 | ||
390 | 390 | ||
391 | 391 | ||
392 | 392 | @Callable(i) | |
393 | 393 | func userInfoREADONLY (userAddress) = { | |
394 | - | let $ | |
395 | - | let _a = $ | |
396 | - | let totalAmount = $ | |
394 | + | let $t01023010285 = getClaimAllActions(userAddress) | |
395 | + | let _a = $t01023010285._1 | |
396 | + | let totalAmount = $t01023010285._2 | |
397 | 397 | let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0) | |
398 | 398 | $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress))) | |
399 | 399 | } | |
400 | 400 | ||
401 | 401 |
github/deemru/w8io/169f3d6 66.29 ms ◑