tx · E5vs2SijNPsW5C1K6G5URagfuFz5C3tUXDXAxXoTBLbe 3N9eLqWNqb7jeF383m9qsXEBqpp8qfQmfbx: -0.01500000 Waves 2022.08.15 22:39 [2186012] smart account 3N9eLqWNqb7jeF383m9qsXEBqpp8qfQmfbx > SELF 0.00000000 Waves
{ "type": 13, "id": "E5vs2SijNPsW5C1K6G5URagfuFz5C3tUXDXAxXoTBLbe", "fee": 1500000, "feeAssetId": null, "timestamp": 1660592413402, "version": 2, "chainId": 84, "sender": "3N9eLqWNqb7jeF383m9qsXEBqpp8qfQmfbx", "senderPublicKey": "5cWdpE4X7mfNkLmxJ389ws6qGZof4fwydqMcqPexhJ7w", "proofs": [ "2NnDZRLbd19WQExtyS4SWioZXiKUW8ePXAfmddGTqMpCzfYzDxv5Yzb7NnJv8k9Z8TwQkH9gpPmEgUTMbJCo2Yis" ], "script": "base64:AAIFAAAAAAAAAE0IAhIHCgUICAgBARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAkSBQoDCAgBEgUKAwEIARIECgIIAQAAACQAAAAADGxvY2tpbmdTdG9yZQUAAAAEdGhpcwAAAAAMc3Rha2luZ1N0b3JlAgAAAAhfUmVzZXJ2ZQAAAAARbWluaW11bUxvY2tBbW91bnQCAAAADl9NaW5Mb2NrQW1vdW50AAAAABFtYXhpbXVtTG9ja0Ftb3VudAIAAAAOX01heExvY2tBbW91bnQAAAAACWFzc2V0TGlzdAUAAAADbmlsAAAAABF1bmxvY2tFbGlnaWJpbGl0eQIAAAAcX0VsaWdpYmxlX3RvX3VubG9ja19hdF9ibG9jawAAAAAMbG9ja2VkQW1vdW50AgAAAA5fQW1vdW50X2xvY2tlZAAAAAALbG9ja2VkQXNzZXQCAAAADV9Bc3NldF9sb2NrZWQAAAAABHVzZXICAAAABV9Vc2VyAAAAAApBUFlfQW1vdW50AgAAAAtfQVBZX2Ftb3VudAAAAAARdG90YWxMb2NrZWRBTW91bnQCAA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UAAAARdHJhbnNmZXJBUFlBbW91bnQFAAAAEXRyYW5zZmVyQVBZQW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAABnVzZXJJZAUAAAANdUxvY2tlZEFtb3VudAkAAlkAAAABBQAAAAx1TG9ja2VkQXNzZXQJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAAEnVBbHJlYWR5Q2xhaW1lZEtleQYFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAMmI0Og=", "height": 2186012, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: uK99eSZYjTexR4eBrUtZbSj1RQYAFXeutpkkXatwBLM Next: B5w39A7YmPq3WqFgHhMRJt1b4HK9iWwDhSJSnshjksn6 Diff:
Old | New | Differences | |
---|---|---|---|
105 | 105 | ||
106 | 106 | func writeConstString (key,value) = if (!(isDefined(getS(key)))) | |
107 | 107 | then writeStr(key, value) | |
108 | - | else throw(("already initialized | |
108 | + | else throw(("already initialized " + key)) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func writeConstInteger (key,value) = if (!(isDefined(getS(key)))) | |
112 | 112 | then writeInt(key, value) | |
113 | - | else throw(("already initialized | |
113 | + | else throw(("already initialized " + key)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func adminOnly (i) = { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let lockingStore = this | |
5 | 5 | ||
6 | 6 | let stakingStore = "_Reserve" | |
7 | 7 | ||
8 | 8 | let minimumLockAmount = "_MinLockAmount" | |
9 | 9 | ||
10 | 10 | let maximumLockAmount = "_MaxLockAmount" | |
11 | 11 | ||
12 | 12 | let assetList = nil | |
13 | 13 | ||
14 | 14 | let unlockEligibility = "_Eligible_to_unlock_at_block" | |
15 | 15 | ||
16 | 16 | let lockedAmount = "_Amount_locked" | |
17 | 17 | ||
18 | 18 | let lockedAsset = "_Asset_locked" | |
19 | 19 | ||
20 | 20 | let user = "_User" | |
21 | 21 | ||
22 | 22 | let APY_Amount = "_APY_amount" | |
23 | 23 | ||
24 | 24 | let totalLockedAMount = "_Total_Locked_Amount" | |
25 | 25 | ||
26 | 26 | let lockingPeriod = "_Days_locked" | |
27 | 27 | ||
28 | 28 | let entryIndex = "_Entry_Index" | |
29 | 29 | ||
30 | 30 | let alreadyClaimed = "_Already_Claimed" | |
31 | 31 | ||
32 | 32 | let admin = "admin_" | |
33 | 33 | ||
34 | 34 | let BlockPerDay = 1440 | |
35 | 35 | ||
36 | 36 | let thirtyDaysLockPeriod = 30 | |
37 | 37 | ||
38 | 38 | let sixtyDaysLockPeriod = 60 | |
39 | 39 | ||
40 | 40 | let ninetyDaysLockPeriod = 90 | |
41 | 41 | ||
42 | 42 | let oneDayLockperiod = 1 | |
43 | 43 | ||
44 | 44 | func getI (key) = getInteger(this, key) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func getS (key) = getString(this, key) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func getIV (key) = value(getInteger(this, key)) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func getSV (key) = value(getString(this, key)) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func throwIf (condition,error) = if (condition) | |
57 | 57 | then throw(error) | |
58 | 58 | else true | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func throwOrReturnI (val,error) = match val { | |
62 | 62 | case val: Int => | |
63 | 63 | val | |
64 | 64 | case _ => | |
65 | 65 | throw(error) | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func throwOrReturnS (val,error) = match val { | |
70 | 70 | case val: String => | |
71 | 71 | val | |
72 | 72 | case _ => | |
73 | 73 | throw(error) | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func writeInt (key,value) = if ((0 > value)) | |
78 | 78 | then throw(((("writing negative value " + toString(value)) + " for key ") + key)) | |
79 | 79 | else IntegerEntry(key, value) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func writeStr (key,value) = if ((" " == value)) | |
83 | 83 | then throw(("writing an empty string " + value)) | |
84 | 84 | else StringEntry(key, value) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func daysToBlocks (days) = if ((days != oneDayLockperiod)) | |
88 | 88 | then if ((days != thirtyDaysLockPeriod)) | |
89 | 89 | then if ((days != sixtyDaysLockPeriod)) | |
90 | 90 | then if ((days != ninetyDaysLockPeriod)) | |
91 | 91 | then throw("invalid locking period") | |
92 | 92 | else (((days + 2) * BlockPerDay) + height) | |
93 | 93 | else (((days + 2) * BlockPerDay) + height) | |
94 | 94 | else (((days + 2) * BlockPerDay) + height) | |
95 | 95 | else (((days + 2) * BlockPerDay) + height) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func blocksToDays (blocksLeft) = if ((0 >= blocksLeft)) | |
99 | 99 | then 0 | |
100 | 100 | else { | |
101 | 101 | let daysleft = (blocksLeft / BlockPerDay) | |
102 | 102 | daysleft | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func writeConstString (key,value) = if (!(isDefined(getS(key)))) | |
107 | 107 | then writeStr(key, value) | |
108 | - | else throw(("already initialized | |
108 | + | else throw(("already initialized " + key)) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func writeConstInteger (key,value) = if (!(isDefined(getS(key)))) | |
112 | 112 | then writeInt(key, value) | |
113 | - | else throw(("already initialized | |
113 | + | else throw(("already initialized " + key)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func adminOnly (i) = { | |
117 | 117 | let inputAddress = toBase58String(i.caller.bytes) | |
118 | 118 | let otherAdmin = (admin + inputAddress) | |
119 | 119 | match getS(admin) { | |
120 | 120 | case a: String => | |
121 | 121 | if ((inputAddress != getS(admin))) | |
122 | 122 | then throw("unauthorized") | |
123 | 123 | else true | |
124 | 124 | case _ => | |
125 | 125 | match getS(otherAdmin) { | |
126 | 126 | case b: String => | |
127 | 127 | if ((inputAddress != getS(otherAdmin))) | |
128 | 128 | then throw("unauthorized") | |
129 | 129 | else true | |
130 | 130 | case _ => | |
131 | 131 | throw("unauthorizd") | |
132 | 132 | } | |
133 | 133 | } | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func writeConfigValue (key,data) = match data { | |
138 | 138 | case data: String => | |
139 | 139 | writeConstString(key, data) | |
140 | 140 | case data: Int => | |
141 | 141 | writeConstInteger(key, data) | |
142 | 142 | case _ => | |
143 | 143 | throw("unsupported config type") | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func incrementEntryIndex (key) = { | |
148 | 148 | let uIndex = getI(key) | |
149 | 149 | if (isDefined(uIndex)) | |
150 | 150 | then (value(uIndex) + 1) | |
151 | 151 | else 0 | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | @Callable(i) | |
156 | 156 | func addAsset (AssetTicker,AssetID,AssetReserve,AssetMinimumLockAmount,AssetMaximumLockAmount) = { | |
157 | 157 | let check = adminOnly(i) | |
158 | 158 | if ((check == check)) | |
159 | 159 | then { | |
160 | 160 | let aStakingStore = (AssetTicker + stakingStore) | |
161 | 161 | let aMinimumLockAmount = (AssetTicker + minimumLockAmount) | |
162 | 162 | let aMaximumLockAmount = (AssetTicker + maximumLockAmount) | |
163 | 163 | let checkMinMax = if ((AssetMaximumLockAmount > AssetMinimumLockAmount)) | |
164 | 164 | then [writeConstInteger(aMinimumLockAmount, AssetMinimumLockAmount), writeConstInteger(aMaximumLockAmount, AssetMaximumLockAmount)] | |
165 | 165 | else [writeConstInteger(aMinimumLockAmount, AssetMaximumLockAmount), writeConstInteger(aMaximumLockAmount, AssetMinimumLockAmount)] | |
166 | 166 | ([writeConstString(AssetTicker, AssetID), writeConstString(aStakingStore, AssetReserve)] ++ checkMinMax) | |
167 | 167 | } | |
168 | 168 | else throw("Strict value is not equal to itself.") | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | ||
173 | 173 | @Callable(i) | |
174 | 174 | func deleteAsset (AssetTicker) = { | |
175 | 175 | let check = adminOnly(i) | |
176 | 176 | if ((check == check)) | |
177 | 177 | then { | |
178 | 178 | let assetID = throwOrReturnS(getS(AssetTicker), (("asset with ticker " + AssetTicker) + " not found")) | |
179 | 179 | if ((assetID == assetID)) | |
180 | 180 | then [DeleteEntry(AssetTicker), DeleteEntry((AssetTicker + minimumLockAmount)), DeleteEntry((AssetTicker + maximumLockAmount)), DeleteEntry((AssetTicker + stakingStore))] | |
181 | 181 | else throw("Strict value is not equal to itself.") | |
182 | 182 | } | |
183 | 183 | else throw("Strict value is not equal to itself.") | |
184 | 184 | } | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | ||
188 | 188 | @Callable(i) | |
189 | 189 | func _getAssetIdByTicker (AssetTicker) = { | |
190 | 190 | let check = adminOnly(i) | |
191 | 191 | if ((check == check)) | |
192 | 192 | then { | |
193 | 193 | let a = throwOrReturnS(getS(AssetTicker), "asset not found") | |
194 | 194 | $Tuple2(nil, a) | |
195 | 195 | } | |
196 | 196 | else throw("Strict value is not equal to itself.") | |
197 | 197 | } | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | ||
201 | 201 | @Callable(i) | |
202 | 202 | func init (AdminAddress) = { | |
203 | 203 | let adminAddr = valueOrErrorMessage(addressFromString(AdminAddress), "invalid address") | |
204 | 204 | [writeConstString(admin, toString(adminAddr))] | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | ||
209 | 209 | @Callable(i) | |
210 | 210 | func _deleteEntry (key) = { | |
211 | 211 | let check = adminOnly(i) | |
212 | 212 | if ((check == check)) | |
213 | 213 | then [DeleteEntry(key)] | |
214 | 214 | else throw("Strict value is not equal to itself.") | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | ||
219 | 219 | @Callable(i) | |
220 | 220 | func addAdmin (AdminAddress) = { | |
221 | 221 | let check = adminOnly(i) | |
222 | 222 | if ((check == check)) | |
223 | 223 | then { | |
224 | 224 | let adminAddr = valueOrErrorMessage(addressFromString(AdminAddress), "invalid address") | |
225 | 225 | let newAdmin = (admin + toString(adminAddr)) | |
226 | 226 | [writeConstString(newAdmin, AdminAddress)] | |
227 | 227 | } | |
228 | 228 | else throw("Strict value is not equal to itself.") | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | ||
233 | 233 | @Callable(i) | |
234 | 234 | func changeMainAdmin (newAddress) = { | |
235 | 235 | let checks = adminOnly(i) | |
236 | 236 | if ((checks == checks)) | |
237 | 237 | then { | |
238 | 238 | let adminAddr = valueOrErrorMessage(addressFromString(newAddress), "invalid address") | |
239 | 239 | let del = DeleteEntry(admin) | |
240 | 240 | if ((del == del)) | |
241 | 241 | then [writeConstString(admin, toString(adminAddr))] | |
242 | 242 | else throw("Strict value is not equal to itself.") | |
243 | 243 | } | |
244 | 244 | else throw("Strict value is not equal to itself.") | |
245 | 245 | } | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | ||
249 | 249 | @Callable(i) | |
250 | 250 | func updateOtherAdminAddress (newAddress) = { | |
251 | 251 | let checks = adminOnly(i) | |
252 | 252 | if ((checks == checks)) | |
253 | 253 | then { | |
254 | 254 | let adminAddr = valueOrErrorMessage(addressFromString(newAddress), "invalid address") | |
255 | 255 | let caller = toString(i.caller) | |
256 | 256 | let otherAdmin = (admin + caller) | |
257 | 257 | let checkOldAddress = throwOrReturnS(getS(otherAdmin), "no previous address found") | |
258 | 258 | if ((checkOldAddress == checkOldAddress)) | |
259 | 259 | then { | |
260 | 260 | let delAddress = DeleteEntry(otherAdmin) | |
261 | 261 | if ((delAddress == delAddress)) | |
262 | 262 | then [writeConstString(otherAdmin, toString(adminAddr))] | |
263 | 263 | else throw("Strict value is not equal to itself.") | |
264 | 264 | } | |
265 | 265 | else throw("Strict value is not equal to itself.") | |
266 | 266 | } | |
267 | 267 | else throw("Strict value is not equal to itself.") | |
268 | 268 | } | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | ||
272 | 272 | @Callable(i) | |
273 | 273 | func removeOtherAdmin (address) = { | |
274 | 274 | let checks = adminOnly(i) | |
275 | 275 | if ((checks == checks)) | |
276 | 276 | then { | |
277 | 277 | let adminAddr = valueOrErrorMessage(addressFromString(address), "invalid address") | |
278 | 278 | let otherAddress = (admin + toString(adminAddr)) | |
279 | 279 | let delAdmin = DeleteEntry(otherAddress) | |
280 | 280 | if ((delAdmin == delAdmin)) | |
281 | 281 | then nil | |
282 | 282 | else throw("Strict value is not equal to itself.") | |
283 | 283 | } | |
284 | 284 | else throw("Strict value is not equal to itself.") | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | ||
289 | 289 | @Callable(i) | |
290 | 290 | func updateConfigValue (key,data) = { | |
291 | 291 | let checks = adminOnly(i) | |
292 | 292 | if ((checks == checks)) | |
293 | 293 | then { | |
294 | 294 | let del = DeleteEntry(key) | |
295 | 295 | if ((del == del)) | |
296 | 296 | then [writeConfigValue(key, data)] | |
297 | 297 | else throw("Strict value is not equal to itself.") | |
298 | 298 | } | |
299 | 299 | else throw("Strict value is not equal to itself.") | |
300 | 300 | } | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | ||
304 | 304 | @Callable(i) | |
305 | 305 | func _getDaysLeftToClaim (userAddress,AssetTicker,EntryIndex) = { | |
306 | 306 | let check0 = adminOnly(i) | |
307 | 307 | if ((check0 == check0)) | |
308 | 308 | then { | |
309 | 309 | let check1 = valueOrErrorMessage(addressFromString(userAddress), "invalid address") | |
310 | 310 | if ((check1 == check1)) | |
311 | 311 | then { | |
312 | 312 | let uEntryIndex = ((("_" + AssetTicker) + "_") + toString(EntryIndex)) | |
313 | 313 | let uUnlockEligibility = ((userAddress + uEntryIndex) + unlockEligibility) | |
314 | 314 | let uBlocksLeft = valueOrErrorMessage(getI(uUnlockEligibility), ("no entry for " + userAddress)) | |
315 | 315 | let uBlocksToDays = blocksToDays((uBlocksLeft - height)) | |
316 | 316 | $Tuple2(nil, uBlocksToDays) | |
317 | 317 | } | |
318 | 318 | else throw("Strict value is not equal to itself.") | |
319 | 319 | } | |
320 | 320 | else throw("Strict value is not equal to itself.") | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | ||
325 | 325 | @Callable(i) | |
326 | 326 | func Lock (LockPeriod,AssetTicker,EntryIndex) = { | |
327 | 327 | let check1 = throwIf((1 != size(i.payments)), "attach amount you want to lock") | |
328 | 328 | if ((check1 == check1)) | |
329 | 329 | then { | |
330 | 330 | let assetValue = valueOrErrorMessage(i.payments[0].assetId, "no assetId for the attached asset") | |
331 | 331 | let asset = toBase58String(assetValue) | |
332 | 332 | let check2 = throwIf((getS(AssetTicker) != asset), "asset not supported") | |
333 | 333 | if ((check2 == check2)) | |
334 | 334 | then { | |
335 | 335 | let lockPeriod = LockPeriod | |
336 | 336 | let userId = toBase58String(i.caller.bytes) | |
337 | 337 | let amountToStake = i.payments[0].amount | |
338 | 338 | let minToStake = throwOrReturnI(getI((AssetTicker + minimumLockAmount)), "internal error: minimum stacking amount not specified") | |
339 | 339 | let maxToStake = throwOrReturnI(getI((AssetTicker + maximumLockAmount)), "internal error: maximum staking amount not specified") | |
340 | 340 | let check3 = throwIf(if ((minToStake > amountToStake)) | |
341 | 341 | then true | |
342 | 342 | else (amountToStake > maxToStake), "staking amount is out of range for the selected asset") | |
343 | 343 | if ((check3 == check3)) | |
344 | 344 | then { | |
345 | 345 | let uTotalLocked = (userId + totalLockedAMount) | |
346 | 346 | let uSumTotal = if (!(isDefined(getI(uTotalLocked)))) | |
347 | 347 | then 0 | |
348 | 348 | else (amountToStake + value(getI(uTotalLocked))) | |
349 | 349 | let check4 = throwIf((uSumTotal > maxToStake), "you have maxed out your quota") | |
350 | 350 | if ((check4 == check4)) | |
351 | 351 | then { | |
352 | 352 | let uEntryToString = toString(EntryIndex) | |
353 | 353 | let uEntry = ((("_" + AssetTicker) + "_") + uEntryToString) | |
354 | 354 | let uUserEntryKey = (userId + uEntry) | |
355 | 355 | let uUserId = ((userId + uEntry) + user) | |
356 | 356 | let uAsset = ((userId + uEntry) + lockedAsset) | |
357 | 357 | let uLockingPeriod = ((userId + uEntry) + lockingPeriod) | |
358 | 358 | let uLockedAmount = ((userId + uEntry) + lockedAmount) | |
359 | 359 | let uAPY = ((userId + uEntry) + APY_Amount) | |
360 | 360 | let uUnlockEligibility = ((userId + uEntry) + unlockEligibility) | |
361 | 361 | let uAlreadyClaimed = ((userId + uEntry) + alreadyClaimed) | |
362 | 362 | let StoredAPY = invoke(Address(fromBase58String(getSV(admin))), "getAPYAmount", [userId, AssetTicker, EntryIndex], nil) | |
363 | 363 | let APY = match StoredAPY { | |
364 | 364 | case c: Int => | |
365 | 365 | c | |
366 | 366 | case _ => | |
367 | 367 | throw(("could not get the APY amount for " + userId)) | |
368 | 368 | } | |
369 | 369 | [writeConstInteger(uUserEntryKey, EntryIndex), writeConstString(uUserId, userId), writeConstString(uAsset, asset), writeConstInteger(uLockingPeriod, lockPeriod), writeConstInteger(uLockedAmount, i.payments[0].amount), writeConstInteger(uTotalLocked, uSumTotal), writeConstInteger(uUnlockEligibility, daysToBlocks(LockPeriod)), writeConstInteger(uAPY, APY), BooleanEntry(uAlreadyClaimed, false)] | |
370 | 370 | } | |
371 | 371 | else throw("Strict value is not equal to itself.") | |
372 | 372 | } | |
373 | 373 | else throw("Strict value is not equal to itself.") | |
374 | 374 | } | |
375 | 375 | else throw("Strict value is not equal to itself.") | |
376 | 376 | } | |
377 | 377 | else throw("Strict value is not equal to itself.") | |
378 | 378 | } | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | ||
382 | 382 | @Callable(i) | |
383 | 383 | func Claim (AssetTicker,EntryIndex) = { | |
384 | 384 | let userId = toString(i.caller) | |
385 | 385 | let asset = valueOrErrorMessage(getS(AssetTicker), "invalid asset") | |
386 | 386 | if ((asset == asset)) | |
387 | 387 | then { | |
388 | 388 | let uEntry = ((("_" + AssetTicker) + "_") + toString(EntryIndex)) | |
389 | 389 | let uUserID = valueOrErrorMessage(getS(((userId + uEntry) + user)), ("no entry found for user " + userId)) | |
390 | 390 | if ((uUserID == uUserID)) | |
391 | 391 | then { | |
392 | 392 | let uLockedAsset = valueOrErrorMessage(getS(((userId + uEntry) + lockedAsset)), "asset not locked by user") | |
393 | 393 | let uAlreadyClaimedKey = ((userId + uEntry) + alreadyClaimed) | |
394 | 394 | let check0 = throwIf((valueOrErrorMessage(getBoolean(uAlreadyClaimedKey), "cannot ascertain claimability") == true), (("user + " + userId) + " already claimed")) | |
395 | 395 | if ((check0 == check0)) | |
396 | 396 | then { | |
397 | 397 | let uLockedAmount = getIV(((userId + uEntry) + lockedAmount)) | |
398 | 398 | let stakingReserve = addressFromStringValue(throwOrReturnS(getS((AssetTicker + stakingStore)), "internal error: no reserve found")) | |
399 | 399 | let APYAMount = getIV(((userId + uEntry) + APY_Amount)) | |
400 | 400 | let period = getIV(((userId + uEntry) + unlockEligibility)) | |
401 | 401 | let blocksLeft = if ((0 >= (period - height))) | |
402 | 402 | then 0 | |
403 | 403 | else (period - height) | |
404 | 404 | let daysLeft = blocksToDays(blocksLeft) | |
405 | 405 | let check1 = throwIf((period > height), (toString(daysLeft) + " days left to claim")) | |
406 | 406 | if ((check1 == check1)) | |
407 | 407 | then { | |
408 | 408 | let transferAPYAmount = invoke(stakingReserve, "transferInterest", [userId, APYAMount, fromBase58String(uLockedAsset)], nil) | |
409 | 409 | if ((transferAPYAmount == transferAPYAmount)) | |
410 | 410 | then [ScriptTransfer(addressFromStringValue(userId), uLockedAmount, fromBase58String(uLockedAsset)), BooleanEntry(uAlreadyClaimedKey, true)] | |
411 | 411 | else throw("Strict value is not equal to itself.") | |
412 | 412 | } | |
413 | 413 | else throw("Strict value is not equal to itself.") | |
414 | 414 | } | |
415 | 415 | else throw("Strict value is not equal to itself.") | |
416 | 416 | } | |
417 | 417 | else throw("Strict value is not equal to itself.") | |
418 | 418 | } | |
419 | 419 | else throw("Strict value is not equal to itself.") | |
420 | 420 | } | |
421 | 421 | ||
422 | 422 |
github/deemru/w8io/169f3d6 77.42 ms ◑