tx · 78yVhGW5aKxchThjtZbpmTxryV6qrDYcy1CRvm3cQYqr

3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1:  -0.01000000 Waves

2024.01.09 15:03 [2923909] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves

{ "type": 13, "id": "78yVhGW5aKxchThjtZbpmTxryV6qrDYcy1CRvm3cQYqr", "fee": 1000000, "feeAssetId": null, "timestamp": 1704801860764, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "4upiKjeY9xHZBrViUjwDS7XEAtoJQTmQiaRNtupSQ6hbfjUT5EHU5qFqiThjh9bceFgiVzwHsKbdy3vQ9WReNCco" ], "script": "base64:BgIRCAISBgoECAEBARIAEgMKAQgZAAxjb250cmFjdEZpbGUCEHZlc3RpbmdfbmVvLnJpZGUAA1NFUAICX18ACElEU19MSVNUCQDMCAIAAAkAzAgCAAEJAMwIAgACCQDMCAIAAwkAzAgCAAQJAMwIAgAFCQDMCAIABgkAzAgCAAcJAMwIAgAICQDMCAIACQkAzAgCAAoJAMwIAgALCQDMCAIADAkAzAgCAA0JAMwIAgAOCQDMCAIADwkAzAgCABAJAMwIAgARCQDMCAIAEgkAzAgCABMJAMwIAgAUCQDMCAIAFQkAzAgCABYJAMwIAgAXCQDMCAIAGAkAzAgCABkJAMwIAgAaCQDMCAIAGwkAzAgCABwJAMwIAgAdBQNuaWwAEU1BWF9WRVNUSU5HX0NPVU5UCQCQAwEFCElEU19MSVNUAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQAA1hc3NldElkU3RyaW5nCQELdmFsdWVPckVsc2UC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Ghyb3dFcnIBAhBub3RoaW5nIHRvIGNsYWltAWkBA2ZvbwELdXNlckFkZHJlc3MJASZnZXRNb3ZlQWxsVW5sb2NrZWRUb0FjY3VtdWxhdG9yQWN0aW9ucwEFC3VzZXJBZGRyZXNzAIJQ/6g=", "height": 2923909, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gv5pwEeNUkw6zeKWsaARomE3pyg33KJrpz8KhQNBdVcp Next: 6SSLGym72Tp67pWGoeFi4a6Hmym5Nd1d7iiqg7kgyXAj Diff:
OldNewDifferences
123123 let remainingAmount = $t033823460._2
124124 let remainingBlocks = max([((startBlock + lockLength) - height), 0])
125125 let updateVestingActions = if ((unlockedAmount != 0))
126- then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
126+ then if ((remainingBlocks != 0))
127+ then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
128+ else [DeleteEntry(keyUserVesting(userAddress, id))]
127129 else nil
128130 $Tuple2(updateVestingActions, unlockedAmount)
129131 }
130132
131133
132134 func getUserClaimActions (userAddress,id) = {
133- let $t038233908 = getUpdateVestingActions(userAddress, id)
134- let updateVestingActions = $t038233908._1
135- let unlockedAmount = $t038233908._2
135+ let $t039244009 = getUpdateVestingActions(userAddress, id)
136+ let updateVestingActions = $t039244009._1
137+ let unlockedAmount = $t039244009._2
136138 let transferActions = if ((unlockedAmount != 0))
137139 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
138140 else nil
142144
143145 func getAllUserClaimActions (userAddress) = {
144146 func actionsHelper (acc,a) = {
145- let $t042824322 = acc
146- let allVestingsClaimActions = $t042824322._1
147- let sum = $t042824322._2
148- let $t043274403 = getUserClaimActions(userAddress, a)
149- let vestingClaimActions = $t043274403._1
150- let claimAmount = $t043274403._2
147+ let $t043834423 = acc
148+ let allVestingsClaimActions = $t043834423._1
149+ let sum = $t043834423._2
150+ let $t044284504 = getUserClaimActions(userAddress, a)
151+ let vestingClaimActions = $t044284504._1
152+ let claimAmount = $t044284504._2
151153 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
152154 }
153155
168170
169171 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
170172 func actionsHelper (acc,a) = {
171- let $t046954736 = acc
172- let updateAllVestingsActions = $t046954736._1
173- let sum = $t046954736._2
174- let $t047414825 = getUpdateVestingActions(userAddress, a)
175- let updateVestingActions = $t047414825._1
176- let unlockedAmount = $t047414825._2
173+ let $t047964837 = acc
174+ let updateAllVestingsActions = $t047964837._1
175+ let sum = $t047964837._2
176+ let $t048424926 = getUpdateVestingActions(userAddress, a)
177+ let updateVestingActions = $t048424926._1
178+ let unlockedAmount = $t048424926._2
177179 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
178180 }
179181
180- let $t049114999 = {
182+ let $t050125100 = {
181183 let $l = IDS_LIST
182184 let $s = size($l)
183185 let $acc0 = $Tuple2(nil, 0)
191193
192194 $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)
193195 }
194- let updateAllVestingsActions = $t049114999._1
195- let unlockedSum = $t049114999._2
196+ let updateAllVestingsActions = $t050125100._1
197+ let unlockedSum = $t050125100._2
196198 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
197199 let updateAccumulatedActions = if ((unlockedSum != 0))
198200 then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
211213
212214 func getAvailableVestingId (userAddress) = {
213215 func helper (availableId,id) = {
214- let $t058185897 = parseUserVesting(userAddress, id)
215- let vestingAmount = $t058185897._1
216- let startBlock = $t058185897._2
217- let lockLength = $t058185897._3
216+ let $t059195998 = parseUserVesting(userAddress, id)
217+ let vestingAmount = $t059195998._1
218+ let startBlock = $t059195998._2
219+ let lockLength = $t059195998._3
218220 if ((vestingAmount > 0))
219221 then availableId
220222 else if ((availableId == -1))
272274 @Callable(i)
273275 func claimAll () = {
274276 let userAddress = toString(i.caller)
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
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
281283 let totalAmount = (unlockedAmount + accumulatedAmount)
282284 let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
283285 if ((totalAmount > 0))
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))
126- then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
126+ then if ((remainingBlocks != 0))
127+ then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
128+ else [DeleteEntry(keyUserVesting(userAddress, id))]
127129 else nil
128130 $Tuple2(updateVestingActions, unlockedAmount)
129131 }
130132
131133
132134 func getUserClaimActions (userAddress,id) = {
133- let $t038233908 = getUpdateVestingActions(userAddress, id)
134- let updateVestingActions = $t038233908._1
135- let unlockedAmount = $t038233908._2
135+ let $t039244009 = getUpdateVestingActions(userAddress, id)
136+ let updateVestingActions = $t039244009._1
137+ let unlockedAmount = $t039244009._2
136138 let transferActions = if ((unlockedAmount != 0))
137139 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
138140 else nil
139141 $Tuple2((updateVestingActions ++ transferActions), unlockedAmount)
140142 }
141143
142144
143145 func getAllUserClaimActions (userAddress) = {
144146 func actionsHelper (acc,a) = {
145- let $t042824322 = acc
146- let allVestingsClaimActions = $t042824322._1
147- let sum = $t042824322._2
148- let $t043274403 = getUserClaimActions(userAddress, a)
149- let vestingClaimActions = $t043274403._1
150- let claimAmount = $t043274403._2
147+ let $t043834423 = acc
148+ let allVestingsClaimActions = $t043834423._1
149+ let sum = $t043834423._2
150+ let $t044284504 = getUserClaimActions(userAddress, a)
151+ let vestingClaimActions = $t044284504._1
152+ let claimAmount = $t044284504._2
151153 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
152154 }
153155
154156 let $l = IDS_LIST
155157 let $s = size($l)
156158 let $acc0 = $Tuple2(nil, 0)
157159 func $f0_1 ($a,$i) = if (($i >= $s))
158160 then $a
159161 else actionsHelper($a, $l[$i])
160162
161163 func $f0_2 ($a,$i) = if (($i >= $s))
162164 then $a
163165 else throw("List size exceeds 30")
164166
165167 $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)
166168 }
167169
168170
169171 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
170172 func actionsHelper (acc,a) = {
171- let $t046954736 = acc
172- let updateAllVestingsActions = $t046954736._1
173- let sum = $t046954736._2
174- let $t047414825 = getUpdateVestingActions(userAddress, a)
175- let updateVestingActions = $t047414825._1
176- let unlockedAmount = $t047414825._2
173+ let $t047964837 = acc
174+ let updateAllVestingsActions = $t047964837._1
175+ let sum = $t047964837._2
176+ let $t048424926 = getUpdateVestingActions(userAddress, a)
177+ let updateVestingActions = $t048424926._1
178+ let unlockedAmount = $t048424926._2
177179 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
178180 }
179181
180- let $t049114999 = {
182+ let $t050125100 = {
181183 let $l = IDS_LIST
182184 let $s = size($l)
183185 let $acc0 = $Tuple2(nil, 0)
184186 func $f0_1 ($a,$i) = if (($i >= $s))
185187 then $a
186188 else actionsHelper($a, $l[$i])
187189
188190 func $f0_2 ($a,$i) = if (($i >= $s))
189191 then $a
190192 else throw("List size exceeds 30")
191193
192194 $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)
193195 }
194- let updateAllVestingsActions = $t049114999._1
195- let unlockedSum = $t049114999._2
196+ let updateAllVestingsActions = $t050125100._1
197+ let unlockedSum = $t050125100._2
196198 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
197199 let updateAccumulatedActions = if ((unlockedSum != 0))
198200 then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
199201 else nil
200202 $Tuple2((updateAllVestingsActions ++ updateAccumulatedActions), unlockedSum)
201203 }
202204
203205
204206 func getClaimAccumulatedActions (userAddress) = {
205207 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
206208 if ((oldAccumulated != 0))
207209 then $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), oldAccumulated, assetIdBytes), DeleteEntry(keyUserAccumulated(userAddress))], oldAccumulated)
208210 else $Tuple2(nil, 0)
209211 }
210212
211213
212214 func getAvailableVestingId (userAddress) = {
213215 func helper (availableId,id) = {
214- let $t058185897 = parseUserVesting(userAddress, id)
215- let vestingAmount = $t058185897._1
216- let startBlock = $t058185897._2
217- let lockLength = $t058185897._3
216+ let $t059195998 = parseUserVesting(userAddress, id)
217+ let vestingAmount = $t059195998._1
218+ let startBlock = $t059195998._2
219+ let lockLength = $t059195998._3
218220 if ((vestingAmount > 0))
219221 then availableId
220222 else if ((availableId == -1))
221223 then id
222224 else min([availableId, id])
223225 }
224226
225227 let availableId = {
226228 let $l = IDS_LIST
227229 let $s = size($l)
228230 let $acc0 = -1
229231 func $f0_1 ($a,$i) = if (($i >= $s))
230232 then $a
231233 else helper($a, $l[$i])
232234
233235 func $f0_2 ($a,$i) = if (($i >= $s))
234236 then $a
235237 else throw("List size exceeds 30")
236238
237239 $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)
238240 }
239241 if ((availableId == -1))
240242 then throwErr(makeString(["user exceeded max active vesting count: ", userAddress], " "))
241243 else availableId
242244 }
243245
244246
245247 func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))]
246248
247249
248250 @Callable(i)
249251 func vestingForUser (userAddress,vestingAmount,startBlock,lockLength) = {
250252 let check = [if ((size(i.payments) == 1))
251253 then true
252254 else throwErr("should be with exactly 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
253255 then true
254256 else throwErr(makeString(["payment assetId should be: ", assetIdString], " ")), if ((i.payments[0].amount == vestingAmount))
255257 then true
256258 else throwErr("payment amount should be equal to vestingAmount"), if (if ((adminList == nil))
257259 then true
258260 else containsElement(adminList, toString(i.caller)))
259261 then true
260262 else throwErr("you must be admin")]
261263 if ((check == check))
262264 then {
263265 let id = getAvailableVestingId(userAddress)
264266 let historyActions = [IntegerEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), vestingAmount)]
265267 (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions)
266268 }
267269 else throw("Strict value is not equal to itself.")
268270 }
269271
270272
271273
272274 @Callable(i)
273275 func claimAll () = {
274276 let userAddress = toString(i.caller)
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
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
281283 let totalAmount = (unlockedAmount + accumulatedAmount)
282284 let historyActions = [IntegerEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), totalAmount)]
283285 if ((totalAmount > 0))
284286 then ((claimActions ++ claimAccumulatedActions) ++ historyActions)
285287 else throwErr("nothing to claim")
286288 }
287289
288290
289291
290292 @Callable(i)
291293 func foo (userAddress) = getMoveAllUnlockedToAccumulatorActions(userAddress)
292294
293295

github/deemru/w8io/169f3d6 
45.38 ms