tx · 4m7Y4Bh8V7RPdeN2bnQfjioA2RMSkGeVtSyvEAEXRAso

3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1:  -0.01800000 Waves

2024.02.06 11:42 [2964159] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves

{ "type": 13, "id": "4m7Y4Bh8V7RPdeN2bnQfjioA2RMSkGeVtSyvEAEXRAso", "fee": 1800000, "feeAssetId": null, "timestamp": 1707208981326, "version": 1, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "nDg88HGod1fqXT12Hw5LXmg4GZvabQXYUn2fqXLsfn5QKTSnDR2XLRf9gQM5Svjy3JTDtxgEjGJXUPjMGb8uGbk" ], "script": "base64:BgIbCAISBgoECAEBARIDCgEIEgMKAQgSABIDCgEIIQAMY29udHJhY3RGaWxlAhB2ZXN0aW5nX25lby5yaWRlAANTRVACAl9fAAhJRFNfTElTVAkAzAgCAAAJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQkAzAgCAAYJAMwIAgAHCQDMCAIACAkAzAgCAAkJAMwIAgAKCQDMCAIACwkAzAgCAAwJAMwIAgANCQDMCAIADgkAzAgCAA8JAMwIAgAQCQDMCAIAEQkAzAgCABIJAMwIAgATCQDMCAIAFAkAzAgCABUJAMwIAgAWCQDMCAIAFwkAzAgCABgJAMwIAgAZCQDMCAIAGgkAzAgCABsJAMwIAgAcCQDMCAIAHQUDbmlsABFNQVhfVkVTVElOR19DT1VOVAkAkAMBBQhJRFNfTElTVAEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cBE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuYWdlclB1YmxpY0tleQEWa2V5TWFuYWdlclZhdWx0QWRkcmVzcwACF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PclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEDXRlbXBQdWJsaWNLZXkEByRtYXRjaDAJAJ0IAgUEdGhpcwIVJXNfX3RlbXBNYW5hZ2VyUHViS2V5AwkAAQIFByRtYXRjaDACBlN0cmluZwQBcwUHJG1hdGNoMAkA2QQBBQFzAwkAAQIFByRtYXRjaDACBFVuaXQFD3RhcmdldFB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5BgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUNdGVtcFB1YmxpY0tleYmcztg=", "chainId": 84, "height": 2964159, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FZs5VPGcTnyv84LpHrPYQaKe9kY136SgpvE4rAZqP7xZ Next: none Diff:
OldNewDifferences
426426
427427 @Callable(i)
428428 func userInfoREADONLY (userAddress) = {
429- let $t01157111626 = getClaimAllActions(userAddress)
430- let _a = $t01157111626._1
431- let totalAmount = $t01157111626._2
429+ let $t01159811653 = getClaimAllActions(userAddress)
430+ let _a = $t01159811653._1
431+ let totalAmount = $t01159811653._2
432432 let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
433433 $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress)))
434434 }
444444 case _ =>
445445 throw("Match error")
446446 }
447- sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
447+ let tempPublicKey = match getString(this, "%s__tempManagerPubKey") {
448+ case s: String =>
449+ fromBase58String(s)
450+ case _: Unit =>
451+ targetPublicKey
452+ case _ =>
453+ throw("Match error")
454+ }
455+ if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
456+ then true
457+ else sigVerify(tx.bodyBytes, tx.proofs[0], tempPublicKey)
448458 }
449459
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
100100 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
107107 else throwErr("lock length cannot be negative"), if ((totalClaimed >= 0))
108108 then true
109109 else throwErr("total claimed cannot be negative")]
110110 if ((checks == checks))
111111 then makeString(["%d%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength), toString(totalClaimed)], SEP)
112112 else throw("Strict value is not equal to itself.")
113113 }
114114
115115
116116 func parseUserVesting (userAddress,id) = match getString(this, keyUserVesting(userAddress, id)) {
117117 case rawString: String =>
118118 let splitString = split(rawString, SEP)
119119 let vestingAmount = parseIntValue(splitString[1])
120120 let startBlock = parseIntValue(splitString[2])
121121 let lockLength = parseIntValue(splitString[3])
122122 let totalClaimed = if ((5 > size(splitString)))
123123 then 0
124124 else parseIntValue(splitString[4])
125125 $Tuple4(vestingAmount, startBlock, lockLength, totalClaimed)
126126 case _ =>
127127 $Tuple4(0, 0, 0, 0)
128128 }
129129
130130
131131 func keyVestingHistory (action,userAddress,txId) = makeString(["%s%s%s%s", "history", userAddress, action, txId], SEP)
132132
133133
134134 func calcUnlockedAmount (amount,startBlock,lockLength) = {
135135 let elapsedBlocks = (height - startBlock)
136136 let unlockedAmount = if (if ((lockLength != 0))
137137 then (elapsedBlocks > 0)
138138 else false)
139139 then min([fraction(amount, elapsedBlocks, lockLength), amount])
140140 else 0
141141 $Tuple2(unlockedAmount, (amount - unlockedAmount))
142142 }
143143
144144
145145 func getUserUnlockedAmount (userAddress,id) = {
146146 let $t040564149 = parseUserVesting(userAddress, id)
147147 let vestingAmount = $t040564149._1
148148 let startBlock = $t040564149._2
149149 let lockLength = $t040564149._3
150150 let totalClaimed = $t040564149._4
151151 let $t041524249 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
152152 let unlockedAmount = $t041524249._1
153153 let remainingAmount = $t041524249._2
154154 $Tuple2(unlockedAmount, remainingAmount)
155155 }
156156
157157
158158 func getUpdateVestingActions (userAddress,id) = {
159159 let $t043564449 = parseUserVesting(userAddress, id)
160160 let vestingAmount = $t043564449._1
161161 let startBlock = $t043564449._2
162162 let lockLength = $t043564449._3
163163 let totalClaimed = $t043564449._4
164164 let $t044524530 = getUserUnlockedAmount(userAddress, id)
165165 let unlockedAmount = $t044524530._1
166166 let remainingAmount = $t044524530._2
167167 let remainingBlocks = max([((startBlock + lockLength) - height), 0])
168168 let newTotalClaimed = (totalClaimed + unlockedAmount)
169169 let updateVestingActions = if ((unlockedAmount != 0))
170170 then if ((remainingBlocks != 0))
171171 then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks, newTotalClaimed))]
172172 else [DeleteEntry(keyUserVesting(userAddress, id))]
173173 else nil
174174 $Tuple2(updateVestingActions, unlockedAmount)
175175 }
176176
177177
178178 func getUserClaimActions (userAddress,id) = {
179179 let $t050655150 = getUpdateVestingActions(userAddress, id)
180180 let updateVestingActions = $t050655150._1
181181 let unlockedAmount = $t050655150._2
182182 let transferActions = if ((unlockedAmount != 0))
183183 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)]
184184 else nil
185185 $Tuple2((updateVestingActions ++ transferActions), unlockedAmount)
186186 }
187187
188188
189189 func getAllUserClaimActions (userAddress) = {
190190 func actionsHelper (acc,id) = {
191191 let $t055245564 = acc
192192 let allVestingsClaimActions = $t055245564._1
193193 let sum = $t055245564._2
194194 let $t055695646 = getUserClaimActions(userAddress, id)
195195 let vestingClaimActions = $t055695646._1
196196 let claimAmount = $t055695646._2
197197 $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount))
198198 }
199199
200200 let $l = IDS_LIST
201201 let $s = size($l)
202202 let $acc0 = $Tuple2(nil, 0)
203203 func $f0_1 ($a,$i) = if (($i >= $s))
204204 then $a
205205 else actionsHelper($a, $l[$i])
206206
207207 func $f0_2 ($a,$i) = if (($i >= $s))
208208 then $a
209209 else throw("List size exceeds 30")
210210
211211 $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)
212212 }
213213
214214
215215 func getMoveAllUnlockedToAccumulatorActions (userAddress) = {
216216 func actionsHelper (acc,id) = {
217217 let $t059395980 = acc
218218 let updateAllVestingsActions = $t059395980._1
219219 let sum = $t059395980._2
220220 let $t059856070 = getUpdateVestingActions(userAddress, id)
221221 let updateVestingActions = $t059856070._1
222222 let unlockedAmount = $t059856070._2
223223 $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount))
224224 }
225225
226226 let $t061566244 = {
227227 let $l = IDS_LIST
228228 let $s = size($l)
229229 let $acc0 = $Tuple2(nil, 0)
230230 func $f0_1 ($a,$i) = if (($i >= $s))
231231 then $a
232232 else actionsHelper($a, $l[$i])
233233
234234 func $f0_2 ($a,$i) = if (($i >= $s))
235235 then $a
236236 else throw("List size exceeds 30")
237237
238238 $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)
239239 }
240240 let updateAllVestingsActions = $t061566244._1
241241 let unlockedSum = $t061566244._2
242242 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
243243 let updateAccumulatedActions = if ((unlockedSum != 0))
244244 then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))]
245245 else nil
246246 $Tuple2((updateAllVestingsActions ++ updateAccumulatedActions), unlockedSum)
247247 }
248248
249249
250250 func getClaimAccumulatedActions (userAddress) = {
251251 let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
252252 if ((oldAccumulated != 0))
253253 then $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), oldAccumulated, assetIdBytes), DeleteEntry(keyUserAccumulated(userAddress))], oldAccumulated)
254254 else $Tuple2(nil, 0)
255255 }
256256
257257
258258 func getClaimAllActions (userAddress) = {
259259 let $t070127145 = if (!(containsElement(banList, userAddress)))
260260 then getAllUserClaimActions(userAddress)
261261 else $Tuple2(nil, 0)
262262 let claimActions = $t070127145._1
263263 let unlockedAmount = $t070127145._2
264264 let $t071487238 = getClaimAccumulatedActions(userAddress)
265265 let claimAccumulatedActions = $t071487238._1
266266 let accumulatedAmount = $t071487238._2
267267 let totalAmount = (unlockedAmount + accumulatedAmount)
268268 $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount)
269269 }
270270
271271
272272 func getVestingUserInfo (userAddress) = {
273273 func helper (acc,id) = {
274274 let $t074527545 = parseUserVesting(userAddress, id)
275275 let vestingAmount = $t074527545._1
276276 let startBlock = $t074527545._2
277277 let lockLength = $t074527545._3
278278 let totalClaimed = $t074527545._4
279279 let $t075507628 = getUserUnlockedAmount(userAddress, id)
280280 let unlockedAmount = $t075507628._1
281281 let remainingAmount = $t075507628._2
282282 if (if ((vestingAmount == 0))
283283 then true
284284 else containsElement(banList, userAddress))
285285 then acc
286286 else (acc :+ [vestingAmount, (startBlock + lockLength), unlockedAmount, remainingAmount, totalClaimed])
287287 }
288288
289289 let $l = IDS_LIST
290290 let $s = size($l)
291291 let $acc0 = nil
292292 func $f0_1 ($a,$i) = if (($i >= $s))
293293 then $a
294294 else helper($a, $l[$i])
295295
296296 func $f0_2 ($a,$i) = if (($i >= $s))
297297 then $a
298298 else throw("List size exceeds 30")
299299
300300 $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)
301301 }
302302
303303
304304 func getAvailableVestingId (userAddress) = {
305305 func helper (availableId,id) = {
306306 let $t079668059 = parseUserVesting(userAddress, id)
307307 let vestingAmount = $t079668059._1
308308 let startBlock = $t079668059._2
309309 let lockLength = $t079668059._3
310310 let totalClaimed = $t079668059._4
311311 if ((vestingAmount > 0))
312312 then availableId
313313 else if ((availableId == -1))
314314 then id
315315 else min([availableId, id])
316316 }
317317
318318 let availableId = {
319319 let $l = IDS_LIST
320320 let $s = size($l)
321321 let $acc0 = -1
322322 func $f0_1 ($a,$i) = if (($i >= $s))
323323 then $a
324324 else helper($a, $l[$i])
325325
326326 func $f0_2 ($a,$i) = if (($i >= $s))
327327 then $a
328328 else throw("List size exceeds 30")
329329
330330 $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)
331331 }
332332 if ((availableId == -1))
333333 then throwErr(makeString(["user exceeded max active vesting count: ", userAddress], " "))
334334 else availableId
335335 }
336336
337337
338338 func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength, 0))]
339339
340340
341341 @Callable(i)
342342 func vestingForUser (userAddress,vestingAmount,startBlock,lockLength) = {
343343 let check = [if ((size(i.payments) == 1))
344344 then true
345345 else throwErr("should be with exactly 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
346346 then true
347347 else throwErr(makeString(["payment assetId should be: ", assetIdString], " ")), if ((i.payments[0].amount == vestingAmount))
348348 then true
349349 else throwErr("payment amount should be equal to vestingAmount"), if (if ((adminList == nil))
350350 then true
351351 else containsElement(adminList, toString(i.caller)))
352352 then true
353353 else throwErr("you must be admin")]
354354 if ((check == check))
355355 then {
356356 let id = getAvailableVestingId(userAddress)
357357 let historyActions = [StringEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), makeString([toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP))]
358358 (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions)
359359 }
360360 else throw("Strict value is not equal to itself.")
361361 }
362362
363363
364364
365365 @Callable(i)
366366 func ban (userAddress) = {
367367 let checks = [if (if ((adminList == nil))
368368 then true
369369 else containsElement(adminList, toString(i.caller)))
370370 then true
371371 else throwErr("you must be admin"), if (!(containsElement(banList, userAddress)))
372372 then true
373373 else throwErr(makeString(["user already in a ban list:", userAddress], " "))]
374374 if ((checks == checks))
375375 then {
376376 let $t0992410012 = getMoveAllUnlockedToAccumulatorActions(userAddress)
377377 let moveToAccumulatedActions = $t0992410012._1
378378 let _a = $t0992410012._2
379379 let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))]
380380 (moveToAccumulatedActions ++ addToBanListActions)
381381 }
382382 else throw("Strict value is not equal to itself.")
383383 }
384384
385385
386386
387387 @Callable(i)
388388 func unban (userAddress) = {
389389 let checks = [if (if ((adminList == nil))
390390 then true
391391 else containsElement(adminList, toString(i.caller)))
392392 then true
393393 else throwErr("you must be admin"), if (containsElement(banList, userAddress))
394394 then true
395395 else throwErr(makeString(["user not in a ban list:", userAddress], " "))]
396396 if ((checks == checks))
397397 then {
398398 let newBanList = match indexOf(banList, userAddress) {
399399 case ind: Int =>
400400 removeByIndex(banList, ind)
401401 case _ =>
402402 throwErr("user address index in ban list is not found")
403403 }
404404 if ((newBanList == nil))
405405 then [DeleteEntry(keyBanList)]
406406 else [StringEntry(keyBanList, makeString_11C(newBanList, "__"))]
407407 }
408408 else throw("Strict value is not equal to itself.")
409409 }
410410
411411
412412
413413 @Callable(i)
414414 func claimAll () = {
415415 let userAddress = toString(i.caller)
416416 let $t01090510970 = getClaimAllActions(userAddress)
417417 let claimActions = $t01090510970._1
418418 let totalAmount = $t01090510970._2
419419 let historyActions = [StringEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), toString(totalAmount))]
420420 if ((totalAmount > 0))
421421 then (claimActions ++ historyActions)
422422 else throwErr("nothing to claim")
423423 }
424424
425425
426426
427427 @Callable(i)
428428 func userInfoREADONLY (userAddress) = {
429- let $t01157111626 = getClaimAllActions(userAddress)
430- let _a = $t01157111626._1
431- let totalAmount = $t01157111626._2
429+ let $t01159811653 = getClaimAllActions(userAddress)
430+ let _a = $t01159811653._1
431+ let totalAmount = $t01159811653._2
432432 let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0)
433433 $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress)))
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 }
447- sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
447+ let tempPublicKey = match getString(this, "%s__tempManagerPubKey") {
448+ case s: String =>
449+ fromBase58String(s)
450+ case _: Unit =>
451+ targetPublicKey
452+ case _ =>
453+ throw("Match error")
454+ }
455+ if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
456+ then true
457+ else sigVerify(tx.bodyBytes, tx.proofs[0], tempPublicKey)
448458 }
449459

github/deemru/w8io/026f985 
71.33 ms