tx · EAdvzzmBtUyshwxbECnqyAVPPqin7LdNatUhPRF2rCR7

3N4r7DNT8t9WqaQWr8or1Hakm4AJfVDk6mS:  -0.01000000 Waves

2023.11.10 16:04 [2837283] smart account 3N4r7DNT8t9WqaQWr8or1Hakm4AJfVDk6mS > SELF 0.00000000 Waves

{ "type": 13, "id": "EAdvzzmBtUyshwxbECnqyAVPPqin7LdNatUhPRF2rCR7", "fee": 1000000, "feeAssetId": null, "timestamp": 1699621503414, "version": 2, "chainId": 84, "sender": "3N4r7DNT8t9WqaQWr8or1Hakm4AJfVDk6mS", "senderPublicKey": "CMMtdSwXAf6tvNvyJDrdC5VGmRkcXU5CqmsapxKNPhLu", "proofs": [ "5TigyWVP7re3gPHv3jPx5xQzRchfg7RpcLz3ia4ZdhCjgLrgHh81S1fpStC1tcDVqKqUw5jqtL5yu3sr3rUScdSf" ], "script": "base64:BgI5CAISBgoECAgBARIDCgEIEgASABIECgIICBIDCgEIEgMKAQgSAwoBARIDCgEBEgASAwoBARIDCgEIGQADU0VQAgJfXwAHZmVlUmFuawCQTgAJd3hBc3NldElkASB6bQLDKkAdN6wf+7trwy200VZFDNDd29aFKJLgHB2a4wAKc2J0QXNzZXRJZAEg7b51XE58aMp9lj9uI5FGnnl/9BHmO+37TVRB3Im5ctkADXdhdmVzRXhjaGFuZ2UBGgFU/Dsuc5FpNxWwmLp+YyVh+q94Okzod8AfABVjbGFpbVd4UmV3YXJkQ29udHJhY3QBGgFU/Dsuc5FpNxWwmLp+YyVh+q94Okzod8AfABBpc0NvbnN0cnVjdGVkS2V5Ag5pc19jb25zdHJ1Y3RlZAAPYWRtaW5BZGRyZXNzS2V5Ag1hZG1pbl9hZGRyZXNzAA5zYld4QXNzZXRJZEtleQIOc2Jfd3hfYXNzZXRfaWQACmxwUG9vbHNLZXkCCGxwX3Bvb2xzABdhZGRpdGlvbmFsUmV3YXJkUG9vbEtleQIWYWRkaXRpb25hbF9yZXdhcmRfcG9vbAAaYWRkaXRpb25hbFJld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GUCBQdjbGFpbWVkBRJzYnRTdGFrZVBvb2xBbW91bnQFGmFkZGl0aW9uYWxSZXdhcmRQb29sQW1vdW50CQDOCAIJAM4IAgkAzggCBRBzYnRSZXdhcmRBY3Rpb25zBRNzYnRTdGFrZVBvb2xBY3Rpb25zBRxhZGRpdGlvbmFsUmV3YXJkc1Bvb2xBY3Rpb25zCQDMCAIJAQxJbnRlZ2VyRW50cnkCBRtzYnRTdGFrZVBvb2xUb3RhbENsYWltZWRLZXkJAGQCBRhzYnRTdGFrZVBvb2xUb3RhbENsYWltZWQFEnNidFN0YWtlUG9vbEFtb3VudAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQtwb29sQWRkcmVzcwULcG9vbENsYWltZWQFCXd4QXNzZXRJZAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAFSMhzc=", "height": 2837283, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CmtxmCYWtcJeupfrW2k3w5DFiMHnF2u77qdv9DoTLM5a Next: none Diff:
OldNewDifferences
113113
114114
115115 @Callable(i)
116-func changeSBTPoolAddress (address) = [StringEntry(getStringValue(sbtStakePoolKey), address)]
116+func changeSBTPoolAddress (address) = [StringEntry(sbtStakePoolKey, address)]
117117
118118
119119
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let feeRank = 10000
77
88 let wxAssetId = base58'9Eu9de5GPPgLzY16bevCaxF4rFr4jA9wqyTfqcjksU82'
99
1010 let sbtAssetId = base58'H144sePa8bNCDFTzZNkUnk6QMz387T2ruKPMQ5DJ3DyS'
1111
1212 let wavesExchange = base58'3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok'
1313
1414 let claimWxRewardContract = base58'3NCukxG6cc7pqKoEwTZsr1CRrHMHfvGM7ok'
1515
1616 let isConstructedKey = "is_constructed"
1717
1818 let adminAddressKey = "admin_address"
1919
2020 let sbWxAssetIdKey = "sb_wx_asset_id"
2121
2222 let lpPoolsKey = "lp_pools"
2323
2424 let additionalRewardPoolKey = "additional_reward_pool"
2525
2626 let additionalRewardPoolFeeKey = "additional_reward_pool_fee"
2727
2828 let sbtStakePoolKey = "sbt_stake_pool"
2929
3030 let sbtStakePoolFeeKey = "sbt_stake_pool_fee"
3131
3232 let sbtStakePoolTotalClaimedKey = "sbt_stake_pool_total_claimed"
3333
3434 let totalWXLockedKey = "total_wx_locked"
3535
3636 let initialSBTTokensAmountKey = "initial_SBT_tokens_amount"
3737
3838 let baseSBTTokenAmountForOneRewardTokenKey = "base_SBT_token_amount_for_one_reward_token"
3939
4040 func asPayment (v) = match v {
4141 case p: AttachedPayment =>
4242 p
4343 case _ =>
4444 throw("fail to cast into AttachedPayment")
4545 }
4646
4747
4848 func asByteVector (v) = match v {
4949 case p: ByteVector =>
5050 p
5151 case _ =>
5252 throw("fail to cast into ByteVector")
5353 }
5454
5555
5656 func asInt (val) = match val {
5757 case valInt: Int =>
5858 valInt
5959 case _ =>
6060 throw("fail to cast into Int")
6161 }
6262
6363
6464 func asAddressString (address) = match addressFromString(address) {
6565 case a: Address =>
6666 toString(a)
6767 case _ =>
6868 throw("fail to cast into Address String")
6969 }
7070
7171
7272 func calculateCurrentRewardSBTAmount (rewardTokenCount) = {
7373 let baseSBTTokenAmountForOneRewardToken = getIntegerValue(this, baseSBTTokenAmountForOneRewardTokenKey)
7474 let initialSBTTokensAmount = getIntegerValue(this, initialSBTTokensAmountKey)
7575 let currentSBTTokensBalance = assetBalance(this, sbtAssetId)
7676 if ((currentSBTTokensBalance == 0))
7777 then 0
7878 else {
7979 let currentSBTTokenAmountForOneRewardToken = fraction(baseSBTTokenAmountForOneRewardToken, currentSBTTokensBalance, initialSBTTokensAmount)
8080 let amountSBT = (rewardTokenCount * currentSBTTokenAmountForOneRewardToken)
8181 if ((amountSBT > currentSBTTokensBalance))
8282 then currentSBTTokensBalance
8383 else amountSBT
8484 }
8585 }
8686
8787
8888 func isAuthorizedPool (pool) = {
8989 let checkedPool = asAddressString(pool)
9090 let lpPools = getStringValue(lpPoolsKey)
9191 contains(lpPools, checkedPool)
9292 }
9393
9494
9595 func getPoolData (pool) = if (!(isAuthorizedPool(pool)))
9696 then throw("Not authorized pool")
9797 else {
9898 let poolLpToken = getStringValue(addressFromStringValue(pool), "token")
9999 let wavesExchangePoolAddress = addressFromStringValue(getStringValue(pool))
100100 $Tuple2(poolLpToken, wavesExchangePoolAddress)
101101 }
102102
103103
104104 @Callable(i)
105105 func constructor (adminAddress,sbtStakePool,initialSBTTokensAmount,sbtTokensForOneRewardToken) = if (isDefined(getBoolean(isConstructedKey)))
106106 then throw("Constructor can be called one time")
107107 else {
108108 let sbWx = Issue("testSbWX", "", 0, 8, true, unit, 0)
109109 let assetId = calculateAssetId(sbWx)
110110 [sbWx, StringEntry(sbWxAssetIdKey, toBase58String(assetId)), StringEntry(adminAddressKey, asAddressString(adminAddress)), StringEntry(sbtStakePoolKey, asAddressString(sbtStakePool)), IntegerEntry(sbtStakePoolFeeKey, 1400), IntegerEntry(sbtStakePoolTotalClaimedKey, 0), StringEntry(lpPoolsKey, ""), StringEntry(additionalRewardPoolKey, ""), IntegerEntry(additionalRewardPoolFeeKey, 600), BooleanEntry(isConstructedKey, true), IntegerEntry(totalWXLockedKey, 0), IntegerEntry(initialSBTTokensAmountKey, initialSBTTokensAmount), IntegerEntry(baseSBTTokenAmountForOneRewardTokenKey, sbtTokensForOneRewardToken)]
111111 }
112112
113113
114114
115115 @Callable(i)
116-func changeSBTPoolAddress (address) = [StringEntry(getStringValue(sbtStakePoolKey), address)]
116+func changeSBTPoolAddress (address) = [StringEntry(sbtStakePoolKey, address)]
117117
118118
119119
120120 @Callable(i)
121121 func mintSbWx () = if ((size(i.payments) != 1))
122122 then throw("One Payment expected")
123123 else {
124124 let payment = asPayment(i.payments[0])
125125 let amount = payment.amount
126126 if (if ((payment.assetId != wxAssetId))
127127 then true
128128 else (0 >= amount))
129129 then throw("Wrong Asset id or amount")
130130 else {
131131 let totalWXLocked = getIntegerValue(totalWXLockedKey)
132132 let sbWxAssetId = getStringValue(sbWxAssetIdKey)
133133 let wavesExchangeInfo = invoke(Address(wavesExchange), "userMaxDurationREADONLY", nil, nil)
134134 if ((wavesExchangeInfo == wavesExchangeInfo))
135135 then match wavesExchangeInfo {
136136 case tuple: (String, Int) =>
137137 let functionName = tuple._1
138138 let maxLockDuration = tuple._2
139139 let result = invoke(Address(wavesExchange), functionName, [maxLockDuration], [payment])
140140 if ((result == result))
141141 then {
142142 let sbWx = fromBase58String(sbWxAssetId)
143143 [Reissue(sbWx, amount, true), ScriptTransfer(Address(i.caller.bytes), amount, sbWx), IntegerEntry(totalWXLockedKey, (totalWXLocked + amount))]
144144 }
145145 else throw("Strict value is not equal to itself.")
146146 case _ =>
147147 throw("FATAL: Inconsistent data")
148148 }
149149 else throw("Strict value is not equal to itself.")
150150 }
151151 }
152152
153153
154154
155155 @Callable(i)
156156 func claimWxStakingRewards () = {
157157 let currentWxOnContract = assetBalance(this, wxAssetId)
158158 if ((currentWxOnContract == currentWxOnContract))
159159 then {
160160 let claimResult = invoke(Address(claimWxRewardContract), "claimReward", nil, nil)
161161 if ((claimResult == claimResult))
162162 then {
163163 let newWxOnContract = assetBalance(this, wxAssetId)
164164 let claimed = (newWxOnContract - currentWxOnContract)
165165 if ((claimed == 0))
166166 then throw("Nothing to claim")
167167 else {
168168 let sbtStakePoolTotalClaimed = getIntegerValue(sbtStakePoolTotalClaimedKey)
169169 [IntegerEntry(sbtStakePoolTotalClaimedKey, (sbtStakePoolTotalClaimed + claimed)), ScriptTransfer(addressFromStringValue(getStringValue(sbtStakePoolKey)), claimed, wxAssetId)]
170170 }
171171 }
172172 else throw("Strict value is not equal to itself.")
173173 }
174174 else throw("Strict value is not equal to itself.")
175175 }
176176
177177
178178
179179 @Callable(i)
180180 func addPool (address,wavesExchangePoolAddress) = if ((toBase58String(i.caller.bytes) != getStringValue(adminAddressKey)))
181181 then throw("Only Admin can call this function")
182182 else {
183183 let lpPools = getStringValue(lpPoolsKey)
184184 if (isAuthorizedPool(address))
185185 then throw("Pool already added")
186186 else {
187187 let newPools = if ((size(lpPools) == 0))
188188 then address
189189 else ((lpPools + SEP) + address)
190190 [StringEntry(lpPoolsKey, newPools), StringEntry(asAddressString(address), asAddressString(wavesExchangePoolAddress))]
191191 }
192192 }
193193
194194
195195
196196 @Callable(i)
197197 func removePool (address) = if ((toBase58String(i.caller.bytes) != getStringValue(adminAddressKey)))
198198 then throw("Only Admin can call this function")
199199 else {
200200 let lpPools = getStringValue(lpPoolsKey)
201201 if (!(isAuthorizedPool(address)))
202202 then throw("Pool not found")
203203 else {
204204 let poolsArray = split_4C(lpPools, SEP)
205205 let poolIndex = asInt(indexOf(poolsArray, address))
206206 let newPools = makeString_2C(removeByIndex(poolsArray, poolIndex), SEP)
207207 ([StringEntry(lpPoolsKey, newPools), DeleteEntry(address)] ++ (if ((getStringValue(additionalRewardPoolKey) == address))
208208 then [StringEntry(additionalRewardPoolKey, "")]
209209 else nil))
210210 }
211211 }
212212
213213
214214
215215 @Callable(i)
216216 func setAdditionalRewardsPool (address) = if ((toBase58String(i.caller.bytes) != getStringValue(adminAddressKey)))
217217 then throw("Only Admin can call this function")
218218 else if (!(isAuthorizedPool(address)))
219219 then throw("Only authorized pool can be added as additional reward pool")
220220 else [StringEntry(additionalRewardPoolKey, address)]
221221
222222
223223
224224 @Callable(i)
225225 func setAdditionalRewardsPoolFee (fee) = if ((toBase58String(i.caller.bytes) != getStringValue(adminAddressKey)))
226226 then throw("Only Admin can call this function")
227227 else if ((fee > 2000))
228228 then throw("Fee can't be bigger than 20%")
229229 else if ((0 > fee))
230230 then throw("Fee can't be negative")
231231 else [IntegerEntry(additionalRewardPoolFeeKey, fee)]
232232
233233
234234
235235 @Callable(i)
236236 func setSbtPoolFee (fee) = if ((toBase58String(i.caller.bytes) != getStringValue(adminAddressKey)))
237237 then throw("Only Admin can call this function")
238238 else if ((fee > 2000))
239239 then throw("Fee can't be bigger than 20%")
240240 else if ((0 > fee))
241241 then throw("Fee can't be negative")
242242 else [IntegerEntry(sbtStakePoolFeeKey, fee)]
243243
244244
245245
246246 @Callable(i)
247247 func stakePoolLps () = if ((size(i.payments) != 1))
248248 then throw("One Payment expected")
249249 else {
250250 let poolData = getPoolData(toBase58String(i.caller.bytes))
251251 let poolLpToken = poolData._1
252252 let wavesExchangePoolAddress = poolData._2
253253 let payment = asPayment(i.payments[0])
254254 if (if ((payment.assetId != fromBase58String(poolLpToken)))
255255 then true
256256 else (0 >= payment.amount))
257257 then throw("Wrong LP Asset id or amount")
258258 else {
259259 let result = invoke(wavesExchangePoolAddress, "stake", nil, [payment])
260260 if ((result == result))
261261 then nil
262262 else throw("Strict value is not equal to itself.")
263263 }
264264 }
265265
266266
267267
268268 @Callable(i)
269269 func withdrawPoolLps (amount) = {
270270 let poolData = getPoolData(toBase58String(i.caller.bytes))
271271 let poolLpToken = poolData._1
272272 let wavesExchangePoolAddress = poolData._2
273273 let result = invoke(wavesExchangePoolAddress, "unstake", [poolLpToken, amount], nil)
274274 if ((result == result))
275275 then [ScriptTransfer(Address(i.caller.bytes), amount, fromBase58String(poolLpToken))]
276276 else throw("Strict value is not equal to itself.")
277277 }
278278
279279
280280
281281 @Callable(i)
282282 func claimPoolRewards (pool) = {
283283 let poolAddress = addressFromStringValue(pool)
284284 let poolData = getPoolData(pool)
285285 let poolLpToken = poolData._1
286286 let wavesExchangePoolAddress = poolData._2
287287 let currentWXOnContract = assetBalance(this, wxAssetId)
288288 if ((currentWXOnContract == currentWXOnContract))
289289 then {
290290 let claimResult = invoke(wavesExchangePoolAddress, "claimWX", [poolLpToken], nil)
291291 if ((claimResult == claimResult))
292292 then {
293293 let newWXOnContract = assetBalance(this, wxAssetId)
294294 let claimed = (newWXOnContract - currentWXOnContract)
295295 if ((claimed == 0))
296296 then throw("Nothing to claim")
297297 else {
298298 let sbtRewardAmount = calculateCurrentRewardSBTAmount(claimed)
299299 let sbtRewardActions = if ((sbtRewardAmount == 0))
300300 then nil
301301 else [ScriptTransfer(poolAddress, sbtRewardAmount, sbtAssetId)]
302302 let sbtStakePool = addressFromStringValue(getStringValue(sbtStakePoolKey))
303303 let sbtStakePoolFee = getIntegerValue(sbtStakePoolFeeKey)
304304 let sbtStakePoolTotalClaimed = getIntegerValue(sbtStakePoolTotalClaimedKey)
305305 let sbtStakePoolAmount = fraction(claimed, sbtStakePoolFee, feeRank, HALFUP)
306306 let sbtStakePoolActions = if ((sbtStakePoolAmount == 0))
307307 then nil
308308 else [ScriptTransfer(sbtStakePool, sbtStakePoolAmount, wxAssetId)]
309309 let additionalRewardPool = getStringValue(additionalRewardPoolKey)
310310 let additionalRewardPoolFree = getIntegerValue(additionalRewardPoolFeeKey)
311311 let additionalRewardPoolAmount = if ((size(additionalRewardPool) == 0))
312312 then 0
313313 else if ((additionalRewardPool != pool))
314314 then fraction(claimed, additionalRewardPoolFree, feeRank, HALFUP)
315315 else 0
316316 let additionalRewardsPoolActions = if ((additionalRewardPoolAmount == 0))
317317 then nil
318318 else [ScriptTransfer(addressFromStringValue(additionalRewardPool), additionalRewardPoolAmount, wxAssetId)]
319319 let poolClaimed = ((claimed - sbtStakePoolAmount) - additionalRewardPoolAmount)
320320 (((sbtRewardActions ++ sbtStakePoolActions) ++ additionalRewardsPoolActions) ++ [IntegerEntry(sbtStakePoolTotalClaimedKey, (sbtStakePoolTotalClaimed + sbtStakePoolAmount)), ScriptTransfer(poolAddress, poolClaimed, wxAssetId)])
321321 }
322322 }
323323 else throw("Strict value is not equal to itself.")
324324 }
325325 else throw("Strict value is not equal to itself.")
326326 }
327327
328328

github/deemru/w8io/169f3d6 
64.43 ms