tx · 1qsMoFi9qjvNR3FHgZtDxtAoGsxCTtThbDmgHd2ff1Z

3MqjiXZpkpN31j7XFmLueeZuFpfZ7fDwe9S:  -0.01000000 Waves

2022.06.02 03:42 [2077999] smart account 3MqjiXZpkpN31j7XFmLueeZuFpfZ7fDwe9S > SELF 0.00000000 Waves

{ "type": 13, "id": "1qsMoFi9qjvNR3FHgZtDxtAoGsxCTtThbDmgHd2ff1Z", "fee": 1000000, "feeAssetId": null, "timestamp": 1654130541725, "version": 2, "chainId": 84, "sender": "3MqjiXZpkpN31j7XFmLueeZuFpfZ7fDwe9S", "senderPublicKey": "7YknsAXP81Vy1sJAhHtumQ4SqcsQHPEmiqnXeY58Bw3y", "proofs": [ "3XyTVuwSFaSpLKn5tcVLNGJ6fzZTDcWu7Z2MyrbhNmg2Sub2PQE9B6RCt6t1StbuvcTQwemSi394azJ5iGB1Uj53" ], "script": "base64:AAIFAAAAAAAAADsIAhIHCgUICAgBARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIICRIFCgMBCAESAwoBCAAAACEAAAAADGxvY2tpbmdTdG9yZQUAAAAEdGhpcwAAAAAMc3Rha2luZ1N0b3JlAgAAAA1fU3Rha2luZ1N0b3JlAAAAABFtaW5pbXVtTG9ja0Ftb3VudAIAAAAOX01pbkxvY2tBbW91bnQAAAAAEW1heGltdW1Mb2NrQW1vdW50AgAAAA5fTWF4TG9ja0Ftb3VudAAAAAAJYXNzZXRMaXN0BQAAAANuaWwAAAAAEXVubG9ja0VsaWdpYmlsaXR5AgAAABxfRWxpZ2libGVfdG9fdW5sb2NrX2F0X2Jsb2NrAAAAAAxsb2NrZWRBbW91bnQCAAAADl9BbW91bnRfbG9ja2VkAAAAAAtsb2NrZWRBc3NldAIAAAANX0Fzc2V0X2xvY2tlZAAAAAAEdXNlcgIAAAAFX1VzZXIAAAAACkFQWV9BbW91bnQCAAAAC19BUFlfYW1vdW50AAAAAA1sb2NraW5nUGVyaW9kAgAAAAxfR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gkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAGdXNlcklkBQAAAA11TG9ja2VkQW1vdW50CQABmwAAAAEFAAAABnVBc3NldAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAAtJA5nQ==", "height": 2077999, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: C521uRBftbsQRkBN5ZCnTRLRCaJZKdSJkJzKERKGVJ2T Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let lockingStore = this
5+
6+let stakingStore = "_StakingStore"
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 lockingPeriod = "_Days_locked"
25+
26+let admin = "admin_"
27+
28+let BlockPerDay = 1440
29+
30+let RBase = 10000000000000000
31+
32+let factorsBase = 1000
33+
34+let thirtyDaysLockPeriod = 30
35+
36+let sixtyDaysLockPeriod = 60
37+
38+let ninetyDaysLockPeriod = 90
39+
40+func getI (key) = getInteger(this, key)
41+
42+
43+func getS (key) = getString(this, key)
44+
45+
46+func getIV (key) = value(getInteger(this, key))
47+
48+
49+func getSV (key) = value(getString(this, key))
50+
51+
52+func throwIf (condition,error) = if (condition)
53+ then throw(error)
54+ else true
55+
56+
57+func throwOrReturnI (val,error) = match val {
58+ case val: Int =>
59+ val
60+ case _ =>
61+ throw(error)
62+}
63+
64+
65+func throwOrReturnS (val,error) = match val {
66+ case val: String =>
67+ val
68+ case _ =>
69+ throw(error)
70+}
71+
72+
73+func writeInt (key,value) = if ((0 > value))
74+ then throw(((("writing negative value " + toString(value)) + " for key ") + key))
75+ else IntegerEntry(key, value)
76+
77+
78+func writeStr (key,value) = if ((" " == value))
79+ then throw(("writing an empty string " + value))
80+ else StringEntry(key, value)
81+
82+
83+func daysToBlocks (days) = if (if (if ((days != thirtyDaysLockPeriod))
84+ then true
85+ else (days != sixtyDaysLockPeriod))
86+ then true
87+ else (days != ninetyDaysLockPeriod))
88+ then throw("invalid Lock Period")
89+ else (((days + 1) * BlockPerDay) + height)
90+
91+
92+func blocksToDays (blocksLeft) = if ((0 >= blocksLeft))
93+ then 0
94+ else {
95+ let multiplier = pow(10, 0, 3, 0, 0, CEILING)
96+ let daysleft = fraction(blocksLeft, multiplier, BlockPerDay)
97+ daysleft
98+ }
99+
100+
101+func writeConstString (key,value) = if (!(isDefined(getS(key))))
102+ then writeStr(key, value)
103+ else throw(("already initialized: " + key))
104+
105+
106+func writeConstInteger (key,value) = if (!(isDefined(getS(key))))
107+ then writeInt(key, value)
108+ else throw(("already initialized: " + key))
109+
110+
111+func adminOnly (i) = {
112+ let AdminAddress = toString(i.caller)
113+ let otherAdminAddress = (admin + toString(i.caller))
114+ if (if ((AdminAddress != valueOrElse(getS(admin), "not an admin")))
115+ then true
116+ else (AdminAddress != valueOrElse(getS(otherAdminAddress), "not an admin")))
117+ then throw("unauthorized")
118+ else true
119+ }
120+
121+
122+func writeConfigValue (key,data) = match data {
123+ case data: String =>
124+ writeConstString(key, data)
125+ case data: Int =>
126+ writeConstInteger(key, data)
127+ case _ =>
128+ throw("unsupported config type")
129+}
130+
131+
132+@Callable(i)
133+func addAsset (AssetTicker,AssetID,AssetStakingStore,AssetMinimumLockAmount,AssetMaximumLockAmount) = {
134+ let check = adminOnly(i)
135+ if ((check == check))
136+ then {
137+ let aStakingStore = (AssetTicker + stakingStore)
138+ let aMinimumLockAmount = (AssetTicker + minimumLockAmount)
139+ let aMaximumLockAmount = (AssetTicker + maximumLockAmount)
140+[writeConstString(AssetTicker, AssetID), writeConstString(aStakingStore, AssetStakingStore), writeConstInteger(aMinimumLockAmount, AssetMinimumLockAmount), writeConstInteger(aMaximumLockAmount, AssetMaximumLockAmount)]
141+ }
142+ else throw("Strict value is not equal to itself.")
143+ }
144+
145+
146+
147+@Callable(i)
148+func getAssetIdByTicker (AssetTicker) = {
149+ let check = adminOnly(i)
150+ if ((check == check))
151+ then {
152+ let a = throwOrReturnS(getS(AssetTicker), "asset not found")
153+ $Tuple2(nil, a)
154+ }
155+ else throw("Strict value is not equal to itself.")
156+ }
157+
158+
159+
160+@Callable(i)
161+func init (AdminAddress) = [writeConstString(admin, toString(addressFromStringValue(AdminAddress)))]
162+
163+
164+
165+@Callable(i)
166+func addAdmin (AdminAddress) = {
167+ let check = adminOnly(i)
168+ if ((check == check))
169+ then {
170+ let newAdmin = (admin + AdminAddress)
171+[writeConstString(newAdmin, AdminAddress)]
172+ }
173+ else throw("Strict value is not equal to itself.")
174+ }
175+
176+
177+
178+@Callable(i)
179+func changeMainAdmin (address) = {
180+ let checks = adminOnly(i)
181+ if ((checks == checks))
182+ then {
183+ let del = DeleteEntry(admin)
184+ if ((del == del))
185+ then [writeConstString(admin, address)]
186+ else throw("Strict value is not equal to itself.")
187+ }
188+ else throw("Strict value is not equal to itself.")
189+ }
190+
191+
192+
193+@Callable(i)
194+func updateOtherAdminAddress (address) = {
195+ let checks = adminOnly(i)
196+ if ((checks == checks))
197+ then {
198+ let caller = toString(i.caller)
199+ let otherAdmin = (admin + caller)
200+ let checkOldAddress = throwOrReturnS(getS(otherAdmin), "no previous address found")
201+ if ((checkOldAddress == checkOldAddress))
202+ then {
203+ let delAddress = DeleteEntry(otherAdmin)
204+ if ((delAddress == delAddress))
205+ then [writeConstString(otherAdmin, address)]
206+ else throw("Strict value is not equal to itself.")
207+ }
208+ else throw("Strict value is not equal to itself.")
209+ }
210+ else throw("Strict value is not equal to itself.")
211+ }
212+
213+
214+
215+@Callable(i)
216+func removeOtherAdmin (address) = {
217+ let checks = adminOnly(i)
218+ if ((checks == checks))
219+ then {
220+ let otherAddress = (admin + address)
221+ let delAdmin = DeleteEntry(otherAddress)
222+ if ((delAdmin == delAdmin))
223+ then nil
224+ else throw("Strict value is not equal to itself.")
225+ }
226+ else throw("Strict value is not equal to itself.")
227+ }
228+
229+
230+
231+@Callable(i)
232+func updateConfigValue (key,data) = {
233+ let checks = adminOnly(i)
234+ if ((checks == checks))
235+ then {
236+ let del = DeleteEntry(key)
237+ if ((del == del))
238+ then [writeConfigValue(key, data)]
239+ else throw("Strict value is not equal to itself.")
240+ }
241+ else throw("Strict value is not equal to itself.")
242+ }
243+
244+
245+
246+@Callable(i)
247+func Lock (LockPeriod,AssetTicker,APY) = {
248+ let check1 = throwIf((1 != size(i.payments)), "Attach amount you want to lock")
249+ if ((check1 == check1))
250+ then {
251+ let asset = toBase58String(value(i.payments[0].assetId))
252+ let check2 = throwIf((getS(AssetTicker) != asset), "Asset not supported")
253+ if ((check2 == check2))
254+ then {
255+ let lockPeriod = LockPeriod
256+ let userId = toString(i.caller)
257+ let amountToStake = i.payments[0].amount
258+ let minToStake = throwOrReturnI(getI((AssetTicker + minimumLockAmount)), "internal error: minimum stacking amount not specified")
259+ let maxToStake = throwOrReturnI(getI((AssetTicker + maximumLockAmount)), "internal error: maximum staking amount not specified")
260+ let check3 = throwIf(if ((minToStake > amountToStake))
261+ then true
262+ else (amountToStake > maxToStake), "staking amount is out of range")
263+ if ((check3 == check3))
264+ then {
265+ let uUserId = (userId + user)
266+ let uAsset = (userId + lockedAsset)
267+ let uLockingPeriod = (userId + lockingPeriod)
268+ let uLockedAmount = (userId + lockedAmount)
269+ let uAPY = (userId + APY_Amount)
270+ let uUnlockEligibility = (userId + unlockEligibility)
271+[writeStr(uUserId, userId), writeStr(uAsset, asset), writeInt(uLockingPeriod, lockPeriod), writeInt(uLockedAmount, i.payments[0].amount), writeInt(uUnlockEligibility, daysToBlocks(LockPeriod)), writeInt(uAPY, APY)]
272+ }
273+ else throw("Strict value is not equal to itself.")
274+ }
275+ else throw("Strict value is not equal to itself.")
276+ }
277+ else throw("Strict value is not equal to itself.")
278+ }
279+
280+
281+
282+@Callable(i)
283+func Claim (AssetTicker) = {
284+ let userId = toString(i.caller)
285+ let uAsset = throwOrReturnS(getS((userId + lockedAsset)), ("there are no locked tokens for " + userId))
286+ let uLockedAmount = throwOrReturnI(getI((userId + lockedAmount)), "internal error: could not retrieve locked amount")
287+ let stakingReserve = addressFromStringValue(throwOrReturnS(getS((AssetTicker + stakingStore)), "internal error: staking store not found for asset"))
288+ let APYAMount = throwOrReturnI(getI((userId + APY_Amount)), "internal error: failed to get APY")
289+ let period = throwOrReturnI(getI((userId + unlockEligibility)), "internal error: could not determine claim eligibility")
290+ let blocksLeft = if ((0 >= (period - height)))
291+ then 0
292+ else (period - height)
293+ let daysLeft = blocksToDays(blocksLeft)
294+ let check1 = throwIf((period > height), (toString(daysLeft) + " days left to claim"))
295+ if ((check1 == check1))
296+ then {
297+ let transferAPYAmount = invoke(stakingReserve, "transferInterest", [userId, APYAMount, toBytes(uAsset)], nil)
298+ if ((transferAPYAmount == transferAPYAmount))
299+ then [ScriptTransfer(addressFromStringValue(userId), uLockedAmount, toBytes(uAsset))]
300+ else throw("Strict value is not equal to itself.")
301+ }
302+ else throw("Strict value is not equal to itself.")
303+ }
304+
305+

github/deemru/w8io/026f985 
22.13 ms