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:BgIbCAISBgoECAEBARIDCgEIEgMKAQgSABIDCgEIIQAMY29udHJhY3RGaWxlAhB2ZXN0aW5nX25lby5yaWRlAANTRVACAl9fAAhJRFNfTElTVAkAzAgCAAAJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQkAzAgCAAYJAMwIAgAHCQDMCAIACAkAzAgCAAkJAMwIAgAKCQDMCAIACwkAzAgCAAwJAMwIAgANCQDMCAIADgkAzAgCAA8JAMwIAgAQCQDMCAIAEQkAzAgCABIJAMwIAgATCQDMCAIAFAkAzAgCABUJAMwIAgAWCQDMCAIAFwkAzAgCABgJAMwIAgAZCQDMCAIAGgkAzAgCABsJAMwIAgAcCQDMCAIAHQUDbmlsABFNQVhfVkVTVElOR19DT1VOVAkAkAMBBQhJRFNfTElTVAEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cBE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuYWdlclB1YmxpY0tleQEWa2V5TWFuYWdlclZhdWx0QWRkcmVzcwACFy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clVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEDXRlbXBQdWJsaWNLZXkEByRtYXRjaDAJAJ0IAgUEdGhpcwIVJXNfX3RlbXBNYW5hZ2VyUHViS2V5AwkAAQIFByRtYXRjaDACBlN0cmluZwQBcwUHJG1hdGNoMAkA2QQBBQFzAwkAAQIFByRtYXRjaDACBFVuaXQFD3RhcmdldFB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5BgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUNdGVtcFB1YmxpY0tleYmcztg=", "chainId": 84, "height": 2964159, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FZs5VPGcTnyv84LpHrPYQaKe9kY136SgpvE4rAZqP7xZ Next: none Diff:
Old | New | Differences | |
---|---|---|---|
426 | 426 | ||
427 | 427 | @Callable(i) | |
428 | 428 | func userInfoREADONLY (userAddress) = { | |
429 | - | let $ | |
430 | - | let _a = $ | |
431 | - | let totalAmount = $ | |
429 | + | let $t01159811653 = getClaimAllActions(userAddress) | |
430 | + | let _a = $t01159811653._1 | |
431 | + | let totalAmount = $t01159811653._2 | |
432 | 432 | let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0) | |
433 | 433 | $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress))) | |
434 | 434 | } | |
444 | 444 | case _ => | |
445 | 445 | throw("Match error") | |
446 | 446 | } | |
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) | |
448 | 458 | } | |
449 | 459 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let contractFile = "vesting_neo.ride" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | 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] | |
9 | 9 | ||
10 | 10 | let MAX_VESTING_COUNT = size(IDS_LIST) | |
11 | 11 | ||
12 | 12 | func throwErr (msg) = throw(((contractFile + ": ") + msg)) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
22 | 22 | case s: String => | |
23 | 23 | addressFromStringValue(s) | |
24 | 24 | case _ => | |
25 | 25 | this | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func managerPublicKeyOrUnit () = { | |
30 | 30 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
31 | 31 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
32 | 32 | case s: String => | |
33 | 33 | fromBase58String(s) | |
34 | 34 | case _: Unit => | |
35 | 35 | unit | |
36 | 36 | case _ => | |
37 | 37 | throw("Match error") | |
38 | 38 | } | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | let keyAssetId = makeString(["%s", "assetId"], SEP) | |
43 | 43 | ||
44 | 44 | let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES") | |
45 | 45 | ||
46 | 46 | let assetIdBytes = if ((assetIdString == "WAVES")) | |
47 | 47 | then unit | |
48 | 48 | else fromBase58String(assetIdString) | |
49 | 49 | ||
50 | 50 | let keyAdminList = makeString(["%s", "adminAddressList"], SEP) | |
51 | 51 | ||
52 | 52 | let keyBanList = makeString(["%s", "banList"], SEP) | |
53 | 53 | ||
54 | 54 | let adminList = match getString(this, keyAdminList) { | |
55 | 55 | case s: String => | |
56 | 56 | split(s, SEP) | |
57 | 57 | case _ => | |
58 | 58 | nil | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | let banList = { | |
62 | 62 | let banListRaw = valueOrElse(getString(this, keyBanList), "") | |
63 | 63 | if ((banListRaw == "")) | |
64 | 64 | then nil | |
65 | 65 | else split_51C(banListRaw, SEP) | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | func isValidAddressString (addressString) = match addressFromString(addressString) { | |
69 | 69 | case a: Address => | |
70 | 70 | true | |
71 | 71 | case _ => | |
72 | 72 | false | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyUserVesting (userAddress,id) = { | |
77 | 77 | let checks = [if (isValidAddressString(userAddress)) | |
78 | 78 | then true | |
79 | 79 | else throwErr(makeString(["address is not valid:", userAddress], " ")), if (if ((id >= 0)) | |
80 | 80 | then (MAX_VESTING_COUNT > id) | |
81 | 81 | else false) | |
82 | 82 | then true | |
83 | 83 | else throwErr(makeString(["id should be less than", toString(MAX_VESTING_COUNT), "got:", toString(id)], " "))] | |
84 | 84 | if ((checks == checks)) | |
85 | 85 | then makeString(["%s%s%d", "vesting", userAddress, toString(id)], SEP) | |
86 | 86 | else throw("Strict value is not equal to itself.") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyUserAccumulated (userAddress) = { | |
91 | 91 | let checks = [if (isValidAddressString(userAddress)) | |
92 | 92 | then true | |
93 | 93 | else throwErr(makeString(["address is not valid:", userAddress], " "))] | |
94 | 94 | if ((checks == checks)) | |
95 | 95 | then makeString(["%s%s", "accumulated", userAddress], SEP) | |
96 | 96 | else throw("Strict value is not equal to itself.") | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func formatUserVesting (vestingAmount,startBlock,lockLength,totalClaimed) = { | |
101 | 101 | let checks = [if ((vestingAmount >= 0)) | |
102 | 102 | then true | |
103 | 103 | else throwErr("vesting amount cannot be negative"), if ((startBlock >= 0)) | |
104 | 104 | then true | |
105 | 105 | else throwErr("start block cannot be negative"), if ((lockLength >= 0)) | |
106 | 106 | then true | |
107 | 107 | else throwErr("lock length cannot be negative"), if ((totalClaimed >= 0)) | |
108 | 108 | then true | |
109 | 109 | else throwErr("total claimed cannot be negative")] | |
110 | 110 | if ((checks == checks)) | |
111 | 111 | then makeString(["%d%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength), toString(totalClaimed)], SEP) | |
112 | 112 | else throw("Strict value is not equal to itself.") | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func parseUserVesting (userAddress,id) = match getString(this, keyUserVesting(userAddress, id)) { | |
117 | 117 | case rawString: String => | |
118 | 118 | let splitString = split(rawString, SEP) | |
119 | 119 | let vestingAmount = parseIntValue(splitString[1]) | |
120 | 120 | let startBlock = parseIntValue(splitString[2]) | |
121 | 121 | let lockLength = parseIntValue(splitString[3]) | |
122 | 122 | let totalClaimed = if ((5 > size(splitString))) | |
123 | 123 | then 0 | |
124 | 124 | else parseIntValue(splitString[4]) | |
125 | 125 | $Tuple4(vestingAmount, startBlock, lockLength, totalClaimed) | |
126 | 126 | case _ => | |
127 | 127 | $Tuple4(0, 0, 0, 0) | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyVestingHistory (action,userAddress,txId) = makeString(["%s%s%s%s", "history", userAddress, action, txId], SEP) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func calcUnlockedAmount (amount,startBlock,lockLength) = { | |
135 | 135 | let elapsedBlocks = (height - startBlock) | |
136 | 136 | let unlockedAmount = if (if ((lockLength != 0)) | |
137 | 137 | then (elapsedBlocks > 0) | |
138 | 138 | else false) | |
139 | 139 | then min([fraction(amount, elapsedBlocks, lockLength), amount]) | |
140 | 140 | else 0 | |
141 | 141 | $Tuple2(unlockedAmount, (amount - unlockedAmount)) | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getUserUnlockedAmount (userAddress,id) = { | |
146 | 146 | let $t040564149 = parseUserVesting(userAddress, id) | |
147 | 147 | let vestingAmount = $t040564149._1 | |
148 | 148 | let startBlock = $t040564149._2 | |
149 | 149 | let lockLength = $t040564149._3 | |
150 | 150 | let totalClaimed = $t040564149._4 | |
151 | 151 | let $t041524249 = calcUnlockedAmount(vestingAmount, startBlock, lockLength) | |
152 | 152 | let unlockedAmount = $t041524249._1 | |
153 | 153 | let remainingAmount = $t041524249._2 | |
154 | 154 | $Tuple2(unlockedAmount, remainingAmount) | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func getUpdateVestingActions (userAddress,id) = { | |
159 | 159 | let $t043564449 = parseUserVesting(userAddress, id) | |
160 | 160 | let vestingAmount = $t043564449._1 | |
161 | 161 | let startBlock = $t043564449._2 | |
162 | 162 | let lockLength = $t043564449._3 | |
163 | 163 | let totalClaimed = $t043564449._4 | |
164 | 164 | let $t044524530 = getUserUnlockedAmount(userAddress, id) | |
165 | 165 | let unlockedAmount = $t044524530._1 | |
166 | 166 | let remainingAmount = $t044524530._2 | |
167 | 167 | let remainingBlocks = max([((startBlock + lockLength) - height), 0]) | |
168 | 168 | let newTotalClaimed = (totalClaimed + unlockedAmount) | |
169 | 169 | let updateVestingActions = if ((unlockedAmount != 0)) | |
170 | 170 | then if ((remainingBlocks != 0)) | |
171 | 171 | then [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks, newTotalClaimed))] | |
172 | 172 | else [DeleteEntry(keyUserVesting(userAddress, id))] | |
173 | 173 | else nil | |
174 | 174 | $Tuple2(updateVestingActions, unlockedAmount) | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func getUserClaimActions (userAddress,id) = { | |
179 | 179 | let $t050655150 = getUpdateVestingActions(userAddress, id) | |
180 | 180 | let updateVestingActions = $t050655150._1 | |
181 | 181 | let unlockedAmount = $t050655150._2 | |
182 | 182 | let transferActions = if ((unlockedAmount != 0)) | |
183 | 183 | then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes)] | |
184 | 184 | else nil | |
185 | 185 | $Tuple2((updateVestingActions ++ transferActions), unlockedAmount) | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func getAllUserClaimActions (userAddress) = { | |
190 | 190 | func actionsHelper (acc,id) = { | |
191 | 191 | let $t055245564 = acc | |
192 | 192 | let allVestingsClaimActions = $t055245564._1 | |
193 | 193 | let sum = $t055245564._2 | |
194 | 194 | let $t055695646 = getUserClaimActions(userAddress, id) | |
195 | 195 | let vestingClaimActions = $t055695646._1 | |
196 | 196 | let claimAmount = $t055695646._2 | |
197 | 197 | $Tuple2((allVestingsClaimActions ++ vestingClaimActions), (sum + claimAmount)) | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | let $l = IDS_LIST | |
201 | 201 | let $s = size($l) | |
202 | 202 | let $acc0 = $Tuple2(nil, 0) | |
203 | 203 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
204 | 204 | then $a | |
205 | 205 | else actionsHelper($a, $l[$i]) | |
206 | 206 | ||
207 | 207 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
208 | 208 | then $a | |
209 | 209 | else throw("List size exceeds 30") | |
210 | 210 | ||
211 | 211 | $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) | |
212 | 212 | } | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func getMoveAllUnlockedToAccumulatorActions (userAddress) = { | |
216 | 216 | func actionsHelper (acc,id) = { | |
217 | 217 | let $t059395980 = acc | |
218 | 218 | let updateAllVestingsActions = $t059395980._1 | |
219 | 219 | let sum = $t059395980._2 | |
220 | 220 | let $t059856070 = getUpdateVestingActions(userAddress, id) | |
221 | 221 | let updateVestingActions = $t059856070._1 | |
222 | 222 | let unlockedAmount = $t059856070._2 | |
223 | 223 | $Tuple2((updateAllVestingsActions ++ updateVestingActions), (sum + unlockedAmount)) | |
224 | 224 | } | |
225 | 225 | ||
226 | 226 | let $t061566244 = { | |
227 | 227 | let $l = IDS_LIST | |
228 | 228 | let $s = size($l) | |
229 | 229 | let $acc0 = $Tuple2(nil, 0) | |
230 | 230 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
231 | 231 | then $a | |
232 | 232 | else actionsHelper($a, $l[$i]) | |
233 | 233 | ||
234 | 234 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
235 | 235 | then $a | |
236 | 236 | else throw("List size exceeds 30") | |
237 | 237 | ||
238 | 238 | $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) | |
239 | 239 | } | |
240 | 240 | let updateAllVestingsActions = $t061566244._1 | |
241 | 241 | let unlockedSum = $t061566244._2 | |
242 | 242 | let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0) | |
243 | 243 | let updateAccumulatedActions = if ((unlockedSum != 0)) | |
244 | 244 | then [IntegerEntry(keyUserAccumulated(userAddress), (oldAccumulated + unlockedSum))] | |
245 | 245 | else nil | |
246 | 246 | $Tuple2((updateAllVestingsActions ++ updateAccumulatedActions), unlockedSum) | |
247 | 247 | } | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func getClaimAccumulatedActions (userAddress) = { | |
251 | 251 | let oldAccumulated = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0) | |
252 | 252 | if ((oldAccumulated != 0)) | |
253 | 253 | then $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), oldAccumulated, assetIdBytes), DeleteEntry(keyUserAccumulated(userAddress))], oldAccumulated) | |
254 | 254 | else $Tuple2(nil, 0) | |
255 | 255 | } | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func getClaimAllActions (userAddress) = { | |
259 | 259 | let $t070127145 = if (!(containsElement(banList, userAddress))) | |
260 | 260 | then getAllUserClaimActions(userAddress) | |
261 | 261 | else $Tuple2(nil, 0) | |
262 | 262 | let claimActions = $t070127145._1 | |
263 | 263 | let unlockedAmount = $t070127145._2 | |
264 | 264 | let $t071487238 = getClaimAccumulatedActions(userAddress) | |
265 | 265 | let claimAccumulatedActions = $t071487238._1 | |
266 | 266 | let accumulatedAmount = $t071487238._2 | |
267 | 267 | let totalAmount = (unlockedAmount + accumulatedAmount) | |
268 | 268 | $Tuple2((claimActions ++ claimAccumulatedActions), totalAmount) | |
269 | 269 | } | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | func getVestingUserInfo (userAddress) = { | |
273 | 273 | func helper (acc,id) = { | |
274 | 274 | let $t074527545 = parseUserVesting(userAddress, id) | |
275 | 275 | let vestingAmount = $t074527545._1 | |
276 | 276 | let startBlock = $t074527545._2 | |
277 | 277 | let lockLength = $t074527545._3 | |
278 | 278 | let totalClaimed = $t074527545._4 | |
279 | 279 | let $t075507628 = getUserUnlockedAmount(userAddress, id) | |
280 | 280 | let unlockedAmount = $t075507628._1 | |
281 | 281 | let remainingAmount = $t075507628._2 | |
282 | 282 | if (if ((vestingAmount == 0)) | |
283 | 283 | then true | |
284 | 284 | else containsElement(banList, userAddress)) | |
285 | 285 | then acc | |
286 | 286 | else (acc :+ [vestingAmount, (startBlock + lockLength), unlockedAmount, remainingAmount, totalClaimed]) | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | let $l = IDS_LIST | |
290 | 290 | let $s = size($l) | |
291 | 291 | let $acc0 = nil | |
292 | 292 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
293 | 293 | then $a | |
294 | 294 | else helper($a, $l[$i]) | |
295 | 295 | ||
296 | 296 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
297 | 297 | then $a | |
298 | 298 | else throw("List size exceeds 30") | |
299 | 299 | ||
300 | 300 | $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) | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func getAvailableVestingId (userAddress) = { | |
305 | 305 | func helper (availableId,id) = { | |
306 | 306 | let $t079668059 = parseUserVesting(userAddress, id) | |
307 | 307 | let vestingAmount = $t079668059._1 | |
308 | 308 | let startBlock = $t079668059._2 | |
309 | 309 | let lockLength = $t079668059._3 | |
310 | 310 | let totalClaimed = $t079668059._4 | |
311 | 311 | if ((vestingAmount > 0)) | |
312 | 312 | then availableId | |
313 | 313 | else if ((availableId == -1)) | |
314 | 314 | then id | |
315 | 315 | else min([availableId, id]) | |
316 | 316 | } | |
317 | 317 | ||
318 | 318 | let availableId = { | |
319 | 319 | let $l = IDS_LIST | |
320 | 320 | let $s = size($l) | |
321 | 321 | let $acc0 = -1 | |
322 | 322 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
323 | 323 | then $a | |
324 | 324 | else helper($a, $l[$i]) | |
325 | 325 | ||
326 | 326 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
327 | 327 | then $a | |
328 | 328 | else throw("List size exceeds 30") | |
329 | 329 | ||
330 | 330 | $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) | |
331 | 331 | } | |
332 | 332 | if ((availableId == -1)) | |
333 | 333 | then throwErr(makeString(["user exceeded max active vesting count: ", userAddress], " ")) | |
334 | 334 | else availableId | |
335 | 335 | } | |
336 | 336 | ||
337 | 337 | ||
338 | 338 | func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength, 0))] | |
339 | 339 | ||
340 | 340 | ||
341 | 341 | @Callable(i) | |
342 | 342 | func vestingForUser (userAddress,vestingAmount,startBlock,lockLength) = { | |
343 | 343 | let check = [if ((size(i.payments) == 1)) | |
344 | 344 | then true | |
345 | 345 | else throwErr("should be with exactly 1 payment"), if ((i.payments[0].assetId == assetIdBytes)) | |
346 | 346 | then true | |
347 | 347 | else throwErr(makeString(["payment assetId should be: ", assetIdString], " ")), if ((i.payments[0].amount == vestingAmount)) | |
348 | 348 | then true | |
349 | 349 | else throwErr("payment amount should be equal to vestingAmount"), if (if ((adminList == nil)) | |
350 | 350 | then true | |
351 | 351 | else containsElement(adminList, toString(i.caller))) | |
352 | 352 | then true | |
353 | 353 | else throwErr("you must be admin")] | |
354 | 354 | if ((check == check)) | |
355 | 355 | then { | |
356 | 356 | let id = getAvailableVestingId(userAddress) | |
357 | 357 | let historyActions = [StringEntry(keyVestingHistory("vested", userAddress, toBase58String(i.transactionId)), makeString([toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP))] | |
358 | 358 | (getNewVestingActions(userAddress, id, vestingAmount, startBlock, lockLength) ++ historyActions) | |
359 | 359 | } | |
360 | 360 | else throw("Strict value is not equal to itself.") | |
361 | 361 | } | |
362 | 362 | ||
363 | 363 | ||
364 | 364 | ||
365 | 365 | @Callable(i) | |
366 | 366 | func ban (userAddress) = { | |
367 | 367 | let checks = [if (if ((adminList == nil)) | |
368 | 368 | then true | |
369 | 369 | else containsElement(adminList, toString(i.caller))) | |
370 | 370 | then true | |
371 | 371 | else throwErr("you must be admin"), if (!(containsElement(banList, userAddress))) | |
372 | 372 | then true | |
373 | 373 | else throwErr(makeString(["user already in a ban list:", userAddress], " "))] | |
374 | 374 | if ((checks == checks)) | |
375 | 375 | then { | |
376 | 376 | let $t0992410012 = getMoveAllUnlockedToAccumulatorActions(userAddress) | |
377 | 377 | let moveToAccumulatedActions = $t0992410012._1 | |
378 | 378 | let _a = $t0992410012._2 | |
379 | 379 | let addToBanListActions = [StringEntry(keyBanList, makeString_11C((banList :+ userAddress), "__"))] | |
380 | 380 | (moveToAccumulatedActions ++ addToBanListActions) | |
381 | 381 | } | |
382 | 382 | else throw("Strict value is not equal to itself.") | |
383 | 383 | } | |
384 | 384 | ||
385 | 385 | ||
386 | 386 | ||
387 | 387 | @Callable(i) | |
388 | 388 | func unban (userAddress) = { | |
389 | 389 | let checks = [if (if ((adminList == nil)) | |
390 | 390 | then true | |
391 | 391 | else containsElement(adminList, toString(i.caller))) | |
392 | 392 | then true | |
393 | 393 | else throwErr("you must be admin"), if (containsElement(banList, userAddress)) | |
394 | 394 | then true | |
395 | 395 | else throwErr(makeString(["user not in a ban list:", userAddress], " "))] | |
396 | 396 | if ((checks == checks)) | |
397 | 397 | then { | |
398 | 398 | let newBanList = match indexOf(banList, userAddress) { | |
399 | 399 | case ind: Int => | |
400 | 400 | removeByIndex(banList, ind) | |
401 | 401 | case _ => | |
402 | 402 | throwErr("user address index in ban list is not found") | |
403 | 403 | } | |
404 | 404 | if ((newBanList == nil)) | |
405 | 405 | then [DeleteEntry(keyBanList)] | |
406 | 406 | else [StringEntry(keyBanList, makeString_11C(newBanList, "__"))] | |
407 | 407 | } | |
408 | 408 | else throw("Strict value is not equal to itself.") | |
409 | 409 | } | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | ||
413 | 413 | @Callable(i) | |
414 | 414 | func claimAll () = { | |
415 | 415 | let userAddress = toString(i.caller) | |
416 | 416 | let $t01090510970 = getClaimAllActions(userAddress) | |
417 | 417 | let claimActions = $t01090510970._1 | |
418 | 418 | let totalAmount = $t01090510970._2 | |
419 | 419 | let historyActions = [StringEntry(keyVestingHistory("claimed", userAddress, toBase58String(i.transactionId)), toString(totalAmount))] | |
420 | 420 | if ((totalAmount > 0)) | |
421 | 421 | then (claimActions ++ historyActions) | |
422 | 422 | else throwErr("nothing to claim") | |
423 | 423 | } | |
424 | 424 | ||
425 | 425 | ||
426 | 426 | ||
427 | 427 | @Callable(i) | |
428 | 428 | func userInfoREADONLY (userAddress) = { | |
429 | - | let $ | |
430 | - | let _a = $ | |
431 | - | let totalAmount = $ | |
429 | + | let $t01159811653 = getClaimAllActions(userAddress) | |
430 | + | let _a = $t01159811653._1 | |
431 | + | let totalAmount = $t01159811653._2 | |
432 | 432 | let accumulatedAmount = valueOrElse(getInteger(this, keyUserAccumulated(userAddress)), 0) | |
433 | 433 | $Tuple2(nil, $Tuple3(totalAmount, accumulatedAmount, getVestingUserInfo(userAddress))) | |
434 | 434 | } | |
435 | 435 | ||
436 | 436 | ||
437 | 437 | @Verifier(tx) | |
438 | 438 | func verify () = { | |
439 | 439 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
440 | 440 | case pk: ByteVector => | |
441 | 441 | pk | |
442 | 442 | case _: Unit => | |
443 | 443 | tx.senderPublicKey | |
444 | 444 | case _ => | |
445 | 445 | throw("Match error") | |
446 | 446 | } | |
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) | |
448 | 458 | } | |
449 | 459 |
github/deemru/w8io/026f985 71.33 ms ◑