tx · 24Qrs2quxqFHvyNmYE1D7WBteCZu2nhRnysCDM36QxeS

3MyTUSFjgJWsmoQEBpeF3N1bmtdr2XMS1uU:  -0.01400000 Waves

2020.12.12 20:29 [1305749] smart account 3MyTUSFjgJWsmoQEBpeF3N1bmtdr2XMS1uU > SELF 0.00000000 Waves

{ "type": 13, "id": "24Qrs2quxqFHvyNmYE1D7WBteCZu2nhRnysCDM36QxeS", "fee": 1400000, "feeAssetId": null, "timestamp": 1607794164018, "version": 1, "sender": "3MyTUSFjgJWsmoQEBpeF3N1bmtdr2XMS1uU", "senderPublicKey": "HNibf5h44NsszRrbctryRBWzFba3biyjEoufpZuraEha", "proofs": [ "43KP2RWEK7LfUmd7Vz5vm2XwfngMu4fG1UVeNEN4ZCeDg3v6emPH7KAxnPtjJd4RBuqN3EUwEy9e96vqS4PbH9ZG" ], "script": "base64:AAIEAAAAAAAAABkIAhIAEgMKAQgSAwoBCBIECgIIARIDCgEIAAAAHQAAAAAMYWRtaW5QdWJLZXkxAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkyAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkzAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAABJhZG1pblB1YktleVN0YWtpbmcBAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAABRrZXlTaGFyZVRva2Vuc0xvY2tlZAIAAAAaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAAAAAEGtleUN1cnJlbnRSZXdhcmQCAAAAD19jdXJyZW50X3Jld2FyZAAAAAAVa2V5UmV3YXJkVXBkYXRlSGVpZ2h0AgAAABVfcmV3YXJkX3Vw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AAEsAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAE2tleVVzZXJMYXN0SW50ZXJlc3QFAAAAD3VzZXJOZXdJbnRlcmVzdAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAABHBvb2wCAAAAAV8FAAAAD2tleUxhc3RJbnRlcmVzdAUAAAAPY3VycmVudEludGVyZXN0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwUAAAAVa2V5TGFzdEludGVyZXN0SGVpZ2h0BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADBQAAAARTV09QBQAAAAtjbGFpbUFtb3VudAYJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAtjbGFpbUFtb3VudAUAAAAEU1dPUAUAAAADbmlsAAAAAJrJ7Cc=", "chainId": 84, "height": 1305749, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9p8DBMtAx3H8gmnRzVjomH4YpiirsXwLkKpyzaLfNeZn Next: BZQWVz1zx7d5wdyAwhV8UcVDaYYxLwXwN3VnUCgWmqry Diff:
OldNewDifferences
4646 func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked))
4747
4848
49-func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), (pool + "_share_asset_id")))
49+func getShareAssetId (pool) = if (true)
50+ then throw((pool + "share_asset_id"))
51+ else fromBase58String(getStringValue(value(addressFromString(pool)), (pool + "_share_asset_id")))
5052
5153
5254 func calcScaleValue (assetId1,assetId2) = {
113115 else {
114116 let scaleValue = calcScaleValue(SWOP, shareAssetId)
115117 let shareTokenLocked = getTotalShareTokenLocked(pool)
116- let $t051965261 = getLastInterestInfo(pool)
117- let lastInterestHeight = $t051965261._1
118- let lastInterest = $t051965261._2
119- let $t052665354 = rewardInfo(pool)
120- let currentRewardPerBlock = $t052665354._1
121- let rewardUpdateHeight = $t052665354._2
122- let previousRewardPerBlock = $t052665354._3
123- let $t053595438 = getUserInterestInfo(pool, caller)
124- let userLastInterest = $t053595438._1
125- let userShareTokensAmount = $t053595438._2
118+ let $t052565321 = getLastInterestInfo(pool)
119+ let lastInterestHeight = $t052565321._1
120+ let lastInterest = $t052565321._2
121+ let $t053265414 = rewardInfo(pool)
122+ let currentRewardPerBlock = $t053265414._1
123+ let rewardUpdateHeight = $t053265414._2
124+ let previousRewardPerBlock = $t053265414._3
125+ let $t054195498 = getUserInterestInfo(pool, caller)
126+ let userLastInterest = $t054195498._1
127+ let userShareTokensAmount = $t054195498._2
126128 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue)
127129 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
128130 let userNewInterest = currentInterest
155157 func initPoolShareLocking (pool) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
156158 then throw("Only admin can call this function")
157159 else {
158- let $t068016881 = rewardInfo(pool)
159- let currentReward = $t068016881._1
160- let rewardUpdateHeight = $t068016881._2
161- let previousRewardPerBlock = $t068016881._3
160+ let $t068616941 = rewardInfo(pool)
161+ let currentReward = $t068616941._1
162+ let rewardUpdateHeight = $t068616941._2
163+ let previousRewardPerBlock = $t068616941._3
162164 [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)]
163165 }
164166
166168
167169 @Callable(i)
168170 func lockShareTokens (pool) = {
169- let $t073317406 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
170- let pmtAmount = $t073317406._1
171- let pmtAssetId = $t073317406._2
171+ let $t073917466 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
172+ let pmtAmount = $t073917466._1
173+ let pmtAssetId = $t073917466._2
172174 if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
173175 then throw("Incorrect pmtAssetId")
174176 else {
175- let $t074997597 = ClaimCalc(pool, i.caller)
176- let userNewInterest = $t074997597._1
177- let currentInterest = $t074997597._2
178- let claimAmount = $t074997597._3
179- let userShareTokensAmount = $t074997597._4
177+ let $t075597657 = ClaimCalc(pool, i.caller)
178+ let userNewInterest = $t075597657._1
179+ let currentInterest = $t075597657._2
180+ let claimAmount = $t075597657._3
181+ let userShareTokensAmount = $t075597657._4
180182 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
181183 let totalShareAmount = getTotalShareTokenLocked(pool)
182184 let totalShareAmountNew = (totalShareAmount + pmtAmount)
188190
189191 @Callable(i)
190192 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
191- let $t083738471 = ClaimCalc(pool, i.caller)
192- let userNewInterest = $t083738471._1
193- let currentInterest = $t083738471._2
194- let claimAmount = $t083738471._3
195- let userShareTokensAmount = $t083738471._4
193+ let $t084338531 = ClaimCalc(pool, i.caller)
194+ let userNewInterest = $t084338531._1
195+ let currentInterest = $t084338531._2
196+ let claimAmount = $t084338531._3
197+ let userShareTokensAmount = $t084338531._4
196198 if ((shareTokensWithdrawAmount > userShareTokensAmount))
197199 then throw("Withdraw amount more then user locked amount")
198200 else {
207209 @Callable(i)
208210 func claim (pool) = {
209211 let shareTokenLocked = getTotalShareTokenLocked(pool)
210- let $t093719436 = getLastInterestInfo(pool)
211- let lastInterestHeight = $t093719436._1
212- let lastInterest = $t093719436._2
213- let $t094419605 = rewardInfo(pool)
214- let currentRewardPerBlock = $t094419605._1
215- let rewardUpdateHeight = $t094419605._2
216- let previousRewardPerBlock = $t094419605._3
217- let $t0961010016 = ClaimCalc(pool, i.caller)
218- let userNewInterest = $t0961010016._1
219- let currentInterest = $t0961010016._2
220- let claimAmount = $t0961010016._3
221- let userShareTokensAmount = $t0961010016._4
212+ let $t094319496 = getLastInterestInfo(pool)
213+ let lastInterestHeight = $t094319496._1
214+ let lastInterest = $t094319496._2
215+ let $t095019665 = rewardInfo(pool)
216+ let currentRewardPerBlock = $t095019665._1
217+ let rewardUpdateHeight = $t095019665._2
218+ let previousRewardPerBlock = $t095019665._3
219+ let $t0967010076 = ClaimCalc(pool, i.caller)
220+ let userNewInterest = $t0967010076._1
221+ let currentInterest = $t0967010076._2
222+ let claimAmount = $t0967010076._3
223+ let userShareTokensAmount = $t0967010076._4
222224 [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry(((pool + "_") + keyLastInterest), currentInterest), IntegerEntry(((pool + "_") + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP)]
223225 }
224226
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
49-func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), (pool + "_share_asset_id")))
49+func getShareAssetId (pool) = if (true)
50+ then throw((pool + "share_asset_id"))
51+ else fromBase58String(getStringValue(value(addressFromString(pool)), (pool + "_share_asset_id")))
5052
5153
5254 func calcScaleValue (assetId1,assetId2) = {
5355 let assetId1Decimals = value(assetInfo(assetId1)).decimals
5456 let assetId2Decimals = value(assetInfo(assetId2)).decimals
5557 let sclaeDigits = ((assetId2Decimals - assetId1Decimals) + 8)
5658 pow(10, 0, sclaeDigits, 0, 0, HALFDOWN)
5759 }
5860
5961
6062 func rewardInfo (pool) = {
6163 let currentReward = valueOrErrorMessage(getInteger(votingAddress, (pool + keyCurrentReward)), (((("No data on the key: " + pool) + keyCurrentReward) + " at address ") + toString(votingAddress)))
6264 let rewardUpdateHeight = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardUpdateHeight)), (((("No data on the key: " + pool) + keyRewardUpdateHeight) + " at address ") + toString(votingAddress)))
6365 let rewardPreviousAmount = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardUpdateHeight)), (((("No data on the key: " + pool) + keyPreviousReward) + " at address ") + toString(votingAddress)))
6466 $Tuple3(currentReward, rewardUpdateHeight, rewardPreviousAmount)
6567 }
6668
6769
6870 func getLastInterestInfo (pool) = {
6971 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (((("No data on the key: " + pool) + "_") + pool) + keyLastInterest))
7072 let lastInterestHeight = valueOrErrorMessage(getInteger(this, (pool + keyLastInterestHeight)), (("No data on the key: " + pool) + keyLastInterestHeight))
7173 $Tuple2(lastInterestHeight, lastInterest)
7274 }
7375
7476
7577 func getUserInterestInfo (pool,userAddres) = {
7678 let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddres)) + keyUserLastInterest))
7779 let userShare = getInteger(this, (((pool + "_") + toString(userAddres)) + keyUserShareTokensLocked))
7880 let userLastInterestValue = match userLastInterest {
7981 case userLastInterest: Int =>
8082 userLastInterest
8183 case _ =>
8284 0
8385 }
8486 let userShareTokensAmount = match userShare {
8587 case userShare: Int =>
8688 userShare
8789 case _ =>
8890 0
8991 }
9092 $Tuple2(userLastInterestValue, userShareTokensAmount)
9193 }
9294
9395
9496 func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue) = if ((lastInterestHeight > rewardUpdateHeight))
9597 then if ((shareTokenLocked == 0))
9698 then 0
9799 else {
98100 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
99101 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
100102 }
101103 else {
102104 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
103105 let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
104106 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
105107 (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
106108 }
107109
108110
109111 func ClaimCalc (pool,caller) = {
110112 let shareAssetId = getShareAssetId(pool)
111113 if (true)
112114 then throw(toBase58String(shareAssetId))
113115 else {
114116 let scaleValue = calcScaleValue(SWOP, shareAssetId)
115117 let shareTokenLocked = getTotalShareTokenLocked(pool)
116- let $t051965261 = getLastInterestInfo(pool)
117- let lastInterestHeight = $t051965261._1
118- let lastInterest = $t051965261._2
119- let $t052665354 = rewardInfo(pool)
120- let currentRewardPerBlock = $t052665354._1
121- let rewardUpdateHeight = $t052665354._2
122- let previousRewardPerBlock = $t052665354._3
123- let $t053595438 = getUserInterestInfo(pool, caller)
124- let userLastInterest = $t053595438._1
125- let userShareTokensAmount = $t053595438._2
118+ let $t052565321 = getLastInterestInfo(pool)
119+ let lastInterestHeight = $t052565321._1
120+ let lastInterest = $t052565321._2
121+ let $t053265414 = rewardInfo(pool)
122+ let currentRewardPerBlock = $t053265414._1
123+ let rewardUpdateHeight = $t053265414._2
124+ let previousRewardPerBlock = $t053265414._3
125+ let $t054195498 = getUserInterestInfo(pool, caller)
126+ let userLastInterest = $t054195498._1
127+ let userShareTokensAmount = $t054195498._2
126128 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue)
127129 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
128130 let userNewInterest = currentInterest
129131 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
130132 }
131133 }
132134
133135
134136 func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
135137 let poolAddres = value(addressFromString(getStringValue(this, (pool + keyPoolAddress))))
136138 let poolShareAssetId = fromBase58String(getStringValue(poolAddres, "share_asset_id"))
137139 if ((pmtAssetId == poolShareAssetId))
138140 then true
139141 else false
140142 }
141143
142144
143145 @Callable(i)
144146 func init () = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
145147 then throw("Only admin can call this function")
146148 else {
147149 let SWOPissue = Issue("SWOP", "SWOP protocol token", 1, 8, true)
148150 let SWOPid = calculateAssetId(SWOPissue)
149151 [Issue("SWOP", "SWOP protocol token", 1, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
150152 }
151153
152154
153155
154156 @Callable(i)
155157 func initPoolShareLocking (pool) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
156158 then throw("Only admin can call this function")
157159 else {
158- let $t068016881 = rewardInfo(pool)
159- let currentReward = $t068016881._1
160- let rewardUpdateHeight = $t068016881._2
161- let previousRewardPerBlock = $t068016881._3
160+ let $t068616941 = rewardInfo(pool)
161+ let currentReward = $t068616941._1
162+ let rewardUpdateHeight = $t068616941._2
163+ let previousRewardPerBlock = $t068616941._3
162164 [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)]
163165 }
164166
165167
166168
167169 @Callable(i)
168170 func lockShareTokens (pool) = {
169- let $t073317406 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
170- let pmtAmount = $t073317406._1
171- let pmtAssetId = $t073317406._2
171+ let $t073917466 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
172+ let pmtAmount = $t073917466._1
173+ let pmtAssetId = $t073917466._2
172174 if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
173175 then throw("Incorrect pmtAssetId")
174176 else {
175- let $t074997597 = ClaimCalc(pool, i.caller)
176- let userNewInterest = $t074997597._1
177- let currentInterest = $t074997597._2
178- let claimAmount = $t074997597._3
179- let userShareTokensAmount = $t074997597._4
177+ let $t075597657 = ClaimCalc(pool, i.caller)
178+ let userNewInterest = $t075597657._1
179+ let currentInterest = $t075597657._2
180+ let claimAmount = $t075597657._3
181+ let userShareTokensAmount = $t075597657._4
180182 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
181183 let totalShareAmount = getTotalShareTokenLocked(pool)
182184 let totalShareAmountNew = (totalShareAmount + pmtAmount)
183185 [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)]
184186 }
185187 }
186188
187189
188190
189191 @Callable(i)
190192 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
191- let $t083738471 = ClaimCalc(pool, i.caller)
192- let userNewInterest = $t083738471._1
193- let currentInterest = $t083738471._2
194- let claimAmount = $t083738471._3
195- let userShareTokensAmount = $t083738471._4
193+ let $t084338531 = ClaimCalc(pool, i.caller)
194+ let userNewInterest = $t084338531._1
195+ let currentInterest = $t084338531._2
196+ let claimAmount = $t084338531._3
197+ let userShareTokensAmount = $t084338531._4
196198 if ((shareTokensWithdrawAmount > userShareTokensAmount))
197199 then throw("Withdraw amount more then user locked amount")
198200 else {
199201 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
200202 let shareTokensId = fromBase58String(getStringValue(this, (pool + "share_asset_id")))
201203 [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)]
202204 }
203205 }
204206
205207
206208
207209 @Callable(i)
208210 func claim (pool) = {
209211 let shareTokenLocked = getTotalShareTokenLocked(pool)
210- let $t093719436 = getLastInterestInfo(pool)
211- let lastInterestHeight = $t093719436._1
212- let lastInterest = $t093719436._2
213- let $t094419605 = rewardInfo(pool)
214- let currentRewardPerBlock = $t094419605._1
215- let rewardUpdateHeight = $t094419605._2
216- let previousRewardPerBlock = $t094419605._3
217- let $t0961010016 = ClaimCalc(pool, i.caller)
218- let userNewInterest = $t0961010016._1
219- let currentInterest = $t0961010016._2
220- let claimAmount = $t0961010016._3
221- let userShareTokensAmount = $t0961010016._4
212+ let $t094319496 = getLastInterestInfo(pool)
213+ let lastInterestHeight = $t094319496._1
214+ let lastInterest = $t094319496._2
215+ let $t095019665 = rewardInfo(pool)
216+ let currentRewardPerBlock = $t095019665._1
217+ let rewardUpdateHeight = $t095019665._2
218+ let previousRewardPerBlock = $t095019665._3
219+ let $t0967010076 = ClaimCalc(pool, i.caller)
220+ let userNewInterest = $t0967010076._1
221+ let currentInterest = $t0967010076._2
222+ let claimAmount = $t0967010076._3
223+ let userShareTokensAmount = $t0967010076._4
222224 [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry(((pool + "_") + keyLastInterest), currentInterest), IntegerEntry(((pool + "_") + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP)]
223225 }
224226
225227

github/deemru/w8io/169f3d6 
58.67 ms