tx · Gv5pwEeNUkw6zeKWsaARomE3pyg33KJrpz8KhQNBdVcp

3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1:  -0.01000000 Waves

2024.01.09 14:57 [2923902] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves

{ "type": 13, "id": "Gv5pwEeNUkw6zeKWsaARomE3pyg33KJrpz8KhQNBdVcp", "fee": 1000000, "feeAssetId": null, "timestamp": 1704801461273, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "49vfg6gL37WdYN9khwtJXcbKxtS1NKqRhqt7Vyu94VimH4E8X95H5Socu33EQWDyAC2iobszZeHRHUhUQrdDKGev" ], "script": "base64:BgIRCAISBgoECAEBARIAEgMKAQgZAAxjb250cmFjdEZpbGUCEHZlc3RpbmdfbmVvLnJpZGUAA1NFUAICX18ACElEU19MSVNUCQDMCAIAAAkAzAgCAAEJAMwIAgACCQDMCAIAAwkAzAgCAAQJAMwIAgAFCQDMCAIABgkAzAgCAAcJAMwIAgAICQDMCAIACQkAzAgCAAoJAMwIAgALCQDMCAIADAkAzAgCAA0JAMwIAgAOCQDMCAIADwkAzAgCABAJAMwIAgARCQDMCAIAEgkAzAgCABMJAMwIAgAUCQDMCAIAFQkAzAgCABYJAMwIAgAXCQDMCAIAGAkAzAgCABkJAMwIAgAaCQDMCAIAGwkAzAgCABwJAMwIAgAdBQNuaWwAEU1BWF9WRVNUSU5HX0NPVU5UCQCQAwEFCElEU19MSVNUAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQAA1hc3NldElkU3RyaW5nCQELdmFsdWVPckVsc2UCCQ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RkcmVzcwDIpLcf", "height": 2923902, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ber9vaDCWa8ar6yvgyDuEwc45ShDrSbTysEn4bj4xXnM Next: 78yVhGW5aKxchThjtZbpmTxryV6qrDYcy1CRvm3cQYqr Diff:
OldNewDifferences
194194 let updateAllVestingsActions = $t049114999._1
195195 let unlockedSum = $t049114999._2
196196 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
197- let updateAccumulatedActions = [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
197+ let updateAccumulatedActions = if ((unlockedSum != 0))
198+ then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
199+ else nil
198200 $Tuple2((updateAllVestingsActions ++ updateAccumulatedActions), unlockedSum)
201+ }
202+
203+
204+func getClaimAccumulatedActions (userAddress) = {
205+ let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
206+ if ((oldAccumulated != 0))
207+ then $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), oldAccumulated, assetIdBytes), DeleteEntry(keyUserAccumulated(userAddress))], oldAccumulated)
208+ else $Tuple2(nil, 0)
199209 }
200210
201211
202212 func getAvailableVestingId (userAddress) = {
203213 func helper (availableId,id) = {
204- let $t053835462 = parseUserVesting(userAddress, id)
205- let vestingAmount = $t053835462._1
206- let startBlock = $t053835462._2
207- let lockLength = $t053835462._3
214+ let $t058185897 = parseUserVesting(userAddress, id)
215+ let vestingAmount = $t058185897._1
216+ let startBlock = $t058185897._2
217+ let lockLength = $t058185897._3
208218 if ((vestingAmount > 0))
209219 then availableId
210220 else if ((availableId == -1))
262272 @Callable(i)
263273 func claimAll () = {
264274 let userAddress = toString(i.caller)
265- let $t069397008 = getAllUserClaimActions(userAddress)
266- let claimActions = $t069397008._1
267- let totalAmount = $t069397008._2
275+ let $t073747446 = getAllUserClaimActions(userAddress)
276+ let claimActions = $t073747446._1
277+ let unlockedAmount = $t073747446._2
278+ let $t074497539 = getClaimAccumulatedActions(userAddress)
279+ let claimAccumulatedActions = $t074497539._1
280+ let accumulatedAmount = $t074497539._2
281+ let totalAmount = (unlockedAmount + accumulatedAmount)
268282 let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
269283 if ((totalAmount > 0))
270- then (claimActions ++ historyActions)
284+ then ((claimActions ++ claimAccumulatedActions) ++ historyActions)
271285 else throwErr("nothing to claim")
272286 }
287+
288+
289+
290+@Callable(i)
291+func foo (userAddress) = getMoveAllUnlockedToAccumulatorActions(userAddress)
273292
274293
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 [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
127127 else nil
128128 $Tuple2(updateVestingActions, unlockedAmount)
129129 }
130130
131131
132132 func getUserClaimActions (userAddress,id) = {
133133 let $t038233908 = getUpdateVestingActions(userAddress, id)
134134 let updateVestingActions = $t038233908._1
135135 let unlockedAmount = $t038233908._2
136136 let transferActions = if ((unlockedAmount != 0))
137137 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
138138 else nil
139139 $Tuple2((updateVestingActions ++ transferActions), unlockedAmount)
140140 }
141141
142142
143143 func getAllUserClaimActions (userAddress) = {
144144 func actionsHelper (acc,a) = {
145145 let $t042824322 = acc
146146 let allVestingsClaimActions = $t042824322._1
147147 let sum = $t042824322._2
148148 let $t043274403 = getUserClaimActions(userAddress, a)
149149 let vestingClaimActions = $t043274403._1
150150 let claimAmount = $t043274403._2
151151 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
152152 }
153153
154154 let $l = IDS_LIST
155155 let $s = size($l)
156156 let $acc0 = $Tuple2(nil, 0)
157157 func $f0_1 ($a,$i) = if (($i >= $s))
158158 then $a
159159 else actionsHelper($a, $l[$i])
160160
161161 func $f0_2 ($a,$i) = if (($i >= $s))
162162 then $a
163163 else throw("List size exceeds 30")
164164
165165 $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)
166166 }
167167
168168
169169 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
170170 func actionsHelper (acc,a) = {
171171 let $t046954736 = acc
172172 let updateAllVestingsActions = $t046954736._1
173173 let sum = $t046954736._2
174174 let $t047414825 = getUpdateVestingActions(userAddress, a)
175175 let updateVestingActions = $t047414825._1
176176 let unlockedAmount = $t047414825._2
177177 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
178178 }
179179
180180 let $t049114999 = {
181181 let $l = IDS_LIST
182182 let $s = size($l)
183183 let $acc0 = $Tuple2(nil, 0)
184184 func $f0_1 ($a,$i) = if (($i >= $s))
185185 then $a
186186 else actionsHelper($a, $l[$i])
187187
188188 func $f0_2 ($a,$i) = if (($i >= $s))
189189 then $a
190190 else throw("List size exceeds 30")
191191
192192 $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)
193193 }
194194 let updateAllVestingsActions = $t049114999._1
195195 let unlockedSum = $t049114999._2
196196 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
197- let updateAccumulatedActions = [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
197+ let updateAccumulatedActions = if ((unlockedSum != 0))
198+ then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
199+ else nil
198200 $Tuple2((updateAllVestingsActions ++ updateAccumulatedActions), unlockedSum)
201+ }
202+
203+
204+func getClaimAccumulatedActions (userAddress) = {
205+ let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
206+ if ((oldAccumulated != 0))
207+ then $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), oldAccumulated, assetIdBytes), DeleteEntry(keyUserAccumulated(userAddress))], oldAccumulated)
208+ else $Tuple2(nil, 0)
199209 }
200210
201211
202212 func getAvailableVestingId (userAddress) = {
203213 func helper (availableId,id) = {
204- let $t053835462 = parseUserVesting(userAddress, id)
205- let vestingAmount = $t053835462._1
206- let startBlock = $t053835462._2
207- let lockLength = $t053835462._3
214+ let $t058185897 = parseUserVesting(userAddress, id)
215+ let vestingAmount = $t058185897._1
216+ let startBlock = $t058185897._2
217+ let lockLength = $t058185897._3
208218 if ((vestingAmount > 0))
209219 then availableId
210220 else if ((availableId == -1))
211221 then id
212222 else min([availableId, id])
213223 }
214224
215225 let availableId = {
216226 let $l = IDS_LIST
217227 let $s = size($l)
218228 let $acc0 = -1
219229 func $f0_1 ($a,$i) = if (($i >= $s))
220230 then $a
221231 else helper($a, $l[$i])
222232
223233 func $f0_2 ($a,$i) = if (($i >= $s))
224234 then $a
225235 else throw("List size exceeds 30")
226236
227237 $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)
228238 }
229239 if ((availableId == -1))
230240 then throwErr(makeString(["user exceeded max active vesting count: ", userAddress], " "))
231241 else availableId
232242 }
233243
234244
235245 func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))]
236246
237247
238248 @Callable(i)
239249 func vestingForUser (userAddress,vestingAmount,startBlock,lockLength) = {
240250 let check = [if ((size(i.payments) == 1))
241251 then true
242252 else throwErr("should be with exactly 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
243253 then true
244254 else throwErr(makeString(["payment assetId should be: ", assetIdString], " ")), if ((i.payments[0].amount == vestingAmount))
245255 then true
246256 else throwErr("payment amount should be equal to vestingAmount"), if (if ((adminList == nil))
247257 then true
248258 else containsElement(adminList, toString(i.caller)))
249259 then true
250260 else throwErr("you must be admin")]
251261 if ((check == check))
252262 then {
253263 let id = getAvailableVestingId(userAddress)
254264 let historyActions = [IntegerEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), vestingAmount)]
255265 (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions)
256266 }
257267 else throw("Strict value is not equal to itself.")
258268 }
259269
260270
261271
262272 @Callable(i)
263273 func claimAll () = {
264274 let userAddress = toString(i.caller)
265- let $t069397008 = getAllUserClaimActions(userAddress)
266- let claimActions = $t069397008._1
267- let totalAmount = $t069397008._2
275+ let $t073747446 = getAllUserClaimActions(userAddress)
276+ let claimActions = $t073747446._1
277+ let unlockedAmount = $t073747446._2
278+ let $t074497539 = getClaimAccumulatedActions(userAddress)
279+ let claimAccumulatedActions = $t074497539._1
280+ let accumulatedAmount = $t074497539._2
281+ let totalAmount = (unlockedAmount + accumulatedAmount)
268282 let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
269283 if ((totalAmount > 0))
270- then (claimActions ++ historyActions)
284+ then ((claimActions ++ claimAccumulatedActions) ++ historyActions)
271285 else throwErr("nothing to claim")
272286 }
287+
288+
289+
290+@Callable(i)
291+func foo (userAddress) = getMoveAllUnlockedToAccumulatorActions(userAddress)
273292
274293

github/deemru/w8io/169f3d6 
38.40 ms