tx · 9mUCrSAnwhkgauXLQrk9oVWBDnA6NVu8yZZzUKDuYThx

3PEVpbeDDkjmKqiMm25MgMZfazR7U1Eivzi:  -0.01500000 Waves

2023.10.08 14:45 [3855450] smart account 3PEVpbeDDkjmKqiMm25MgMZfazR7U1Eivzi > SELF 0.00000000 Waves

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

github/deemru/w8io/fabc49c 
47.09 ms