tx · FZs5VPGcTnyv84LpHrPYQaKe9kY136SgpvE4rAZqP7xZ

3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1:  -0.01700000 Waves

2024.01.31 12:25 [2955583] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves

{ "type": 13, "id": "FZs5VPGcTnyv84LpHrPYQaKe9kY136SgpvE4rAZqP7xZ", "fee": 1700000, "feeAssetId": null, "timestamp": 1706693100388, "version": 1, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "5mFMej3pd3kX5DybTj2eFRktW4JuzDVtduTzF5n31RNjw6DEYawxKQK63Xg1quoXqsfkFSEWDa1kTj8PfZDsbj3x" ], "script": "base64:BgIbCAISBgoECAEBARIDCgEIEgMKAQgSABIDCgEIIQAMY29udHJhY3RGaWxlAhB2ZXN0aW5nX25lby5yaWRlAANTRVACAl9fAAhJRFNfTElTVAkAzAgCAAAJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQkAzAgCAAYJAMwIAgAHCQDMCAIACAkAzAgCAAkJAMwIAgAKCQDMCAIACwkAzAgCAAwJAMwIAgANCQDMCAIADgkAzAgCAA8JAMwIAgAQCQDMCAIAEQkAzAgCABIJAMwIAgATCQDMCAIAFAkAzAgCABUJAMwIAgAWCQDMCAIAFwkAzAgCABgJAMwIAgAZCQDMCAIAGgkAzAgCABsJAMwIAgAcCQDMCAIAHQUDbmlsABFNQVhfVkVTVElOR19DT1VOVAkAkAMBBQhJRFNfTElTVAEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cBE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuYWdlclB1YmxpY0tleQEWa2V5TWFuYWdlclZhdWx0QWRkcmVzcwACFyVzX19tYW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AwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleZQggMQ=", "chainId": 84, "height": 2955583, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6ufmP5RMMxW3rVNkZsrigp22Mnx2QtAE6Mzr6XPNJWkU Next: 4m7Y4Bh8V7RPdeN2bnQfjioA2RMSkGeVtSyvEAEXRAso Diff:
OldNewDifferences
9797 }
9898
9999
100-func formatUserVesting (vestingAmount,startBlock,lockLength) = {
100+func formatUserVesting (vestingAmount,startBlock,lockLength,totalClaimed) = {
101101 let checks = [if ((vestingAmount >= 0))
102102 then true
103103 else throwErr("vesting amount cannot be negative"), if ((startBlock >= 0))
104104 then true
105105 else throwErr("start block cannot be negative"), if ((lockLength >= 0))
106106 then true
107- else throwErr("lock length cannot be negative")]
107+ else throwErr("lock length cannot be negative"), if ((totalClaimed >= 0))
108+ then true
109+ else throwErr("total claimed cannot be negative")]
108110 if ((checks == checks))
109- then makeString(["%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP)
111+ then makeString(["%d%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength), toString(totalClaimed)], SEP)
110112 else throw("Strict value is not equal to itself.")
111113 }
112114
117119 let vestingAmount = parseIntValue(splitString[1])
118120 let startBlock = parseIntValue(splitString[2])
119121 let lockLength = parseIntValue(splitString[3])
120- $Tuple3(vestingAmount, startBlock, lockLength)
122+ let totalClaimed = if ((5 > size(splitString)))
123+ then 0
124+ else parseIntValue(splitString[4])
125+ $Tuple4(vestingAmount, startBlock, lockLength, totalClaimed)
121126 case _ =>
122- $Tuple3(0, 0, 0)
127+ $Tuple4(0, 0, 0, 0)
123128 }
124129
125130
138143
139144
140145 func getUserUnlockedAmount (userAddress,id) = {
141- let $t037793858 = parseUserVesting(userAddress, id)
142- let vestingAmount = $t037793858._1
143- let startBlock = $t037793858._2
144- let lockLength = $t037793858._3
145- let $t038613958 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
146- let unlockedAmount = $t038613958._1
147- let remainingAmount = $t038613958._2
146+ let $t040564149 = parseUserVesting(userAddress, id)
147+ let vestingAmount = $t040564149._1
148+ let startBlock = $t040564149._2
149+ let lockLength = $t040564149._3
150+ let totalClaimed = $t040564149._4
151+ let $t041524249 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
152+ let unlockedAmount = $t041524249._1
153+ let remainingAmount = $t041524249._2
148154 $Tuple2(unlockedAmount, remainingAmount)
149155 }
150156
151157
152158 func getUpdateVestingActions (userAddress,id) = {
153- let $t040654144 = parseUserVesting(userAddress, id)
154- let vestingAmount = $t040654144._1
155- let startBlock = $t040654144._2
156- let lockLength = $t040654144._3
157- let $t041474225 = getUserUnlockedAmount(userAddress, id)
158- let unlockedAmount = $t041474225._1
159- let remainingAmount = $t041474225._2
159+ let $t043564449 = parseUserVesting(userAddress, id)
160+ let vestingAmount = $t043564449._1
161+ let startBlock = $t043564449._2
162+ let lockLength = $t043564449._3
163+ let totalClaimed = $t043564449._4
164+ let $t044524530 = getUserUnlockedAmount(userAddress, id)
165+ let unlockedAmount = $t044524530._1
166+ let remainingAmount = $t044524530._2
160167 let remainingBlocks = max([((startBlock + lockLength) - height), 0])
168+ let newTotalClaimed = (totalClaimed + unlockedAmount)
161169 let updateVestingActions = if ((unlockedAmount != 0))
162170 then if ((remainingBlocks != 0))
163- then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
171+ then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks, newTotalClaimed))]
164172 else [DeleteEntry(keyUserVesting(userAddress, id))]
165173 else nil
166174 $Tuple2(updateVestingActions, unlockedAmount)
168176
169177
170178 func getUserClaimActions (userAddress,id) = {
171- let $t046894774 = getUpdateVestingActions(userAddress, id)
172- let updateVestingActions = $t046894774._1
173- let unlockedAmount = $t046894774._2
179+ let $t050655150 = getUpdateVestingActions(userAddress, id)
180+ let updateVestingActions = $t050655150._1
181+ let unlockedAmount = $t050655150._2
174182 let transferActions = if ((unlockedAmount != 0))
175183 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
176184 else nil
180188
181189 func getAllUserClaimActions (userAddress) = {
182190 func actionsHelper (acc,id) = {
183- let $t051485188 = acc
184- let allVestingsClaimActions = $t051485188._1
185- let sum = $t051485188._2
186- let $t051935270 = getUserClaimActions(userAddress, id)
187- let vestingClaimActions = $t051935270._1
188- let claimAmount = $t051935270._2
191+ let $t055245564 = acc
192+ let allVestingsClaimActions = $t055245564._1
193+ let sum = $t055245564._2
194+ let $t055695646 = getUserClaimActions(userAddress, id)
195+ let vestingClaimActions = $t055695646._1
196+ let claimAmount = $t055695646._2
189197 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
190198 }
191199
206214
207215 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
208216 func actionsHelper (acc,id) = {
209- let $t055635604 = acc
210- let updateAllVestingsActions = $t055635604._1
211- let sum = $t055635604._2
212- let $t056095694 = getUpdateVestingActions(userAddress, id)
213- let updateVestingActions = $t056095694._1
214- let unlockedAmount = $t056095694._2
217+ let $t059395980 = acc
218+ let updateAllVestingsActions = $t059395980._1
219+ let sum = $t059395980._2
220+ let $t059856070 = getUpdateVestingActions(userAddress, id)
221+ let updateVestingActions = $t059856070._1
222+ let unlockedAmount = $t059856070._2
215223 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
216224 }
217225
218- let $t057805868 = {
226+ let $t061566244 = {
219227 let $l = IDS_LIST
220228 let $s = size($l)
221229 let $acc0 = $Tuple2(nil, 0)
229237
230238 $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)
231239 }
232- let updateAllVestingsActions = $t057805868._1
233- let unlockedSum = $t057805868._2
240+ let updateAllVestingsActions = $t061566244._1
241+ let unlockedSum = $t061566244._2
234242 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
235243 let updateAccumulatedActions = if ((unlockedSum != 0))
236244 then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
248256
249257
250258 func getClaimAllActions (userAddress) = {
251- let $t066366769 = if (!(containsElement(banList, userAddress)))
259+ let $t070127145 = if (!(containsElement(banList, userAddress)))
252260 then getAllUserClaimActions(userAddress)
253261 else $Tuple2(nil, 0)
254- let claimActions = $t066366769._1
255- let unlockedAmount = $t066366769._2
256- let $t067726862 = getClaimAccumulatedActions(userAddress)
257- let claimAccumulatedActions = $t067726862._1
258- let accumulatedAmount = $t067726862._2
262+ let claimActions = $t070127145._1
263+ let unlockedAmount = $t070127145._2
264+ let $t071487238 = getClaimAccumulatedActions(userAddress)
265+ let claimAccumulatedActions = $t071487238._1
266+ let accumulatedAmount = $t071487238._2
259267 let totalAmount = (unlockedAmount + accumulatedAmount)
260268 $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
261269 }
263271
264272 func getVestingUserInfo (userAddress) = {
265273 func helper (acc,id) = {
266- let $t070767155 = parseUserVesting(userAddress, id)
267- let vestingAmount = $t070767155._1
268- let startBlock = $t070767155._2
269- let lockLength = $t070767155._3
270- let $t071607238 = getUserUnlockedAmount(userAddress, id)
271- let unlockedAmount = $t071607238._1
272- let remainingAmount = $t071607238._2
274+ let $t074527545 = parseUserVesting(userAddress, id)
275+ let vestingAmount = $t074527545._1
276+ let startBlock = $t074527545._2
277+ let lockLength = $t074527545._3
278+ let totalClaimed = $t074527545._4
279+ let $t075507628 = getUserUnlockedAmount(userAddress, id)
280+ let unlockedAmount = $t075507628._1
281+ let remainingAmount = $t075507628._2
273282 if (if ((vestingAmount == 0))
274283 then true
275284 else containsElement(banList, userAddress))
276285 then acc
277- else (acc :+ [vestingAmount, (startBlock + lockLength), unlockedAmount, remainingAmount])
286+ else (acc :+ [vestingAmount, (startBlock + lockLength), unlockedAmount, remainingAmount, totalClaimed])
278287 }
279288
280289 let $l = IDS_LIST
294303
295304 func getAvailableVestingId (userAddress) = {
296305 func helper (availableId,id) = {
297- let $t075627641 = parseUserVesting(userAddress, id)
298- let vestingAmount = $t075627641._1
299- let startBlock = $t075627641._2
300- let lockLength = $t075627641._3
306+ let $t079668059 = parseUserVesting(userAddress, id)
307+ let vestingAmount = $t079668059._1
308+ let startBlock = $t079668059._2
309+ let lockLength = $t079668059._3
310+ let totalClaimed = $t079668059._4
301311 if ((vestingAmount > 0))
302312 then availableId
303313 else if ((availableId == -1))
325335 }
326336
327337
328-func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))]
338+func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength, 0))]
329339
330340
331341 @Callable(i)
363373 else throwErr(makeString(["user already in a ban list:", userAddress], " "))]
364374 if ((checks == checks))
365375 then {
366- let $t095039591 = getMoveAllUnlockedToAccumulatorActions(userAddress)
367- let moveToAccumulatedActions = $t095039591._1
368- let _a = $t095039591._2
376+ let $t0992410012 = getMoveAllUnlockedToAccumulatorActions(userAddress)
377+ let moveToAccumulatedActions = $t0992410012._1
378+ let _a = $t0992410012._2
369379 let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))]
370380 (moveToAccumulatedActions ++ addToBanListActions)
371381 }
403413 @Callable(i)
404414 func claimAll () = {
405415 let userAddress = toString(i.caller)
406- let $t01048410549 = getClaimAllActions(userAddress)
407- let claimActions = $t01048410549._1
408- let totalAmount = $t01048410549._2
416+ let $t01090510970 = getClaimAllActions(userAddress)
417+ let claimActions = $t01090510970._1
418+ let totalAmount = $t01090510970._2
409419 let historyActions = [StringEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), toString(totalAmount))]
410420 if ((totalAmount > 0))
411421 then (claimActions ++ historyActions)
416426
417427 @Callable(i)
418428 func userInfoREADONLY (userAddress) = {
419- let $t01115011205 = getClaimAllActions(userAddress)
420- let _a = $t01115011205._1
421- let totalAmount = $t01115011205._2
429+ let $t01157111626 = getClaimAllActions(userAddress)
430+ let _a = $t01157111626._1
431+ let totalAmount = $t01157111626._2
422432 let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
423433 $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress)))
424- }
425-
426-
427-
428-@Callable(i)
429-func foo () = {
430- let ch = throw("err")
431- if ((ch == ch))
432- then nil
433- else throw("Strict value is not equal to itself.")
434434 }
435435
436436
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 func keyManagerPublicKey () = "%s__managerPublicKey"
1616
1717
1818 func keyManagerVaultAddress () = "%s__managerVaultAddress"
1919
2020
2121 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
2222 case s: String =>
2323 addressFromStringValue(s)
2424 case _ =>
2525 this
2626 }
2727
2828
2929 func managerPublicKeyOrUnit () = {
3030 let managerVaultAddress = getManagerVaultAddressOrThis()
3131 match getString(managerVaultAddress, keyManagerPublicKey()) {
3232 case s: String =>
3333 fromBase58String(s)
3434 case _: Unit =>
3535 unit
3636 case _ =>
3737 throw("Match error")
3838 }
3939 }
4040
4141
4242 let keyAssetId = makeString(["%s", "assetId"], SEP)
4343
4444 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
4545
4646 let assetIdBytes = if ((assetIdString == "WAVES"))
4747 then unit
4848 else fromBase58String(assetIdString)
4949
5050 let keyAdminList = makeString(["%s", "adminAddressList"], SEP)
5151
5252 let keyBanList = makeString(["%s", "banList"], SEP)
5353
5454 let adminList = match getString(this, keyAdminList) {
5555 case s: String =>
5656 split(s, SEP)
5757 case _ =>
5858 nil
5959 }
6060
6161 let banList = {
6262 let banListRaw = valueOrElse(getString(this, keyBanList), "")
6363 if ((banListRaw == ""))
6464 then nil
6565 else split_51C(banListRaw, SEP)
6666 }
6767
6868 func isValidAddressString (addressString) = match addressFromString(addressString) {
6969 case a: Address =>
7070 true
7171 case _ =>
7272 false
7373 }
7474
7575
7676 func keyUserVesting (userAddress,id) = {
7777 let checks = [if (isValidAddressString(userAddress))
7878 then true
7979 else throwErr(makeString(["address is not valid:", userAddress], " ")), if (if ((id >= 0))
8080 then (MAX_VESTING_COUNT > id)
8181 else false)
8282 then true
8383 else throwErr(makeString(["id should be less than", toString(MAX_VESTING_COUNT), "got:", toString(id)], " "))]
8484 if ((checks == checks))
8585 then makeString(["%s%s%d", "vesting", userAddress, toString(id)], SEP)
8686 else throw("Strict value is not equal to itself.")
8787 }
8888
8989
9090 func keyUserAccumulated (userAddress) = {
9191 let checks = [if (isValidAddressString(userAddress))
9292 then true
9393 else throwErr(makeString(["address is not valid:", userAddress], " "))]
9494 if ((checks == checks))
9595 then makeString(["%s%s", "accumulated", userAddress], SEP)
9696 else throw("Strict value is not equal to itself.")
9797 }
9898
9999
100-func formatUserVesting (vestingAmount,startBlock,lockLength) = {
100+func formatUserVesting (vestingAmount,startBlock,lockLength,totalClaimed) = {
101101 let checks = [if ((vestingAmount >= 0))
102102 then true
103103 else throwErr("vesting amount cannot be negative"), if ((startBlock >= 0))
104104 then true
105105 else throwErr("start block cannot be negative"), if ((lockLength >= 0))
106106 then true
107- else throwErr("lock length cannot be negative")]
107+ else throwErr("lock length cannot be negative"), if ((totalClaimed >= 0))
108+ then true
109+ else throwErr("total claimed cannot be negative")]
108110 if ((checks == checks))
109- then makeString(["%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP)
111+ then makeString(["%d%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength), toString(totalClaimed)], SEP)
110112 else throw("Strict value is not equal to itself.")
111113 }
112114
113115
114116 func parseUserVesting (userAddress,id) = match getString(this, keyUserVesting(userAddress, id)) {
115117 case rawString: String =>
116118 let splitString = split(rawString, SEP)
117119 let vestingAmount = parseIntValue(splitString[1])
118120 let startBlock = parseIntValue(splitString[2])
119121 let lockLength = parseIntValue(splitString[3])
120- $Tuple3(vestingAmount, startBlock, lockLength)
122+ let totalClaimed = if ((5 > size(splitString)))
123+ then 0
124+ else parseIntValue(splitString[4])
125+ $Tuple4(vestingAmount, startBlock, lockLength, totalClaimed)
121126 case _ =>
122- $Tuple3(0, 0, 0)
127+ $Tuple4(0, 0, 0, 0)
123128 }
124129
125130
126131 func keyVestingHistory (action,userAddress,txId) = makeString(["%s%s%s%s", "history", userAddress, action, txId], SEP)
127132
128133
129134 func calcUnlockedAmount (amount,startBlock,lockLength) = {
130135 let elapsedBlocks = (height - startBlock)
131136 let unlockedAmount = if (if ((lockLength != 0))
132137 then (elapsedBlocks > 0)
133138 else false)
134139 then min([fraction(amount, elapsedBlocks, lockLength), amount])
135140 else 0
136141 $Tuple2(unlockedAmount, (amount - unlockedAmount))
137142 }
138143
139144
140145 func getUserUnlockedAmount (userAddress,id) = {
141- let $t037793858 = parseUserVesting(userAddress, id)
142- let vestingAmount = $t037793858._1
143- let startBlock = $t037793858._2
144- let lockLength = $t037793858._3
145- let $t038613958 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
146- let unlockedAmount = $t038613958._1
147- let remainingAmount = $t038613958._2
146+ let $t040564149 = parseUserVesting(userAddress, id)
147+ let vestingAmount = $t040564149._1
148+ let startBlock = $t040564149._2
149+ let lockLength = $t040564149._3
150+ let totalClaimed = $t040564149._4
151+ let $t041524249 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
152+ let unlockedAmount = $t041524249._1
153+ let remainingAmount = $t041524249._2
148154 $Tuple2(unlockedAmount, remainingAmount)
149155 }
150156
151157
152158 func getUpdateVestingActions (userAddress,id) = {
153- let $t040654144 = parseUserVesting(userAddress, id)
154- let vestingAmount = $t040654144._1
155- let startBlock = $t040654144._2
156- let lockLength = $t040654144._3
157- let $t041474225 = getUserUnlockedAmount(userAddress, id)
158- let unlockedAmount = $t041474225._1
159- let remainingAmount = $t041474225._2
159+ let $t043564449 = parseUserVesting(userAddress, id)
160+ let vestingAmount = $t043564449._1
161+ let startBlock = $t043564449._2
162+ let lockLength = $t043564449._3
163+ let totalClaimed = $t043564449._4
164+ let $t044524530 = getUserUnlockedAmount(userAddress, id)
165+ let unlockedAmount = $t044524530._1
166+ let remainingAmount = $t044524530._2
160167 let remainingBlocks = max([((startBlock + lockLength) - height), 0])
168+ let newTotalClaimed = (totalClaimed + unlockedAmount)
161169 let updateVestingActions = if ((unlockedAmount != 0))
162170 then if ((remainingBlocks != 0))
163- then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
171+ then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks, newTotalClaimed))]
164172 else [DeleteEntry(keyUserVesting(userAddress, id))]
165173 else nil
166174 $Tuple2(updateVestingActions, unlockedAmount)
167175 }
168176
169177
170178 func getUserClaimActions (userAddress,id) = {
171- let $t046894774 = getUpdateVestingActions(userAddress, id)
172- let updateVestingActions = $t046894774._1
173- let unlockedAmount = $t046894774._2
179+ let $t050655150 = getUpdateVestingActions(userAddress, id)
180+ let updateVestingActions = $t050655150._1
181+ let unlockedAmount = $t050655150._2
174182 let transferActions = if ((unlockedAmount != 0))
175183 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
176184 else nil
177185 $Tuple2((updateVestingActions ++ transferActions), unlockedAmount)
178186 }
179187
180188
181189 func getAllUserClaimActions (userAddress) = {
182190 func actionsHelper (acc,id) = {
183- let $t051485188 = acc
184- let allVestingsClaimActions = $t051485188._1
185- let sum = $t051485188._2
186- let $t051935270 = getUserClaimActions(userAddress, id)
187- let vestingClaimActions = $t051935270._1
188- let claimAmount = $t051935270._2
191+ let $t055245564 = acc
192+ let allVestingsClaimActions = $t055245564._1
193+ let sum = $t055245564._2
194+ let $t055695646 = getUserClaimActions(userAddress, id)
195+ let vestingClaimActions = $t055695646._1
196+ let claimAmount = $t055695646._2
189197 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
190198 }
191199
192200 let $l = IDS_LIST
193201 let $s = size($l)
194202 let $acc0 = $Tuple2(nil, 0)
195203 func $f0_1 ($a,$i) = if (($i >= $s))
196204 then $a
197205 else actionsHelper($a, $l[$i])
198206
199207 func $f0_2 ($a,$i) = if (($i >= $s))
200208 then $a
201209 else throw("List size exceeds 30")
202210
203211 $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)
204212 }
205213
206214
207215 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
208216 func actionsHelper (acc,id) = {
209- let $t055635604 = acc
210- let updateAllVestingsActions = $t055635604._1
211- let sum = $t055635604._2
212- let $t056095694 = getUpdateVestingActions(userAddress, id)
213- let updateVestingActions = $t056095694._1
214- let unlockedAmount = $t056095694._2
217+ let $t059395980 = acc
218+ let updateAllVestingsActions = $t059395980._1
219+ let sum = $t059395980._2
220+ let $t059856070 = getUpdateVestingActions(userAddress, id)
221+ let updateVestingActions = $t059856070._1
222+ let unlockedAmount = $t059856070._2
215223 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
216224 }
217225
218- let $t057805868 = {
226+ let $t061566244 = {
219227 let $l = IDS_LIST
220228 let $s = size($l)
221229 let $acc0 = $Tuple2(nil, 0)
222230 func $f0_1 ($a,$i) = if (($i >= $s))
223231 then $a
224232 else actionsHelper($a, $l[$i])
225233
226234 func $f0_2 ($a,$i) = if (($i >= $s))
227235 then $a
228236 else throw("List size exceeds 30")
229237
230238 $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)
231239 }
232- let updateAllVestingsActions = $t057805868._1
233- let unlockedSum = $t057805868._2
240+ let updateAllVestingsActions = $t061566244._1
241+ let unlockedSum = $t061566244._2
234242 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
235243 let updateAccumulatedActions = if ((unlockedSum != 0))
236244 then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
237245 else nil
238246 $Tuple2((updateAllVestingsActions ++ updateAccumulatedActions), unlockedSum)
239247 }
240248
241249
242250 func getClaimAccumulatedActions (userAddress) = {
243251 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
244252 if ((oldAccumulated != 0))
245253 then $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), oldAccumulated, assetIdBytes), DeleteEntry(keyUserAccumulated(userAddress))], oldAccumulated)
246254 else $Tuple2(nil, 0)
247255 }
248256
249257
250258 func getClaimAllActions (userAddress) = {
251- let $t066366769 = if (!(containsElement(banList, userAddress)))
259+ let $t070127145 = if (!(containsElement(banList, userAddress)))
252260 then getAllUserClaimActions(userAddress)
253261 else $Tuple2(nil, 0)
254- let claimActions = $t066366769._1
255- let unlockedAmount = $t066366769._2
256- let $t067726862 = getClaimAccumulatedActions(userAddress)
257- let claimAccumulatedActions = $t067726862._1
258- let accumulatedAmount = $t067726862._2
262+ let claimActions = $t070127145._1
263+ let unlockedAmount = $t070127145._2
264+ let $t071487238 = getClaimAccumulatedActions(userAddress)
265+ let claimAccumulatedActions = $t071487238._1
266+ let accumulatedAmount = $t071487238._2
259267 let totalAmount = (unlockedAmount + accumulatedAmount)
260268 $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
261269 }
262270
263271
264272 func getVestingUserInfo (userAddress) = {
265273 func helper (acc,id) = {
266- let $t070767155 = parseUserVesting(userAddress, id)
267- let vestingAmount = $t070767155._1
268- let startBlock = $t070767155._2
269- let lockLength = $t070767155._3
270- let $t071607238 = getUserUnlockedAmount(userAddress, id)
271- let unlockedAmount = $t071607238._1
272- let remainingAmount = $t071607238._2
274+ let $t074527545 = parseUserVesting(userAddress, id)
275+ let vestingAmount = $t074527545._1
276+ let startBlock = $t074527545._2
277+ let lockLength = $t074527545._3
278+ let totalClaimed = $t074527545._4
279+ let $t075507628 = getUserUnlockedAmount(userAddress, id)
280+ let unlockedAmount = $t075507628._1
281+ let remainingAmount = $t075507628._2
273282 if (if ((vestingAmount == 0))
274283 then true
275284 else containsElement(banList, userAddress))
276285 then acc
277- else (acc :+ [vestingAmount, (startBlock + lockLength), unlockedAmount, remainingAmount])
286+ else (acc :+ [vestingAmount, (startBlock + lockLength), unlockedAmount, remainingAmount, totalClaimed])
278287 }
279288
280289 let $l = IDS_LIST
281290 let $s = size($l)
282291 let $acc0 = nil
283292 func $f0_1 ($a,$i) = if (($i >= $s))
284293 then $a
285294 else helper($a, $l[$i])
286295
287296 func $f0_2 ($a,$i) = if (($i >= $s))
288297 then $a
289298 else throw("List size exceeds 30")
290299
291300 $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)
292301 }
293302
294303
295304 func getAvailableVestingId (userAddress) = {
296305 func helper (availableId,id) = {
297- let $t075627641 = parseUserVesting(userAddress, id)
298- let vestingAmount = $t075627641._1
299- let startBlock = $t075627641._2
300- let lockLength = $t075627641._3
306+ let $t079668059 = parseUserVesting(userAddress, id)
307+ let vestingAmount = $t079668059._1
308+ let startBlock = $t079668059._2
309+ let lockLength = $t079668059._3
310+ let totalClaimed = $t079668059._4
301311 if ((vestingAmount > 0))
302312 then availableId
303313 else if ((availableId == -1))
304314 then id
305315 else min([availableId, id])
306316 }
307317
308318 let availableId = {
309319 let $l = IDS_LIST
310320 let $s = size($l)
311321 let $acc0 = -1
312322 func $f0_1 ($a,$i) = if (($i >= $s))
313323 then $a
314324 else helper($a, $l[$i])
315325
316326 func $f0_2 ($a,$i) = if (($i >= $s))
317327 then $a
318328 else throw("List size exceeds 30")
319329
320330 $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)
321331 }
322332 if ((availableId == -1))
323333 then throwErr(makeString(["user exceeded max active vesting count: ", userAddress], " "))
324334 else availableId
325335 }
326336
327337
328-func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))]
338+func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength, 0))]
329339
330340
331341 @Callable(i)
332342 func vestingForUser (userAddress,vestingAmount,startBlock,lockLength) = {
333343 let check = [if ((size(i.payments) == 1))
334344 then true
335345 else throwErr("should be with exactly 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
336346 then true
337347 else throwErr(makeString(["payment assetId should be: ", assetIdString], " ")), if ((i.payments[0].amount == vestingAmount))
338348 then true
339349 else throwErr("payment amount should be equal to vestingAmount"), if (if ((adminList == nil))
340350 then true
341351 else containsElement(adminList, toString(i.caller)))
342352 then true
343353 else throwErr("you must be admin")]
344354 if ((check == check))
345355 then {
346356 let id = getAvailableVestingId(userAddress)
347357 let historyActions = [StringEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), makeString([toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP))]
348358 (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions)
349359 }
350360 else throw("Strict value is not equal to itself.")
351361 }
352362
353363
354364
355365 @Callable(i)
356366 func ban (userAddress) = {
357367 let checks = [if (if ((adminList == nil))
358368 then true
359369 else containsElement(adminList, toString(i.caller)))
360370 then true
361371 else throwErr("you must be admin"), if (!(containsElement(banList, userAddress)))
362372 then true
363373 else throwErr(makeString(["user already in a ban list:", userAddress], " "))]
364374 if ((checks == checks))
365375 then {
366- let $t095039591 = getMoveAllUnlockedToAccumulatorActions(userAddress)
367- let moveToAccumulatedActions = $t095039591._1
368- let _a = $t095039591._2
376+ let $t0992410012 = getMoveAllUnlockedToAccumulatorActions(userAddress)
377+ let moveToAccumulatedActions = $t0992410012._1
378+ let _a = $t0992410012._2
369379 let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))]
370380 (moveToAccumulatedActions ++ addToBanListActions)
371381 }
372382 else throw("Strict value is not equal to itself.")
373383 }
374384
375385
376386
377387 @Callable(i)
378388 func unban (userAddress) = {
379389 let checks = [if (if ((adminList == nil))
380390 then true
381391 else containsElement(adminList, toString(i.caller)))
382392 then true
383393 else throwErr("you must be admin"), if (containsElement(banList, userAddress))
384394 then true
385395 else throwErr(makeString(["user not in a ban list:", userAddress], " "))]
386396 if ((checks == checks))
387397 then {
388398 let newBanList = match indexOf(banList, userAddress) {
389399 case ind: Int =>
390400 removeByIndex(banList, ind)
391401 case _ =>
392402 throwErr("user address index in ban list is not found")
393403 }
394404 if ((newBanList == nil))
395405 then [DeleteEntry(keyBanList)]
396406 else [StringEntry(keyBanList, makeString_11C(newBanList, "__"))]
397407 }
398408 else throw("Strict value is not equal to itself.")
399409 }
400410
401411
402412
403413 @Callable(i)
404414 func claimAll () = {
405415 let userAddress = toString(i.caller)
406- let $t01048410549 = getClaimAllActions(userAddress)
407- let claimActions = $t01048410549._1
408- let totalAmount = $t01048410549._2
416+ let $t01090510970 = getClaimAllActions(userAddress)
417+ let claimActions = $t01090510970._1
418+ let totalAmount = $t01090510970._2
409419 let historyActions = [StringEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), toString(totalAmount))]
410420 if ((totalAmount > 0))
411421 then (claimActions ++ historyActions)
412422 else throwErr("nothing to claim")
413423 }
414424
415425
416426
417427 @Callable(i)
418428 func userInfoREADONLY (userAddress) = {
419- let $t01115011205 = getClaimAllActions(userAddress)
420- let _a = $t01115011205._1
421- let totalAmount = $t01115011205._2
429+ let $t01157111626 = getClaimAllActions(userAddress)
430+ let _a = $t01157111626._1
431+ let totalAmount = $t01157111626._2
422432 let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
423433 $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress)))
424- }
425-
426-
427-
428-@Callable(i)
429-func foo () = {
430- let ch = throw("err")
431- if ((ch == ch))
432- then nil
433- else throw("Strict value is not equal to itself.")
434434 }
435435
436436
437437 @Verifier(tx)
438438 func verify () = {
439439 let targetPublicKey = match managerPublicKeyOrUnit() {
440440 case pk: ByteVector =>
441441 pk
442442 case _: Unit =>
443443 tx.senderPublicKey
444444 case _ =>
445445 throw("Match error")
446446 }
447447 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
448448 }
449449

github/deemru/w8io/169f3d6 
81.18 ms