tx · DnFZSBJwjxtX2t4tNsohmJ4TBqboV3s1XgyCpmUHpoYK

3MyTUSFjgJWsmoQEBpeF3N1bmtdr2XMS1uU:  -0.01400000 Waves

2020.12.12 21:39 [1305818] smart account 3MyTUSFjgJWsmoQEBpeF3N1bmtdr2XMS1uU > SELF 0.00000000 Waves

{ "type": 13, "id": "DnFZSBJwjxtX2t4tNsohmJ4TBqboV3s1XgyCpmUHpoYK", "fee": 1400000, "feeAssetId": null, "timestamp": 1607798362830, "version": 1, "sender": "3MyTUSFjgJWsmoQEBpeF3N1bmtdr2XMS1uU", "senderPublicKey": "HNibf5h44NsszRrbctryRBWzFba3biyjEoufpZuraEha", "proofs": [ "2xxtTXBQY28dGsFS4peLsWngZTB8hgucYBAZiLAB8bFzaRoDQ2wPoUdquYK9Z8AMKjuE1eRFLgTsg7NKQGc2myYK" ], "script": "base64:AAIEAAAAAAAAABkIAhIAEgMKAQgSAwoBCBIECgIIARIDCgEIAAAAHQAAAAAMYWRtaW5QdWJLZXkxAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkyAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkzAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAABJhZG1pblB1YktleVN0YWtpbmcBAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAABRrZXlTaGFyZVRva2Vuc0xvY2tlZAIAAAAaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAAAAAEGtleUN1cnJlbnRSZXdhcmQCAAAAD19jdXJyZW50X3Jld2FyZAAAAAAVa2V5UmV3YXJkVXBkYXRlSGVpZ2h0AgAAABVfcmV3YXJkX3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dJbnRlcmVzdAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAABHBvb2wCAAAAAV8FAAAAD2tleUxhc3RJbnRlcmVzdAUAAAAPY3VycmVudEludGVyZXN0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwUAAAAVa2V5TGFzdEludGVyZXN0SGVpZ2h0BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADBQAAAARTV09QBQAAAAtjbGFpbUFtb3VudAYJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAtjbGFpbUFtb3VudAUAAAAEU1dPUAUAAAADbmlsAAAAACDvBYk=", "chainId": 84, "height": 1305818, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4gLsHz1r1iGaESpy2tdsZukoRXZr1oYEC6NHq9HPNqg6 Next: AxLARYHz3y2D3PyMHJnMNNZbxSqgxFD6NPUWo2Bj61ws Diff:
OldNewDifferences
110110 let shareAssetId = getShareAssetId(pool)
111111 let scaleValue = calcScaleValue(SWOP, shareAssetId)
112112 let shareTokenLocked = getTotalShareTokenLocked(pool)
113- let $t051295194 = getLastInterestInfo(pool)
114- let lastInterestHeight = $t051295194._1
115- let lastInterest = $t051295194._2
116- let $t051995287 = rewardInfo(pool)
117- let currentRewardPerBlock = $t051995287._1
118- let rewardUpdateHeight = $t051995287._2
119- let previousRewardPerBlock = $t051995287._3
120- let $t052925371 = getUserInterestInfo(pool, caller)
121- let userLastInterest = $t052925371._1
122- let userShareTokensAmount = $t052925371._2
113+ let $t052045269 = getLastInterestInfo(pool)
114+ let lastInterestHeight = $t052045269._1
115+ let lastInterest = $t052045269._2
116+ let $t052745362 = rewardInfo(pool)
117+ let currentRewardPerBlock = $t052745362._1
118+ let rewardUpdateHeight = $t052745362._2
119+ let previousRewardPerBlock = $t052745362._3
120+ let $t053675446 = getUserInterestInfo(pool, caller)
121+ let userLastInterest = $t053675446._1
122+ let userShareTokensAmount = $t053675446._2
123123 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue)
124124 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
125125 let userNewInterest = currentInterest
151151 func initPoolShareLocking (pool) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
152152 then throw("Only admin can call this function")
153153 else {
154- let $t067346814 = rewardInfo(pool)
155- let currentReward = $t067346814._1
156- let rewardUpdateHeight = $t067346814._2
157- let previousRewardPerBlock = $t067346814._3
154+ let $t068096889 = rewardInfo(pool)
155+ let currentReward = $t068096889._1
156+ let rewardUpdateHeight = $t068096889._2
157+ let previousRewardPerBlock = $t068096889._3
158158 [StringEntry((pool + keyPoolAddress), pool), IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyCurrentReward), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((pool + keyRewardUpdateHeight), rewardUpdateHeight), IntegerEntry((pool + keyPreviousReward), previousRewardPerBlock)]
159159 }
160160
162162
163163 @Callable(i)
164164 func lockShareTokens (pool) = {
165- let $t072647339 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166- let pmtAmount = $t072647339._1
167- let pmtAssetId = $t072647339._2
165+ let $t073397414 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166+ let pmtAmount = $t073397414._1
167+ let pmtAssetId = $t073397414._2
168168 if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
169169 then throw("Incorrect pmtAssetId")
170170 else {
171- let $t074327530 = ClaimCalc(pool, i.caller)
172- let userNewInterest = $t074327530._1
173- let currentInterest = $t074327530._2
174- let claimAmount = $t074327530._3
175- let userShareTokensAmount = $t074327530._4
171+ let $t075077605 = ClaimCalc(pool, i.caller)
172+ let userNewInterest = $t075077605._1
173+ let currentInterest = $t075077605._2
174+ let claimAmount = $t075077605._3
175+ let userShareTokensAmount = $t075077605._4
176176 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
177177 let totalShareAmount = getTotalShareTokenLocked(pool)
178178 let totalShareAmountNew = (totalShareAmount + pmtAmount)
184184
185185 @Callable(i)
186186 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
187- let $t083068404 = ClaimCalc(pool, i.caller)
188- let userNewInterest = $t083068404._1
189- let currentInterest = $t083068404._2
190- let claimAmount = $t083068404._3
191- let userShareTokensAmount = $t083068404._4
187+ let $t083818479 = ClaimCalc(pool, i.caller)
188+ let userNewInterest = $t083818479._1
189+ let currentInterest = $t083818479._2
190+ let claimAmount = $t083818479._3
191+ let userShareTokensAmount = $t083818479._4
192192 if ((shareTokensWithdrawAmount > userShareTokensAmount))
193193 then throw("Withdraw amount more then user locked amount")
194194 else {
195195 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
196- let shareTokensId = fromBase58String(getStringValue(this, (pool + "share_asset_id")))
196+ if (true)
197+ then throw("111")
198+ else {
199+ let shareTokensId = fromBase58String(getStringValue(this, (pool + "share_asset_id")))
197200 [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)]
201+ }
198202 }
199203 }
200204
203207 @Callable(i)
204208 func claim (pool) = {
205209 let shareTokenLocked = getTotalShareTokenLocked(pool)
206- let $t093049369 = getLastInterestInfo(pool)
207- let lastInterestHeight = $t093049369._1
208- let lastInterest = $t093049369._2
209- let $t093749538 = rewardInfo(pool)
210- let currentRewardPerBlock = $t093749538._1
211- let rewardUpdateHeight = $t093749538._2
212- let previousRewardPerBlock = $t093749538._3
213- let $t095439949 = ClaimCalc(pool, i.caller)
214- let userNewInterest = $t095439949._1
215- let currentInterest = $t095439949._2
216- let claimAmount = $t095439949._3
217- let userShareTokensAmount = $t095439949._4
210+ let $t094149479 = getLastInterestInfo(pool)
211+ let lastInterestHeight = $t094149479._1
212+ let lastInterest = $t094149479._2
213+ let $t094849648 = rewardInfo(pool)
214+ let currentRewardPerBlock = $t094849648._1
215+ let rewardUpdateHeight = $t094849648._2
216+ let previousRewardPerBlock = $t094849648._3
217+ let $t0965310059 = ClaimCalc(pool, i.caller)
218+ let userNewInterest = $t0965310059._1
219+ let currentInterest = $t0965310059._2
220+ let claimAmount = $t0965310059._3
221+ let userShareTokensAmount = $t0965310059._4
218222 [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry(((pool + "_") + keyLastInterest), currentInterest), IntegerEntry(((pool + "_") + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP)]
219223 }
220224
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey1 = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
55
66 let adminPubKey2 = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
77
88 let adminPubKey3 = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
99
1010 let adminPubKeyStartStop = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
1111
1212 let adminPubKeyStaking = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
1313
1414 let keyShareTokensLocked = "_total_share_tokens_locked"
1515
1616 let keyCurrentReward = "_current_reward"
1717
1818 let keyRewardUpdateHeight = "_reward_update_height"
1919
2020 let keyPreviousReward = "_previous_reward"
2121
2222 let keyLastInterest = "_last_interest"
2323
2424 let keyLastInterestHeight = "_last_interest_height"
2525
2626 let keyUserShareTokensLocked = "_share_tokens_locked"
2727
2828 let keyUserLastInterest = "_last_interest"
2929
3030 let keySWOPid = "SWOP_id"
3131
3232 let keyPoolAddress = "_address"
3333
3434 let votingAddress = Address(base58'3N5F5DCmWNzT8ZPe1tBfiXaVYzWJriaJZ9E')
3535
3636 let SWOP = fromBase58String(getStringValue(this, keySWOPid))
3737
3838 let heightRewardUpdate = getIntegerValue(this, "height_reward_update")
3939
4040 func throwOnlyAdmin () = throw("Only admin can call this function")
4141
4242
4343 func throwIsActive () = throw("DApp is already active")
4444
4545
4646 func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked))
4747
4848
4949 func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
5050
5151
5252 func calcScaleValue (assetId1,assetId2) = {
5353 let assetId1Decimals = value(assetInfo(assetId1)).decimals
5454 let assetId2Decimals = value(assetInfo(assetId2)).decimals
5555 let sclaeDigits = ((assetId2Decimals - assetId1Decimals) + 8)
5656 pow(10, 0, sclaeDigits, 0, 0, HALFDOWN)
5757 }
5858
5959
6060 func rewardInfo (pool) = {
6161 let currentReward = valueOrErrorMessage(getInteger(votingAddress, (pool + keyCurrentReward)), (((("No data on the key: " + pool) + keyCurrentReward) + " at address ") + toString(votingAddress)))
6262 let rewardUpdateHeight = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardUpdateHeight)), (((("No data on the key: " + pool) + keyRewardUpdateHeight) + " at address ") + toString(votingAddress)))
6363 let rewardPreviousAmount = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardUpdateHeight)), (((("No data on the key: " + pool) + keyPreviousReward) + " at address ") + toString(votingAddress)))
6464 $Tuple3(currentReward, rewardUpdateHeight, rewardPreviousAmount)
6565 }
6666
6767
6868 func getLastInterestInfo (pool) = {
6969 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (((("No data on the key: " + pool) + "_") + pool) + keyLastInterest))
7070 let lastInterestHeight = valueOrErrorMessage(getInteger(this, (pool + keyLastInterestHeight)), (("No data on the key: " + pool) + keyLastInterestHeight))
7171 $Tuple2(lastInterestHeight, lastInterest)
7272 }
7373
7474
7575 func getUserInterestInfo (pool,userAddres) = {
7676 let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddres)) + keyUserLastInterest))
7777 let userShare = getInteger(this, (((pool + "_") + toString(userAddres)) + keyUserShareTokensLocked))
7878 let userLastInterestValue = match userLastInterest {
7979 case userLastInterest: Int =>
8080 userLastInterest
8181 case _ =>
8282 0
8383 }
8484 let userShareTokensAmount = match userShare {
8585 case userShare: Int =>
8686 userShare
8787 case _ =>
8888 0
8989 }
9090 $Tuple2(userLastInterestValue, userShareTokensAmount)
9191 }
9292
9393
9494 func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue) = if ((lastInterestHeight > rewardUpdateHeight))
9595 then if ((shareTokenLocked == 0))
9696 then 0
9797 else {
9898 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
9999 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
100100 }
101101 else {
102102 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
103103 let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
104104 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
105105 (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
106106 }
107107
108108
109109 func ClaimCalc (pool,caller) = {
110110 let shareAssetId = getShareAssetId(pool)
111111 let scaleValue = calcScaleValue(SWOP, shareAssetId)
112112 let shareTokenLocked = getTotalShareTokenLocked(pool)
113- let $t051295194 = getLastInterestInfo(pool)
114- let lastInterestHeight = $t051295194._1
115- let lastInterest = $t051295194._2
116- let $t051995287 = rewardInfo(pool)
117- let currentRewardPerBlock = $t051995287._1
118- let rewardUpdateHeight = $t051995287._2
119- let previousRewardPerBlock = $t051995287._3
120- let $t052925371 = getUserInterestInfo(pool, caller)
121- let userLastInterest = $t052925371._1
122- let userShareTokensAmount = $t052925371._2
113+ let $t052045269 = getLastInterestInfo(pool)
114+ let lastInterestHeight = $t052045269._1
115+ let lastInterest = $t052045269._2
116+ let $t052745362 = rewardInfo(pool)
117+ let currentRewardPerBlock = $t052745362._1
118+ let rewardUpdateHeight = $t052745362._2
119+ let previousRewardPerBlock = $t052745362._3
120+ let $t053675446 = getUserInterestInfo(pool, caller)
121+ let userLastInterest = $t053675446._1
122+ let userShareTokensAmount = $t053675446._2
123123 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue)
124124 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
125125 let userNewInterest = currentInterest
126126 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
127127 }
128128
129129
130130 func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
131131 let poolAddres = value(addressFromString(getStringValue(this, (pool + keyPoolAddress))))
132132 let poolShareAssetId = fromBase58String(getStringValue(poolAddres, "share_asset_id"))
133133 if ((pmtAssetId == poolShareAssetId))
134134 then true
135135 else false
136136 }
137137
138138
139139 @Callable(i)
140140 func init () = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
141141 then throw("Only admin can call this function")
142142 else {
143143 let SWOPissue = Issue("SWOP", "SWOP protocol token", 1, 8, true)
144144 let SWOPid = calculateAssetId(SWOPissue)
145145 [Issue("SWOP", "SWOP protocol token", 1, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
146146 }
147147
148148
149149
150150 @Callable(i)
151151 func initPoolShareLocking (pool) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
152152 then throw("Only admin can call this function")
153153 else {
154- let $t067346814 = rewardInfo(pool)
155- let currentReward = $t067346814._1
156- let rewardUpdateHeight = $t067346814._2
157- let previousRewardPerBlock = $t067346814._3
154+ let $t068096889 = rewardInfo(pool)
155+ let currentReward = $t068096889._1
156+ let rewardUpdateHeight = $t068096889._2
157+ let previousRewardPerBlock = $t068096889._3
158158 [StringEntry((pool + keyPoolAddress), pool), IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyCurrentReward), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((pool + keyRewardUpdateHeight), rewardUpdateHeight), IntegerEntry((pool + keyPreviousReward), previousRewardPerBlock)]
159159 }
160160
161161
162162
163163 @Callable(i)
164164 func lockShareTokens (pool) = {
165- let $t072647339 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166- let pmtAmount = $t072647339._1
167- let pmtAssetId = $t072647339._2
165+ let $t073397414 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166+ let pmtAmount = $t073397414._1
167+ let pmtAssetId = $t073397414._2
168168 if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
169169 then throw("Incorrect pmtAssetId")
170170 else {
171- let $t074327530 = ClaimCalc(pool, i.caller)
172- let userNewInterest = $t074327530._1
173- let currentInterest = $t074327530._2
174- let claimAmount = $t074327530._3
175- let userShareTokensAmount = $t074327530._4
171+ let $t075077605 = ClaimCalc(pool, i.caller)
172+ let userNewInterest = $t075077605._1
173+ let currentInterest = $t075077605._2
174+ let claimAmount = $t075077605._3
175+ let userShareTokensAmount = $t075077605._4
176176 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
177177 let totalShareAmount = getTotalShareTokenLocked(pool)
178178 let totalShareAmountNew = (totalShareAmount + pmtAmount)
179179 [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew)]
180180 }
181181 }
182182
183183
184184
185185 @Callable(i)
186186 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
187- let $t083068404 = ClaimCalc(pool, i.caller)
188- let userNewInterest = $t083068404._1
189- let currentInterest = $t083068404._2
190- let claimAmount = $t083068404._3
191- let userShareTokensAmount = $t083068404._4
187+ let $t083818479 = ClaimCalc(pool, i.caller)
188+ let userNewInterest = $t083818479._1
189+ let currentInterest = $t083818479._2
190+ let claimAmount = $t083818479._3
191+ let userShareTokensAmount = $t083818479._4
192192 if ((shareTokensWithdrawAmount > userShareTokensAmount))
193193 then throw("Withdraw amount more then user locked amount")
194194 else {
195195 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
196- let shareTokensId = fromBase58String(getStringValue(this, (pool + "share_asset_id")))
196+ if (true)
197+ then throw("111")
198+ else {
199+ let shareTokensId = fromBase58String(getStringValue(this, (pool + "share_asset_id")))
197200 [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)]
201+ }
198202 }
199203 }
200204
201205
202206
203207 @Callable(i)
204208 func claim (pool) = {
205209 let shareTokenLocked = getTotalShareTokenLocked(pool)
206- let $t093049369 = getLastInterestInfo(pool)
207- let lastInterestHeight = $t093049369._1
208- let lastInterest = $t093049369._2
209- let $t093749538 = rewardInfo(pool)
210- let currentRewardPerBlock = $t093749538._1
211- let rewardUpdateHeight = $t093749538._2
212- let previousRewardPerBlock = $t093749538._3
213- let $t095439949 = ClaimCalc(pool, i.caller)
214- let userNewInterest = $t095439949._1
215- let currentInterest = $t095439949._2
216- let claimAmount = $t095439949._3
217- let userShareTokensAmount = $t095439949._4
210+ let $t094149479 = getLastInterestInfo(pool)
211+ let lastInterestHeight = $t094149479._1
212+ let lastInterest = $t094149479._2
213+ let $t094849648 = rewardInfo(pool)
214+ let currentRewardPerBlock = $t094849648._1
215+ let rewardUpdateHeight = $t094849648._2
216+ let previousRewardPerBlock = $t094849648._3
217+ let $t0965310059 = ClaimCalc(pool, i.caller)
218+ let userNewInterest = $t0965310059._1
219+ let currentInterest = $t0965310059._2
220+ let claimAmount = $t0965310059._3
221+ let userShareTokensAmount = $t0965310059._4
218222 [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry(((pool + "_") + keyLastInterest), currentInterest), IntegerEntry(((pool + "_") + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP)]
219223 }
220224
221225

github/deemru/w8io/169f3d6 
66.77 ms