tx · 6SSLGym72Tp67pWGoeFi4a6Hmym5Nd1d7iiqg7kgyXAj

3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1:  -0.01000000 Waves

2024.01.09 15:07 [2923916] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves

{ "type": 13, "id": "6SSLGym72Tp67pWGoeFi4a6Hmym5Nd1d7iiqg7kgyXAj", "fee": 1000000, "feeAssetId": null, "timestamp": 1704802116068, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "5B8QNz5KPoqycjEHc2okTxpBB4fXr3MX1Cfw7ThoPpKp1WKjATyURpBvPegHwSperdTHiUmBFKrBxSwX4aaiT9Be" ], "script": "base64:BgIRCAISBgoECAEBARIAEgMKAQgaAAxjb250cmFjdEZpbGUCEHZlc3RpbmdfbmVvLnJpZGUAA1NFUAICX18ACElEU19MSVNUCQDMCAIAAAkAzAgCAAEJAMwIAgACCQDMCAIAAwkAzAgCAAQJAMwIAgAFCQDMCAIABgkAzAgCAAcJAMwIAgAICQDMCAIACQkAzAgCAAoJAMwIAgALCQDMCAIADAkAzAgCAA0JAMwIAgAOCQDMCAIADwkAzAgCABAJAMwIAgARCQDMCAIAEgkAzAgCABMJAMwIAgAUCQDMCAIAFQkAzAgCABYJAMwIAgAXCQDMCAIAGAkAzAgCABkJAMwIAgAaCQDMCAIAGwkAzAgCABwJAMwIAgAdBQNuaWwAEU1BWF9WRVNUSU5HX0NPVU5UCQCQAwEFCElEU19MSVNUAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQAA1hc3NldElkU3RyaW5nCQELdmFsdWVPckV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CyR0MDc4ODA3OTQ1Al8xBAt0b3RhbEFtb3VudAgFCyR0MDc4ODA3OTQ1Al8yBA5oaXN0b3J5QWN0aW9ucwkAzAgCCQEMSW50ZWdlckVudHJ5AgkBEWtleVZlc3RpbmdIaXN0b3J5AwIHY2xhaW1lZAULdXNlckFkZHJlc3MJANgEAQgFAWkNdHJhbnNhY3Rpb25JZAULdG90YWxBbW91bnQFA25pbAkAzggCBQxjbGFpbUFjdGlvbnMFDmhpc3RvcnlBY3Rpb25zAWkBA2ZvbwELdXNlckFkZHJlc3MJASZnZXRNb3ZlQWxsVW5sb2NrZWRUb0FjY3VtdWxhdG9yQWN0aW9ucwEFC3VzZXJBZGRyZXNzAHzT3Ss=", "height": 2923916, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 78yVhGW5aKxchThjtZbpmTxryV6qrDYcy1CRvm3cQYqr Next: CKptvzRwTAYpRJEnQ5ETTXLgFsfnL4A1Z23UsL1WGEND Diff:
OldNewDifferences
211211 }
212212
213213
214+func getClaimAllActions (userAddress) = {
215+ let $t058685940 = getAllUserClaimActions(userAddress)
216+ let claimActions = $t058685940._1
217+ let unlockedAmount = $t058685940._2
218+ let $t059436033 = getClaimAccumulatedActions(userAddress)
219+ let claimAccumulatedActions = $t059436033._1
220+ let accumulatedAmount = $t059436033._2
221+ let totalAmount = (unlockedAmount + accumulatedAmount)
222+ if ((totalAmount > 0))
223+ then $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
224+ else throwErr("nothing to claim")
225+ }
226+
227+
214228 func getAvailableVestingId (userAddress) = {
215229 func helper (availableId,id) = {
216- let $t059195998 = parseUserVesting(userAddress, id)
217- let vestingAmount = $t059195998._1
218- let startBlock = $t059195998._2
219- let lockLength = $t059195998._3
230+ let $t063246403 = parseUserVesting(userAddress, id)
231+ let vestingAmount = $t063246403._1
232+ let startBlock = $t063246403._2
233+ let lockLength = $t063246403._3
220234 if ((vestingAmount > 0))
221235 then availableId
222236 else if ((availableId == -1))
274288 @Callable(i)
275289 func claimAll () = {
276290 let userAddress = toString(i.caller)
277- let $t074757547 = getAllUserClaimActions(userAddress)
278- let claimActions = $t074757547._1
279- let unlockedAmount = $t074757547._2
280- let $t075507640 = getClaimAccumulatedActions(userAddress)
281- let claimAccumulatedActions = $t075507640._1
282- let accumulatedAmount = $t075507640._2
283- let totalAmount = (unlockedAmount + accumulatedAmount)
291+ let $t078807945 = getClaimAllActions(userAddress)
292+ let claimActions = $t078807945._1
293+ let totalAmount = $t078807945._2
284294 let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
285- if ((totalAmount > 0))
286- then ((claimActions ++ claimAccumulatedActions) ++ historyActions)
287- else throwErr("nothing to claim")
295+ (claimActions ++ historyActions)
288296 }
289297
290298
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 adminList = match getString(this, keyAdminList) {
2626 case s: String =>
2727 split(s, SEP)
2828 case _ =>
2929 nil
3030 }
3131
3232 func isValidAddressString (addressString) = match addressFromString(addressString) {
3333 case a: Address =>
3434 true
3535 case _ =>
3636 false
3737 }
3838
3939
4040 func keyUserVesting (userAddress,id) = {
4141 let checks = [if (isValidAddressString(userAddress))
4242 then true
4343 else throwErr(makeString(["address is not valid:", userAddress], " ")), if (if ((id >= 0))
4444 then (MAX_VESTING_COUNT > id)
4545 else false)
4646 then true
4747 else throwErr(makeString(["id should be less than", toString(MAX_VESTING_COUNT), "got:", toString(id)], " "))]
4848 if ((checks == checks))
4949 then makeString(["%s%s%d", "vesting", userAddress, toString(id)], SEP)
5050 else throw("Strict value is not equal to itself.")
5151 }
5252
5353
5454 func keyUserAccumulated (userAddress) = {
5555 let checks = [if (isValidAddressString(userAddress))
5656 then true
5757 else throwErr(makeString(["address is not valid:", userAddress], " "))]
5858 if ((checks == checks))
5959 then makeString(["%s%s", "accumulated", userAddress], SEP)
6060 else throw("Strict value is not equal to itself.")
6161 }
6262
6363
6464 func formatUserVesting (vestingAmount,startBlock,lockLength) = {
6565 let checks = [if ((vestingAmount >= 0))
6666 then true
6767 else throwErr("vesting amount cannot be negative"), if ((startBlock >= 0))
6868 then true
6969 else throwErr("start block cannot be negative"), if ((lockLength >= 0))
7070 then true
7171 else throwErr("lock length cannot be negative")]
7272 if ((checks == checks))
7373 then makeString(["%d%d%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP)
7474 else throw("Strict value is not equal to itself.")
7575 }
7676
7777
7878 func parseUserVesting (userAddress,id) = match getString(this, keyUserVesting(userAddress, id)) {
7979 case rawString: String =>
8080 let splitString = split(rawString, SEP)
8181 let vestingAmount = parseIntValue(splitString[1])
8282 let startBlock = parseIntValue(splitString[2])
8383 let lockLength = parseIntValue(splitString[3])
8484 $Tuple3(vestingAmount, startBlock, lockLength)
8585 case _ =>
8686 $Tuple3(0, 0, 0)
8787 }
8888
8989
9090 func keyVestingHistory (action,userAddress,txId) = makeString(["%s%s%s%s", "history", action, userAddress, txId], SEP)
9191
9292
9393 func calcUnlockedAmount (amount,startBlock,lockLength) = {
9494 let elapsedBlocks = (height - startBlock)
9595 let unlockedAmount = if (if ((lockLength != 0))
9696 then (elapsedBlocks > 0)
9797 else false)
9898 then min([fraction(amount, elapsedBlocks, lockLength), amount])
9999 else 0
100100 $Tuple2(unlockedAmount, (amount - unlockedAmount))
101101 }
102102
103103
104104 func getUserUnlockedAmount (userAddress,id) = {
105105 let $t030143093 = parseUserVesting(userAddress, id)
106106 let vestingAmount = $t030143093._1
107107 let startBlock = $t030143093._2
108108 let lockLength = $t030143093._3
109109 let $t030963193 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
110110 let unlockedAmount = $t030963193._1
111111 let remainingAmount = $t030963193._2
112112 $Tuple2(unlockedAmount, remainingAmount)
113113 }
114114
115115
116116 func getUpdateVestingActions (userAddress,id) = {
117117 let $t033003379 = parseUserVesting(userAddress, id)
118118 let vestingAmount = $t033003379._1
119119 let startBlock = $t033003379._2
120120 let lockLength = $t033003379._3
121121 let $t033823460 = getUserUnlockedAmount(userAddress, id)
122122 let unlockedAmount = $t033823460._1
123123 let remainingAmount = $t033823460._2
124124 let remainingBlocks = max([((startBlock + lockLength) - height), 0])
125125 let updateVestingActions = if ((unlockedAmount != 0))
126126 then if ((remainingBlocks != 0))
127127 then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
128128 else [DeleteEntry(keyUserVesting(userAddress, id))]
129129 else nil
130130 $Tuple2(updateVestingActions, unlockedAmount)
131131 }
132132
133133
134134 func getUserClaimActions (userAddress,id) = {
135135 let $t039244009 = getUpdateVestingActions(userAddress, id)
136136 let updateVestingActions = $t039244009._1
137137 let unlockedAmount = $t039244009._2
138138 let transferActions = if ((unlockedAmount != 0))
139139 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
140140 else nil
141141 $Tuple2((updateVestingActions ++ transferActions), unlockedAmount)
142142 }
143143
144144
145145 func getAllUserClaimActions (userAddress) = {
146146 func actionsHelper (acc,a) = {
147147 let $t043834423 = acc
148148 let allVestingsClaimActions = $t043834423._1
149149 let sum = $t043834423._2
150150 let $t044284504 = getUserClaimActions(userAddress, a)
151151 let vestingClaimActions = $t044284504._1
152152 let claimAmount = $t044284504._2
153153 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
154154 }
155155
156156 let $l = IDS_LIST
157157 let $s = size($l)
158158 let $acc0 = $Tuple2(nil, 0)
159159 func $f0_1 ($a,$i) = if (($i >= $s))
160160 then $a
161161 else actionsHelper($a, $l[$i])
162162
163163 func $f0_2 ($a,$i) = if (($i >= $s))
164164 then $a
165165 else throw("List size exceeds 30")
166166
167167 $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)
168168 }
169169
170170
171171 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
172172 func actionsHelper (acc,a) = {
173173 let $t047964837 = acc
174174 let updateAllVestingsActions = $t047964837._1
175175 let sum = $t047964837._2
176176 let $t048424926 = getUpdateVestingActions(userAddress, a)
177177 let updateVestingActions = $t048424926._1
178178 let unlockedAmount = $t048424926._2
179179 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
180180 }
181181
182182 let $t050125100 = {
183183 let $l = IDS_LIST
184184 let $s = size($l)
185185 let $acc0 = $Tuple2(nil, 0)
186186 func $f0_1 ($a,$i) = if (($i >= $s))
187187 then $a
188188 else actionsHelper($a, $l[$i])
189189
190190 func $f0_2 ($a,$i) = if (($i >= $s))
191191 then $a
192192 else throw("List size exceeds 30")
193193
194194 $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)
195195 }
196196 let updateAllVestingsActions = $t050125100._1
197197 let unlockedSum = $t050125100._2
198198 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
199199 let updateAccumulatedActions = if ((unlockedSum != 0))
200200 then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
201201 else nil
202202 $Tuple2((updateAllVestingsActions ++ updateAccumulatedActions), unlockedSum)
203203 }
204204
205205
206206 func getClaimAccumulatedActions (userAddress) = {
207207 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
208208 if ((oldAccumulated != 0))
209209 then $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), oldAccumulated, assetIdBytes), DeleteEntry(keyUserAccumulated(userAddress))], oldAccumulated)
210210 else $Tuple2(nil, 0)
211211 }
212212
213213
214+func getClaimAllActions (userAddress) = {
215+ let $t058685940 = getAllUserClaimActions(userAddress)
216+ let claimActions = $t058685940._1
217+ let unlockedAmount = $t058685940._2
218+ let $t059436033 = getClaimAccumulatedActions(userAddress)
219+ let claimAccumulatedActions = $t059436033._1
220+ let accumulatedAmount = $t059436033._2
221+ let totalAmount = (unlockedAmount + accumulatedAmount)
222+ if ((totalAmount > 0))
223+ then $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
224+ else throwErr("nothing to claim")
225+ }
226+
227+
214228 func getAvailableVestingId (userAddress) = {
215229 func helper (availableId,id) = {
216- let $t059195998 = parseUserVesting(userAddress, id)
217- let vestingAmount = $t059195998._1
218- let startBlock = $t059195998._2
219- let lockLength = $t059195998._3
230+ let $t063246403 = parseUserVesting(userAddress, id)
231+ let vestingAmount = $t063246403._1
232+ let startBlock = $t063246403._2
233+ let lockLength = $t063246403._3
220234 if ((vestingAmount > 0))
221235 then availableId
222236 else if ((availableId == -1))
223237 then id
224238 else min([availableId, id])
225239 }
226240
227241 let availableId = {
228242 let $l = IDS_LIST
229243 let $s = size($l)
230244 let $acc0 = -1
231245 func $f0_1 ($a,$i) = if (($i >= $s))
232246 then $a
233247 else helper($a, $l[$i])
234248
235249 func $f0_2 ($a,$i) = if (($i >= $s))
236250 then $a
237251 else throw("List size exceeds 30")
238252
239253 $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)
240254 }
241255 if ((availableId == -1))
242256 then throwErr(makeString(["user exceeded max active vesting count: ", userAddress], " "))
243257 else availableId
244258 }
245259
246260
247261 func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))]
248262
249263
250264 @Callable(i)
251265 func vestingForUser (userAddress,vestingAmount,startBlock,lockLength) = {
252266 let check = [if ((size(i.payments) == 1))
253267 then true
254268 else throwErr("should be with exactly 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
255269 then true
256270 else throwErr(makeString(["payment assetId should be: ", assetIdString], " ")), if ((i.payments[0].amount == vestingAmount))
257271 then true
258272 else throwErr("payment amount should be equal to vestingAmount"), if (if ((adminList == nil))
259273 then true
260274 else containsElement(adminList, toString(i.caller)))
261275 then true
262276 else throwErr("you must be admin")]
263277 if ((check == check))
264278 then {
265279 let id = getAvailableVestingId(userAddress)
266280 let historyActions = [IntegerEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), vestingAmount)]
267281 (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions)
268282 }
269283 else throw("Strict value is not equal to itself.")
270284 }
271285
272286
273287
274288 @Callable(i)
275289 func claimAll () = {
276290 let userAddress = toString(i.caller)
277- let $t074757547 = getAllUserClaimActions(userAddress)
278- let claimActions = $t074757547._1
279- let unlockedAmount = $t074757547._2
280- let $t075507640 = getClaimAccumulatedActions(userAddress)
281- let claimAccumulatedActions = $t075507640._1
282- let accumulatedAmount = $t075507640._2
283- let totalAmount = (unlockedAmount + accumulatedAmount)
291+ let $t078807945 = getClaimAllActions(userAddress)
292+ let claimActions = $t078807945._1
293+ let totalAmount = $t078807945._2
284294 let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
285- if ((totalAmount > 0))
286- then ((claimActions ++ claimAccumulatedActions) ++ historyActions)
287- else throwErr("nothing to claim")
295+ (claimActions ++ historyActions)
288296 }
289297
290298
291299
292300 @Callable(i)
293301 func foo (userAddress) = getMoveAllUnlockedToAccumulatorActions(userAddress)
294302
295303

github/deemru/w8io/169f3d6 
52.63 ms