tx · BoYaRZtVhUvqBXPbiGpCmhcpTN7cxsiBujqTWYwsMk53 3Mz3zcbv3p8Vjx6566CjJxMynZFn2KJvc85: -0.01500000 Waves 2022.06.16 20:02 [2099196] smart account 3Mz3zcbv3p8Vjx6566CjJxMynZFn2KJvc85 > SELF 0.00000000 Waves
{ "type": 13, "id": "BoYaRZtVhUvqBXPbiGpCmhcpTN7cxsiBujqTWYwsMk53", "fee": 1500000, "feeAssetId": null, "timestamp": 1655398941096, "version": 2, "chainId": 84, "sender": "3Mz3zcbv3p8Vjx6566CjJxMynZFn2KJvc85", "senderPublicKey": "FzsBKmVJC76fKJH1jmXYtwvX3kDyWF97DYPHRo3D5gG4", "proofs": [ "51Dc3SGxPs19haAbz5WA9awXVg5cMfeLYtEaxxJMEimHvdYQuGQmTFrx2fk3A9cbwBbiAkQu1ewRQgnapHVZAtLc" ], "script": "base64:AAIFAAAAAAAAAD4IAhIDCgEIEgMKAQESCAoGCAEEAQEBEgMKAQQSABIAEgASAwoBCBIGCgQICAEBEgMKAQgSAwoBCBIECgIICAAAACEAAAAAC2tleU1BY2NQS2V5AgAAAAltYXN0ZXJfcGsAAAAACHdhcnNQS2V5AgAAAAd3YXJzX3BrAQAAAAZnZXRTdHIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAAAAAAAA5tQWNjUEtleVN0cmluZwkBAAAABmdldFN0cgAAAAEFAAAAC2tleU1BY2NQS2V5AAAAAAhtQWNjUEtleQkAAlkAAAABBQAAAA5tQWNjUEtleVN0cmluZwAAAAAIbUFjY0FkZHIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAACG1BY2NQS2V5AAAAAApmZWVQZXJjZW50CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAhtQWNjQWRkcg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UAAAAQYWxsb3dlZENvbnRyYWN0cwIAAAABOwQAAAAKZGFwcFRvQ2FsbAkABCUAAAABCQAEJAAAAAEIBQAAAANpbnYAAAAEZEFwcAkBAAAAAiE9AAAAAgkABE8AAAACBQAAABRhbGxvd2VkQ29udHJhY3RzTGlzdAUAAAAKZGFwcFRvQ2FsbAUAAAAEdW5pdAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAnNzBQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAIbUFjY1BLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF01hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAJtdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAACG1BY2NQS2V5B3TuCVc=", "height": 2099196, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 2YBijj4qkwwQCU2CJo8u76RT4A68vJ8HxSrh6opMspCr Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let keyMAccPKey = "master_pk" | |
5 | + | ||
6 | + | let warsPKey = "wars_pk" | |
7 | + | ||
8 | + | func getStr (key) = match getString(this, key) { | |
9 | + | case b: String => | |
10 | + | b | |
11 | + | case _ => | |
12 | + | "" | |
13 | + | } | |
14 | + | ||
15 | + | ||
16 | + | let mAccPKeyString = getStr(keyMAccPKey) | |
17 | + | ||
18 | + | let mAccPKey = fromBase58String(mAccPKeyString) | |
19 | + | ||
20 | + | let mAccAddr = addressFromPublicKey(mAccPKey) | |
21 | + | ||
22 | + | let feePercent = getIntegerValue(mAccAddr, (("f_" + toString(this)) + "_fee")) | |
23 | + | ||
24 | + | let stakingAddress = addressFromStringValue(valueOrErrorMessage(getString(mAccAddr, (("f_" + toString(this)) + "_stake_address")), (("f_" + toString(this)) + "_stake_address not defined"))) | |
25 | + | ||
26 | + | let wAccPKey = fromBase58String(valueOrErrorMessage(getString(mAccAddr, warsPKey), (warsPKey + " not defined"))) | |
27 | + | ||
28 | + | let kTotalLiquidity = "total_liquidity" | |
29 | + | ||
30 | + | let kInitialized = "INITIALIZED" | |
31 | + | ||
32 | + | let kLiquidityThreshold = "LIQUIDITY_THRESHOLD" | |
33 | + | ||
34 | + | let kTotalFarmingReward = "total_farming_reward" | |
35 | + | ||
36 | + | let kShareAssetId = "SHARE_ASSET_ID" | |
37 | + | ||
38 | + | let kIncubatorDapp = "INCUBATOR_DAPP" | |
39 | + | ||
40 | + | let kBreederDapp = "BREEDER_DAPP" | |
41 | + | ||
42 | + | let kFarmingDapp = "FARMING_DAPP" | |
43 | + | ||
44 | + | let kMarketProxyDapp = "MARKETPLACE_PROXY_DAPP" | |
45 | + | ||
46 | + | let kAuctionDapp = "AUCTION_DAPP" | |
47 | + | ||
48 | + | let kLocked = "LOCKED" | |
49 | + | ||
50 | + | let kCeoCollectedFee = "ceo_collected_fee" | |
51 | + | ||
52 | + | let kCeoCollectedFeeOverall = "ceo_fee_overall" | |
53 | + | ||
54 | + | let kLockedInvestments = "locked_investments" | |
55 | + | ||
56 | + | let keyTotalCompound = "total_compound" | |
57 | + | ||
58 | + | let keyGlobalStaked = "global_staked" | |
59 | + | ||
60 | + | func getInt (key) = match getInteger(this, key) { | |
61 | + | case b: Int => | |
62 | + | b | |
63 | + | case _ => | |
64 | + | 0 | |
65 | + | } | |
66 | + | ||
67 | + | ||
68 | + | func getBool (key) = match getBoolean(this, key) { | |
69 | + | case b: Boolean => | |
70 | + | b | |
71 | + | case _ => | |
72 | + | unit | |
73 | + | } | |
74 | + | ||
75 | + | ||
76 | + | func getStrA (a,k) = match getString(a, k) { | |
77 | + | case b: String => | |
78 | + | b | |
79 | + | case _ => | |
80 | + | "" | |
81 | + | } | |
82 | + | ||
83 | + | ||
84 | + | func getIntA (address,key) = match getInteger(address, key) { | |
85 | + | case b: Int => | |
86 | + | b | |
87 | + | case _ => | |
88 | + | 0 | |
89 | + | } | |
90 | + | ||
91 | + | ||
92 | + | func getMarketProxyAddr () = getStrA(mAccAddr, kMarketProxyDapp) | |
93 | + | ||
94 | + | ||
95 | + | func getEggId () = fromBase58String(getStringValue(mAccAddr, "EGG_ASSET_ID")) | |
96 | + | ||
97 | + | ||
98 | + | func getShareAssetId () = fromBase58String(getStr(kShareAssetId)) | |
99 | + | ||
100 | + | ||
101 | + | func asInt (value) = match value { | |
102 | + | case int: Int => | |
103 | + | int | |
104 | + | case _ => | |
105 | + | throw("wrong type, expected: Int") | |
106 | + | } | |
107 | + | ||
108 | + | ||
109 | + | @Callable(i) | |
110 | + | func initMasterKey (publicKey) = if ((i.caller != this)) | |
111 | + | then throw("You cannot do this action") | |
112 | + | else if ((mAccPKeyString != "")) | |
113 | + | then throw("Master public key already set, you can't override!") | |
114 | + | else [StringEntry(keyMAccPKey, publicKey)] | |
115 | + | ||
116 | + | ||
117 | + | ||
118 | + | @Callable(i) | |
119 | + | func calculateCompoundShareAndIssue (amount) = if ((i.caller != this)) | |
120 | + | then throw("You cannot do this action") | |
121 | + | else if ((getBool(kLockedInvestments) == true)) | |
122 | + | then $Tuple2(nil, 0) | |
123 | + | else { | |
124 | + | let shareAssetId = getShareAssetId() | |
125 | + | let totalCompound = getIntA(stakingAddress, keyTotalCompound) | |
126 | + | let totalStaked = getIntA(stakingAddress, keyGlobalStaked) | |
127 | + | let totalLocked = (totalStaked + totalCompound) | |
128 | + | let amountForCompound = fraction(amount, totalCompound, totalLocked) | |
129 | + | $Tuple2([Reissue(shareAssetId, amountForCompound, true)], amountForCompound) | |
130 | + | } | |
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | @Callable(i) | |
135 | + | func initCollectiveFarm (name,minimumThreshold,migration,totalFarmingReward,totalLiquidity,totalFarmToken) = if ((mAccPKeyString == "")) | |
136 | + | then throw("First initiatie a master public key!") | |
137 | + | else if ((i.callerPublicKey != mAccPKey)) | |
138 | + | then throw("_1") | |
139 | + | else if ((getBool(kInitialized) != unit)) | |
140 | + | then throw("_2") | |
141 | + | else if (if ((migration == false)) | |
142 | + | then if ((i.payments[0].amount != 10000000)) | |
143 | + | then true | |
144 | + | else (i.payments[0].assetId != getEggId()) | |
145 | + | else false) | |
146 | + | then throw("_20") | |
147 | + | else { | |
148 | + | let shareTokens = if (migration) | |
149 | + | then totalFarmToken | |
150 | + | else 10000000 | |
151 | + | let shareToken = Issue(name, (("Team token for the " + name) + " collective farm"), shareTokens, 8, true) | |
152 | + | let totLiquidity = if (migration) | |
153 | + | then totalLiquidity | |
154 | + | else 10000000 | |
155 | + | let totFarmingReward = if (migration) | |
156 | + | then [IntegerEntry(kTotalFarmingReward, totalFarmingReward)] | |
157 | + | else nil | |
158 | + | ([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) | |
159 | + | } | |
160 | + | ||
161 | + | ||
162 | + | ||
163 | + | @Callable(i) | |
164 | + | func setLock (s) = if ((i.callerPublicKey != mAccPKey)) | |
165 | + | then throw("_21") | |
166 | + | else [BooleanEntry(kLocked, s)] | |
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | @Callable(i) | |
171 | + | func lockInvestments () = if ((i.caller != this)) | |
172 | + | then throw("You cannot lock this contract") | |
173 | + | else [BooleanEntry(kLockedInvestments, true)] | |
174 | + | ||
175 | + | ||
176 | + | ||
177 | + | @Callable(i) | |
178 | + | func unlockInvestments () = if ((i.caller != this)) | |
179 | + | then throw("You cannot lock this contract") | |
180 | + | else [BooleanEntry(kLockedInvestments, false)] | |
181 | + | ||
182 | + | ||
183 | + | ||
184 | + | @Callable(i) | |
185 | + | func provideLiquidity () = { | |
186 | + | let eggAssetId = getEggId() | |
187 | + | if (if (if ((i.callerPublicKey != wAccPKey)) | |
188 | + | then (i.callerPublicKey != mAccPKey) | |
189 | + | else false) | |
190 | + | then (getBool(kLockedInvestments) == true) | |
191 | + | else false) | |
192 | + | then throw("Contract is locked for investments by it's CEO. Please invest in another collective farm.") | |
193 | + | else if ((getBool(kLocked) == true)) | |
194 | + | then throw("_22") | |
195 | + | else if ((i.payments[0].assetId != eggAssetId)) | |
196 | + | then throw("_4") | |
197 | + | else if ((1000000 > i.payments[0].amount)) | |
198 | + | then throw("Min amount to invest is 0.01 EGG") | |
199 | + | else { | |
200 | + | let totalLiquidity = getInt(kTotalLiquidity) | |
201 | + | let shareTokensToGive = i.payments[0].amount | |
202 | + | let shareTokensId = fromBase58String(getStr(kShareAssetId)) | |
203 | + | let reissue = Reissue(getShareAssetId(), shareTokensToGive, true) | |
204 | + | let kParticipated = (("account_" + toString(i.caller)) + "_participated") | |
205 | + | let alreadyParticipated = getBool(kParticipated) | |
206 | + | $Tuple2([reissue, ScriptTransfer(i.caller, shareTokensToGive, shareTokensId), IntegerEntry(kTotalLiquidity, (totalLiquidity + value(i.payments[0].amount))), BooleanEntry(kParticipated, true)], shareTokensToGive) | |
207 | + | } | |
208 | + | } | |
209 | + | ||
210 | + | ||
211 | + | ||
212 | + | @Callable(i) | |
213 | + | func claimFarmingRewardProxy (ids) = if ((i.callerPublicKey != mAccPKey)) | |
214 | + | then throw("_23") | |
215 | + | else { | |
216 | + | let eggAssetId = getEggId() | |
217 | + | let shareAssetId = getShareAssetId() | |
218 | + | let farmingDapp = addressFromStringValue(getStrA(mAccAddr, kFarmingDapp)) | |
219 | + | func claimReward (accum,nftId) = { | |
220 | + | let invRes = invoke(farmingDapp, "claimReward", [nftId], nil) | |
221 | + | if ((invRes == invRes)) | |
222 | + | then match invRes { | |
223 | + | case int: Int => | |
224 | + | (accum + int) | |
225 | + | case _ => | |
226 | + | throw("_5") | |
227 | + | } | |
228 | + | else throw("Strict value is not equal to itself.") | |
229 | + | } | |
230 | + | ||
231 | + | let nftIds = split(ids, ";") | |
232 | + | 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]) | |
239 | + | ||
240 | + | func f0_2 (a,i) = if ((i >= s)) | |
241 | + | then a | |
242 | + | else throw("List size exceeds 10") | |
243 | + | ||
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) | |
245 | + | } | |
246 | + | let claimedReward = match foldResult { | |
247 | + | case int: Int => | |
248 | + | int | |
249 | + | case _ => | |
250 | + | throw("_6") | |
251 | + | } | |
252 | + | let totalFarmingReward = getInt(kTotalFarmingReward) | |
253 | + | let farmCeoFeeSize = fraction(claimedReward, feePercent, 100) | |
254 | + | let currentCeoFee = getInt(kCeoCollectedFee) | |
255 | + | let ceoFeeOverall = getInt(kCeoCollectedFeeOverall) | |
256 | + | let amountToPay = (claimedReward - farmCeoFeeSize) | |
257 | + | let amountCompound = asInt(invoke(this, "calculateCompoundShareAndIssue", [amountToPay], nil)) | |
258 | + | if ((amountCompound == amountCompound)) | |
259 | + | then { | |
260 | + | let topUp = invoke(stakingAddress, "topUpReward", nil, [AttachedPayment(eggAssetId, (amountToPay - amountCompound)), AttachedPayment(shareAssetId, amountCompound)]) | |
261 | + | if ((topUp == topUp)) | |
262 | + | then [IntegerEntry(kTotalFarmingReward, (totalFarmingReward + amountToPay)), IntegerEntry(kCeoCollectedFee, (currentCeoFee + farmCeoFeeSize)), IntegerEntry(kCeoCollectedFeeOverall, (ceoFeeOverall + farmCeoFeeSize))] | |
263 | + | else throw("Strict value is not equal to itself.") | |
264 | + | } | |
265 | + | else throw("Strict value is not equal to itself.") | |
266 | + | } | |
267 | + | ||
268 | + | ||
269 | + | ||
270 | + | @Callable(i) | |
271 | + | func claimCeoFee (address1,address2,address1Share,address2Share) = if ((0 > address1Share)) | |
272 | + | then throw("Share 1 can't be negative") | |
273 | + | else if ((0 > address2Share)) | |
274 | + | then throw("Share 2 can't be negative") | |
275 | + | else if (((address1Share + address2Share) != 100)) | |
276 | + | then throw("Sum of shares should be 100") | |
277 | + | else if ((getBool(kLocked) == true)) | |
278 | + | then throw("_22") | |
279 | + | else if ((i.caller == this)) | |
280 | + | then { | |
281 | + | let currentCeoCollectedFee = getInt(kCeoCollectedFee) | |
282 | + | let address1Reward = if ((address2 == "")) | |
283 | + | then currentCeoCollectedFee | |
284 | + | else fraction(currentCeoCollectedFee, address1Share, 100) | |
285 | + | let address2Reward = if ((address2 == "")) | |
286 | + | then 0 | |
287 | + | else fraction(currentCeoCollectedFee, address2Share, 100) | |
288 | + | let scriptTransferAddress2 = if ((address2 == "")) | |
289 | + | then nil | |
290 | + | else [ScriptTransfer(addressFromStringValue(address2), address2Reward, getEggId())] | |
291 | + | (scriptTransferAddress2 ++ [ScriptTransfer(addressFromStringValue(address1), address1Reward, getEggId()), IntegerEntry(kCeoCollectedFee, 0)]) | |
292 | + | } | |
293 | + | else throw("Only manager can call the contract") | |
294 | + | ||
295 | + | ||
296 | + | ||
297 | + | @Callable(i) | |
298 | + | func startLiquidation (auctionId) = throw("_7") | |
299 | + | ||
300 | + | ||
301 | + | ||
302 | + | @Callable(i) | |
303 | + | func voteForLiquidation (auctionId) = throw("_7") | |
304 | + | ||
305 | + | ||
306 | + | ||
307 | + | @Callable(i) | |
308 | + | func callUnstakeProxy (function,assetId) = if ((getBool(kLocked) == true)) | |
309 | + | then throw("Contract is locked now") | |
310 | + | else if (if ((function != "unstakeNFT")) | |
311 | + | then (function != "unstakeJackpot") | |
312 | + | else false) | |
313 | + | then throw("Bad function name") | |
314 | + | else if ((i.caller != this)) | |
315 | + | then throw("Can be called only by the account") | |
316 | + | else { | |
317 | + | let eggAssetId = getEggId() | |
318 | + | let shareAssetId = getShareAssetId() | |
319 | + | let farmingDappAddress = addressFromStringValue(getStrA(mAccAddr, "FARMING_DAPP")) | |
320 | + | let unstakedReward = invoke(farmingDappAddress, function, [assetId], nil) | |
321 | + | if ((unstakedReward == unstakedReward)) | |
322 | + | then { | |
323 | + | let reward = match unstakedReward { | |
324 | + | case int: Int => | |
325 | + | int | |
326 | + | case _ => | |
327 | + | throw("Error during unstaking") | |
328 | + | } | |
329 | + | let currentCeoFee = getInt(kCeoCollectedFee) | |
330 | + | let ceoFeeOverall = getInt(kCeoCollectedFeeOverall) | |
331 | + | let farmCeoFeeSize = fraction(reward, feePercent, 100) | |
332 | + | let amountToPay = (reward - farmCeoFeeSize) | |
333 | + | let amountCompontCall = invoke(this, "calculateCompoundShareAndIssue", [amountToPay], nil) | |
334 | + | if ((amountCompontCall == amountCompontCall)) | |
335 | + | then { | |
336 | + | let amountCompound = asInt(invoke(this, "calculateCompoundShareAndIssue", [amountToPay], nil)) | |
337 | + | if ((amountCompound == amountCompound)) | |
338 | + | then { | |
339 | + | let topUp = invoke(stakingAddress, "topUpReward", nil, [AttachedPayment(eggAssetId, (amountToPay - amountCompound)), AttachedPayment(shareAssetId, amountCompound)]) | |
340 | + | if ((topUp == topUp)) | |
341 | + | then [IntegerEntry(kCeoCollectedFee, (currentCeoFee + farmCeoFeeSize)), IntegerEntry(kCeoCollectedFeeOverall, (ceoFeeOverall + farmCeoFeeSize))] | |
342 | + | else throw("Strict value is not equal to itself.") | |
343 | + | } | |
344 | + | else throw("Strict value is not equal to itself.") | |
345 | + | } | |
346 | + | else throw("Strict value is not equal to itself.") | |
347 | + | } | |
348 | + | else throw("Strict value is not equal to itself.") | |
349 | + | } | |
350 | + | ||
351 | + | ||
352 | + | @Verifier(tx) | |
353 | + | func verify () = { | |
354 | + | let checkStarted = (getInt(kTotalLiquidity) >= getInt(kLiquidityThreshold)) | |
355 | + | match tx { | |
356 | + | case inv: InvokeScriptTransaction => | |
357 | + | let acceptedCallsStaking = ["stakeFarmTokens", "claimReward", "withdrawFarmTokens"] | |
358 | + | let acceptedCallsThis = ["callUnstakeProxy", "claimCeoFee", "lockInvestments", "unlockInvestments"] | |
359 | + | if (if ((inv.function == "unstakeNFT")) | |
360 | + | then true | |
361 | + | else (inv.function == "unstakeJackpot")) | |
362 | + | then throw("You cannot call these functions directly") | |
363 | + | else if (if (if ((addressFromRecipient(inv.dApp) == this)) | |
364 | + | then (inv.function == "initMasterKey") | |
365 | + | else false) | |
366 | + | then (mAccPKeyString == "") | |
367 | + | else false) | |
368 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
369 | + | else if ((sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) == false)) | |
370 | + | then throw("_100") | |
371 | + | else if ((checkStarted == false)) | |
372 | + | then throw("_14") | |
373 | + | else if ((getBool(kLocked) == true)) | |
374 | + | then throw("_22") | |
375 | + | else if (if ((inv.fee > 900000)) | |
376 | + | then true | |
377 | + | else (inv.feeAssetId != unit)) | |
378 | + | then throw("_15") | |
379 | + | else if ((size(inv.payments) > 2)) | |
380 | + | then throw("_17") | |
381 | + | else if (if ((addressFromRecipient(inv.dApp) == this)) | |
382 | + | then containsElement(acceptedCallsThis, inv.function) | |
383 | + | else false) | |
384 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
385 | + | else if (if ((addressFromRecipient(inv.dApp) == addressFromStringValue(getMarketProxyAddr()))) | |
386 | + | then (inv.function == "callMarketplaceProxy") | |
387 | + | else false) | |
388 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
389 | + | else if (if ((addressFromRecipient(inv.dApp) == stakingAddress)) | |
390 | + | then containsElement(acceptedCallsStaking, inv.function) | |
391 | + | else false) | |
392 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
393 | + | else { | |
394 | + | let allowedContracts = getStrA(mAccAddr, "allowed_contracts") | |
395 | + | let allowedContractsList = split(allowedContracts, ";") | |
396 | + | let dappToCall = toString(addressFromRecipient(inv.dApp)) | |
397 | + | (indexOf(allowedContractsList, dappToCall) != unit) | |
398 | + | } | |
399 | + | case ss: SetScriptTransaction => | |
400 | + | sigVerify(tx.bodyBytes, tx.proofs[0], mAccPKey) | |
401 | + | case mt: MassTransferTransaction => | |
402 | + | sigVerify(tx.bodyBytes, tx.proofs[0], mAccPKey) | |
403 | + | case _ => | |
404 | + | false | |
405 | + | } | |
406 | + | } | |
407 | + |
github/deemru/w8io/169f3d6 39.35 ms ◑