tx · HEQiLGTf1dhgxCqdktd982YwvXjNLQWVu114VGtQ7pxD 3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4: -0.01700000 Waves 2023.09.20 13:42 [2763599] smart account 3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4 > SELF 0.00000000 Waves
{ "type": 13, "id": "HEQiLGTf1dhgxCqdktd982YwvXjNLQWVu114VGtQ7pxD", "fee": 1700000, "feeAssetId": null, "timestamp": 1695206574510, "version": 2, "chainId": 84, "sender": "3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4", "senderPublicKey": "DU1U4j8FqHUMRr9WgfF3yo67ULEFkjp7dtMWMpjBK1ar", "proofs": [ "4azX4Qrq36HHUdQ18cBMspvpdR4iAzjYYTYzAR69mUwxAMZmapEPC1UZHAWzBkacmAiPz2E2py7egW9FRrx8mFCd", "2cowGCw1tYQBjoEGUi2ZBbWhZRLJZ6c1U9Z5jPjnRDLtUQ4GVLRf5gJ5DfbcqezcEF6nMTyVvayPiqEzxU6aRnv1" ], "script": "base64:BgI0CAISABIDCgEIEgMKAQgSBwoFCAgICAESABIDCgEBEgASABIDCgEIEgUKAwgICBIAEgASACMABlNDQUxFOACAwtcvAA1QRVJDRU5UX1NDQUxFAJBOAAlTRVBBUkFUT1ICAl9fAAlrSW50ZXJlc3QCCGludGVyZXN0AA1rVXNlckludGVyZXN0Ag1fdXNlckludGVyZXN0AA5rVXNlckF2YWlsYWJsZQITX3VzZXJBdmFpbGFibGVDbGFpbQAQa1VzZXJUb2tlblN0YWtlZAIQX3VzZXJUb2tlblN0YWtlZAARa1RvdGFsVG9rZW5TdGFrZWQCEHRvdGFsVG9rZW5TdGFrZWQADGtORlRJbnRlcmVzdAILTkZUSW50ZXJlc3QAEGtORlRVc2VySW50ZXJlc3QCEF9ORlRVc2VySW50ZXJlc3QAFmtORlRVc2VyQXZhaWxhYmxlQ2xhaW0CFl9ORlRVc2VyQXZhaWxhYmxlQ2xhaW0AD2tORlRUb3RhbFN0Y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AGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAgQHJG1hdGNoMAUCdHgDCQABAgUHJG1hdGNoMAIXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EA2ludgUHJG1hdGNoMAQGaXNTZWxmCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5BAppc1JpZ2h0RmVlAwkAAAIIBQNpbnYDZmVlAKD3NgkAAAIIBQNpbnYKZmVlQXNzZXRJZAUEdW5pdAcECmlzSW5pdENhbGwJAAACCAUDaW52CGZ1bmN0aW9uAgRpbml0BAxpc25vUGF5bWVudHMJAAACCQCQAwEIBQNpbnYIcGF5bWVudHMAAAMDAwMFCmlzUmlnaHRGZWUFCmlzSW5pdENhbGwHBQZpc1NlbGYHBQxpc25vUGF5bWVudHMHBgUTbXVsdGlTaWduZWRCeUFkbWlucwUTbXVsdGlTaWduZWRCeUFkbWluc8O7Tc8=", "height": 2763599, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B6XsqtpfhnLBRPBPkyqoX2gZYPs1Tas714q4N4KJTMPH Next: BPbGKRJCsMb33aWkhW6arytEBw6MyfygwetTKwCJ2ccu Diff:
Old | New | Differences | |
---|---|---|---|
354 | 354 | let aZ = if ((X == 0)) | |
355 | 355 | then $Tuple2(0, aH) | |
356 | 356 | else { | |
357 | - | let ba = fraction(aH, | |
357 | + | let ba = fraction(aH, min([Y, (X * 10)]), 100) | |
358 | 358 | $Tuple2(ba, (aH - ba)) | |
359 | 359 | } | |
360 | 360 | let bb = aZ._1 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 100000000 | |
5 | 5 | ||
6 | 6 | let b = 10000 | |
7 | 7 | ||
8 | 8 | let c = "__" | |
9 | 9 | ||
10 | 10 | let d = "interest" | |
11 | 11 | ||
12 | 12 | let e = "_userInterest" | |
13 | 13 | ||
14 | 14 | let f = "_userAvailableClaim" | |
15 | 15 | ||
16 | 16 | let g = "_userTokenStaked" | |
17 | 17 | ||
18 | 18 | let h = "totalTokenStaked" | |
19 | 19 | ||
20 | 20 | let i = "NFTInterest" | |
21 | 21 | ||
22 | 22 | let j = "_NFTUserInterest" | |
23 | 23 | ||
24 | 24 | let k = "_NFTUserAvailableClaim" | |
25 | 25 | ||
26 | 26 | let l = "NFTTotalStaked" | |
27 | 27 | ||
28 | 28 | let m = "_userNFTStaked" | |
29 | 29 | ||
30 | 30 | let n = "_userNFTStakedId" | |
31 | 31 | ||
32 | 32 | let o = "_NFTCreated" | |
33 | 33 | ||
34 | 34 | let p = "_lastAirdrop" | |
35 | 35 | ||
36 | 36 | let q = "tokenId" | |
37 | 37 | ||
38 | 38 | let r = "percentForNFT" | |
39 | 39 | ||
40 | 40 | let s = "nftCreatedList" | |
41 | 41 | ||
42 | 42 | let t = "active" | |
43 | 43 | ||
44 | 44 | let u = "admin_pub_1" | |
45 | 45 | ||
46 | 46 | let v = "admin_pub_2" | |
47 | 47 | ||
48 | 48 | let w = "admin_pub_3" | |
49 | 49 | ||
50 | 50 | let x = fromBase58String(valueOrErrorMessage(getString(this, u), "Can't get admin1PK")) | |
51 | 51 | ||
52 | 52 | let y = fromBase58String(valueOrErrorMessage(getString(this, v), "Can't get admin2PK")) | |
53 | 53 | ||
54 | 54 | let z = fromBase58String(valueOrErrorMessage(getString(this, w), "Can't get operatorPK")) | |
55 | 55 | ||
56 | 56 | let A = valueOrErrorMessage(getString(this, q), "Can't get staking token") | |
57 | 57 | ||
58 | 58 | func B (C) = if (containsElement([x, y, z], C.callerPublicKey)) | |
59 | 59 | then unit | |
60 | 60 | else throw("Only admin can call this function") | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func D (C) = if ((C.caller == this)) | |
64 | 64 | then unit | |
65 | 65 | else throw("Only contract itself can call this function") | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func E () = if (valueOrElse(getBoolean(this, t), true)) | |
69 | 69 | then unit | |
70 | 70 | else throw("DApp is inactive at this moment") | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func F (G) = { | |
74 | 74 | let H = G | |
75 | 75 | if ($isInstanceOf(H, "ByteVector")) | |
76 | 76 | then { | |
77 | 77 | let I = H | |
78 | 78 | toBase58String(I) | |
79 | 79 | } | |
80 | 80 | else if ($isInstanceOf(H, "Unit")) | |
81 | 81 | then { | |
82 | 82 | let J = H | |
83 | 83 | "WAVES" | |
84 | 84 | } | |
85 | 85 | else throw("Not Asset id") | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func K (L) = { | |
90 | 90 | let M = valueOrElse(getInteger(this, h), 0) | |
91 | 91 | let N = valueOrElse(getInteger(this, d), 0) | |
92 | 92 | let O = valueOrElse(getInteger(this, (L + f)), 0) | |
93 | 93 | let P = valueOrElse(getInteger(this, (L + e)), N) | |
94 | 94 | let Q = valueOrElse(getInteger(this, (L + g)), 0) | |
95 | 95 | let R = fraction(Q, (N - P), a) | |
96 | 96 | $Tuple4(N, (R + O), Q, M) | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func S (L) = { | |
101 | 101 | let T = valueOrElse(getInteger(this, l), 0) | |
102 | 102 | let N = valueOrElse(getInteger(this, i), 0) | |
103 | 103 | let O = valueOrElse(getInteger(this, (L + k)), 0) | |
104 | 104 | let P = valueOrElse(getInteger(this, (L + j)), N) | |
105 | 105 | let U = valueOrElse(getInteger(this, (L + m)), 0) | |
106 | 106 | let R = (U * (N - P)) | |
107 | 107 | $Tuple4(N, (R + O), U, T) | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func V () = { | |
112 | 112 | let W = valueOrElse(getInteger(this, p), 0) | |
113 | 113 | let M = valueOrElse(getInteger(this, h), 0) | |
114 | 114 | let X = valueOrElse(getInteger(this, l), 0) | |
115 | 115 | let Y = getIntegerValue(this, r) | |
116 | 116 | let Z = if ((X == 0)) | |
117 | 117 | then W | |
118 | 118 | else fraction(W, (100 - min([Y, (X * 10)])), 100) | |
119 | 119 | (fraction(Z, b, M) * 52) | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func aa (L) = { | |
124 | 124 | func ab (ac,ad) = if (isDefined(getBoolean(this, (((L + "_") + ad) + n)))) | |
125 | 125 | then (ac :+ ad) | |
126 | 126 | else ac | |
127 | 127 | ||
128 | 128 | let ae = valueOrElse(getString(this, s), "") | |
129 | 129 | let af = if ((ae == "")) | |
130 | 130 | then nil | |
131 | 131 | else split(ae, c) | |
132 | 132 | let ag = { | |
133 | 133 | let ah = af | |
134 | 134 | let ai = size(ah) | |
135 | 135 | let aj = nil | |
136 | 136 | func ak (al,am) = if ((am >= ai)) | |
137 | 137 | then al | |
138 | 138 | else ab(al, ah[am]) | |
139 | 139 | ||
140 | 140 | func an (al,am) = if ((am >= ai)) | |
141 | 141 | then al | |
142 | 142 | else throw("List size exceeds 5") | |
143 | 143 | ||
144 | 144 | an(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5) | |
145 | 145 | } | |
146 | 146 | makeString(ag, ",") | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | @Callable(C) | |
151 | 151 | func getStatsREADONLY () = { | |
152 | 152 | let ao = V() | |
153 | 153 | let M = valueOrElse(getInteger(this, h), 0) | |
154 | 154 | let T = valueOrElse(getInteger(this, l), 0) | |
155 | 155 | $Tuple2(nil, makeString(["%d%d%d", toString(ao), toString(M), toString(T)], c)) | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | ||
160 | 160 | @Callable(C) | |
161 | 161 | func getStatsByUserREADONLY (L) = { | |
162 | 162 | let ap = valueOrErrorMessage(addressFromString(L), "Wrong user address") | |
163 | 163 | let aq = K(L) | |
164 | 164 | let ar = aq._1 | |
165 | 165 | let as = aq._2 | |
166 | 166 | let Q = aq._3 | |
167 | 167 | let M = aq._4 | |
168 | 168 | let at = S(L) | |
169 | 169 | let au = at._1 | |
170 | 170 | let av = at._2 | |
171 | 171 | let aw = at._3 | |
172 | 172 | let X = at._4 | |
173 | 173 | let ax = assetBalance(ap, fromBase58String(A)) | |
174 | 174 | let ag = aa(L) | |
175 | 175 | $Tuple2(nil, makeString(["%d%d%d%d%s", toString(ax), toString(Q), toString(as), toString(av), ag], c)) | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | ||
180 | 180 | @Callable(C) | |
181 | 181 | func getUserStatsREADONLY (L) = { | |
182 | 182 | let ao = V() | |
183 | 183 | let ay = if ((L == "")) | |
184 | 184 | then $Tuple4(0, 0, 0, 0) | |
185 | 185 | else { | |
186 | 186 | let ap = valueOrErrorMessage(addressFromString(L), "Wrong user address") | |
187 | 187 | let az = K(L) | |
188 | 188 | let ar = az._1 | |
189 | 189 | let as = az._2 | |
190 | 190 | let Q = az._3 | |
191 | 191 | let M = az._4 | |
192 | 192 | let aA = S(L) | |
193 | 193 | let au = aA._1 | |
194 | 194 | let av = aA._2 | |
195 | 195 | let aw = aA._3 | |
196 | 196 | let X = aA._4 | |
197 | 197 | let aB = assetBalance(ap, fromBase58String(A)) | |
198 | 198 | $Tuple4(aB, Q, as, av) | |
199 | 199 | } | |
200 | 200 | let ax = ay._1 | |
201 | 201 | let Q = ay._2 | |
202 | 202 | let as = ay._3 | |
203 | 203 | let av = ay._4 | |
204 | 204 | $Tuple2(nil, makeString(["%d%d%d%d%d", toString(ao), toString(ax), toString(Q), toString(as), toString(av)], c)) | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | ||
209 | 209 | @Callable(C) | |
210 | 210 | func init (A,aC,aD,aE,aF) = valueOrElse(D(C), if (isDefined(getString(this, q))) | |
211 | 211 | then throw("DApp already inited") | |
212 | 212 | else if (!(isDefined(assetInfo(fromBase58String(A))))) | |
213 | 213 | then throw("asset id is not correct asset id") | |
214 | 214 | else if ((size(fromBase58String(aC)) != 32)) | |
215 | 215 | then throw("group1Admin1PubKey is not correct") | |
216 | 216 | else if ((size(fromBase58String(aD)) != 32)) | |
217 | 217 | then throw("group1Admin1PubKey is not correct") | |
218 | 218 | else if ((size(fromBase58String(aE)) != 32)) | |
219 | 219 | then throw("group1Admin1PubKey is not correct") | |
220 | 220 | else [StringEntry(q, A), StringEntry(u, aC), StringEntry(v, aD), StringEntry(w, aE), IntegerEntry(r, aF)]) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | ||
224 | 224 | @Callable(C) | |
225 | 225 | func stake () = valueOrElse(E(), if ((size(C.payments) != 1)) | |
226 | 226 | then throw("One payment expected") | |
227 | 227 | else { | |
228 | 228 | let aG = $Tuple2(C.payments[0].amount, C.payments[0].assetId) | |
229 | 229 | let aH = aG._1 | |
230 | 230 | let aI = aG._2 | |
231 | 231 | if ((aI != fromBase58String(A))) | |
232 | 232 | then throw("Wrong payment asset") | |
233 | 233 | else { | |
234 | 234 | let L = toString(C.caller) | |
235 | 235 | let aJ = K(L) | |
236 | 236 | let ar = aJ._1 | |
237 | 237 | let as = aJ._2 | |
238 | 238 | let Q = aJ._3 | |
239 | 239 | let M = aJ._4 | |
240 | 240 | [IntegerEntry((L + e), ar), IntegerEntry((L + f), as), IntegerEntry((L + g), (Q + aH)), IntegerEntry(h, (M + aH))] | |
241 | 241 | } | |
242 | 242 | }) | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | ||
246 | 246 | @Callable(C) | |
247 | 247 | func unstake (aK) = valueOrElse(E(), { | |
248 | 248 | let L = toString(C.caller) | |
249 | 249 | if ((0 >= aK)) | |
250 | 250 | then throw("Amount must be greater than 0") | |
251 | 251 | else { | |
252 | 252 | let aL = K(L) | |
253 | 253 | let ar = aL._1 | |
254 | 254 | let as = aL._2 | |
255 | 255 | let Q = aL._3 | |
256 | 256 | let M = aL._4 | |
257 | 257 | if ((aK > Q)) | |
258 | 258 | then throw("You can't unstake more than staked") | |
259 | 259 | else [IntegerEntry((L + e), ar), IntegerEntry((L + f), as), IntegerEntry((L + g), (Q - aK)), IntegerEntry(h, (M - aK)), ScriptTransfer(C.caller, aK, fromBase58String(A))] | |
260 | 260 | } | |
261 | 261 | }) | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | ||
265 | 265 | @Callable(C) | |
266 | 266 | func claim () = valueOrElse(E(), { | |
267 | 267 | let L = toString(C.caller) | |
268 | 268 | let aM = K(L) | |
269 | 269 | let ar = aM._1 | |
270 | 270 | let as = aM._2 | |
271 | 271 | let Q = aM._3 | |
272 | 272 | let M = aM._4 | |
273 | 273 | let aN = S(L) | |
274 | 274 | let au = aN._1 | |
275 | 275 | let av = aN._2 | |
276 | 276 | let aw = aN._3 | |
277 | 277 | let X = aN._4 | |
278 | 278 | if (((as + av) == 0)) | |
279 | 279 | then throw("Nothing to claim") | |
280 | 280 | else [IntegerEntry((L + e), ar), IntegerEntry((L + f), 0), IntegerEntry((L + j), au), IntegerEntry((L + k), 0), ScriptTransfer(C.caller, (as + av), fromBase58String(A))] | |
281 | 281 | }) | |
282 | 282 | ||
283 | 283 | ||
284 | 284 | ||
285 | 285 | @Callable(C) | |
286 | 286 | func stakeNFT () = valueOrElse(E(), if ((size(C.payments) != 1)) | |
287 | 287 | then throw("One payment expected") | |
288 | 288 | else { | |
289 | 289 | let aO = $Tuple2(C.payments[0].amount, C.payments[0].assetId) | |
290 | 290 | let aH = aO._1 | |
291 | 291 | let aI = aO._2 | |
292 | 292 | let aP = F(aI) | |
293 | 293 | if (!(isDefined(getString(this, (aP + o))))) | |
294 | 294 | then throw("Wrong nft asset") | |
295 | 295 | else { | |
296 | 296 | let L = toString(C.caller) | |
297 | 297 | let aQ = S(L) | |
298 | 298 | let ar = aQ._1 | |
299 | 299 | let as = aQ._2 | |
300 | 300 | let aw = aQ._3 | |
301 | 301 | let X = aQ._4 | |
302 | 302 | [IntegerEntry((L + j), ar), IntegerEntry((L + k), as), IntegerEntry((L + m), (aw + 1)), IntegerEntry(l, (X + 1)), BooleanEntry((((L + "_") + aP) + n), true)] | |
303 | 303 | } | |
304 | 304 | }) | |
305 | 305 | ||
306 | 306 | ||
307 | 307 | ||
308 | 308 | @Callable(C) | |
309 | 309 | func unstakeNFT (I) = valueOrElse(E(), { | |
310 | 310 | let L = toString(C.caller) | |
311 | 311 | if (!(isDefined(getBoolean(this, (((L + "_") + I) + n))))) | |
312 | 312 | then throw("You didn't staked") | |
313 | 313 | else { | |
314 | 314 | let aR = S(L) | |
315 | 315 | let ar = aR._1 | |
316 | 316 | let as = aR._2 | |
317 | 317 | let aw = aR._3 | |
318 | 318 | let X = aR._4 | |
319 | 319 | [IntegerEntry((L + j), ar), IntegerEntry((L + k), as), IntegerEntry((L + m), (aw - 1)), IntegerEntry(l, (X - 1)), DeleteEntry((((L + "_") + I) + n)), ScriptTransfer(C.caller, 1, fromBase58String(I))] | |
320 | 320 | } | |
321 | 321 | }) | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | ||
325 | 325 | @Callable(C) | |
326 | 326 | func issueNFT (ap,aS,aT) = valueOrElse(E(), valueOrElse(B(C), { | |
327 | 327 | let aU = valueOrErrorMessage(addressFromString(ap), "Wrong user address") | |
328 | 328 | let aV = Issue(aS, aT, 1, 0, false) | |
329 | 329 | let ad = calculateAssetId(aV) | |
330 | 330 | let af = valueOrElse(getString(this, s), "") | |
331 | 331 | let aW = (af + (if ((af != "")) | |
332 | 332 | then (c + toBase58String(ad)) | |
333 | 333 | else ("" + toBase58String(ad)))) | |
334 | 334 | [aV, StringEntry((toBase58String(ad) + o), ap), StringEntry(s, aW), ScriptTransfer(aU, 1, ad)] | |
335 | 335 | })) | |
336 | 336 | ||
337 | 337 | ||
338 | 338 | ||
339 | 339 | @Callable(C) | |
340 | 340 | func airdrop () = valueOrElse(E(), valueOrElse(B(C), if ((size(C.payments) != 1)) | |
341 | 341 | then throw("One payment expected") | |
342 | 342 | else { | |
343 | 343 | let aX = $Tuple2(C.payments[0].amount, C.payments[0].assetId) | |
344 | 344 | let aH = aX._1 | |
345 | 345 | let aI = aX._2 | |
346 | 346 | if ((aI != fromBase58String(A))) | |
347 | 347 | then throw("Wrong payment asset") | |
348 | 348 | else { | |
349 | 349 | let Y = getIntegerValue(this, r) | |
350 | 350 | let M = valueOrElse(getInteger(this, h), 0) | |
351 | 351 | let X = valueOrElse(getInteger(this, l), 0) | |
352 | 352 | let N = valueOrElse(getInteger(this, d), 0) | |
353 | 353 | let aY = valueOrElse(getInteger(this, i), 0) | |
354 | 354 | let aZ = if ((X == 0)) | |
355 | 355 | then $Tuple2(0, aH) | |
356 | 356 | else { | |
357 | - | let ba = fraction(aH, | |
357 | + | let ba = fraction(aH, min([Y, (X * 10)]), 100) | |
358 | 358 | $Tuple2(ba, (aH - ba)) | |
359 | 359 | } | |
360 | 360 | let bb = aZ._1 | |
361 | 361 | let bc = aZ._2 | |
362 | 362 | let bd = if ((M > 0)) | |
363 | 363 | then (N + fraction(bc, a, M)) | |
364 | 364 | else N | |
365 | 365 | let be = if ((X > 0)) | |
366 | 366 | then (aY + (bb / X)) | |
367 | 367 | else aY | |
368 | 368 | [IntegerEntry(d, bd), IntegerEntry(i, be), IntegerEntry(p, aH)] | |
369 | 369 | } | |
370 | 370 | })) | |
371 | 371 | ||
372 | 372 | ||
373 | 373 | ||
374 | 374 | @Callable(C) | |
375 | 375 | func activate () = valueOrElse(B(C), if (valueOrElse(getBoolean(this, t), true)) | |
376 | 376 | then throw("dApp already active") | |
377 | 377 | else [BooleanEntry(t, true)]) | |
378 | 378 | ||
379 | 379 | ||
380 | 380 | ||
381 | 381 | @Callable(C) | |
382 | 382 | func shutdown () = valueOrElse(B(C), if (!(valueOrElse(getBoolean(this, t), true))) | |
383 | 383 | then throw("dApp already shutdown") | |
384 | 384 | else [BooleanEntry(t, false)]) | |
385 | 385 | ||
386 | 386 | ||
387 | 387 | @Verifier(bf) | |
388 | 388 | func bg () = { | |
389 | 389 | let bh = { | |
390 | 390 | let bi = if (sigVerify(bf.bodyBytes, bf.proofs[0], x)) | |
391 | 391 | then 1 | |
392 | 392 | else 0 | |
393 | 393 | let bj = if (sigVerify(bf.bodyBytes, bf.proofs[1], y)) | |
394 | 394 | then 1 | |
395 | 395 | else 0 | |
396 | 396 | let bk = if (sigVerify(bf.bodyBytes, bf.proofs[2], z)) | |
397 | 397 | then 1 | |
398 | 398 | else 0 | |
399 | 399 | (((bi + bj) + bk) >= 2) | |
400 | 400 | } | |
401 | 401 | let H = bf | |
402 | 402 | if ($isInstanceOf(H, "InvokeScriptTransaction")) | |
403 | 403 | then { | |
404 | 404 | let bl = H | |
405 | 405 | let bm = sigVerify(bf.bodyBytes, bf.proofs[0], bf.senderPublicKey) | |
406 | 406 | let bn = if ((bl.fee == 900000)) | |
407 | 407 | then (bl.feeAssetId == unit) | |
408 | 408 | else false | |
409 | 409 | let bo = (bl.function == "init") | |
410 | 410 | let bp = (size(bl.payments) == 0) | |
411 | 411 | if (if (if (if (bn) | |
412 | 412 | then bo | |
413 | 413 | else false) | |
414 | 414 | then bm | |
415 | 415 | else false) | |
416 | 416 | then bp | |
417 | 417 | else false) | |
418 | 418 | then true | |
419 | 419 | else bh | |
420 | 420 | } | |
421 | 421 | else bh | |
422 | 422 | } | |
423 | 423 |
github/deemru/w8io/169f3d6 45.52 ms ◑