tx · G2q2GzDiTjTsoSbgL2dYheY6jLximE8tRhrZkNc6fJ27

3MqjiXZpkpN31j7XFmLueeZuFpfZ7fDwe9S:  -0.01000000 Waves

2022.06.02 15:05 [2078685] smart account 3MqjiXZpkpN31j7XFmLueeZuFpfZ7fDwe9S > SELF 0.00000000 Waves

{ "type": 13, "id": "G2q2GzDiTjTsoSbgL2dYheY6jLximE8tRhrZkNc6fJ27", "fee": 1000000, "feeAssetId": null, "timestamp": 1654171572392, "version": 2, "chainId": 84, "sender": "3MqjiXZpkpN31j7XFmLueeZuFpfZ7fDwe9S", "senderPublicKey": "7YknsAXP81Vy1sJAhHtumQ4SqcsQHPEmiqnXeY58Bw3y", "proofs": [ "3s9etSdpZYbp1vxL93gksxkncr5hUB6gTiA1MgurnpskcDvGCAJwwDGypqyJrvtYq149gWUkm49F2fhW3hUhyDyE" ], "script": "base64:AAIFAAAAAAAAADsIAhIHCgUICAgBARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIICRIFCgMBCAESAwoBCAAAACEAAAAADGxvY2tpbmdTdG9yZQUAAAAEdGhpcwAAAAAMc3Rha2luZ1N0b3JlAgAAAA1fU3Rha2luZ1N0b3JlAAAAABFtaW5pbXVtTG9ja0Ftb3VudAIAAAAOX01pbkxvY2tBbW91bnQAAAAAEW1heGltdW1Mb2NrQW1vdW50AgAAAA5fTWF4TG9ja0Ftb3VudAAAAAAJYXNzZXRMaXN0BQAAAANuaWwAAAAAEXVubG9ja0VsaWdpYmlsaXR5AgAAABxfRWxpZ2libGVfdG9fdW5sb2NrX2F0X2Jsb2NrAAAAAAxsb2NrZWRBbW91bnQCAAAADl9BbW91bnRfbG9ja2VkAAAAAAtsb2NrZWRBc3NldAIAAAANX0Fzc2V0X2xvY2tlZAAAAAAEdXNlcgIAAAAFX1VzZXIAAAAACkFQWV9BbW91bnQCAAAAC19BUFlfYW1vdW50AAAAAA1sb2NraW5nUGVyaW9kAgAAAAxfRGF5c19sb2NrZWQ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wdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAGdXNlcklkBQAAAA11TG9ja2VkQW1vdW50CQABmwAAAAEFAAAABnVBc3NldAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAAtJA5nQ==", "height": 2078685, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FotjV3ZxK891HcEF7y75vX7URzvYZWfwmXgopLymHJhw Next: EsmL5qBR8M5jVkKSgCHJX32bQKAWGeHQWJMfm1YTm7K7 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lockingStore = this
55
66 let stakingStore = "_StakingStore"
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 lockingPeriod = "_Days_locked"
2525
2626 let admin = "admin_"
2727
2828 let BlockPerDay = 1440
2929
3030 let RBase = 10000000000000000
3131
3232 let factorsBase = 1000
3333
3434 let thirtyDaysLockPeriod = 30
3535
3636 let sixtyDaysLockPeriod = 60
3737
3838 let ninetyDaysLockPeriod = 90
3939
4040 func getI (key) = getInteger(this, key)
4141
4242
4343 func getS (key) = getString(this, key)
4444
4545
4646 func getIV (key) = value(getInteger(this, key))
4747
4848
4949 func getSV (key) = value(getString(this, key))
5050
5151
5252 func throwIf (condition,error) = if (condition)
5353 then throw(error)
5454 else true
5555
5656
5757 func throwOrReturnI (val,error) = match val {
5858 case val: Int =>
5959 val
6060 case _ =>
6161 throw(error)
6262 }
6363
6464
6565 func throwOrReturnS (val,error) = match val {
6666 case val: String =>
6767 val
6868 case _ =>
6969 throw(error)
7070 }
7171
7272
7373 func writeInt (key,value) = if ((0 > value))
7474 then throw(((("writing negative value " + toString(value)) + " for key ") + key))
7575 else IntegerEntry(key, value)
7676
7777
7878 func writeStr (key,value) = if ((" " == value))
7979 then throw(("writing an empty string " + value))
8080 else StringEntry(key, value)
8181
8282
8383 func daysToBlocks (days) = if (if (if ((days != thirtyDaysLockPeriod))
8484 then true
8585 else (days != sixtyDaysLockPeriod))
8686 then true
8787 else (days != ninetyDaysLockPeriod))
8888 then throw("invalid Lock Period")
8989 else (((days + 1) * BlockPerDay) + height)
9090
9191
9292 func blocksToDays (blocksLeft) = if ((0 >= blocksLeft))
9393 then 0
9494 else {
9595 let multiplier = pow(10, 0, 3, 0, 0, CEILING)
9696 let daysleft = fraction(blocksLeft, multiplier, BlockPerDay)
9797 daysleft
9898 }
9999
100100
101101 func writeConstString (key,value) = if (!(isDefined(getS(key))))
102102 then writeStr(key, value)
103103 else throw(("already initialized: " + key))
104104
105105
106106 func writeConstInteger (key,value) = if (!(isDefined(getS(key))))
107107 then writeInt(key, value)
108108 else throw(("already initialized: " + key))
109109
110110
111111 func adminOnly (i) = {
112112 let AdminAddress = toString(i.caller)
113113 let otherAdminAddress = (admin + toString(i.caller))
114114 if (if ((AdminAddress != valueOrElse(getS(admin), "not an admin")))
115115 then true
116116 else (AdminAddress != valueOrElse(getS(otherAdminAddress), "not an admin")))
117117 then throw("unauthorized")
118118 else true
119119 }
120120
121121
122122 func writeConfigValue (key,data) = match data {
123123 case data: String =>
124124 writeConstString(key, data)
125125 case data: Int =>
126126 writeConstInteger(key, data)
127127 case _ =>
128128 throw("unsupported config type")
129129 }
130130
131131
132132 @Callable(i)
133133 func addAsset (AssetTicker,AssetID,AssetStakingStore,AssetMinimumLockAmount,AssetMaximumLockAmount) = {
134134 let check = adminOnly(i)
135135 if ((check == check))
136136 then {
137137 let aStakingStore = (AssetTicker + stakingStore)
138138 let aMinimumLockAmount = (AssetTicker + minimumLockAmount)
139139 let aMaximumLockAmount = (AssetTicker + maximumLockAmount)
140140 [writeConstString(AssetTicker, AssetID), writeConstString(aStakingStore, AssetStakingStore), writeConstInteger(aMinimumLockAmount, AssetMinimumLockAmount), writeConstInteger(aMaximumLockAmount, AssetMaximumLockAmount)]
141141 }
142142 else throw("Strict value is not equal to itself.")
143143 }
144144
145145
146146
147147 @Callable(i)
148148 func getAssetIdByTicker (AssetTicker) = {
149149 let check = adminOnly(i)
150150 if ((check == check))
151151 then {
152152 let a = throwOrReturnS(getS(AssetTicker), "asset not found")
153153 $Tuple2(nil, a)
154154 }
155155 else throw("Strict value is not equal to itself.")
156156 }
157157
158158
159159
160160 @Callable(i)
161161 func init (AdminAddress) = [writeConstString(admin, toString(addressFromStringValue(AdminAddress)))]
162162
163163
164164
165165 @Callable(i)
166166 func addAdmin (AdminAddress) = {
167167 let check = adminOnly(i)
168168 if ((check == check))
169169 then {
170170 let newAdmin = (admin + AdminAddress)
171171 [writeConstString(newAdmin, AdminAddress)]
172172 }
173173 else throw("Strict value is not equal to itself.")
174174 }
175175
176176
177177
178178 @Callable(i)
179179 func changeMainAdmin (address) = {
180180 let checks = adminOnly(i)
181181 if ((checks == checks))
182182 then {
183183 let del = DeleteEntry(admin)
184184 if ((del == del))
185185 then [writeConstString(admin, address)]
186186 else throw("Strict value is not equal to itself.")
187187 }
188188 else throw("Strict value is not equal to itself.")
189189 }
190190
191191
192192
193193 @Callable(i)
194194 func updateOtherAdminAddress (address) = {
195195 let checks = adminOnly(i)
196196 if ((checks == checks))
197197 then {
198198 let caller = toString(i.caller)
199199 let otherAdmin = (admin + caller)
200200 let checkOldAddress = throwOrReturnS(getS(otherAdmin), "no previous address found")
201201 if ((checkOldAddress == checkOldAddress))
202202 then {
203203 let delAddress = DeleteEntry(otherAdmin)
204204 if ((delAddress == delAddress))
205205 then [writeConstString(otherAdmin, address)]
206206 else throw("Strict value is not equal to itself.")
207207 }
208208 else throw("Strict value is not equal to itself.")
209209 }
210210 else throw("Strict value is not equal to itself.")
211211 }
212212
213213
214214
215215 @Callable(i)
216216 func removeOtherAdmin (address) = {
217217 let checks = adminOnly(i)
218218 if ((checks == checks))
219219 then {
220220 let otherAddress = (admin + address)
221221 let delAdmin = DeleteEntry(otherAddress)
222222 if ((delAdmin == delAdmin))
223223 then nil
224224 else throw("Strict value is not equal to itself.")
225225 }
226226 else throw("Strict value is not equal to itself.")
227227 }
228228
229229
230230
231231 @Callable(i)
232232 func updateConfigValue (key,data) = {
233233 let checks = adminOnly(i)
234234 if ((checks == checks))
235235 then {
236236 let del = DeleteEntry(key)
237237 if ((del == del))
238238 then [writeConfigValue(key, data)]
239239 else throw("Strict value is not equal to itself.")
240240 }
241241 else throw("Strict value is not equal to itself.")
242242 }
243243
244244
245245
246246 @Callable(i)
247247 func Lock (LockPeriod,AssetTicker,APY) = {
248248 let check1 = throwIf((1 != size(i.payments)), "Attach amount you want to lock")
249249 if ((check1 == check1))
250250 then {
251251 let asset = toBase58String(value(i.payments[0].assetId))
252252 let check2 = throwIf((getS(AssetTicker) != asset), "Asset not supported")
253253 if ((check2 == check2))
254254 then {
255255 let lockPeriod = LockPeriod
256256 let userId = toString(i.caller)
257257 let amountToStake = i.payments[0].amount
258258 let minToStake = throwOrReturnI(getI((AssetTicker + minimumLockAmount)), "internal error: minimum stacking amount not specified")
259259 let maxToStake = throwOrReturnI(getI((AssetTicker + maximumLockAmount)), "internal error: maximum staking amount not specified")
260260 let check3 = throwIf(if ((minToStake > amountToStake))
261261 then true
262262 else (amountToStake > maxToStake), "staking amount is out of range")
263263 if ((check3 == check3))
264264 then {
265265 let uUserId = (userId + user)
266266 let uAsset = (userId + lockedAsset)
267267 let uLockingPeriod = (userId + lockingPeriod)
268268 let uLockedAmount = (userId + lockedAmount)
269269 let uAPY = (userId + APY_Amount)
270270 let uUnlockEligibility = (userId + unlockEligibility)
271271 [writeStr(uUserId, userId), writeStr(uAsset, asset), writeInt(uLockingPeriod, lockPeriod), writeInt(uLockedAmount, i.payments[0].amount), writeInt(uUnlockEligibility, daysToBlocks(LockPeriod)), writeInt(uAPY, APY)]
272272 }
273273 else throw("Strict value is not equal to itself.")
274274 }
275275 else throw("Strict value is not equal to itself.")
276276 }
277277 else throw("Strict value is not equal to itself.")
278278 }
279279
280280
281281
282282 @Callable(i)
283283 func Claim (AssetTicker) = {
284284 let userId = toString(i.caller)
285285 let uAsset = throwOrReturnS(getS((userId + lockedAsset)), ("there are no locked tokens for " + userId))
286286 let uLockedAmount = throwOrReturnI(getI((userId + lockedAmount)), "internal error: could not retrieve locked amount")
287287 let stakingReserve = addressFromStringValue(throwOrReturnS(getS((AssetTicker + stakingStore)), "internal error: staking store not found for asset"))
288288 let APYAMount = throwOrReturnI(getI((userId + APY_Amount)), "internal error: failed to get APY")
289289 let period = throwOrReturnI(getI((userId + unlockEligibility)), "internal error: could not determine claim eligibility")
290290 let blocksLeft = if ((0 >= (period - height)))
291291 then 0
292292 else (period - height)
293293 let daysLeft = blocksToDays(blocksLeft)
294294 let check1 = throwIf((period > height), (toString(daysLeft) + " days left to claim"))
295295 if ((check1 == check1))
296296 then {
297297 let transferAPYAmount = invoke(stakingReserve, "transferInterest", [userId, APYAMount, toBytes(uAsset)], nil)
298298 if ((transferAPYAmount == transferAPYAmount))
299299 then [ScriptTransfer(addressFromStringValue(userId), uLockedAmount, toBytes(uAsset))]
300300 else throw("Strict value is not equal to itself.")
301301 }
302302 else throw("Strict value is not equal to itself.")
303303 }
304304
305305

github/deemru/w8io/026f985 
41.99 ms