tx · 6kzXroB6x4oqgzmaP3W2A26C3VoqSpA1A7zyiddi18y2

3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1:  -0.01100000 Waves

2024.01.09 15:44 [2923960] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves

{ "type": 13, "id": "6kzXroB6x4oqgzmaP3W2A26C3VoqSpA1A7zyiddi18y2", "fee": 1100000, "feeAssetId": null, "timestamp": 1704804274573, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "fKr2gxtVLGV7Fv1kRjkhM5kNasFEDxKTKnoa1FbkHmwzA4PVxmRTJRRnGYpa8yrV2VMFme7vfq7CYrMmNFTSMhS" ], "script": "base64:BgIWCAISBgoECAEBARIAEgMKAQgSAwoBCBwADGNvbnRyYWN0RmlsZQIQdmVzdGluZ19uZW8ucmlkZQADU0VQAgJfXwAISURTX0xJU1QJAMwIAgAACQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUJAMwIAgAGCQDMCAIABwkAzAgCAAgJAMwIAgAJCQDMCAIACgkAzAgCAAsJAMwIAgAMCQDMCAIADQkAzAgCAA4JAMwIAgAPCQDMCAIAEAkAzAgCABEJAMwIAgASCQDMCAIAEwkAzAgCABQJAMwIAgAVCQDMCAIAFgkAzAgCABcJAMwIAgAYCQDMCAIAGQkAzAgCABoJAMwIAgAbCQDMCAIAHAkAzAgCAB0FA25pbAARTUFYX1ZFU1RJTkdfQ09VTlQJAJADAQUISURTX0xJU1QBCHRocm93RXJyAQNtc2cJAAIBCQCsAgIJAKwCAgUMY29udHJhY3RGaWxlAgI6IAUDbXNnAAprZXlBc3NldElkCQC5CQIJAMwIAgICJXMJAMwIAgIHYXNzZXRJZAUDbmlsBQNTRVAADWFzc2V0SWRTdHJpbmcJAQt2Y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plexity": 0 } View: original | compacted Prev: AA7g7dX8UfSR8BYfNyy1tngFPsP3LNMVcfdt8u5VodX Next: 98X4ibmc8qTMJqFX8dmgmz29qeHfKGDuGTUmuxGqagi8 Diff:
OldNewDifferences
347347 case _ =>
348348 throwErr("user address index in ban list is not found")
349349 }
350- if ((newBanList == [""]))
350+ if ((newBanList == nil))
351351 then [DeleteEntry(keyBanList)]
352352 else [StringEntry(keyBanList, makeString_11C(newBanList, "__"))]
353353 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
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) = {
116116 let $t032143293 = parseUserVesting(userAddress, id)
117117 let vestingAmount = $t032143293._1
118118 let startBlock = $t032143293._2
119119 let lockLength = $t032143293._3
120120 let $t032963393 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
121121 let unlockedAmount = $t032963393._1
122122 let remainingAmount = $t032963393._2
123123 $Tuple2(unlockedAmount, remainingAmount)
124124 }
125125
126126
127127 func getUpdateVestingActions (userAddress,id) = {
128128 let $t035003579 = parseUserVesting(userAddress, id)
129129 let vestingAmount = $t035003579._1
130130 let startBlock = $t035003579._2
131131 let lockLength = $t035003579._3
132132 let $t035823660 = getUserUnlockedAmount(userAddress, id)
133133 let unlockedAmount = $t035823660._1
134134 let remainingAmount = $t035823660._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) = {
146146 let $t041244209 = getUpdateVestingActions(userAddress, id)
147147 let updateVestingActions = $t041244209._1
148148 let unlockedAmount = $t041244209._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) = {
158158 let $t045834623 = acc
159159 let allVestingsClaimActions = $t045834623._1
160160 let sum = $t045834623._2
161161 let $t046284704 = getUserClaimActions(userAddress, a)
162162 let vestingClaimActions = $t046284704._1
163163 let claimAmount = $t046284704._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) = {
184184 let $t049965037 = acc
185185 let updateAllVestingsActions = $t049965037._1
186186 let sum = $t049965037._2
187187 let $t050425126 = getUpdateVestingActions(userAddress, a)
188188 let updateVestingActions = $t050425126._1
189189 let unlockedAmount = $t050425126._2
190190 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
191191 }
192192
193193 let $t052125300 = {
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 }
207207 let updateAllVestingsActions = $t052125300._1
208208 let unlockedSum = $t052125300._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) = {
226226 let $t060686140 = getAllUserClaimActions(userAddress)
227227 let claimActions = $t060686140._1
228228 let unlockedAmount = $t060686140._2
229229 let $t061436233 = getClaimAccumulatedActions(userAddress)
230230 let claimAccumulatedActions = $t061436233._1
231231 let accumulatedAmount = $t061436233._2
232232 let totalAmount = (unlockedAmount + accumulatedAmount)
233233 if ((totalAmount > 0))
234234 then $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
235235 else throwErr("nothing to claim")
236236 }
237237
238238
239239 func getAvailableVestingId (userAddress) = {
240240 func helper (availableId,id) = {
241241 let $t065246603 = parseUserVesting(userAddress, id)
242242 let vestingAmount = $t065246603._1
243243 let startBlock = $t065246603._2
244244 let lockLength = $t065246603._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)
302302 let $t080808145 = getClaimAllActions(userAddress)
303303 let claimActions = $t080808145._1
304304 let totalAmount = $t080808145._2
305305 let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
306306 (claimActions ++ historyActions)
307307 }
308308
309309
310310
311311 @Callable(i)
312312 func ban (userAddress) = {
313313 let checks = [if (if ((adminList == nil))
314314 then true
315315 else containsElement(adminList, toString(i.caller)))
316316 then true
317317 else throwErr("you must be admin"), if (!(containsElement(banList, userAddress)))
318318 then true
319319 else throwErr(makeString(["user already in a ban list:", userAddress], " "))]
320320 if ((checks == checks))
321321 then {
322322 let $t086178705 = getMoveAllUnlockedToAccumulatorActions(userAddress)
323323 let moveToAccumulatedActions = $t086178705._1
324324 let _a = $t086178705._2
325325 let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))]
326326 (moveToAccumulatedActions ++ addToBanListActions)
327327 }
328328 else throw("Strict value is not equal to itself.")
329329 }
330330
331331
332332
333333 @Callable(i)
334334 func unban (userAddress) = {
335335 let checks = [if (if ((adminList == nil))
336336 then true
337337 else containsElement(adminList, toString(i.caller)))
338338 then true
339339 else throwErr("you must be admin"), if (containsElement(banList, userAddress))
340340 then true
341341 else throwErr(makeString(["user not in a ban list:", userAddress], " "))]
342342 if ((checks == checks))
343343 then {
344344 let newBanList = match indexOf(banList, userAddress) {
345345 case ind: Int =>
346346 removeByIndex(banList, ind)
347347 case _ =>
348348 throwErr("user address index in ban list is not found")
349349 }
350- if ((newBanList == [""]))
350+ if ((newBanList == nil))
351351 then [DeleteEntry(keyBanList)]
352352 else [StringEntry(keyBanList, makeString_11C(newBanList, "__"))]
353353 }
354354 else throw("Strict value is not equal to itself.")
355355 }
356356
357357

github/deemru/w8io/169f3d6 
42.40 ms