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