tx · FBs4yRa3mNLd5GD5HS8DSssPwVTHcVbxYYV9BNmWmwYh

3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1:  -0.01200000 Waves

2024.01.10 09:24 [2925029] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves

{ "type": 13, "id": "FBs4yRa3mNLd5GD5HS8DSssPwVTHcVbxYYV9BNmWmwYh", "fee": 1200000, "feeAssetId": null, "timestamp": 1704867974392, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "58RKeNsYQyAx2eabQcbHXgNHEEkU9i5wSiYoHYv4asT63PtTpFuKwUkR7eWHpCBbcSf8aTpNUu4hnpoEykaKLh2v" ], "script": "base64:BgIbCAISBgoECAEBARIDCgEIEgMKAQgSABIDCgEIHQAMY29udHJhY3RGaWxlAhB2ZXN0aW5nX25lby5yaWRlAANTRVACAl9fAAhJRFNfTElTVAkAzAgCAAAJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQkAzAgCAAYJAMwIAgAHCQDMCAIACAkAzAgCAAkJAMwIAgAKCQDMCAIACwkAzAgCAAwJAMwIAgANCQDMCAIADgkAzAgCAA8JAMwIAgAQCQDMCAIAEQkAzAgCABIJAMwIAgATCQDMCAIAFAkAzAgCABUJAMwIAgAWCQDMCAIAFwkAzAgCABgJAMwIAgAZCQDMCAIAGgkAzAgCABsJAMwIAgAcCQDMCAIAHQUDbmlsABFNQVhfVkVTVElOR19DT1VOVAkAkAMBBQhJRFNfTElTVAEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAANYXNzZXRJZFN0cmluZwkBC3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wOTgxODk4ODMJARJnZXRDbGFpbUFsbEFjdGlvbnMBBQt1c2VyQWRkcmVzcwQMY2xhaW1BY3Rpb25zCAULJHQwOTgxODk4ODMCXzEEC3RvdGFsQW1vdW50CAULJHQwOTgxODk4ODMCXzIEDmhpc3RvcnlBY3Rpb25zCQDMCAIJAQtTdHJpbmdFbnRyeQIJARFrZXlWZXN0aW5nSGlzdG9yeQMCB2NsYWltZWQFC3VzZXJBZGRyZXNzCQDYBAEIBQFpDXRyYW5zYWN0aW9uSWQJAKQDAQULdG90YWxBbW91bnQFA25pbAMJAGYCBQt0b3RhbEFtb3VudAAACQDOCAIFDGNsYWltQWN0aW9ucwUOaGlzdG9yeUFjdGlvbnMJAQh0aHJvd0VycgECEG5vdGhpbmcgdG8gY2xhaW0BaQEQdXNlckluZm9SRUFET05MWQELdXNlckFkZHJlc3MEDSR0MDEwMjIzMTAyNzgJARJnZXRDbGFpbUFsbEFjdGlvbnMBBQt1c2VyQWRkcmVzcwQCX2EIBQ0kdDAxMDIyMzEwMjc4Al8xBAt0b3RhbEFtb3VudAgFDSR0MDEwMjIzMTAyNzgCXzIEEWFjY3VtdWxhdGVkQW1vdW50CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMJARJrZXlVc2VyQWNjdW11bGF0ZWQBBQt1c2VyQWRkcmVzcwAACQCUCgIFA25pbAkAlQoDBQt0b3RhbEFtb3VudAURYWNjdW11bGF0ZWRBbW91bnQJARJnZXRWZXN0aW5nVXNlckluZm8BBQt1c2VyQWRkcmVzcwC4mXcu", "height": 2925029, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3TNwSiNHpdapQgiYciuZcCweAXBHAxZZk8xCSEoHSYuf Next: CkgHYNohvEGrMyFwELrdSCFm3db3aSTuNXcxBUaBPnVw Diff:
OldNewDifferences
113113
114114
115115 func getUserUnlockedAmount (userAddress,id) = {
116- let $t032093288 = parseUserVesting(userAddress, id)
117- let vestingAmount = $t032093288._1
118- let startBlock = $t032093288._2
119- let lockLength = $t032093288._3
120- let $t032913388 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
121- let unlockedAmount = $t032913388._1
122- let remainingAmount = $t032913388._2
116+ let $t032113290 = parseUserVesting(userAddress, id)
117+ let vestingAmount = $t032113290._1
118+ let startBlock = $t032113290._2
119+ let lockLength = $t032113290._3
120+ let $t032933390 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
121+ let unlockedAmount = $t032933390._1
122+ let remainingAmount = $t032933390._2
123123 $Tuple2(unlockedAmount, remainingAmount)
124124 }
125125
126126
127127 func getUpdateVestingActions (userAddress,id) = {
128- let $t034953574 = parseUserVesting(userAddress, id)
129- let vestingAmount = $t034953574._1
130- let startBlock = $t034953574._2
131- let lockLength = $t034953574._3
132- let $t035773655 = getUserUnlockedAmount(userAddress, id)
133- let unlockedAmount = $t035773655._1
134- let remainingAmount = $t035773655._2
128+ let $t034973576 = parseUserVesting(userAddress, id)
129+ let vestingAmount = $t034973576._1
130+ let startBlock = $t034973576._2
131+ let lockLength = $t034973576._3
132+ let $t035793657 = getUserUnlockedAmount(userAddress, id)
133+ let unlockedAmount = $t035793657._1
134+ let remainingAmount = $t035793657._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 $t041194204 = getUpdateVestingActions(userAddress, id)
147- let updateVestingActions = $t041194204._1
148- let unlockedAmount = $t041194204._2
146+ let $t041214206 = getUpdateVestingActions(userAddress, id)
147+ let updateVestingActions = $t041214206._1
148+ let unlockedAmount = $t041214206._2
149149 let transferActions = if ((unlockedAmount != 0))
150150 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
151151 else nil
154154
155155
156156 func getAllUserClaimActions (userAddress) = {
157- func actionsHelper (acc,a) = {
158- let $t045774617 = acc
159- let allVestingsClaimActions = $t045774617._1
160- let sum = $t045774617._2
161- let $t046224698 = getUserClaimActions(userAddress, a)
162- let vestingClaimActions = $t046224698._1
163- let claimAmount = $t046224698._2
157+ func actionsHelper (acc,id) = {
158+ let $t045804620 = acc
159+ let allVestingsClaimActions = $t045804620._1
160+ let sum = $t045804620._2
161+ let $t046254702 = getUserClaimActions(userAddress, id)
162+ let vestingClaimActions = $t046254702._1
163+ let claimAmount = $t046254702._2
164164 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
165165 }
166166
180180
181181
182182 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
183- func actionsHelper (acc,a) = {
184- let $t049905031 = acc
185- let updateAllVestingsActions = $t049905031._1
186- let sum = $t049905031._2
187- let $t050365120 = getUpdateVestingActions(userAddress, a)
188- let updateVestingActions = $t050365120._1
189- let unlockedAmount = $t050365120._2
183+ func actionsHelper (acc,id) = {
184+ let $t049955036 = acc
185+ let updateAllVestingsActions = $t049955036._1
186+ let sum = $t049955036._2
187+ let $t050415126 = getUpdateVestingActions(userAddress, id)
188+ let updateVestingActions = $t050415126._1
189+ let unlockedAmount = $t050415126._2
190190 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
191191 }
192192
193- let $t052065294 = {
193+ let $t052125300 = {
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 = $t052065294._1
208- let unlockedSum = $t052065294._2
207+ let updateAllVestingsActions = $t052125300._1
208+ 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))]
223223
224224
225225 func getClaimAllActions (userAddress) = {
226- let $t060626195 = if (!(containsElement(banList, userAddress)))
226+ let $t060686201 = if (!(containsElement(banList, userAddress)))
227227 then getAllUserClaimActions(userAddress)
228228 else $Tuple2(nil, 0)
229- let claimActions = $t060626195._1
230- let unlockedAmount = $t060626195._2
231- let $t061986288 = getClaimAccumulatedActions(userAddress)
232- let claimAccumulatedActions = $t061986288._1
233- let accumulatedAmount = $t061986288._2
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
234234 let totalAmount = (unlockedAmount + accumulatedAmount)
235235 $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
236236 }
238238
239239 func getVestingUserInfo (userAddress) = {
240240 func helper (acc,id) = {
241- let $t065026581 = parseUserVesting(userAddress, id)
242- let vestingAmount = $t065026581._1
243- let startBlock = $t065026581._2
244- let lockLength = $t065026581._3
245- let $t065866664 = getUserUnlockedAmount(userAddress, id)
246- let unlockedAmount = $t065866664._1
247- let remainingAmount = $t065866664._2
241+ let $t065086587 = parseUserVesting(userAddress, id)
242+ let vestingAmount = $t065086587._1
243+ let startBlock = $t065086587._2
244+ let lockLength = $t065086587._3
245+ let $t065926670 = getUserUnlockedAmount(userAddress, id)
246+ let unlockedAmount = $t065926670._1
247+ let remainingAmount = $t065926670._2
248248 if (if ((vestingAmount == 0))
249249 then true
250250 else containsElement(banList, userAddress))
269269
270270 func getAvailableVestingId (userAddress) = {
271271 func helper (availableId,id) = {
272- let $t069887067 = parseUserVesting(userAddress, id)
273- let vestingAmount = $t069887067._1
274- let startBlock = $t069887067._2
275- let lockLength = $t069887067._3
272+ let $t069947073 = parseUserVesting(userAddress, id)
273+ let vestingAmount = $t069947073._1
274+ let startBlock = $t069947073._2
275+ let lockLength = $t069947073._3
276276 if ((vestingAmount > 0))
277277 then availableId
278278 else if ((availableId == -1))
319319 if ((check == check))
320320 then {
321321 let id = getAvailableVestingId(userAddress)
322- let historyActions = [IntegerEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), vestingAmount)]
322+ let historyActions = [StringEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), makeString([toString(vestingAmount), toString(startBlock), toString(lockLength), toString(id)], SEP))]
323323 (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions)
324324 }
325325 else throw("Strict value is not equal to itself.")
338338 else throwErr(makeString(["user already in a ban list:", userAddress], " "))]
339339 if ((checks == checks))
340340 then {
341- let $t087668854 = getMoveAllUnlockedToAccumulatorActions(userAddress)
342- let moveToAccumulatedActions = $t087668854._1
343- let _a = $t087668854._2
341+ let $t088808968 = getMoveAllUnlockedToAccumulatorActions(userAddress)
342+ let moveToAccumulatedActions = $t088808968._1
343+ let _a = $t088808968._2
344344 let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))]
345345 (moveToAccumulatedActions ++ addToBanListActions)
346346 }
378378 @Callable(i)
379379 func claimAll () = {
380380 let userAddress = toString(i.caller)
381- let $t097049769 = getClaimAllActions(userAddress)
382- let claimActions = $t097049769._1
383- let totalAmount = $t097049769._2
384- let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
381+ let $t098189883 = getClaimAllActions(userAddress)
382+ let claimActions = $t098189883._1
383+ let totalAmount = $t098189883._2
384+ let historyActions = [StringEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), toString(totalAmount))]
385385 if ((totalAmount > 0))
386386 then (claimActions ++ historyActions)
387387 else throwErr("nothing to claim")
391391
392392 @Callable(i)
393393 func userInfoREADONLY (userAddress) = {
394- let $t01008010135 = getClaimAllActions(userAddress)
395- let _a = $t01008010135._1
396- let totalAmount = $t01008010135._2
394+ let $t01022310278 = getClaimAllActions(userAddress)
395+ let _a = $t01022310278._1
396+ let totalAmount = $t01022310278._2
397397 let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
398398 $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress)))
399399 }
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", 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 $t032093288 = parseUserVesting(userAddress, id)
117- let vestingAmount = $t032093288._1
118- let startBlock = $t032093288._2
119- let lockLength = $t032093288._3
120- let $t032913388 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
121- let unlockedAmount = $t032913388._1
122- let remainingAmount = $t032913388._2
116+ let $t032113290 = parseUserVesting(userAddress, id)
117+ let vestingAmount = $t032113290._1
118+ let startBlock = $t032113290._2
119+ let lockLength = $t032113290._3
120+ let $t032933390 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
121+ let unlockedAmount = $t032933390._1
122+ let remainingAmount = $t032933390._2
123123 $Tuple2(unlockedAmount, remainingAmount)
124124 }
125125
126126
127127 func getUpdateVestingActions (userAddress,id) = {
128- let $t034953574 = parseUserVesting(userAddress, id)
129- let vestingAmount = $t034953574._1
130- let startBlock = $t034953574._2
131- let lockLength = $t034953574._3
132- let $t035773655 = getUserUnlockedAmount(userAddress, id)
133- let unlockedAmount = $t035773655._1
134- let remainingAmount = $t035773655._2
128+ let $t034973576 = parseUserVesting(userAddress, id)
129+ let vestingAmount = $t034973576._1
130+ let startBlock = $t034973576._2
131+ let lockLength = $t034973576._3
132+ let $t035793657 = getUserUnlockedAmount(userAddress, id)
133+ let unlockedAmount = $t035793657._1
134+ let remainingAmount = $t035793657._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 $t041194204 = getUpdateVestingActions(userAddress, id)
147- let updateVestingActions = $t041194204._1
148- let unlockedAmount = $t041194204._2
146+ let $t041214206 = getUpdateVestingActions(userAddress, id)
147+ let updateVestingActions = $t041214206._1
148+ let unlockedAmount = $t041214206._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) = {
157- func actionsHelper (acc,a) = {
158- let $t045774617 = acc
159- let allVestingsClaimActions = $t045774617._1
160- let sum = $t045774617._2
161- let $t046224698 = getUserClaimActions(userAddress, a)
162- let vestingClaimActions = $t046224698._1
163- let claimAmount = $t046224698._2
157+ func actionsHelper (acc,id) = {
158+ let $t045804620 = acc
159+ let allVestingsClaimActions = $t045804620._1
160+ let sum = $t045804620._2
161+ let $t046254702 = getUserClaimActions(userAddress, id)
162+ let vestingClaimActions = $t046254702._1
163+ let claimAmount = $t046254702._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) = {
183- func actionsHelper (acc,a) = {
184- let $t049905031 = acc
185- let updateAllVestingsActions = $t049905031._1
186- let sum = $t049905031._2
187- let $t050365120 = getUpdateVestingActions(userAddress, a)
188- let updateVestingActions = $t050365120._1
189- let unlockedAmount = $t050365120._2
183+ func actionsHelper (acc,id) = {
184+ let $t049955036 = acc
185+ let updateAllVestingsActions = $t049955036._1
186+ let sum = $t049955036._2
187+ let $t050415126 = getUpdateVestingActions(userAddress, id)
188+ let updateVestingActions = $t050415126._1
189+ let unlockedAmount = $t050415126._2
190190 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
191191 }
192192
193- let $t052065294 = {
193+ 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 }
207- let updateAllVestingsActions = $t052065294._1
208- let unlockedSum = $t052065294._2
207+ let updateAllVestingsActions = $t052125300._1
208+ 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) = {
226- let $t060626195 = if (!(containsElement(banList, userAddress)))
226+ let $t060686201 = if (!(containsElement(banList, userAddress)))
227227 then getAllUserClaimActions(userAddress)
228228 else $Tuple2(nil, 0)
229- let claimActions = $t060626195._1
230- let unlockedAmount = $t060626195._2
231- let $t061986288 = getClaimAccumulatedActions(userAddress)
232- let claimAccumulatedActions = $t061986288._1
233- let accumulatedAmount = $t061986288._2
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
234234 let totalAmount = (unlockedAmount + accumulatedAmount)
235235 $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
236236 }
237237
238238
239239 func getVestingUserInfo (userAddress) = {
240240 func helper (acc,id) = {
241- let $t065026581 = parseUserVesting(userAddress, id)
242- let vestingAmount = $t065026581._1
243- let startBlock = $t065026581._2
244- let lockLength = $t065026581._3
245- let $t065866664 = getUserUnlockedAmount(userAddress, id)
246- let unlockedAmount = $t065866664._1
247- let remainingAmount = $t065866664._2
241+ let $t065086587 = parseUserVesting(userAddress, id)
242+ let vestingAmount = $t065086587._1
243+ let startBlock = $t065086587._2
244+ let lockLength = $t065086587._3
245+ let $t065926670 = getUserUnlockedAmount(userAddress, id)
246+ let unlockedAmount = $t065926670._1
247+ let remainingAmount = $t065926670._2
248248 if (if ((vestingAmount == 0))
249249 then true
250250 else containsElement(banList, userAddress))
251251 then acc
252252 else (acc :+ [vestingAmount, (startBlock + lockLength), unlockedAmount, remainingAmount])
253253 }
254254
255255 let $l = IDS_LIST
256256 let $s = size($l)
257257 let $acc0 = nil
258258 func $f0_1 ($a,$i) = if (($i >= $s))
259259 then $a
260260 else helper($a, $l[$i])
261261
262262 func $f0_2 ($a,$i) = if (($i >= $s))
263263 then $a
264264 else throw("List size exceeds 30")
265265
266266 $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)
267267 }
268268
269269
270270 func getAvailableVestingId (userAddress) = {
271271 func helper (availableId,id) = {
272- let $t069887067 = parseUserVesting(userAddress, id)
273- let vestingAmount = $t069887067._1
274- let startBlock = $t069887067._2
275- let lockLength = $t069887067._3
272+ let $t069947073 = parseUserVesting(userAddress, id)
273+ let vestingAmount = $t069947073._1
274+ let startBlock = $t069947073._2
275+ let lockLength = $t069947073._3
276276 if ((vestingAmount > 0))
277277 then availableId
278278 else if ((availableId == -1))
279279 then id
280280 else min([availableId, id])
281281 }
282282
283283 let availableId = {
284284 let $l = IDS_LIST
285285 let $s = size($l)
286286 let $acc0 = -1
287287 func $f0_1 ($a,$i) = if (($i >= $s))
288288 then $a
289289 else helper($a, $l[$i])
290290
291291 func $f0_2 ($a,$i) = if (($i >= $s))
292292 then $a
293293 else throw("List size exceeds 30")
294294
295295 $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)
296296 }
297297 if ((availableId == -1))
298298 then throwErr(makeString(["user exceeded max active vesting count: ", userAddress], " "))
299299 else availableId
300300 }
301301
302302
303303 func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))]
304304
305305
306306 @Callable(i)
307307 func vestingForUser (userAddress,vestingAmount,startBlock,lockLength) = {
308308 let check = [if ((size(i.payments) == 1))
309309 then true
310310 else throwErr("should be with exactly 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
311311 then true
312312 else throwErr(makeString(["payment assetId should be: ", assetIdString], " ")), if ((i.payments[0].amount == vestingAmount))
313313 then true
314314 else throwErr("payment amount should be equal to vestingAmount"), if (if ((adminList == nil))
315315 then true
316316 else containsElement(adminList, toString(i.caller)))
317317 then true
318318 else throwErr("you must be admin")]
319319 if ((check == check))
320320 then {
321321 let id = getAvailableVestingId(userAddress)
322- let historyActions = [IntegerEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), vestingAmount)]
322+ let historyActions = [StringEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), makeString([toString(vestingAmount), toString(startBlock), toString(lockLength), toString(id)], SEP))]
323323 (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions)
324324 }
325325 else throw("Strict value is not equal to itself.")
326326 }
327327
328328
329329
330330 @Callable(i)
331331 func ban (userAddress) = {
332332 let checks = [if (if ((adminList == nil))
333333 then true
334334 else containsElement(adminList, toString(i.caller)))
335335 then true
336336 else throwErr("you must be admin"), if (!(containsElement(banList, userAddress)))
337337 then true
338338 else throwErr(makeString(["user already in a ban list:", userAddress], " "))]
339339 if ((checks == checks))
340340 then {
341- let $t087668854 = getMoveAllUnlockedToAccumulatorActions(userAddress)
342- let moveToAccumulatedActions = $t087668854._1
343- let _a = $t087668854._2
341+ let $t088808968 = getMoveAllUnlockedToAccumulatorActions(userAddress)
342+ let moveToAccumulatedActions = $t088808968._1
343+ let _a = $t088808968._2
344344 let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))]
345345 (moveToAccumulatedActions ++ addToBanListActions)
346346 }
347347 else throw("Strict value is not equal to itself.")
348348 }
349349
350350
351351
352352 @Callable(i)
353353 func unban (userAddress) = {
354354 let checks = [if (if ((adminList == nil))
355355 then true
356356 else containsElement(adminList, toString(i.caller)))
357357 then true
358358 else throwErr("you must be admin"), if (containsElement(banList, userAddress))
359359 then true
360360 else throwErr(makeString(["user not in a ban list:", userAddress], " "))]
361361 if ((checks == checks))
362362 then {
363363 let newBanList = match indexOf(banList, userAddress) {
364364 case ind: Int =>
365365 removeByIndex(banList, ind)
366366 case _ =>
367367 throwErr("user address index in ban list is not found")
368368 }
369369 if ((newBanList == nil))
370370 then [DeleteEntry(keyBanList)]
371371 else [StringEntry(keyBanList, makeString_11C(newBanList, "__"))]
372372 }
373373 else throw("Strict value is not equal to itself.")
374374 }
375375
376376
377377
378378 @Callable(i)
379379 func claimAll () = {
380380 let userAddress = toString(i.caller)
381- let $t097049769 = getClaimAllActions(userAddress)
382- let claimActions = $t097049769._1
383- let totalAmount = $t097049769._2
384- let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
381+ let $t098189883 = getClaimAllActions(userAddress)
382+ let claimActions = $t098189883._1
383+ let totalAmount = $t098189883._2
384+ let historyActions = [StringEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), toString(totalAmount))]
385385 if ((totalAmount > 0))
386386 then (claimActions ++ historyActions)
387387 else throwErr("nothing to claim")
388388 }
389389
390390
391391
392392 @Callable(i)
393393 func userInfoREADONLY (userAddress) = {
394- let $t01008010135 = getClaimAllActions(userAddress)
395- let _a = $t01008010135._1
396- let totalAmount = $t01008010135._2
394+ let $t01022310278 = getClaimAllActions(userAddress)
395+ let _a = $t01022310278._1
396+ let totalAmount = $t01022310278._2
397397 let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
398398 $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress)))
399399 }
400400
401401

github/deemru/w8io/026f985 
61.92 ms