tx · 2YBijj4qkwwQCU2CJo8u76RT4A68vJ8HxSrh6opMspCr

3Mz3zcbv3p8Vjx6566CjJxMynZFn2KJvc85:  -0.01900000 Waves

2022.06.16 23:53 [2099429] smart account 3Mz3zcbv3p8Vjx6566CjJxMynZFn2KJvc85 > SELF 0.00000000 Waves

{ "type": 13, "id": "2YBijj4qkwwQCU2CJo8u76RT4A68vJ8HxSrh6opMspCr", "fee": 1900000, "feeAssetId": null, "timestamp": 1655412765729, "version": 2, "chainId": 84, "sender": "3Mz3zcbv3p8Vjx6566CjJxMynZFn2KJvc85", "senderPublicKey": "FzsBKmVJC76fKJH1jmXYtwvX3kDyWF97DYPHRo3D5gG4", "proofs": [ "4WvL5AaE6bgVmfNKx6ReNdmbdVs2Ks6jPSwci156MiTdv1EUBz6ZK6dHDZDEzZVG2MG7hzzLDsENz5EqiNz6MKtY" ], "script": "base64:AAIFAAAAAAAAAD4IAhIDCgEIEgMKAQESCAoGCAEEAQEBEgMKAQQSABIAEgASAwoBCBIGCgQICAEBEgMKAQgSAwoBCBIECgIICAAAACEAAAAAC2tleU1BY2NQS2V5AgAAAAltYXN0ZXJfcGsAAAAACHdhcnNQS2V5AgAAAAd3YXJzX3BrAQAAAAZnZXRTdHIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAAAAAAAA5tQWNjUEtleVN0cmluZwkBAAAABmdldFN0cgAAAAEFAAAAC2tleU1BY2NQS2V5AAAAAAhtQWNjUEtleQkAAlkAAAABBQAAAA5tQWNjUEtleVN0cmluZwAAAAAIbUFjY0FkZHIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAACG1BY2NQS2V5AAAAAApmZWVQZXJjZW50CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAhtQWNjQWRkc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b250cmFjdHMEAAAAFGFsbG93ZWRDb250cmFjdHNMaXN0CQAEtQAAAAIFAAAAEGFsbG93ZWRDb250cmFjdHMCAAAAATsEAAAACmRhcHBUb0NhbGwJAAQlAAAAAQkABCQAAAABCAUAAAADaW52AAAABGRBcHAJAQAAAAIhPQAAAAIJAARPAAAAAgUAAAAUYWxsb3dlZENvbnRyYWN0c0xpc3QFAAAACmRhcHBUb0NhbGwFAAAABHVuaXQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAJzcwUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAACG1BY2NQS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAACbXQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAhtQWNjUEtleQeNUpO3", "height": 2099429, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BoYaRZtVhUvqBXPbiGpCmhcpTN7cxsiBujqTWYwsMk53 Next: none Diff:
OldNewDifferences
230230
231231 let nftIds = split(ids, ";")
232232 let foldResult = {
233- let l = nftIds
234- let s = size(l)
235- let acc0 = 0
236- func f0_1 (a,i) = if ((i >= s))
237- then a
238- else claimReward(a, l[i])
233+ let $l = nftIds
234+ let $s = size($l)
235+ let $acc0 = 0
236+ func $f0_1 ($a,$i) = if (($i >= $s))
237+ then $a
238+ else claimReward($a, $l[$i])
239239
240- func f0_2 (a,i) = if ((i >= s))
241- then a
240+ func $f0_2 ($a,$i) = if (($i >= $s))
241+ then $a
242242 else throw("List size exceeds 10")
243243
244- f0_2(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)
244+ $f0_2($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)
245245 }
246246 let claimedReward = match foldResult {
247247 case int: Int =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let keyMAccPKey = "master_pk"
55
66 let warsPKey = "wars_pk"
77
88 func getStr (key) = match getString(this, key) {
99 case b: String =>
1010 b
1111 case _ =>
1212 ""
1313 }
1414
1515
1616 let mAccPKeyString = getStr(keyMAccPKey)
1717
1818 let mAccPKey = fromBase58String(mAccPKeyString)
1919
2020 let mAccAddr = addressFromPublicKey(mAccPKey)
2121
2222 let feePercent = getIntegerValue(mAccAddr, (("f_" + toString(this)) + "_fee"))
2323
2424 let stakingAddress = addressFromStringValue(valueOrErrorMessage(getString(mAccAddr, (("f_" + toString(this)) + "_stake_address")), (("f_" + toString(this)) + "_stake_address not defined")))
2525
2626 let wAccPKey = fromBase58String(valueOrErrorMessage(getString(mAccAddr, warsPKey), (warsPKey + " not defined")))
2727
2828 let kTotalLiquidity = "total_liquidity"
2929
3030 let kInitialized = "INITIALIZED"
3131
3232 let kLiquidityThreshold = "LIQUIDITY_THRESHOLD"
3333
3434 let kTotalFarmingReward = "total_farming_reward"
3535
3636 let kShareAssetId = "SHARE_ASSET_ID"
3737
3838 let kIncubatorDapp = "INCUBATOR_DAPP"
3939
4040 let kBreederDapp = "BREEDER_DAPP"
4141
4242 let kFarmingDapp = "FARMING_DAPP"
4343
4444 let kMarketProxyDapp = "MARKETPLACE_PROXY_DAPP"
4545
4646 let kAuctionDapp = "AUCTION_DAPP"
4747
4848 let kLocked = "LOCKED"
4949
5050 let kCeoCollectedFee = "ceo_collected_fee"
5151
5252 let kCeoCollectedFeeOverall = "ceo_fee_overall"
5353
5454 let kLockedInvestments = "locked_investments"
5555
5656 let keyTotalCompound = "total_compound"
5757
5858 let keyGlobalStaked = "global_staked"
5959
6060 func getInt (key) = match getInteger(this, key) {
6161 case b: Int =>
6262 b
6363 case _ =>
6464 0
6565 }
6666
6767
6868 func getBool (key) = match getBoolean(this, key) {
6969 case b: Boolean =>
7070 b
7171 case _ =>
7272 unit
7373 }
7474
7575
7676 func getStrA (a,k) = match getString(a, k) {
7777 case b: String =>
7878 b
7979 case _ =>
8080 ""
8181 }
8282
8383
8484 func getIntA (address,key) = match getInteger(address, key) {
8585 case b: Int =>
8686 b
8787 case _ =>
8888 0
8989 }
9090
9191
9292 func getMarketProxyAddr () = getStrA(mAccAddr, kMarketProxyDapp)
9393
9494
9595 func getEggId () = fromBase58String(getStringValue(mAccAddr, "EGG_ASSET_ID"))
9696
9797
9898 func getShareAssetId () = fromBase58String(getStr(kShareAssetId))
9999
100100
101101 func asInt (value) = match value {
102102 case int: Int =>
103103 int
104104 case _ =>
105105 throw("wrong type, expected: Int")
106106 }
107107
108108
109109 @Callable(i)
110110 func initMasterKey (publicKey) = if ((i.caller != this))
111111 then throw("You cannot do this action")
112112 else if ((mAccPKeyString != ""))
113113 then throw("Master public key already set, you can't override!")
114114 else [StringEntry(keyMAccPKey, publicKey)]
115115
116116
117117
118118 @Callable(i)
119119 func calculateCompoundShareAndIssue (amount) = if ((i.caller != this))
120120 then throw("You cannot do this action")
121121 else if ((getBool(kLockedInvestments) == true))
122122 then $Tuple2(nil, 0)
123123 else {
124124 let shareAssetId = getShareAssetId()
125125 let totalCompound = getIntA(stakingAddress, keyTotalCompound)
126126 let totalStaked = getIntA(stakingAddress, keyGlobalStaked)
127127 let totalLocked = (totalStaked + totalCompound)
128128 let amountForCompound = fraction(amount, totalCompound, totalLocked)
129129 $Tuple2([Reissue(shareAssetId, amountForCompound, true)], amountForCompound)
130130 }
131131
132132
133133
134134 @Callable(i)
135135 func initCollectiveFarm (name,minimumThreshold,migration,totalFarmingReward,totalLiquidity,totalFarmToken) = if ((mAccPKeyString == ""))
136136 then throw("First initiatie a master public key!")
137137 else if ((i.callerPublicKey != mAccPKey))
138138 then throw("_1")
139139 else if ((getBool(kInitialized) != unit))
140140 then throw("_2")
141141 else if (if ((migration == false))
142142 then if ((i.payments[0].amount != 10000000))
143143 then true
144144 else (i.payments[0].assetId != getEggId())
145145 else false)
146146 then throw("_20")
147147 else {
148148 let shareTokens = if (migration)
149149 then totalFarmToken
150150 else 10000000
151151 let shareToken = Issue(name, (("Team token for the " + name) + " collective farm"), shareTokens, 8, true)
152152 let totLiquidity = if (migration)
153153 then totalLiquidity
154154 else 10000000
155155 let totFarmingReward = if (migration)
156156 then [IntegerEntry(kTotalFarmingReward, totalFarmingReward)]
157157 else nil
158158 ([StringEntry(kShareAssetId, toBase58String(calculateAssetId(shareToken))), BooleanEntry(kInitialized, true), IntegerEntry(kTotalLiquidity, totLiquidity), shareToken, ScriptTransfer(i.caller, shareTokens, calculateAssetId(shareToken)), BooleanEntry(kLocked, false), IntegerEntry(kLiquidityThreshold, minimumThreshold)] ++ totFarmingReward)
159159 }
160160
161161
162162
163163 @Callable(i)
164164 func setLock (s) = if ((i.callerPublicKey != mAccPKey))
165165 then throw("_21")
166166 else [BooleanEntry(kLocked, s)]
167167
168168
169169
170170 @Callable(i)
171171 func lockInvestments () = if ((i.caller != this))
172172 then throw("You cannot lock this contract")
173173 else [BooleanEntry(kLockedInvestments, true)]
174174
175175
176176
177177 @Callable(i)
178178 func unlockInvestments () = if ((i.caller != this))
179179 then throw("You cannot lock this contract")
180180 else [BooleanEntry(kLockedInvestments, false)]
181181
182182
183183
184184 @Callable(i)
185185 func provideLiquidity () = {
186186 let eggAssetId = getEggId()
187187 if (if (if ((i.callerPublicKey != wAccPKey))
188188 then (i.callerPublicKey != mAccPKey)
189189 else false)
190190 then (getBool(kLockedInvestments) == true)
191191 else false)
192192 then throw("Contract is locked for investments by it's CEO. Please invest in another collective farm.")
193193 else if ((getBool(kLocked) == true))
194194 then throw("_22")
195195 else if ((i.payments[0].assetId != eggAssetId))
196196 then throw("_4")
197197 else if ((1000000 > i.payments[0].amount))
198198 then throw("Min amount to invest is 0.01 EGG")
199199 else {
200200 let totalLiquidity = getInt(kTotalLiquidity)
201201 let shareTokensToGive = i.payments[0].amount
202202 let shareTokensId = fromBase58String(getStr(kShareAssetId))
203203 let reissue = Reissue(getShareAssetId(), shareTokensToGive, true)
204204 let kParticipated = (("account_" + toString(i.caller)) + "_participated")
205205 let alreadyParticipated = getBool(kParticipated)
206206 $Tuple2([reissue, ScriptTransfer(i.caller, shareTokensToGive, shareTokensId), IntegerEntry(kTotalLiquidity, (totalLiquidity + value(i.payments[0].amount))), BooleanEntry(kParticipated, true)], shareTokensToGive)
207207 }
208208 }
209209
210210
211211
212212 @Callable(i)
213213 func claimFarmingRewardProxy (ids) = if ((i.callerPublicKey != mAccPKey))
214214 then throw("_23")
215215 else {
216216 let eggAssetId = getEggId()
217217 let shareAssetId = getShareAssetId()
218218 let farmingDapp = addressFromStringValue(getStrA(mAccAddr, kFarmingDapp))
219219 func claimReward (accum,nftId) = {
220220 let invRes = invoke(farmingDapp, "claimReward", [nftId], nil)
221221 if ((invRes == invRes))
222222 then match invRes {
223223 case int: Int =>
224224 (accum + int)
225225 case _ =>
226226 throw("_5")
227227 }
228228 else throw("Strict value is not equal to itself.")
229229 }
230230
231231 let nftIds = split(ids, ";")
232232 let foldResult = {
233- let l = nftIds
234- let s = size(l)
235- let acc0 = 0
236- func f0_1 (a,i) = if ((i >= s))
237- then a
238- else claimReward(a, l[i])
233+ let $l = nftIds
234+ let $s = size($l)
235+ let $acc0 = 0
236+ func $f0_1 ($a,$i) = if (($i >= $s))
237+ then $a
238+ else claimReward($a, $l[$i])
239239
240- func f0_2 (a,i) = if ((i >= s))
241- then a
240+ func $f0_2 ($a,$i) = if (($i >= $s))
241+ then $a
242242 else throw("List size exceeds 10")
243243
244- f0_2(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)
244+ $f0_2($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)
245245 }
246246 let claimedReward = match foldResult {
247247 case int: Int =>
248248 int
249249 case _ =>
250250 throw("_6")
251251 }
252252 let totalFarmingReward = getInt(kTotalFarmingReward)
253253 let farmCeoFeeSize = fraction(claimedReward, feePercent, 100)
254254 let currentCeoFee = getInt(kCeoCollectedFee)
255255 let ceoFeeOverall = getInt(kCeoCollectedFeeOverall)
256256 let amountToPay = (claimedReward - farmCeoFeeSize)
257257 let amountCompound = asInt(invoke(this, "calculateCompoundShareAndIssue", [amountToPay], nil))
258258 if ((amountCompound == amountCompound))
259259 then {
260260 let topUp = invoke(stakingAddress, "topUpReward", nil, [AttachedPayment(eggAssetId, (amountToPay - amountCompound)), AttachedPayment(shareAssetId, amountCompound)])
261261 if ((topUp == topUp))
262262 then [IntegerEntry(kTotalFarmingReward, (totalFarmingReward + amountToPay)), IntegerEntry(kCeoCollectedFee, (currentCeoFee + farmCeoFeeSize)), IntegerEntry(kCeoCollectedFeeOverall, (ceoFeeOverall + farmCeoFeeSize))]
263263 else throw("Strict value is not equal to itself.")
264264 }
265265 else throw("Strict value is not equal to itself.")
266266 }
267267
268268
269269
270270 @Callable(i)
271271 func claimCeoFee (address1,address2,address1Share,address2Share) = if ((0 > address1Share))
272272 then throw("Share 1 can't be negative")
273273 else if ((0 > address2Share))
274274 then throw("Share 2 can't be negative")
275275 else if (((address1Share + address2Share) != 100))
276276 then throw("Sum of shares should be 100")
277277 else if ((getBool(kLocked) == true))
278278 then throw("_22")
279279 else if ((i.caller == this))
280280 then {
281281 let currentCeoCollectedFee = getInt(kCeoCollectedFee)
282282 let address1Reward = if ((address2 == ""))
283283 then currentCeoCollectedFee
284284 else fraction(currentCeoCollectedFee, address1Share, 100)
285285 let address2Reward = if ((address2 == ""))
286286 then 0
287287 else fraction(currentCeoCollectedFee, address2Share, 100)
288288 let scriptTransferAddress2 = if ((address2 == ""))
289289 then nil
290290 else [ScriptTransfer(addressFromStringValue(address2), address2Reward, getEggId())]
291291 (scriptTransferAddress2 ++ [ScriptTransfer(addressFromStringValue(address1), address1Reward, getEggId()), IntegerEntry(kCeoCollectedFee, 0)])
292292 }
293293 else throw("Only manager can call the contract")
294294
295295
296296
297297 @Callable(i)
298298 func startLiquidation (auctionId) = throw("_7")
299299
300300
301301
302302 @Callable(i)
303303 func voteForLiquidation (auctionId) = throw("_7")
304304
305305
306306
307307 @Callable(i)
308308 func callUnstakeProxy (function,assetId) = if ((getBool(kLocked) == true))
309309 then throw("Contract is locked now")
310310 else if (if ((function != "unstakeNFT"))
311311 then (function != "unstakeJackpot")
312312 else false)
313313 then throw("Bad function name")
314314 else if ((i.caller != this))
315315 then throw("Can be called only by the account")
316316 else {
317317 let eggAssetId = getEggId()
318318 let shareAssetId = getShareAssetId()
319319 let farmingDappAddress = addressFromStringValue(getStrA(mAccAddr, "FARMING_DAPP"))
320320 let unstakedReward = invoke(farmingDappAddress, function, [assetId], nil)
321321 if ((unstakedReward == unstakedReward))
322322 then {
323323 let reward = match unstakedReward {
324324 case int: Int =>
325325 int
326326 case _ =>
327327 throw("Error during unstaking")
328328 }
329329 let currentCeoFee = getInt(kCeoCollectedFee)
330330 let ceoFeeOverall = getInt(kCeoCollectedFeeOverall)
331331 let farmCeoFeeSize = fraction(reward, feePercent, 100)
332332 let amountToPay = (reward - farmCeoFeeSize)
333333 let amountCompontCall = invoke(this, "calculateCompoundShareAndIssue", [amountToPay], nil)
334334 if ((amountCompontCall == amountCompontCall))
335335 then {
336336 let amountCompound = asInt(invoke(this, "calculateCompoundShareAndIssue", [amountToPay], nil))
337337 if ((amountCompound == amountCompound))
338338 then {
339339 let topUp = invoke(stakingAddress, "topUpReward", nil, [AttachedPayment(eggAssetId, (amountToPay - amountCompound)), AttachedPayment(shareAssetId, amountCompound)])
340340 if ((topUp == topUp))
341341 then [IntegerEntry(kCeoCollectedFee, (currentCeoFee + farmCeoFeeSize)), IntegerEntry(kCeoCollectedFeeOverall, (ceoFeeOverall + farmCeoFeeSize))]
342342 else throw("Strict value is not equal to itself.")
343343 }
344344 else throw("Strict value is not equal to itself.")
345345 }
346346 else throw("Strict value is not equal to itself.")
347347 }
348348 else throw("Strict value is not equal to itself.")
349349 }
350350
351351
352352 @Verifier(tx)
353353 func verify () = {
354354 let checkStarted = (getInt(kTotalLiquidity) >= getInt(kLiquidityThreshold))
355355 match tx {
356356 case inv: InvokeScriptTransaction =>
357357 let acceptedCallsStaking = ["stakeFarmTokens", "claimReward", "withdrawFarmTokens"]
358358 let acceptedCallsThis = ["callUnstakeProxy", "claimCeoFee", "lockInvestments", "unlockInvestments"]
359359 if (if ((inv.function == "unstakeNFT"))
360360 then true
361361 else (inv.function == "unstakeJackpot"))
362362 then throw("You cannot call these functions directly")
363363 else if (if (if ((addressFromRecipient(inv.dApp) == this))
364364 then (inv.function == "initMasterKey")
365365 else false)
366366 then (mAccPKeyString == "")
367367 else false)
368368 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
369369 else if ((sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) == false))
370370 then throw("_100")
371371 else if ((checkStarted == false))
372372 then throw("_14")
373373 else if ((getBool(kLocked) == true))
374374 then throw("_22")
375375 else if (if ((inv.fee > 900000))
376376 then true
377377 else (inv.feeAssetId != unit))
378378 then throw("_15")
379379 else if ((size(inv.payments) > 2))
380380 then throw("_17")
381381 else if (if ((addressFromRecipient(inv.dApp) == this))
382382 then containsElement(acceptedCallsThis, inv.function)
383383 else false)
384384 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
385385 else if (if ((addressFromRecipient(inv.dApp) == addressFromStringValue(getMarketProxyAddr())))
386386 then (inv.function == "callMarketplaceProxy")
387387 else false)
388388 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
389389 else if (if ((addressFromRecipient(inv.dApp) == stakingAddress))
390390 then containsElement(acceptedCallsStaking, inv.function)
391391 else false)
392392 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
393393 else {
394394 let allowedContracts = getStrA(mAccAddr, "allowed_contracts")
395395 let allowedContractsList = split(allowedContracts, ";")
396396 let dappToCall = toString(addressFromRecipient(inv.dApp))
397397 (indexOf(allowedContractsList, dappToCall) != unit)
398398 }
399399 case ss: SetScriptTransaction =>
400400 sigVerify(tx.bodyBytes, tx.proofs[0], mAccPKey)
401401 case mt: MassTransferTransaction =>
402402 sigVerify(tx.bodyBytes, tx.proofs[0], mAccPKey)
403403 case _ =>
404404 false
405405 }
406406 }
407407

github/deemru/w8io/169f3d6 
60.62 ms