tx · 7SijzkLzdh9EpPXmf9yJu97jVWH7tCbD22jdxqCusWSb

3N9eLqWNqb7jeF383m9qsXEBqpp8qfQmfbx:  -0.01500000 Waves

2022.08.29 15:45 [2205758] smart account 3N9eLqWNqb7jeF383m9qsXEBqpp8qfQmfbx > SELF 0.00000000 Waves

{ "type": 13, "id": "7SijzkLzdh9EpPXmf9yJu97jVWH7tCbD22jdxqCusWSb", "fee": 1500000, "feeAssetId": null, "timestamp": 1661777159419, "version": 2, "chainId": 84, "sender": "3N9eLqWNqb7jeF383m9qsXEBqpp8qfQmfbx", "senderPublicKey": "5cWdpE4X7mfNkLmxJ389ws6qGZof4fwydqMcqPexhJ7w", "proofs": [ "2StXAcTPXa8ujhVDgD6J5hLjLsqnQybuZCsX9KPJXkmq79ZVzvXuvnmJkfTT21zWtTxV7qS6BN86nahBNFmYkh24" ], "script": "base64:AAIFAAAAAAAAAE0IAhIHCgUICAgBARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAkSBQoDCAgBEgUKAwEIARIECgIIAQAAACYAAAAADGxvY2tpbmdTdG9yZQUAAAAEdGhpcwAAAAAMc3Rha2luZ1N0b3JlAgAAAAhfUmVzZXJ2ZQAAAAARbWluaW11bUxvY2tBbW91bnQCAAAADl9NaW5Mb2NrQW1vdW50AAAAABFtYXhpbXVtTG9ja0Ftb3VudAIAAAAOX01heExvY2tBbW91bnQAAAAACWFzc2V0TGlzdAUAAAADbmlsAAAAABF1bmxvY2tFbGlnaWJpbGl0eQIAAAAcX0VsaWdpYmxlX3RvX3VubG9ja19hdF9ibG9jawAAAAAMbG9ja2VkQW1vdW50AgAAAA5fQW1vdW50X2xvY2tlZAAAAAALbG9ja2VkQXNzZXQCAAAADV9Bc3NldF9sb2NrZWQAAAAABHVzZXICAAAABV9Vc2VyAAAAAApBUFlfQW1vdW50AgAAAAtfQVBZX2Ftb3VudAAAAAARdG90YWxMb2NrZWRBTW91bnQCAAAAFF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": 2205758, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C4ei4uRGQR7ARzKG7f5bxvy6eoYQBztMNtYPZj46gg8Z Next: none Diff:
OldNewDifferences
113113
114114 func writeConstString (key,value) = if (!(isDefined(getS(key))))
115115 then writeStr(key, value)
116- else throw(("already initialized: " + key))
116+ else throw((" entry already initialized: " + key))
117117
118118
119119 func writeConstInteger (key,value) = if (!(isDefined(getS(key))))
120120 then writeInt(key, value)
121- else throw(("already initialized: " + key))
121+ else throw((" entry already initialized: " + key))
122122
123123
124124 func adminOnly (i) = {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lockingStore = this
55
66 let stakingStore = "_Reserve"
77
88 let minimumLockAmount = "_MinLockAmount"
99
1010 let maximumLockAmount = "_MaxLockAmount"
1111
1212 let assetList = nil
1313
1414 let unlockEligibility = "_Eligible_to_unlock_at_block"
1515
1616 let lockedAmount = "_Amount_locked"
1717
1818 let lockedAsset = "_Asset_locked"
1919
2020 let user = "_User"
2121
2222 let APY_Amount = "_APY_amount"
2323
2424 let totalLockedAMount = "_Total_Locked_Amount"
2525
2626 let lockingPeriod = "_Days_locked"
2727
2828 let entryIndex = "_Entry_Index"
2929
3030 let alreadyClaimed = "_Already_Claimed"
3131
3232 let admin = "admin_"
3333
3434 let BlockPerDay = 1440
3535
3636 let oneDayLockperiod = 1
3737
3838 let sevenDaysLockPeriod = 7
3939
4040 let fourteenDaysLockePeriod = 14
4141
4242 let thirtyDaysLockPeriod = 30
4343
4444 let sixtyDaysLockPeriod = 60
4545
4646 let ninetyDaysLockPeriod = 90
4747
4848 func getI (key) = getInteger(this, key)
4949
5050
5151 func getS (key) = getString(this, key)
5252
5353
5454 func getIV (key) = value(getInteger(this, key))
5555
5656
5757 func getSV (key) = value(getString(this, key))
5858
5959
6060 func throwIf (condition,error) = if (condition)
6161 then throw(error)
6262 else true
6363
6464
6565 func throwOrReturnI (val,error) = match val {
6666 case val: Int =>
6767 val
6868 case _ =>
6969 throw(error)
7070 }
7171
7272
7373 func throwOrReturnS (val,error) = match val {
7474 case val: String =>
7575 val
7676 case _ =>
7777 throw(error)
7878 }
7979
8080
8181 func writeInt (key,value) = if ((0 > value))
8282 then throw(((("writing negative value " + toString(value)) + " for key ") + key))
8383 else IntegerEntry(key, value)
8484
8585
8686 func writeStr (key,value) = if ((" " == value))
8787 then throw(("writing an empty string " + value))
8888 else StringEntry(key, value)
8989
9090
9191 func daysToBlocks (days) = if ((days != oneDayLockperiod))
9292 then if ((days != sevenDaysLockPeriod))
9393 then if ((days != fourteenDaysLockePeriod))
9494 then if ((days != thirtyDaysLockPeriod))
9595 then if ((days != sixtyDaysLockPeriod))
9696 then if ((days != ninetyDaysLockPeriod))
9797 then throw("invalid locking period")
9898 else (((days + 2) * BlockPerDay) + height)
9999 else (((days + 2) * BlockPerDay) + height)
100100 else (((days + 2) * BlockPerDay) + height)
101101 else (((days + 2) * BlockPerDay) + height)
102102 else (((days + 2) * BlockPerDay) + height)
103103 else (((days + 2) * BlockPerDay) + height)
104104
105105
106106 func blocksToDays (blocksLeft) = if ((0 >= blocksLeft))
107107 then 0
108108 else {
109109 let daysleft = fraction(blocksLeft, 1000, BlockPerDay, CEILING)
110110 daysleft
111111 }
112112
113113
114114 func writeConstString (key,value) = if (!(isDefined(getS(key))))
115115 then writeStr(key, value)
116- else throw(("already initialized: " + key))
116+ else throw((" entry already initialized: " + key))
117117
118118
119119 func writeConstInteger (key,value) = if (!(isDefined(getS(key))))
120120 then writeInt(key, value)
121- else throw(("already initialized: " + key))
121+ else throw((" entry already initialized: " + key))
122122
123123
124124 func adminOnly (i) = {
125125 let inputAddress = toBase58String(i.caller.bytes)
126126 let otherAdmin = (admin + inputAddress)
127127 match getS(admin) {
128128 case a: String =>
129129 if ((inputAddress != getS(admin)))
130130 then throw("unauthorized")
131131 else true
132132 case _ =>
133133 match getS(otherAdmin) {
134134 case b: String =>
135135 if ((inputAddress != getS(otherAdmin)))
136136 then throw("unauthorized")
137137 else true
138138 case _ =>
139139 throw("unauthorizd")
140140 }
141141 }
142142 }
143143
144144
145145 func writeConfigValue (key,data) = match data {
146146 case data: String =>
147147 writeConstString(key, data)
148148 case data: Int =>
149149 writeConstInteger(key, data)
150150 case _ =>
151151 throw("unsupported config type")
152152 }
153153
154154
155155 func incrementEntryIndex (key) = {
156156 let uIndex = getI(key)
157157 if (isDefined(uIndex))
158158 then (value(uIndex) + 1)
159159 else 0
160160 }
161161
162162
163163 @Callable(i)
164164 func addAsset (AssetTicker,AssetID,AssetReserve,AssetMinimumLockAmount,AssetMaximumLockAmount) = {
165165 let check = adminOnly(i)
166166 if ((check == check))
167167 then {
168168 let aStakingStore = (AssetTicker + stakingStore)
169169 let aMinimumLockAmount = (AssetTicker + minimumLockAmount)
170170 let aMaximumLockAmount = (AssetTicker + maximumLockAmount)
171171 let checkMinMax = if ((AssetMaximumLockAmount > AssetMinimumLockAmount))
172172 then [writeConstInteger(aMinimumLockAmount, AssetMinimumLockAmount), writeConstInteger(aMaximumLockAmount, AssetMaximumLockAmount)]
173173 else [writeConstInteger(aMinimumLockAmount, AssetMaximumLockAmount), writeConstInteger(aMaximumLockAmount, AssetMinimumLockAmount)]
174174 ([writeConstString(AssetTicker, AssetID), writeConstString(aStakingStore, AssetReserve)] ++ checkMinMax)
175175 }
176176 else throw("Strict value is not equal to itself.")
177177 }
178178
179179
180180
181181 @Callable(i)
182182 func deleteAsset (AssetTicker) = {
183183 let check = adminOnly(i)
184184 if ((check == check))
185185 then {
186186 let assetID = throwOrReturnS(getS(AssetTicker), (("asset with ticker " + AssetTicker) + " not found"))
187187 if ((assetID == assetID))
188188 then [DeleteEntry(AssetTicker), DeleteEntry((AssetTicker + minimumLockAmount)), DeleteEntry((AssetTicker + maximumLockAmount)), DeleteEntry((AssetTicker + stakingStore))]
189189 else throw("Strict value is not equal to itself.")
190190 }
191191 else throw("Strict value is not equal to itself.")
192192 }
193193
194194
195195
196196 @Callable(i)
197197 func _getAssetIdByTicker (AssetTicker) = {
198198 let check = adminOnly(i)
199199 if ((check == check))
200200 then {
201201 let a = throwOrReturnS(getS(AssetTicker), "asset not found")
202202 $Tuple2(nil, a)
203203 }
204204 else throw("Strict value is not equal to itself.")
205205 }
206206
207207
208208
209209 @Callable(i)
210210 func init (AdminAddress) = {
211211 let adminAddr = valueOrErrorMessage(addressFromString(AdminAddress), "invalid address")
212212 [writeConstString(admin, toString(adminAddr))]
213213 }
214214
215215
216216
217217 @Callable(i)
218218 func _deleteEntry (key) = {
219219 let check = adminOnly(i)
220220 if ((check == check))
221221 then [DeleteEntry(key)]
222222 else throw("Strict value is not equal to itself.")
223223 }
224224
225225
226226
227227 @Callable(i)
228228 func addAdmin (AdminAddress) = {
229229 let check = adminOnly(i)
230230 if ((check == check))
231231 then {
232232 let adminAddr = valueOrErrorMessage(addressFromString(AdminAddress), "invalid address")
233233 let newAdmin = (admin + toString(adminAddr))
234234 [writeConstString(newAdmin, AdminAddress)]
235235 }
236236 else throw("Strict value is not equal to itself.")
237237 }
238238
239239
240240
241241 @Callable(i)
242242 func changeMainAdmin (newAddress) = {
243243 let checks = adminOnly(i)
244244 if ((checks == checks))
245245 then {
246246 let adminAddr = valueOrErrorMessage(addressFromString(newAddress), "invalid address")
247247 let del = DeleteEntry(admin)
248248 if ((del == del))
249249 then [writeConstString(admin, toString(adminAddr))]
250250 else throw("Strict value is not equal to itself.")
251251 }
252252 else throw("Strict value is not equal to itself.")
253253 }
254254
255255
256256
257257 @Callable(i)
258258 func updateOtherAdminAddress (newAddress) = {
259259 let checks = adminOnly(i)
260260 if ((checks == checks))
261261 then {
262262 let adminAddr = valueOrErrorMessage(addressFromString(newAddress), "invalid address")
263263 let caller = toString(i.caller)
264264 let otherAdmin = (admin + caller)
265265 let checkOldAddress = throwOrReturnS(getS(otherAdmin), "no previous address found")
266266 if ((checkOldAddress == checkOldAddress))
267267 then {
268268 let delAddress = DeleteEntry(otherAdmin)
269269 if ((delAddress == delAddress))
270270 then [writeConstString(otherAdmin, toString(adminAddr))]
271271 else throw("Strict value is not equal to itself.")
272272 }
273273 else throw("Strict value is not equal to itself.")
274274 }
275275 else throw("Strict value is not equal to itself.")
276276 }
277277
278278
279279
280280 @Callable(i)
281281 func removeOtherAdmin (address) = {
282282 let checks = adminOnly(i)
283283 if ((checks == checks))
284284 then {
285285 let adminAddr = valueOrErrorMessage(addressFromString(address), "invalid address")
286286 let otherAddress = (admin + toString(adminAddr))
287287 let delAdmin = DeleteEntry(otherAddress)
288288 if ((delAdmin == delAdmin))
289289 then nil
290290 else throw("Strict value is not equal to itself.")
291291 }
292292 else throw("Strict value is not equal to itself.")
293293 }
294294
295295
296296
297297 @Callable(i)
298298 func updateConfigValue (key,data) = {
299299 let checks = adminOnly(i)
300300 if ((checks == checks))
301301 then {
302302 let del = DeleteEntry(key)
303303 if ((del == del))
304304 then [writeConfigValue(key, data)]
305305 else throw("Strict value is not equal to itself.")
306306 }
307307 else throw("Strict value is not equal to itself.")
308308 }
309309
310310
311311
312312 @Callable(i)
313313 func _getDaysLeftToClaim (userAddress,AssetTicker,EntryIndex) = {
314314 let check0 = adminOnly(i)
315315 if ((check0 == check0))
316316 then {
317317 let check1 = valueOrErrorMessage(addressFromString(userAddress), "invalid address")
318318 if ((check1 == check1))
319319 then {
320320 let uEntryIndex = ((("_" + AssetTicker) + "_") + toString(EntryIndex))
321321 let uUnlockEligibility = ((userAddress + uEntryIndex) + unlockEligibility)
322322 let uBlocksLeft = valueOrErrorMessage(getI(uUnlockEligibility), ("no entry for " + userAddress))
323323 let uBlocksToDays = blocksToDays((uBlocksLeft - height))
324324 $Tuple2(nil, uBlocksToDays)
325325 }
326326 else throw("Strict value is not equal to itself.")
327327 }
328328 else throw("Strict value is not equal to itself.")
329329 }
330330
331331
332332
333333 @Callable(i)
334334 func Lock (LockPeriod,AssetTicker,EntryIndex) = {
335335 let check1 = throwIf((1 != size(i.payments)), "attach amount you want to lock")
336336 if ((check1 == check1))
337337 then {
338338 let assetValue = valueOrErrorMessage(i.payments[0].assetId, "no assetId for the attached asset")
339339 let asset = toBase58String(assetValue)
340340 let check2 = throwIf((getS(AssetTicker) != asset), "asset not supported")
341341 if ((check2 == check2))
342342 then {
343343 let lockPeriod = LockPeriod
344344 let userId = toBase58String(i.caller.bytes)
345345 let amountToStake = i.payments[0].amount
346346 let minToStake = throwOrReturnI(getI((AssetTicker + minimumLockAmount)), "internal error: minimum stacking amount not specified")
347347 let maxToStake = throwOrReturnI(getI((AssetTicker + maximumLockAmount)), "internal error: maximum staking amount not specified")
348348 let check3 = throwIf(if ((minToStake > amountToStake))
349349 then true
350350 else (amountToStake > maxToStake), "staking amount is out of range")
351351 if ((check3 == check3))
352352 then {
353353 let uTotalLocked = (userId + totalLockedAMount)
354354 let uSumTotal = if (!(isDefined(getI(uTotalLocked))))
355355 then 0
356356 else (amountToStake + value(getI(uTotalLocked)))
357357 let check4 = throwIf((uSumTotal > maxToStake), "you have maxed out your quota")
358358 if ((check4 == check4))
359359 then {
360360 let uEntryToString = toString(EntryIndex)
361361 let uEntry = ((("_" + AssetTicker) + "_") + uEntryToString)
362362 let uUserEntryKey = (userId + uEntry)
363363 let uUserId = ((userId + uEntry) + user)
364364 let uAsset = ((userId + uEntry) + lockedAsset)
365365 let uLockingPeriod = ((userId + uEntry) + lockingPeriod)
366366 let uLockedAmount = ((userId + uEntry) + lockedAmount)
367367 let uAPY = ((userId + uEntry) + APY_Amount)
368368 let uUnlockEligibility = ((userId + uEntry) + unlockEligibility)
369369 let uAlreadyClaimed = ((userId + uEntry) + alreadyClaimed)
370370 let StoredAPY = invoke(Address(fromBase58String(getSV(admin))), "getAPYAmount", [userId, AssetTicker, EntryIndex], nil)
371371 let APY = match StoredAPY {
372372 case c: Int =>
373373 c
374374 case _ =>
375375 throw(("could not get the APY amount for " + userId))
376376 }
377377 [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)]
378378 }
379379 else throw("Strict value is not equal to itself.")
380380 }
381381 else throw("Strict value is not equal to itself.")
382382 }
383383 else throw("Strict value is not equal to itself.")
384384 }
385385 else throw("Strict value is not equal to itself.")
386386 }
387387
388388
389389
390390 @Callable(i)
391391 func Claim (AssetTicker,EntryIndex) = {
392392 let userId = toString(i.caller)
393393 let asset = valueOrErrorMessage(getS(AssetTicker), "invalid asset")
394394 if ((asset == asset))
395395 then {
396396 let uEntry = ((("_" + AssetTicker) + "_") + toString(EntryIndex))
397397 let uUserID = valueOrErrorMessage(getS(((userId + uEntry) + user)), ("no entry found for user " + userId))
398398 if ((uUserID == uUserID))
399399 then {
400400 let uLockedAsset = valueOrErrorMessage(getS(((userId + uEntry) + lockedAsset)), "asset not locked by user")
401401 let uAlreadyClaimedKey = ((userId + uEntry) + alreadyClaimed)
402402 let check0 = throwIf((valueOrErrorMessage(getBoolean(uAlreadyClaimedKey), "cannot ascertain claimability") == true), (("user + " + userId) + " already claimed"))
403403 if ((check0 == check0))
404404 then {
405405 let uLockedAmount = getIV(((userId + uEntry) + lockedAmount))
406406 let stakingReserve = addressFromStringValue(throwOrReturnS(getS((AssetTicker + stakingStore)), "internal error: no reserve found"))
407407 let APYAMount = getIV(((userId + uEntry) + APY_Amount))
408408 let period = getIV(((userId + uEntry) + unlockEligibility))
409409 let blocksLeft = if ((0 >= (period - height)))
410410 then 0
411411 else (period - height)
412412 let daysLeft = blocksToDays(blocksLeft)
413413 let check1 = throwIf((period > height), (("(" + toString(daysLeft)) + "/1000) days left to claim"))
414414 if ((check1 == check1))
415415 then {
416416 let transferAPYAmount = invoke(stakingReserve, "transferInterest", [userId, APYAMount, fromBase58String(uLockedAsset)], nil)
417417 if ((transferAPYAmount == transferAPYAmount))
418418 then [ScriptTransfer(addressFromStringValue(userId), uLockedAmount, fromBase58String(uLockedAsset)), BooleanEntry(uAlreadyClaimedKey, true)]
419419 else throw("Strict value is not equal to itself.")
420420 }
421421 else throw("Strict value is not equal to itself.")
422422 }
423423 else throw("Strict value is not equal to itself.")
424424 }
425425 else throw("Strict value is not equal to itself.")
426426 }
427427 else throw("Strict value is not equal to itself.")
428428 }
429429
430430

github/deemru/w8io/169f3d6 
64.09 ms