tx · EjqUTei8XRGPqNvE9NdyW8cJHyeABCJ3rZd89j11hKes 3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC: -0.01400000 Waves 2021.04.09 12:40 [1474743] smart account 3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC > SELF 0.00000000 Waves
{ "type": 13, "id": "EjqUTei8XRGPqNvE9NdyW8cJHyeABCJ3rZd89j11hKes", "fee": 1400000, "feeAssetId": null, "timestamp": 1617961232044, "version": 2, "chainId": 84, "sender": "3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC", "senderPublicKey": "FQ5JNhUjFS3Ty3nSykXrGWHDt4NvXJDCv4JQiJ3dXmKa", "proofs": [ "27iRVVSYn7PrqcfRcm4TWYZduQsn54xcGsQ9jzgjaMog5zH3Y8KeJSSZqqGMnpiCbTg6MGoDEdMtqYCQsdbYwVXd" ], "script": "base64:AAIEAAAAAAAAABwIAhIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIAAAAIQAAAAAMYWRtaW5QdWJLZXkxAQAAACC6Cdc7iVmk0V2g//G7M9Cq4TlpD8vivZHWO+5PXqjgEwAAAAAMYWRtaW5QdWJLZXkyAQAAACDCkUSZs9KwtA0ipZFYvYi8oTe7CMv/3YzmlO9bFg5+QAAAAAAMYWRtaW5QdWJLZXkzAQAAACCOHhcueLEHO/RITnozKGB2KHf8meWSMKMgws+oq+kOVQAAAAAUa2V5U2hhcmVUb2tlbnNMb2NrZWQCAAAAGl90b3RhbF9zaGFyZV90b2tlbnNfbG9ja2VkAAAAABxrZXlSZXdhcmRQb29sRnJhY3Rpb25DdXJyZW50AgAAAB1fY3VycmVudF9wb29sX2ZyYWN0aW9uX3Jld2FyZAAAAAAda2V5UmV3YXJkUG9vbEZyYWN0aW9uUHJldmlvdXMCAAAAHl9wcmV2aW91c19wb29sX2ZyYWN0aW9uX3Jld2FyZAAAAAAda2V5VG90YWxSZXdhcmRQZXJCbG9ja0N1cnJlbnQCAAAAHnRvdGFsX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AAgkAASwAAAACBQAAAARwb29sAgAAAAFfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAQa2V5QXZhaWxhYmxlU1dPUAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAGGtleVVzZXJTV09QQ2xhaW1lZEFtb3VudAUAAAAUdXNlckNsYWltZWRBbW91bnROZXcJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAABHBvb2wCAAAAAV8JAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABxrZXlVc2VyU1dPUExhc3RDbGFpbWVkQW1vdW50BQAAAAtjbGFpbUFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADWF2YWlsYWJsZUZ1bmQFAAAABFNXT1AFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleb9nBJQ=", "height": 1474743, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D64mUsQG7v4CNkdtcbqJm5f8rVZT719iW5XcVAf2NmFp Next: 5z4ZiCbxVUiZtLbvXna1v2rEs4JeACHKqgPfSJwZfgjc Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | ||
38 | 38 | let keyFarmingStartHeight = "farming_start_height" | |
39 | 39 | ||
40 | - | let governanceAddress = Address(base58' | |
40 | + | let governanceAddress = Address(base58'3PLHVWCqA9DJPDbadUofTohnCULLauiDWhS') | |
41 | 41 | ||
42 | 42 | let oneWeekInBlock = 10106 | |
43 | 43 | ||
250 | 250 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
251 | 251 | if ((availableFund == 0)) | |
252 | 252 | then throw("You have 0 available SWOP") | |
253 | - | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), | |
253 | + | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)] | |
254 | 254 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | @Verifier(tx) | |
258 | - | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
258 | + | func verify () = match tx { | |
259 | + | case _ => | |
260 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
261 | + | } | |
259 | 262 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'DXDY2itiEcYBtGkVLnkpHtDFyWQUkoLJz79uJ7ECbMrA' | |
5 | 5 | ||
6 | 6 | let adminPubKey2 = base58'E6Wa1SGoktYcjHjsKrvjMiqJY3SWmGKcD8Q5L8kxSPS7' | |
7 | 7 | ||
8 | 8 | let adminPubKey3 = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ' | |
9 | 9 | ||
10 | 10 | let keyShareTokensLocked = "_total_share_tokens_locked" | |
11 | 11 | ||
12 | 12 | let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
13 | 13 | ||
14 | 14 | let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
15 | 15 | ||
16 | 16 | let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
17 | 17 | ||
18 | 18 | let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
19 | 19 | ||
20 | 20 | let keyRewardUpdateHeight = "reward_update_height" | |
21 | 21 | ||
22 | 22 | let keyLastInterest = "_last_interest" | |
23 | 23 | ||
24 | 24 | let keyLastInterestHeight = "_last_interest_height" | |
25 | 25 | ||
26 | 26 | let keyUserShareTokensLocked = "_share_tokens_locked" | |
27 | 27 | ||
28 | 28 | let keyUserLastInterest = "_last_interest" | |
29 | 29 | ||
30 | 30 | let keySWOPid = "SWOP_id" | |
31 | 31 | ||
32 | 32 | let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount" | |
33 | 33 | ||
34 | 34 | let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount" | |
35 | 35 | ||
36 | 36 | let keyAvailableSWOP = "_available_SWOP" | |
37 | 37 | ||
38 | 38 | let keyFarmingStartHeight = "farming_start_height" | |
39 | 39 | ||
40 | - | let governanceAddress = Address(base58' | |
40 | + | let governanceAddress = Address(base58'3PLHVWCqA9DJPDbadUofTohnCULLauiDWhS') | |
41 | 41 | ||
42 | 42 | let oneWeekInBlock = 10106 | |
43 | 43 | ||
44 | 44 | let totalVoteShare = 10000000000 | |
45 | 45 | ||
46 | 46 | let SWOP = fromBase58String(getStringValue(this, keySWOPid)) | |
47 | 47 | ||
48 | 48 | func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked)) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func calcScaleValue (assetId1,assetId2) = { | |
55 | 55 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
56 | 56 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
57 | 57 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
58 | 58 | pow(10, 0, scaleDigits, 0, 0, HALFDOWN) | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func rewardInfo (pool) = { | |
66 | 66 | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress))) | |
67 | 67 | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress))) | |
68 | 68 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress))) | |
69 | 69 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress))) | |
70 | 70 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress))) | |
71 | 71 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
72 | 72 | let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare) | |
73 | 73 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
74 | 74 | then true | |
75 | 75 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
76 | 76 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
77 | 77 | else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious) | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getLastInterestInfo (pool) = { | |
82 | 82 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
83 | 83 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height) | |
84 | 84 | $Tuple2(lastInterestHeight, lastInterest) | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func getUserInterestInfo (pool,userAddress) = { | |
89 | 89 | let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest)) | |
90 | 90 | let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked)) | |
91 | 91 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
92 | 92 | let userLastInterestValue = match userLastInterest { | |
93 | 93 | case userLastInterest: Int => | |
94 | 94 | userLastInterest | |
95 | 95 | case _ => | |
96 | 96 | lastInterest | |
97 | 97 | } | |
98 | 98 | let userShareTokensAmount = match userShare { | |
99 | 99 | case userShare: Int => | |
100 | 100 | userShare | |
101 | 101 | case _ => | |
102 | 102 | 0 | |
103 | 103 | } | |
104 | 104 | $Tuple2(userLastInterestValue, userShareTokensAmount) | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0)) | |
109 | 109 | then 0 | |
110 | 110 | else if ((rewardUpdateHeight > height)) | |
111 | 111 | then { | |
112 | 112 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
113 | 113 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
114 | 114 | } | |
115 | 115 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
116 | 116 | then { | |
117 | 117 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
118 | 118 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
119 | 119 | } | |
120 | 120 | else { | |
121 | 121 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
122 | 122 | let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked)) | |
123 | 123 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
124 | 124 | (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked)) | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func claimCalc (pool,caller,pmtAmount) = { | |
129 | 129 | let shareAssetId = getShareAssetId(pool) | |
130 | 130 | let scaleValue = calcScaleValue(SWOP, shareAssetId) | |
131 | 131 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
132 | 132 | let $t069316996 = getLastInterestInfo(pool) | |
133 | 133 | let lastInterestHeight = $t069316996._1 | |
134 | 134 | let lastInterest = $t069316996._2 | |
135 | 135 | let $t070017089 = rewardInfo(pool) | |
136 | 136 | let currentRewardPerBlock = $t070017089._1 | |
137 | 137 | let rewardUpdateHeight = $t070017089._2 | |
138 | 138 | let previousRewardPerBlock = $t070017089._3 | |
139 | 139 | let $t070947173 = getUserInterestInfo(pool, caller) | |
140 | 140 | let userLastInterest = $t070947173._1 | |
141 | 141 | let userShareTokensAmount = $t070947173._2 | |
142 | 142 | let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount) | |
143 | 143 | let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue) | |
144 | 144 | let userNewInterest = currentInterest | |
145 | 145 | $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount) | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func checkPmtAssetIdCorrect (pool,pmtAssetId) = { | |
150 | 150 | let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
151 | 151 | if ((pmtAssetId == poolShareAssetId)) | |
152 | 152 | then true | |
153 | 153 | else false | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | @Callable(i) | |
161 | 161 | func init (earlyLP) = if (isDefined(getString(this, "keySWOPid"))) | |
162 | 162 | then throw("SWOP already initialized") | |
163 | 163 | else { | |
164 | 164 | let initAmount = 100000000000000 | |
165 | 165 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
166 | 166 | let SWOPid = calculateAssetId(SWOPissue) | |
167 | 167 | [Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))] | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | ||
172 | 172 | @Callable(i) | |
173 | 173 | func initPoolShareFarming (pool) = if ((i.caller != this)) | |
174 | 174 | then throw("Only the DApp itself can call this function") | |
175 | 175 | else { | |
176 | 176 | let $t087038783 = rewardInfo(pool) | |
177 | 177 | let currentReward = $t087038783._1 | |
178 | 178 | let rewardUpdateHeight = $t087038783._2 | |
179 | 179 | let previousRewardPerBlock = $t087038783._3 | |
180 | 180 | [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0)] | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | ||
185 | 185 | @Callable(i) | |
186 | 186 | func lockShareTokens (pool) = { | |
187 | 187 | let $t089569031 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
188 | 188 | let pmtAmount = $t089569031._1 | |
189 | 189 | let pmtAssetId = $t089569031._2 | |
190 | 190 | if (!(checkPmtAssetIdCorrect(pool, pmtAssetId))) | |
191 | 191 | then throw("Incorrect pmtAssetId") | |
192 | 192 | else { | |
193 | 193 | let $t091329240 = claimCalc(pool, i.caller, pmtAmount) | |
194 | 194 | let userNewInterest = $t091329240._1 | |
195 | 195 | let currentInterest = $t091329240._2 | |
196 | 196 | let claimAmount = $t091329240._3 | |
197 | 197 | let userShareTokensAmount = $t091329240._4 | |
198 | 198 | let userShareAmountNew = (userShareTokensAmount + pmtAmount) | |
199 | 199 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
200 | 200 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
201 | 201 | let totalShareAmountNew = (totalShareAmount + pmtAmount) | |
202 | 202 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
203 | 203 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
204 | 204 | [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), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), availableFundsNew)] | |
205 | 205 | } | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | ||
210 | 210 | @Callable(i) | |
211 | 211 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = { | |
212 | 212 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
213 | 213 | let $t01059710697 = claimCalc(pool, i.caller, 1) | |
214 | 214 | let userNewInterest = $t01059710697._1 | |
215 | 215 | let currentInterest = $t01059710697._2 | |
216 | 216 | let claimAmount = $t01059710697._3 | |
217 | 217 | let userShareTokensAmount = $t01059710697._4 | |
218 | 218 | if ((shareTokensWithdrawAmount > userShareTokensAmount)) | |
219 | 219 | then throw("Withdraw amount more then user locked amount") | |
220 | 220 | else { | |
221 | 221 | let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount) | |
222 | 222 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
223 | 223 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
224 | 224 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
225 | 225 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
226 | 226 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
227 | 227 | [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), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), availableFundsNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)] | |
228 | 228 | } | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | ||
233 | 233 | @Callable(i) | |
234 | 234 | func claim (pool) = { | |
235 | 235 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
236 | 236 | let $t01218912254 = getLastInterestInfo(pool) | |
237 | 237 | let lastInterestHeight = $t01218912254._1 | |
238 | 238 | let lastInterest = $t01218912254._2 | |
239 | 239 | let $t01225912348 = rewardInfo(pool) | |
240 | 240 | let currentRewardPerBlock = $t01225912348._1 | |
241 | 241 | let rewardUpdateHeight = $t01225912348._2 | |
242 | 242 | let previousRewardPerBlock = $t01225912348._3 | |
243 | 243 | let $t01235312453 = claimCalc(pool, i.caller, 1) | |
244 | 244 | let userNewInterest = $t01235312453._1 | |
245 | 245 | let currentInterest = $t01235312453._2 | |
246 | 246 | let claimAmount = $t01235312453._3 | |
247 | 247 | let userShareTokensAmount = $t01235312453._4 | |
248 | 248 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
249 | 249 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
250 | 250 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
251 | 251 | if ((availableFund == 0)) | |
252 | 252 | then throw("You have 0 available SWOP") | |
253 | - | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), | |
253 | + | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)] | |
254 | 254 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | @Verifier(tx) | |
258 | - | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
258 | + | func verify () = match tx { | |
259 | + | case _ => | |
260 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
261 | + | } | |
259 | 262 |
github/deemru/w8io/026f985 42.56 ms ◑