tx · Hq2jw7mQaM9AKWTJ8tdbXiGETFKmrbGH7GJNMr3cuhiX

3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt:  -0.01200000 Waves

2023.12.11 09:59 [2881708] smart account 3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt > SELF 0.00000000 Waves

{ "type": 13, "id": "Hq2jw7mQaM9AKWTJ8tdbXiGETFKmrbGH7GJNMr3cuhiX", "fee": 1200000, "feeAssetId": null, "timestamp": 1702278050495, "version": 1, "sender": "3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt", "senderPublicKey": "FACNGaFYnR8yFbQFg9sRBpzGVCyzMyLeVw3JMhGQT1wn", "proofs": [ "rE9wKLG8kB4HyCeoRmZZxxWjiz9unyy1q3w83iDn5vCRXuoE1VSK953xDAtz9CwxYuXRix8d7j3bLvnJFgUVqfu" ], "script": "base64:BgIWCAISBAoCCAESBQoDGBEBEgMKAQgSADAADGNvbnRyYWN0RmlsZQIRbDJtcF9zdGFraW5nLnJpZGUAA1NFUAICX18ABnNjYWxlOACAwtcvAAdzY2FsZTE4AICAkLu61q3wDQANc2NhbGUxOEJpZ0ludAkAtgIBBQdzY2FsZTE4ABJBRERSRVNTX0JZVEVTX1NJWkUAGgANQkxPQ0tTX0lOX0RBWQCgCwAMYWRtaW5BZGRyZXNzCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzTXBzN0NacUI5blViRWlyWXlDTU1vQTdWYnFyeEx2SkZTQgEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAATa2V5RW1pc3Npb25QZXJCbG9jawkAuQkCCQDMCAICAiVzCQDMCAICEGVtaXNzaW9uUGVyQmxvY2sFA25pbAUDU0VQABlrZXlFbWlzc2lvblBlcmlvZEluQmxvY2tzCQC5CQIJAMwIAgICJXMJAMwIAgIWZ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WtpbmdOb2Rlc0xpc3QIBQ0kdDAxMDY3MjEwNzY0Al8xBBl1c2VyU3Rha2luZ05vZGVTaGFyZXNMaXN0CAUNJHQwMTA2NzIxMDc2NAJfMgkAlAoCBQNuaWwJAJwKCgUMdXNlckxwQW1vdW50BRx1c2VyQXZhaWxhYmxlQXNzZXRUb1dpdGhkcmF3CQEPZ2V0Q3VycmVudFByaWNlAAUVdXNlclRvdGFsU3Rha2VkQW1vdW50BRd1c2VyVG90YWxBc3NldFdpdGhkcmF3bgUSdXNlckxvY2tlZExwQW1vdW50BRV1c2VyTG9ja2VkQXNzZXRBbW91bnQFFHVzZXJTdGFraW5nTm9kZXNMaXN0BRl1c2VyU3Rha2luZ05vZGVTaGFyZXNMaXN0CQESZ2V0UmVtYWluaW5nQmxvY2tzAAFpARZnZXRUb3RhbEFzc2V0c1JFQURPTkxZAAkAlAoCBQNuaWwJAJgKBgUNdG90YWxMcEFtb3VudAkBK2dldFRvdGFsQXNzZXRBbW91bnRXaXRoUHJvZml0T3JNYXhBdmFpbGFibGUBBQZoZWlnaHQJAQ9nZXRDdXJyZW50UHJpY2UABRN0b3RhbExvY2tlZExwQW1vdW50CQEPY2FsY0Fzc2V0RnJvbUxwAgUTdG90YWxMb2NrZWRMcEFtb3VudAUGaGVpZ2h0CQESZ2V0UmVtYWluaW5nQmxvY2tzAABtidG5", "chainId": 84, "height": 2881708, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D5dPMa5Sz2QcHQrn5piwiHR2YZkjh1MZbUJt5MG5gath Next: 86f1wMkBdKnMiHu4udATPPUkn5M37Bhy7qGtJPuoxPDc Diff:
OldNewDifferences
1414 let ADDRESS_BYTES_SIZE = 26
1515
1616 let BLOCKS_IN_DAY = 1440
17+
18+let adminAddress = addressFromStringValue("3Mps7CZqB9nUbEirYyCMMoA7VbqrxLvJFSB")
1719
1820 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1921
196198
197199 @Callable(i)
198200 func stakeForAdmin (userAddress,stakeHeight) = {
199- let check = [if ((i.caller == this))
201+ let check = [if ((i.caller == adminAddress))
200202 then true
201203 else throwErr("permission denied")]
202204 if ((check == check))
226228
227229 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90)
228230 }
229- let check = [if ((i.caller == this))
231+ let check = [if ((i.caller == adminAddress))
230232 then true
231233 else throwErr("permission denied"), if ((size(i.payments) == 1))
232234 then true
242244 if ((check == check))
243245 then {
244246 func getAirdropStateChanges (accum,assetAmount) = {
245- let $t081708221 = accum
246- let result = $t081708221._1
247- let index = $t081708221._2
248- let totalLp = $t081708221._3
249- let processedList = $t081708221._4
247+ let $t083528403 = accum
248+ let result = $t083528403._1
249+ let index = $t083528403._2
250+ let totalLp = $t083528403._3
251+ let processedList = $t083528403._4
250252 let addressString = addressList[index]
251253 let address = match addressFromString(addressString) {
252254 case adr: Address =>
267269 else throw("Strict value is not equal to itself.")
268270 }
269271
270- let $t090009117 = {
272+ let $t091829299 = {
271273 let $l = amountList
272274 let $s = size($l)
273275 let $acc0 = $Tuple4(nil, 0, 0, nil)
281283
282284 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90)
283285 }
284- let airdropEntries = $t090009117._1
285- let _a = $t090009117._2
286- let addedTotalLockedLpAmount = $t090009117._3
287- let _b = $t090009117._4
286+ let airdropEntries = $t091829299._1
287+ let _a = $t091829299._2
288+ let addedTotalLockedLpAmount = $t091829299._3
289+ let _b = $t091829299._4
288290 let newTotalAsset = calcAssetFromLp((totalLpAmount + addedTotalLockedLpAmount), airdropHeight)
289291 ([IntegerEntry(keyTotalLockedLpAmount, (totalLockedLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalLpAmount, (totalLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalAssetAmount, newTotalAsset), IntegerEntry(keyStartBlock, height)] ++ airdropEntries)
290292 }
301303 let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress)
302304 let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0)
303305 let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0)
304- let $t01049010582 = getUserStakingNodesData(userAddress)
305- let userStakingNodesList = $t01049010582._1
306- let userStakingNodeSharesList = $t01049010582._2
306+ let $t01067210764 = getUserStakingNodesData(userAddress)
307+ let userStakingNodesList = $t01067210764._1
308+ let userStakingNodeSharesList = $t01067210764._2
307309 $Tuple2(nil, $Tuple10(userLpAmount, userAvailableAssetToWithdraw, getCurrentPrice(), userTotalStakedAmount, userTotalAssetWithdrawn, userLockedLpAmount, userLockedAssetAmount, userStakingNodesList, userStakingNodeSharesList, getRemainingBlocks()))
308310 }
309311
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFile = "l2mp_staking.ride"
55
66 let SEP = "__"
77
88 let scale8 = 100000000
99
1010 let scale18 = 1000000000000000000
1111
1212 let scale18BigInt = toBigInt(scale18)
1313
1414 let ADDRESS_BYTES_SIZE = 26
1515
1616 let BLOCKS_IN_DAY = 1440
17+
18+let adminAddress = addressFromStringValue("3Mps7CZqB9nUbEirYyCMMoA7VbqrxLvJFSB")
1719
1820 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1921
2022
2123 let keyAssetId = makeString(["%s", "assetId"], SEP)
2224
2325 let keyEmissionPerBlock = makeString(["%s", "emissionPerBlock"], SEP)
2426
2527 let keyEmissionPeriodInBlocks = makeString(["%s", "emissionPeriodInBlocks"], SEP)
2628
2729 let keyStartBlock = makeString(["%s", "startBlock"], SEP)
2830
2931 let keyTotalLpAmount = makeString(["%s", "totalLpAmount"], SEP)
3032
3133 let keyTotalAssetAmount = makeString(["%s", "totalAssetAmount"], SEP)
3234
3335 let keyTotalLockedLpAmount = makeString(["%s", "totalLockedLpAmount"], SEP)
3436
3537 func keyUserLpAmount (userAddress) = makeString(["%s%s", "userLpAmount", userAddress], SEP)
3638
3739
3840 func keyUserLockedLpAmount (userAddress) = makeString(["%s%s", "userLockedLpAmount", userAddress], SEP)
3941
4042
4143 func keyUserStakingNodes (userAddress) = makeString(["%s%s", "userStakingNodes", userAddress], SEP)
4244
4345
4446 func keyUserStakingNodesShares (userAddress) = makeString(["%s%s", "userStakingNodesShares", userAddress], SEP)
4547
4648
4749 func keyUserTotalAssetWithdrawn (userAddress) = makeString(["%s%s", "totalAssetWithdrawn", userAddress], SEP)
4850
4951
5052 func keyUserTotalAssetStaked (userAddress) = makeString(["%s%s", "totalAssetStaked", userAddress], SEP)
5153
5254
5355 func keyHistory (type,userAddress,txId) = makeString(["%s%s%s", type, userAddress, toBase58String(txId)], SEP)
5456
5557
5658 func formatHistory (totalProfit,price,totalAssetAmount,totalLpAmount) = makeString(["%d%d%d%d", toString(totalProfit), toString(price), toString(totalAssetAmount), toString(totalLpAmount)], SEP)
5759
5860
5961 let totalLpAmount = valueOrElse(getInteger(this, keyTotalLpAmount), 0)
6062
6163 let totalAssetAmount = valueOrElse(getInteger(this, keyTotalAssetAmount), 0)
6264
6365 let totalLockedLpAmount = valueOrElse(getInteger(this, keyTotalLockedLpAmount), 0)
6466
6567 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
6668
6769 let assetIdBytes = if ((assetIdString == "WAVES"))
6870 then unit
6971 else fromBase58String(assetIdString)
7072
7173 let emissionPeriodInBlocks = valueOrElse(getInteger(this, keyEmissionPeriodInBlocks), BLOCKS_IN_DAY)
7274
7375 let emissionPerBlock = valueOrElse(getInteger(this, keyEmissionPerBlock), 0)
7476
7577 let emissionPerPeriod = (emissionPerBlock * emissionPeriodInBlocks)
7678
7779 func stringListToIntListHelper (acc,value) = (acc :+ parseIntValue(value))
7880
7981
8082 func calcTotalProfitForHeight (h) = {
8183 let startBlock = valueOrElse(getInteger(this, keyStartBlock), height)
8284 let startPeriod = fraction(startBlock, 1, emissionPeriodInBlocks)
8385 let elapsedPeriods = ((h / emissionPeriodInBlocks) - startPeriod)
8486 max([0, (emissionPerPeriod * elapsedPeriods)])
8587 }
8688
8789
8890 func calcTotalProfit () = calcTotalProfitForHeight(height)
8991
9092
9193 func getMaxAssetAvailable () = match assetIdBytes {
9294 case u: Unit =>
9395 wavesBalance(this).available
9496 case b: ByteVector =>
9597 assetBalance(this, b)
9698 case _ =>
9799 throw("Match error")
98100 }
99101
100102
101103 func getTotalAssetAmountWithProfitOrMaxAvailable (atHeight) = {
102104 let totalAssetAmountWithProfit = (totalAssetAmount + calcTotalProfitForHeight(atHeight))
103105 let totalAmount = min([totalAssetAmountWithProfit, getMaxAssetAvailable()])
104106 if ((totalLpAmount == 0))
105107 then 0
106108 else totalAmount
107109 }
108110
109111
110112 func getPriceAtHeight (h) = if ((totalLpAmount != 0))
111113 then fraction(toBigInt(getTotalAssetAmountWithProfitOrMaxAvailable(h)), scale18BigInt, toBigInt(totalLpAmount))
112114 else scale18BigInt
113115
114116
115117 func getCurrentPrice () = getPriceAtHeight(height)
116118
117119
118120 func getRemainingBlocks () = if ((emissionPerBlock == 0))
119121 then 0
120122 else fraction((getMaxAssetAvailable() - getTotalAssetAmountWithProfitOrMaxAvailable(height)), 1, emissionPerBlock)
121123
122124
123125 func getUserStakingNodesData (userAddress) = {
124126 let nodesRaw = valueOrElse(getString(this, keyUserStakingNodes(userAddress)), "")
125127 let sharesRaw = valueOrElse(getString(this, keyUserStakingNodesShares(userAddress)), "")
126128 let nodesList = if ((nodesRaw == ""))
127129 then nil
128130 else split(nodesRaw, SEP)
129131 let sharesStringList = if ((sharesRaw == ""))
130132 then nil
131133 else split(sharesRaw, SEP)
132134 let sharesList = {
133135 let $l = sharesStringList
134136 let $s = size($l)
135137 let $acc0 = nil
136138 func $f0_1 ($a,$i) = if (($i >= $s))
137139 then $a
138140 else stringListToIntListHelper($a, $l[$i])
139141
140142 func $f0_2 ($a,$i) = if (($i >= $s))
141143 then $a
142144 else throw("List size exceeds 20")
143145
144146 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
145147 }
146148 $Tuple2(nodesList, sharesList)
147149 }
148150
149151
150152 func calcAssetFromLp (lpAmount,atHeight) = max([0, toInt(fraction(toBigInt(lpAmount), getPriceAtHeight(atHeight), scale18BigInt))])
151153
152154
153155 func calcLpFromAsset (assetAmount,atHeight) = max([0, toInt(fraction(toBigInt(assetAmount), scale18BigInt, getPriceAtHeight(atHeight)))])
154156
155157
156158 func getUserLpAmount (userAddress) = valueOrElse(getInteger(this, keyUserLpAmount(userAddress)), 0)
157159
158160
159161 func getUserLockedLpAmount (userAddress) = valueOrElse(getInteger(this, keyUserLockedLpAmount(userAddress)), 0)
160162
161163
162164 func getUserAvailableAssetsToWithdraw (userAddress) = {
163165 let userLpAmount = getUserLpAmount(userAddress)
164166 calcAssetFromLp(userLpAmount, height)
165167 }
166168
167169
168170 func getClearStakingNodesActions (userAddress) = [DeleteEntry(keyUserStakingNodes(userAddress)), DeleteEntry(keyUserStakingNodesShares(userAddress))]
169171
170172
171173 func getStakeActions (i,userAddress,stakeHeight) = {
172174 let checks = [if ((size(i.payments) == 1))
173175 then true
174176 else throwErr("should include 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
175177 then true
176178 else throwErr(("payment should be in " + assetIdString)), if ((i.payments[0].amount > 0))
177179 then true
178180 else "payment amount should be greater than 0", if ((size(fromBase58String(userAddress)) == ADDRESS_BYTES_SIZE))
179181 then true
180182 else throwErr("user address is not valid")]
181183 if ((checks == checks))
182184 then {
183185 let paymentAmount = i.payments[0].amount
184186 let paymentLpAmount = calcLpFromAsset(paymentAmount, stakeHeight)
185187 let userLpAmount = getUserLpAmount(userAddress)
186188 let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0)
187189 let newTotalLpAmount = (totalLpAmount + paymentLpAmount)
188190 let newTotalAssetAmount = calcAssetFromLp(newTotalLpAmount, stakeHeight)
189191 let newUserLpAmount = (userLpAmount + paymentLpAmount)
190192 let newUserTotalStakedAmount = (userTotalStakedAmount + paymentAmount)
191193 [StringEntry(keyHistory("stake", userAddress, i.transactionId), formatHistory(calcTotalProfit(), getCurrentPrice(), totalLpAmount, totalAssetAmount)), IntegerEntry(keyTotalLpAmount, newTotalLpAmount), IntegerEntry(keyTotalAssetAmount, newTotalAssetAmount), IntegerEntry(keyUserLpAmount(userAddress), newUserLpAmount), IntegerEntry(keyUserTotalAssetStaked(userAddress), newUserTotalStakedAmount), IntegerEntry(keyStartBlock, height)]
192194 }
193195 else throw("Strict value is not equal to itself.")
194196 }
195197
196198
197199 @Callable(i)
198200 func stakeForAdmin (userAddress,stakeHeight) = {
199- let check = [if ((i.caller == this))
201+ let check = [if ((i.caller == adminAddress))
200202 then true
201203 else throwErr("permission denied")]
202204 if ((check == check))
203205 then getStakeActions(i, userAddress, stakeHeight)
204206 else throw("Strict value is not equal to itself.")
205207 }
206208
207209
208210
209211 @Callable(i)
210212 func airdrop (addressList,amountList,airdropHeight) = {
211213 func sum (accum,next) = if ((0 > next))
212214 then throwErr("negative amount value in amountList")
213215 else (accum + next)
214216
215217 let amountListSum = {
216218 let $l = amountList
217219 let $s = size($l)
218220 let $acc0 = 0
219221 func $f0_1 ($a,$i) = if (($i >= $s))
220222 then $a
221223 else sum($a, $l[$i])
222224
223225 func $f0_2 ($a,$i) = if (($i >= $s))
224226 then $a
225227 else throw("List size exceeds 90")
226228
227229 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90)
228230 }
229- let check = [if ((i.caller == this))
231+ let check = [if ((i.caller == adminAddress))
230232 then true
231233 else throwErr("permission denied"), if ((size(i.payments) == 1))
232234 then true
233235 else throwErr("should include 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
234236 then true
235237 else throwErr(("payment should be in " + assetIdString)), if ((i.payments[0].amount > 0))
236238 then true
237239 else "payment amount should be greater than 0", if ((size(addressList) == size(amountList)))
238240 then true
239241 else throwErr("addressList should be same size as amountList"), if ((i.payments[0].amount >= amountListSum))
240242 then true
241243 else throwErr("payment amount is less than sum of amountList")]
242244 if ((check == check))
243245 then {
244246 func getAirdropStateChanges (accum,assetAmount) = {
245- let $t081708221 = accum
246- let result = $t081708221._1
247- let index = $t081708221._2
248- let totalLp = $t081708221._3
249- let processedList = $t081708221._4
247+ let $t083528403 = accum
248+ let result = $t083528403._1
249+ let index = $t083528403._2
250+ let totalLp = $t083528403._3
251+ let processedList = $t083528403._4
250252 let addressString = addressList[index]
251253 let address = match addressFromString(addressString) {
252254 case adr: Address =>
253255 adr
254256 case _ =>
255257 throwErr("invalid address in addressList")
256258 }
257259 let ch = [if (!(containsElement(processedList, address)))
258260 then true
259261 else throwErr("duplicate address is addressList")]
260262 if ((ch == ch))
261263 then {
262264 let addedLpAmount = calcLpFromAsset(assetAmount, airdropHeight)
263265 let userLockedLpKey = keyUserLockedLpAmount(addressString)
264266 let oldLpAmount = valueOrElse(getInteger(this, userLockedLpKey), 0)
265267 $Tuple4((result :+ IntegerEntry(userLockedLpKey, (oldLpAmount + addedLpAmount))), (index + 1), (totalLp + addedLpAmount), (processedList :+ address))
266268 }
267269 else throw("Strict value is not equal to itself.")
268270 }
269271
270- let $t090009117 = {
272+ let $t091829299 = {
271273 let $l = amountList
272274 let $s = size($l)
273275 let $acc0 = $Tuple4(nil, 0, 0, nil)
274276 func $f1_1 ($a,$i) = if (($i >= $s))
275277 then $a
276278 else getAirdropStateChanges($a, $l[$i])
277279
278280 func $f1_2 ($a,$i) = if (($i >= $s))
279281 then $a
280282 else throw("List size exceeds 90")
281283
282284 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90)
283285 }
284- let airdropEntries = $t090009117._1
285- let _a = $t090009117._2
286- let addedTotalLockedLpAmount = $t090009117._3
287- let _b = $t090009117._4
286+ let airdropEntries = $t091829299._1
287+ let _a = $t091829299._2
288+ let addedTotalLockedLpAmount = $t091829299._3
289+ let _b = $t091829299._4
288290 let newTotalAsset = calcAssetFromLp((totalLpAmount + addedTotalLockedLpAmount), airdropHeight)
289291 ([IntegerEntry(keyTotalLockedLpAmount, (totalLockedLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalLpAmount, (totalLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalAssetAmount, newTotalAsset), IntegerEntry(keyStartBlock, height)] ++ airdropEntries)
290292 }
291293 else throw("Strict value is not equal to itself.")
292294 }
293295
294296
295297
296298 @Callable(i)
297299 func getUserAssetsREADONLY (userAddress) = {
298300 let userLpAmount = getUserLpAmount(userAddress)
299301 let userLockedLpAmount = getUserLockedLpAmount(userAddress)
300302 let userLockedAssetAmount = calcAssetFromLp(userLockedLpAmount, height)
301303 let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress)
302304 let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0)
303305 let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0)
304- let $t01049010582 = getUserStakingNodesData(userAddress)
305- let userStakingNodesList = $t01049010582._1
306- let userStakingNodeSharesList = $t01049010582._2
306+ let $t01067210764 = getUserStakingNodesData(userAddress)
307+ let userStakingNodesList = $t01067210764._1
308+ let userStakingNodeSharesList = $t01067210764._2
307309 $Tuple2(nil, $Tuple10(userLpAmount, userAvailableAssetToWithdraw, getCurrentPrice(), userTotalStakedAmount, userTotalAssetWithdrawn, userLockedLpAmount, userLockedAssetAmount, userStakingNodesList, userStakingNodeSharesList, getRemainingBlocks()))
308310 }
309311
310312
311313
312314 @Callable(i)
313315 func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple6(totalLpAmount, getTotalAssetAmountWithProfitOrMaxAvailable(height), getCurrentPrice(), totalLockedLpAmount, calcAssetFromLp(totalLockedLpAmount, height), getRemainingBlocks()))
314316
315317

github/deemru/w8io/026f985 
56.97 ms