tx · 7jn4StSpD6Dd28GGEMTFie6XYkEahk3rr7iUr8wsaB7c

3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1:  -0.01100000 Waves

2024.01.09 15:53 [2923972] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves

{ "type": 13, "id": "7jn4StSpD6Dd28GGEMTFie6XYkEahk3rr7iUr8wsaB7c", "fee": 1100000, "feeAssetId": null, "timestamp": 1704804870240, "version": 1, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "2Mh7GwYsYPk71a1CuDrMZbriXPWyhAb8WGbmSUjvSMWYx8Yg2tb5v5EPruFUdrikXppq3h2KSRkspRJBKh79eYvc" ], "script": "base64:CAIWCAISBgoECAEBARIAEgMKAQgSAwoBCBwADGNvbnRyYWN0RmlsZQIQdmVzdGluZ19uZW8ucmlkZQADU0VQAgJfXwAISURTX0xJU1QJAMwIAgAACQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUJAMwIAgAGCQDMCAIABwkAzAgCAAgJAMwIAgAJCQDMCAIACgkAzAgCAAsJAMwIAgAMCQDMCAIADQkAzAgCAA4JAMwIAgAPCQDMCAIAEAkAzAgCABEJAMwIAgASCQDMCAIAEwkAzAgCABQJAMwIAgAVCQDMCAIAFgkAzAgCABcJAMwIAgAYCQDMCAIAGQkAzAgCABoJAMwIAgAbCQDMCAIAHAkAzAgCAB0FA25pbAARTUFYX1ZFU1RJTkdfQ09VTlQJAJADAQUISURTX0xJU1QBCHRocm93RXJyAQNtc2cJAAIBCQCsAgIJAKwCAgUMY29udHJhY3RGaWxlAgI6IAUDbXNnAAprZXlBc3NldElkCQC5CQIJAMwIAgICJXMJAMwIAgIHYXNzZXRJZAUDbmlsBQNTRVAADWFzc2V0SWRTdHJpbmcJAQt2YWx1ZU9yR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N0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAGPDKCc=", "chainId": 84, "height": 2923972, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 98X4ibmc8qTMJqFX8dmgmz29qeHfKGDuGTUmuxGqagi8 Next: DWqrgmBr8MS9DmXUHuPDBtB5P6PbayEXpCsG6kEtXAZu Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 8 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFile = "vesting_neo.ride"
113113
114114
115115 func getUserUnlockedAmount (userAddress,id) = {
116- let $t032143293 = parseUserVesting(userAddress, id)
117- let vestingAmount = $t032143293._1
118- let startBlock = $t032143293._2
119- let lockLength = $t032143293._3
120- let $t032963393 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
121- let unlockedAmount = $t032963393._1
122- let remainingAmount = $t032963393._2
116+ let $t032133292 = parseUserVesting(userAddress, id)
117+ let vestingAmount = $t032133292._1
118+ let startBlock = $t032133292._2
119+ let lockLength = $t032133292._3
120+ let $t032953392 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
121+ let unlockedAmount = $t032953392._1
122+ let remainingAmount = $t032953392._2
123123 $Tuple2(unlockedAmount, remainingAmount)
124124 }
125125
126126
127127 func getUpdateVestingActions (userAddress,id) = {
128- let $t035003579 = parseUserVesting(userAddress, id)
129- let vestingAmount = $t035003579._1
130- let startBlock = $t035003579._2
131- let lockLength = $t035003579._3
132- let $t035823660 = getUserUnlockedAmount(userAddress, id)
133- let unlockedAmount = $t035823660._1
134- let remainingAmount = $t035823660._2
128+ let $t034993578 = parseUserVesting(userAddress, id)
129+ let vestingAmount = $t034993578._1
130+ let startBlock = $t034993578._2
131+ let lockLength = $t034993578._3
132+ let $t035813659 = getUserUnlockedAmount(userAddress, id)
133+ let unlockedAmount = $t035813659._1
134+ let remainingAmount = $t035813659._2
135135 let remainingBlocks = max([((startBlock + lockLength) - height), 0])
136136 let updateVestingActions = if ((unlockedAmount != 0))
137137 then if ((remainingBlocks != 0))
143143
144144
145145 func getUserClaimActions (userAddress,id) = {
146- let $t041244209 = getUpdateVestingActions(userAddress, id)
147- let updateVestingActions = $t041244209._1
148- let unlockedAmount = $t041244209._2
146+ let $t041234208 = getUpdateVestingActions(userAddress, id)
147+ let updateVestingActions = $t041234208._1
148+ let unlockedAmount = $t041234208._2
149149 let transferActions = if ((unlockedAmount != 0))
150150 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
151151 else nil
155155
156156 func getAllUserClaimActions (userAddress) = {
157157 func actionsHelper (acc,a) = {
158- let $t045834623 = acc
159- let allVestingsClaimActions = $t045834623._1
160- let sum = $t045834623._2
161- let $t046284704 = getUserClaimActions(userAddress, a)
162- let vestingClaimActions = $t046284704._1
163- let claimAmount = $t046284704._2
158+ let $t045824622 = acc
159+ let allVestingsClaimActions = $t045824622._1
160+ let sum = $t045824622._2
161+ let $t046274703 = getUserClaimActions(userAddress, a)
162+ let vestingClaimActions = $t046274703._1
163+ let claimAmount = $t046274703._2
164164 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
165165 }
166166
181181
182182 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
183183 func actionsHelper (acc,a) = {
184- let $t049965037 = acc
185- let updateAllVestingsActions = $t049965037._1
186- let sum = $t049965037._2
187- let $t050425126 = getUpdateVestingActions(userAddress, a)
188- let updateVestingActions = $t050425126._1
189- let unlockedAmount = $t050425126._2
184+ let $t049955036 = acc
185+ let updateAllVestingsActions = $t049955036._1
186+ let sum = $t049955036._2
187+ let $t050415125 = getUpdateVestingActions(userAddress, a)
188+ let updateVestingActions = $t050415125._1
189+ let unlockedAmount = $t050415125._2
190190 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
191191 }
192192
193- let $t052125300 = {
193+ let $t052115299 = {
194194 let $l = IDS_LIST
195195 let $s = size($l)
196196 let $acc0 = $Tuple2(nil, 0)
204204
205205 $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)
206206 }
207- let updateAllVestingsActions = $t052125300._1
208- let unlockedSum = $t052125300._2
207+ let updateAllVestingsActions = $t052115299._1
208+ let unlockedSum = $t052115299._2
209209 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
210210 let updateAccumulatedActions = if ((unlockedSum != 0))
211211 then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
223223
224224
225225 func getClaimAllActions (userAddress) = {
226- let $t060686201 = if (!(containsElement(banList, userAddress)))
226+ let $t060676200 = if (!(containsElement(banList, userAddress)))
227227 then getAllUserClaimActions(userAddress)
228228 else $Tuple2(nil, 0)
229- let claimActions = $t060686201._1
230- let unlockedAmount = $t060686201._2
231- let $t062046294 = getClaimAccumulatedActions(userAddress)
232- let claimAccumulatedActions = $t062046294._1
233- let accumulatedAmount = $t062046294._2
229+ let claimActions = $t060676200._1
230+ let unlockedAmount = $t060676200._2
231+ let $t062036293 = getClaimAccumulatedActions(userAddress)
232+ let claimAccumulatedActions = $t062036293._1
233+ let accumulatedAmount = $t062036293._2
234234 let totalAmount = (unlockedAmount + accumulatedAmount)
235235 $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
236236 }
238238
239239 func getAvailableVestingId (userAddress) = {
240240 func helper (availableId,id) = {
241- let $t065136592 = parseUserVesting(userAddress, id)
242- let vestingAmount = $t065136592._1
243- let startBlock = $t065136592._2
244- let lockLength = $t065136592._3
241+ let $t065126591 = parseUserVesting(userAddress, id)
242+ let vestingAmount = $t065126591._1
243+ let startBlock = $t065126591._2
244+ let lockLength = $t065126591._3
245245 if ((vestingAmount > 0))
246246 then availableId
247247 else if ((availableId == -1))
299299 @Callable(i)
300300 func claimAll () = {
301301 let userAddress = toString(i.caller)
302- let $t080698134 = getClaimAllActions(userAddress)
303- let claimActions = $t080698134._1
304- let totalAmount = $t080698134._2
302+ let $t080678132 = getClaimAllActions(userAddress)
303+ let claimActions = $t080678132._1
304+ let totalAmount = $t080678132._2
305305 let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
306306 if ((totalAmount > 0))
307307 then (claimActions ++ historyActions)
321321 else throwErr(makeString(["user already in a ban list:", userAddress], " "))]
322322 if ((checks == checks))
323323 then {
324- let $t086818769 = getMoveAllUnlockedToAccumulatorActions(userAddress)
325- let moveToAccumulatedActions = $t086818769._1
326- let _a = $t086818769._2
324+ let $t086798767 = getMoveAllUnlockedToAccumulatorActions(userAddress)
325+ let moveToAccumulatedActions = $t086798767._1
326+ let _a = $t086798767._2
327327 let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))]
328328 (moveToAccumulatedActions ++ addToBanListActions)
329329 }
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 8 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFile = "vesting_neo.ride"
55
66 let SEP = "__"
77
88 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]
99
1010 let MAX_VESTING_COUNT = size(IDS_LIST)
1111
1212 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1313
1414
1515 let keyAssetId = makeString(["%s", "assetId"], SEP)
1616
1717 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
1818
1919 let assetIdBytes = if ((assetIdString == "WAVES"))
2020 then unit
2121 else fromBase58String(assetIdString)
2222
2323 let keyAdminList = makeString(["%s", "adminList"], SEP)
2424
2525 let keyBanList = makeString(["%s", "banList"], SEP)
2626
2727 let adminList = match getString(this, keyAdminList) {
2828 case s: String =>
2929 split(s, SEP)
3030 case _ =>
3131 nil
3232 }
3333
3434 let banList = match getString(this, keyBanList) {
3535 case s: String =>
3636 if ((s == ""))
3737 then nil
3838 else split_51C(s, SEP)
3939 case _ =>
4040 nil
4141 }
4242
4343 func isValidAddressString (addressString) = match addressFromString(addressString) {
4444 case a: Address =>
4545 true
4646 case _ =>
4747 false
4848 }
4949
5050
5151 func keyUserVesting (userAddress,id) = {
5252 let checks = [if (isValidAddressString(userAddress))
5353 then true
5454 else throwErr(makeString(["address is not valid:", userAddress], " ")), if (if ((id >= 0))
5555 then (MAX_VESTING_COUNT > id)
5656 else false)
5757 then true
5858 else throwErr(makeString(["id should be less than", toString(MAX_VESTING_COUNT), "got:", toString(id)], " "))]
5959 if ((checks == checks))
6060 then makeString(["%s%s%d", "vesting", userAddress, toString(id)], SEP)
6161 else throw("Strict value is not equal to itself.")
6262 }
6363
6464
6565 func keyUserAccumulated (userAddress) = {
6666 let checks = [if (isValidAddressString(userAddress))
6767 then true
6868 else throwErr(makeString(["address is not valid:", userAddress], " "))]
6969 if ((checks == checks))
7070 then makeString(["%s%s", "accumulated", userAddress], SEP)
7171 else throw("Strict value is not equal to itself.")
7272 }
7373
7474
7575 func formatUserVesting (vestingAmount,startBlock,lockLength) = {
7676 let checks = [if ((vestingAmount >= 0))
7777 then true
7878 else throwErr("vesting amount cannot be negative"), if ((startBlock >= 0))
7979 then true
8080 else throwErr("start block cannot be negative"), if ((lockLength >= 0))
8181 then true
8282 else throwErr("lock length cannot be negative")]
8383 if ((checks == checks))
8484 then makeString(["%d%d%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP)
8585 else throw("Strict value is not equal to itself.")
8686 }
8787
8888
8989 func parseUserVesting (userAddress,id) = match getString(this, keyUserVesting(userAddress, id)) {
9090 case rawString: String =>
9191 let splitString = split(rawString, SEP)
9292 let vestingAmount = parseIntValue(splitString[1])
9393 let startBlock = parseIntValue(splitString[2])
9494 let lockLength = parseIntValue(splitString[3])
9595 $Tuple3(vestingAmount, startBlock, lockLength)
9696 case _ =>
9797 $Tuple3(0, 0, 0)
9898 }
9999
100100
101101 func keyVestingHistory (action,userAddress,txId) = makeString(["%s%s%s%s", "history", userAddress, action, txId], SEP)
102102
103103
104104 func calcUnlockedAmount (amount,startBlock,lockLength) = {
105105 let elapsedBlocks = (height - startBlock)
106106 let unlockedAmount = if (if ((lockLength != 0))
107107 then (elapsedBlocks > 0)
108108 else false)
109109 then min([fraction(amount, elapsedBlocks, lockLength), amount])
110110 else 0
111111 $Tuple2(unlockedAmount, (amount - unlockedAmount))
112112 }
113113
114114
115115 func getUserUnlockedAmount (userAddress,id) = {
116- let $t032143293 = parseUserVesting(userAddress, id)
117- let vestingAmount = $t032143293._1
118- let startBlock = $t032143293._2
119- let lockLength = $t032143293._3
120- let $t032963393 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
121- let unlockedAmount = $t032963393._1
122- let remainingAmount = $t032963393._2
116+ let $t032133292 = parseUserVesting(userAddress, id)
117+ let vestingAmount = $t032133292._1
118+ let startBlock = $t032133292._2
119+ let lockLength = $t032133292._3
120+ let $t032953392 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
121+ let unlockedAmount = $t032953392._1
122+ let remainingAmount = $t032953392._2
123123 $Tuple2(unlockedAmount, remainingAmount)
124124 }
125125
126126
127127 func getUpdateVestingActions (userAddress,id) = {
128- let $t035003579 = parseUserVesting(userAddress, id)
129- let vestingAmount = $t035003579._1
130- let startBlock = $t035003579._2
131- let lockLength = $t035003579._3
132- let $t035823660 = getUserUnlockedAmount(userAddress, id)
133- let unlockedAmount = $t035823660._1
134- let remainingAmount = $t035823660._2
128+ let $t034993578 = parseUserVesting(userAddress, id)
129+ let vestingAmount = $t034993578._1
130+ let startBlock = $t034993578._2
131+ let lockLength = $t034993578._3
132+ let $t035813659 = getUserUnlockedAmount(userAddress, id)
133+ let unlockedAmount = $t035813659._1
134+ let remainingAmount = $t035813659._2
135135 let remainingBlocks = max([((startBlock + lockLength) - height), 0])
136136 let updateVestingActions = if ((unlockedAmount != 0))
137137 then if ((remainingBlocks != 0))
138138 then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
139139 else [DeleteEntry(keyUserVesting(userAddress, id))]
140140 else nil
141141 $Tuple2(updateVestingActions, unlockedAmount)
142142 }
143143
144144
145145 func getUserClaimActions (userAddress,id) = {
146- let $t041244209 = getUpdateVestingActions(userAddress, id)
147- let updateVestingActions = $t041244209._1
148- let unlockedAmount = $t041244209._2
146+ let $t041234208 = getUpdateVestingActions(userAddress, id)
147+ let updateVestingActions = $t041234208._1
148+ let unlockedAmount = $t041234208._2
149149 let transferActions = if ((unlockedAmount != 0))
150150 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
151151 else nil
152152 $Tuple2((updateVestingActions ++ transferActions), unlockedAmount)
153153 }
154154
155155
156156 func getAllUserClaimActions (userAddress) = {
157157 func actionsHelper (acc,a) = {
158- let $t045834623 = acc
159- let allVestingsClaimActions = $t045834623._1
160- let sum = $t045834623._2
161- let $t046284704 = getUserClaimActions(userAddress, a)
162- let vestingClaimActions = $t046284704._1
163- let claimAmount = $t046284704._2
158+ let $t045824622 = acc
159+ let allVestingsClaimActions = $t045824622._1
160+ let sum = $t045824622._2
161+ let $t046274703 = getUserClaimActions(userAddress, a)
162+ let vestingClaimActions = $t046274703._1
163+ let claimAmount = $t046274703._2
164164 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
165165 }
166166
167167 let $l = IDS_LIST
168168 let $s = size($l)
169169 let $acc0 = $Tuple2(nil, 0)
170170 func $f0_1 ($a,$i) = if (($i >= $s))
171171 then $a
172172 else actionsHelper($a, $l[$i])
173173
174174 func $f0_2 ($a,$i) = if (($i >= $s))
175175 then $a
176176 else throw("List size exceeds 30")
177177
178178 $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)
179179 }
180180
181181
182182 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
183183 func actionsHelper (acc,a) = {
184- let $t049965037 = acc
185- let updateAllVestingsActions = $t049965037._1
186- let sum = $t049965037._2
187- let $t050425126 = getUpdateVestingActions(userAddress, a)
188- let updateVestingActions = $t050425126._1
189- let unlockedAmount = $t050425126._2
184+ let $t049955036 = acc
185+ let updateAllVestingsActions = $t049955036._1
186+ let sum = $t049955036._2
187+ let $t050415125 = getUpdateVestingActions(userAddress, a)
188+ let updateVestingActions = $t050415125._1
189+ let unlockedAmount = $t050415125._2
190190 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
191191 }
192192
193- let $t052125300 = {
193+ let $t052115299 = {
194194 let $l = IDS_LIST
195195 let $s = size($l)
196196 let $acc0 = $Tuple2(nil, 0)
197197 func $f0_1 ($a,$i) = if (($i >= $s))
198198 then $a
199199 else actionsHelper($a, $l[$i])
200200
201201 func $f0_2 ($a,$i) = if (($i >= $s))
202202 then $a
203203 else throw("List size exceeds 30")
204204
205205 $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)
206206 }
207- let updateAllVestingsActions = $t052125300._1
208- let unlockedSum = $t052125300._2
207+ let updateAllVestingsActions = $t052115299._1
208+ let unlockedSum = $t052115299._2
209209 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
210210 let updateAccumulatedActions = if ((unlockedSum != 0))
211211 then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
212212 else nil
213213 $Tuple2((updateAllVestingsActions ++ updateAccumulatedActions), unlockedSum)
214214 }
215215
216216
217217 func getClaimAccumulatedActions (userAddress) = {
218218 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
219219 if ((oldAccumulated != 0))
220220 then $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), oldAccumulated, assetIdBytes), DeleteEntry(keyUserAccumulated(userAddress))], oldAccumulated)
221221 else $Tuple2(nil, 0)
222222 }
223223
224224
225225 func getClaimAllActions (userAddress) = {
226- let $t060686201 = if (!(containsElement(banList, userAddress)))
226+ let $t060676200 = if (!(containsElement(banList, userAddress)))
227227 then getAllUserClaimActions(userAddress)
228228 else $Tuple2(nil, 0)
229- let claimActions = $t060686201._1
230- let unlockedAmount = $t060686201._2
231- let $t062046294 = getClaimAccumulatedActions(userAddress)
232- let claimAccumulatedActions = $t062046294._1
233- let accumulatedAmount = $t062046294._2
229+ let claimActions = $t060676200._1
230+ let unlockedAmount = $t060676200._2
231+ let $t062036293 = getClaimAccumulatedActions(userAddress)
232+ let claimAccumulatedActions = $t062036293._1
233+ let accumulatedAmount = $t062036293._2
234234 let totalAmount = (unlockedAmount + accumulatedAmount)
235235 $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
236236 }
237237
238238
239239 func getAvailableVestingId (userAddress) = {
240240 func helper (availableId,id) = {
241- let $t065136592 = parseUserVesting(userAddress, id)
242- let vestingAmount = $t065136592._1
243- let startBlock = $t065136592._2
244- let lockLength = $t065136592._3
241+ let $t065126591 = parseUserVesting(userAddress, id)
242+ let vestingAmount = $t065126591._1
243+ let startBlock = $t065126591._2
244+ let lockLength = $t065126591._3
245245 if ((vestingAmount > 0))
246246 then availableId
247247 else if ((availableId == -1))
248248 then id
249249 else min([availableId, id])
250250 }
251251
252252 let availableId = {
253253 let $l = IDS_LIST
254254 let $s = size($l)
255255 let $acc0 = -1
256256 func $f0_1 ($a,$i) = if (($i >= $s))
257257 then $a
258258 else helper($a, $l[$i])
259259
260260 func $f0_2 ($a,$i) = if (($i >= $s))
261261 then $a
262262 else throw("List size exceeds 30")
263263
264264 $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)
265265 }
266266 if ((availableId == -1))
267267 then throwErr(makeString(["user exceeded max active vesting count: ", userAddress], " "))
268268 else availableId
269269 }
270270
271271
272272 func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))]
273273
274274
275275 @Callable(i)
276276 func vestingForUser (userAddress,vestingAmount,startBlock,lockLength) = {
277277 let check = [if ((size(i.payments) == 1))
278278 then true
279279 else throwErr("should be with exactly 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
280280 then true
281281 else throwErr(makeString(["payment assetId should be: ", assetIdString], " ")), if ((i.payments[0].amount == vestingAmount))
282282 then true
283283 else throwErr("payment amount should be equal to vestingAmount"), if (if ((adminList == nil))
284284 then true
285285 else containsElement(adminList, toString(i.caller)))
286286 then true
287287 else throwErr("you must be admin")]
288288 if ((check == check))
289289 then {
290290 let id = getAvailableVestingId(userAddress)
291291 let historyActions = [IntegerEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), vestingAmount)]
292292 (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions)
293293 }
294294 else throw("Strict value is not equal to itself.")
295295 }
296296
297297
298298
299299 @Callable(i)
300300 func claimAll () = {
301301 let userAddress = toString(i.caller)
302- let $t080698134 = getClaimAllActions(userAddress)
303- let claimActions = $t080698134._1
304- let totalAmount = $t080698134._2
302+ let $t080678132 = getClaimAllActions(userAddress)
303+ let claimActions = $t080678132._1
304+ let totalAmount = $t080678132._2
305305 let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
306306 if ((totalAmount > 0))
307307 then (claimActions ++ historyActions)
308308 else throwErr("nothing to claim")
309309 }
310310
311311
312312
313313 @Callable(i)
314314 func ban (userAddress) = {
315315 let checks = [if (if ((adminList == nil))
316316 then true
317317 else containsElement(adminList, toString(i.caller)))
318318 then true
319319 else throwErr("you must be admin"), if (!(containsElement(banList, userAddress)))
320320 then true
321321 else throwErr(makeString(["user already in a ban list:", userAddress], " "))]
322322 if ((checks == checks))
323323 then {
324- let $t086818769 = getMoveAllUnlockedToAccumulatorActions(userAddress)
325- let moveToAccumulatedActions = $t086818769._1
326- let _a = $t086818769._2
324+ let $t086798767 = getMoveAllUnlockedToAccumulatorActions(userAddress)
325+ let moveToAccumulatedActions = $t086798767._1
326+ let _a = $t086798767._2
327327 let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))]
328328 (moveToAccumulatedActions ++ addToBanListActions)
329329 }
330330 else throw("Strict value is not equal to itself.")
331331 }
332332
333333
334334
335335 @Callable(i)
336336 func unban (userAddress) = {
337337 let checks = [if (if ((adminList == nil))
338338 then true
339339 else containsElement(adminList, toString(i.caller)))
340340 then true
341341 else throwErr("you must be admin"), if (containsElement(banList, userAddress))
342342 then true
343343 else throwErr(makeString(["user not in a ban list:", userAddress], " "))]
344344 if ((checks == checks))
345345 then {
346346 let newBanList = match indexOf(banList, userAddress) {
347347 case ind: Int =>
348348 removeByIndex(banList, ind)
349349 case _ =>
350350 throwErr("user address index in ban list is not found")
351351 }
352352 if ((newBanList == nil))
353353 then [DeleteEntry(keyBanList)]
354354 else [StringEntry(keyBanList, makeString_11C(newBanList, "__"))]
355355 }
356356 else throw("Strict value is not equal to itself.")
357357 }
358358
359359

github/deemru/w8io/169f3d6 
61.46 ms