tx · 9ynn9a6nrDZxqBcB8PAnGVy6kBPjSM53QMm7Ph2vPhF 3MtDn875i1WRCdCymHMcfCk94YT9ccJJouP: -0.01500000 Waves 2024.10.03 20:05 [3310942] smart account 3MtDn875i1WRCdCymHMcfCk94YT9ccJJouP > SELF 0.00000000 Waves
{ "type": 13, "id": "9ynn9a6nrDZxqBcB8PAnGVy6kBPjSM53QMm7Ph2vPhF", "fee": 1500000, "feeAssetId": null, "timestamp": 1727975100126, "version": 2, "chainId": 84, "sender": "3MtDn875i1WRCdCymHMcfCk94YT9ccJJouP", "senderPublicKey": "HiVVS4DDgAz7hk7nPYxpMJFMeDwEspXQSDVs5npYHvDa", "proofs": [ "iHyYNa3srbkpRi8bS5ZcwuYF278oD2F83GNDWWSRvigRfMTJcmZ3PE8EacEXPtBNF7Ee96KyNRnTw42r28EdkBc" ], "script": "base64:AAIFAAAAAAAAAB8IAhIECgIICBIAEgMKAQgSBAoCCAgSAwoBCBIDCgEIAAAAIQEAAAAHZ2V0Qm9vbAAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgcBAAAACWlzVGVzdEVudgAAAAAJAQAAAAdnZXRCb29sAAAAAQIAAAAHVEVTVEVOVgEAAAAIa2V5T3duZXIAAAABAAAAC2R1Y2tIb3VzZUlkCQABLAAAAAIFAAAAC2R1Y2tIb3VzZUlkAgAAAAZfb3duZXIBAAAADGtleUR1Y2tIb3VzZQAAAAEAAAAGZHVja0lkCQABLAAAAAIFAAAABmR1Y2tJZAIAAAALX2R1Y2tfaG91c2UBAAAAF29jY3VwaWVkU3BvdHNEdWNrc0hvdXNlAAAAAQAAAAtkdWNrSG91c2VJZAkAASwAAAACBQAAAAtkdWNrSG91c2VJZAIAAAANX2ZpbGxlZF9zcG90cwEAAAANdHJ5R2V0Qm9vbGV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RAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAJdGhpcmRVc2VyAAAAAAAAAAABAAAAAAAAAAAABAAAAA9zaWduYXR1cmVzQ291bnQJAABkAAAAAgkAAGQAAAACBQAAAA9maXJzdFVzZXJTaWduZWQFAAAAEHNlY29uZFVzZXJTaWduZWQFAAAAD3RoaXJkVXNlclNpZ25lZAQAAAAHJG1hdGNoMAUAAAACdHgJAABnAAAAAgUAAAAPc2lnbmF0dXJlc0NvdW50AAAAAAAAAAACm81DwQ==", "height": 3310942, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 13WojSu8gnZPbijG7TT5FLZiNAmzdjaDDBJDz34T9oMi Next: BK6BrLs1rEjEx1jFJPSEE3upcETqjtHsXefBMiZsYCZv Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | func a (b) = (b + "_owner") | |
5 | - | ||
6 | - | ||
7 | - | func c (d) = (d + "_duck_house") | |
8 | - | ||
9 | - | ||
10 | - | func e (b) = (b + "_filled_spots") | |
11 | - | ||
12 | - | ||
13 | - | func f (g) = { | |
14 | - | let h = getBoolean(g) | |
15 | - | if ($isInstanceOf(h, "Boolean")) | |
4 | + | func a (b) = { | |
5 | + | let c = getBoolean(this, b) | |
6 | + | if ($isInstanceOf(c, "Boolean")) | |
16 | 7 | then { | |
17 | - | let | |
18 | - | | |
8 | + | let d = c | |
9 | + | d | |
19 | 10 | } | |
20 | 11 | else false | |
21 | 12 | } | |
22 | 13 | ||
23 | 14 | ||
24 | - | func j (k,g) = { | |
25 | - | let h = getString(k, g) | |
26 | - | if ($isInstanceOf(h, "String")) | |
15 | + | func e () = a("TESTENV") | |
16 | + | ||
17 | + | ||
18 | + | func f (g) = (g + "_owner") | |
19 | + | ||
20 | + | ||
21 | + | func h (i) = (i + "_duck_house") | |
22 | + | ||
23 | + | ||
24 | + | func j (g) = (g + "_filled_spots") | |
25 | + | ||
26 | + | ||
27 | + | func k (b) = { | |
28 | + | let c = getBoolean(b) | |
29 | + | if ($isInstanceOf(c, "Boolean")) | |
27 | 30 | then { | |
28 | - | let l = h | |
29 | - | l | |
31 | + | let d = c | |
32 | + | d | |
33 | + | } | |
34 | + | else false | |
35 | + | } | |
36 | + | ||
37 | + | ||
38 | + | func l (m,b) = { | |
39 | + | let c = getString(m, b) | |
40 | + | if ($isInstanceOf(c, "String")) | |
41 | + | then { | |
42 | + | let n = c | |
43 | + | n | |
30 | 44 | } | |
31 | 45 | else "" | |
32 | 46 | } | |
33 | 47 | ||
34 | 48 | ||
35 | - | func | |
49 | + | func o (b) = l(this, b) | |
36 | 50 | ||
37 | 51 | ||
38 | - | func | |
39 | - | let | |
40 | - | if ($isInstanceOf( | |
52 | + | func p (b) = { | |
53 | + | let c = getInteger(this, b) | |
54 | + | if ($isInstanceOf(c, "Int")) | |
41 | 55 | then { | |
42 | - | let | |
43 | - | | |
56 | + | let d = c | |
57 | + | d | |
44 | 58 | } | |
45 | 59 | else 0 | |
46 | 60 | } | |
47 | 61 | ||
48 | 62 | ||
49 | - | func | |
50 | - | let | |
51 | - | if ($isInstanceOf( | |
63 | + | func q (r) = { | |
64 | + | let c = r | |
65 | + | if ($isInstanceOf(c, "String")) | |
52 | 66 | then { | |
53 | - | let | |
54 | - | | |
67 | + | let s = c | |
68 | + | s | |
55 | 69 | } | |
56 | 70 | else throw("wrong type, expected: String") | |
57 | 71 | } | |
58 | 72 | ||
59 | 73 | ||
60 | - | func | |
61 | - | let | |
62 | - | if ($isInstanceOf( | |
74 | + | func t (r) = { | |
75 | + | let c = r | |
76 | + | if ($isInstanceOf(c, "Int")) | |
63 | 77 | then { | |
64 | - | let | |
65 | - | | |
78 | + | let u = c | |
79 | + | u | |
66 | 80 | } | |
67 | 81 | else throw("wrong type, expected: Int") | |
68 | 82 | } | |
69 | 83 | ||
70 | 84 | ||
71 | - | func | |
85 | + | func v () = "static_oracleAddress" | |
72 | 86 | ||
73 | 87 | ||
74 | - | func | |
88 | + | func w () = "static_itemsAddress" | |
75 | 89 | ||
76 | 90 | ||
77 | - | func | |
91 | + | func x () = "static_extraFee" | |
78 | 92 | ||
79 | 93 | ||
80 | - | func | |
94 | + | func y () = "static_feeAggregator" | |
81 | 95 | ||
82 | 96 | ||
83 | - | func | |
97 | + | func z () = "static_eggAssetId" | |
84 | 98 | ||
85 | 99 | ||
86 | - | func | |
100 | + | func A () = "static_farmingAddressNew" | |
87 | 101 | ||
88 | 102 | ||
89 | - | func | |
103 | + | func B () = "static_maxDucks" | |
90 | 104 | ||
91 | 105 | ||
92 | - | func | |
106 | + | func C () = "stakeNFT" | |
93 | 107 | ||
94 | 108 | ||
95 | - | func | |
109 | + | func D () = "static_without_perch" | |
96 | 110 | ||
97 | 111 | ||
98 | - | func | |
112 | + | func E () = "static_type" | |
99 | 113 | ||
100 | 114 | ||
101 | - | func | |
115 | + | func F () = "static_boost" | |
102 | 116 | ||
103 | 117 | ||
104 | - | func | |
118 | + | func G () = Address(fromBase58String(o(v()))) | |
105 | 119 | ||
106 | 120 | ||
107 | - | func | |
121 | + | func H () = Address(fromBase58String(l(G(), w()))) | |
108 | 122 | ||
109 | 123 | ||
110 | - | func | |
124 | + | func I () = Address(fromBase58String(l(G(), A()))) | |
111 | 125 | ||
112 | 126 | ||
113 | - | func | |
127 | + | func J () = fromBase58String(l(G(), z())) | |
114 | 128 | ||
115 | 129 | ||
116 | - | func | |
130 | + | func K () = Address(fromBase58String(l(G(), y()))) | |
117 | 131 | ||
118 | 132 | ||
119 | - | func | |
133 | + | func L () = p(B()) | |
120 | 134 | ||
121 | 135 | ||
122 | - | func | |
136 | + | func M () = o(E()) | |
123 | 137 | ||
124 | 138 | ||
125 | - | func | |
139 | + | func N () = p(F()) | |
126 | 140 | ||
127 | 141 | ||
128 | - | func | |
142 | + | func O (P) = (takeRight(value(value(assetInfo(P)).name), 1) == "U") | |
129 | 143 | ||
130 | 144 | ||
131 | - | func | |
145 | + | func Q (R) = if (isDefined(R.assetId)) | |
132 | 146 | then throw("WCAP: Please attach waves") | |
133 | 147 | else { | |
134 | - | let | |
135 | - | if (( | |
136 | - | then throw((("WCAP: Please attach exactly " + toString( | |
137 | - | else [ScriptTransfer( | |
148 | + | let S = getIntegerValue(G(), x()) | |
149 | + | if ((R.amount != S)) | |
150 | + | then throw((("WCAP: Please attach exactly " + toString(S)) + " amount of wavelets")) | |
151 | + | else [ScriptTransfer(K(), S, unit)] | |
138 | 152 | } | |
139 | 153 | ||
140 | 154 | ||
141 | - | func | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | if (( | |
155 | + | func T (U,V) = { | |
156 | + | let g = o(h(U)) | |
157 | + | let W = o(f(g)) | |
158 | + | let m = toString(V.caller) | |
159 | + | if ((W != m)) | |
146 | 160 | then throw("Don't try to steal someone duck!") | |
147 | - | else | |
161 | + | else g | |
148 | 162 | } | |
149 | 163 | ||
150 | 164 | ||
151 | - | @Callable( | |
152 | - | func configureOracle ( | |
165 | + | @Callable(V) | |
166 | + | func configureOracle (X,M) = if ((V.caller != this)) | |
153 | 167 | then throw("admin only") | |
154 | 168 | else { | |
155 | - | let | |
156 | - | then [IntegerEntry( | |
157 | - | else if (( | |
158 | - | then [IntegerEntry( | |
159 | - | else if (( | |
160 | - | then [IntegerEntry( | |
169 | + | let Y = if ((M == "ART-BIGHOUSE")) | |
170 | + | then [IntegerEntry(F(), 15), IntegerEntry(B(), 10), BooleanEntry(D(), true)] | |
171 | + | else if ((M == "ART-HOUSE")) | |
172 | + | then [IntegerEntry(F(), 30), IntegerEntry(B(), 4), BooleanEntry(D(), false)] | |
173 | + | else if ((M == "ART-XMAS_STBLE")) | |
174 | + | then [IntegerEntry(F(), 5), IntegerEntry(B(), 6), BooleanEntry(D(), false)] | |
161 | 175 | else throw("Unknown type!") | |
162 | - | ([StringEntry( | |
176 | + | ([StringEntry(v(), X), StringEntry(E(), M)] ++ Y) | |
163 | 177 | } | |
164 | 178 | ||
165 | 179 | ||
166 | 180 | ||
167 | - | @Callable( | |
181 | + | @Callable(V) | |
168 | 182 | func stakeDuckHouse () = { | |
169 | - | let | |
170 | - | let | |
171 | - | let | |
172 | - | let | |
173 | - | if (( | |
183 | + | let W = toString(V.caller) | |
184 | + | let Z = value(V.payments[0]) | |
185 | + | let aa = Q(V.payments[1]) | |
186 | + | let ab = toBase58String(value(Z.assetId)) | |
187 | + | if ((Z.amount != 1)) | |
174 | 188 | then throw("NFT is not attached") | |
175 | 189 | else { | |
176 | - | let | |
177 | - | if (( | |
178 | - | then if (( | |
190 | + | let ac = q(invoke(H(), "checkArtefactDetails", [ab], nil)) | |
191 | + | if ((ac == ac)) | |
192 | + | then if ((ac != M())) | |
179 | 193 | then throw("Wrong artefact") | |
180 | - | else ([StringEntry( | |
194 | + | else ([StringEntry(f(ab), W)] ++ aa) | |
181 | 195 | else throw("Strict value is not equal to itself.") | |
182 | 196 | } | |
183 | 197 | } | |
184 | 198 | ||
185 | 199 | ||
186 | 200 | ||
187 | - | @Callable( | |
188 | - | func unstakeDuckHouse ( | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if (( | |
201 | + | @Callable(V) | |
202 | + | func unstakeDuckHouse (g) = { | |
203 | + | let ad = toString(V.caller) | |
204 | + | let ae = o(f(g)) | |
205 | + | let aa = Q(V.payments[0]) | |
206 | + | if ((ae == "")) | |
193 | 207 | then throw("This duckhouse is not staked!") | |
194 | - | else if (( | |
208 | + | else if ((ae != ad)) | |
195 | 209 | then throw("This duckhouse is not yours!") | |
196 | - | else if (( | |
210 | + | else if ((p(j(g)) != 0)) | |
197 | 211 | then throw("Please first remove your ducks from the duckhouse") | |
198 | - | else ([ScriptTransfer( | |
212 | + | else ([ScriptTransfer(V.caller, 1, fromBase58String(g)), DeleteEntry(f(g))] ++ aa) | |
199 | 213 | } | |
200 | 214 | ||
201 | 215 | ||
202 | 216 | ||
203 | - | @Callable( | |
204 | - | func stakeDuck ( | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | if (( | |
217 | + | @Callable(V) | |
218 | + | func stakeDuck (g,af) = { | |
219 | + | let P = value(value(V.payments[1]).assetId) | |
220 | + | let m = toString(V.caller) | |
221 | + | let ae = o(f(g)) | |
222 | + | if ((ae == "")) | |
209 | 223 | then throw("This duckhouse is not staked!") | |
210 | - | else if (( | |
224 | + | else if ((ae != m)) | |
211 | 225 | then throw("This duckhouse is not yours!") | |
212 | 226 | else { | |
213 | - | let | |
214 | - | if (( | |
227 | + | let ag = p(j(g)) | |
228 | + | if ((ag == L())) | |
215 | 229 | then throw("No space in duck house left!") | |
216 | 230 | else { | |
217 | - | let | |
218 | - | if (( | |
231 | + | let ah = invoke(H(), "manipulateBoost", [N(), toBase58String(P)], nil) | |
232 | + | if ((ah == ah)) | |
219 | 233 | then { | |
220 | - | let | |
221 | - | if (( | |
222 | - | then [IntegerEntry( | |
234 | + | let ai = invoke(I(), C(), [af, true, k(D())], V.payments) | |
235 | + | if ((ai == ai)) | |
236 | + | then [IntegerEntry(j(g), (ag + 1)), StringEntry(h(toBase58String(P)), g)] | |
223 | 237 | else throw("Strict value is not equal to itself.") | |
224 | 238 | } | |
225 | 239 | else throw("Strict value is not equal to itself.") | |
229 | 243 | ||
230 | 244 | ||
231 | 245 | ||
232 | - | @Callable( | |
233 | - | func unstakeDuck ( | |
234 | - | let | |
235 | - | if (( | |
246 | + | @Callable(V) | |
247 | + | func unstakeDuck (U) = { | |
248 | + | let g = T(U, V) | |
249 | + | if ((g == g)) | |
236 | 250 | then { | |
237 | - | let | |
238 | - | if (( | |
251 | + | let aj = t(invoke(I(), "unstakeNFT", [U], V.payments)) | |
252 | + | if ((aj == aj)) | |
239 | 253 | then { | |
240 | - | let | |
241 | - | if (( | |
254 | + | let ag = p(j(g)) | |
255 | + | if ((ag == 0)) | |
242 | 256 | then throw("You aren't staking any ducks!") | |
243 | 257 | else { | |
244 | - | let | |
245 | - | if (( | |
246 | - | then [ScriptTransfer( | |
258 | + | let ak = invoke(H(), "manipulateBoost", [-(N()), U], nil) | |
259 | + | if ((ak == ak)) | |
260 | + | then [ScriptTransfer(V.caller, aj, J()), ScriptTransfer(V.caller, 1, fromBase58String(U)), DeleteEntry(h(U)), IntegerEntry(j(g), (ag - 1))] | |
247 | 261 | else throw("Strict value is not equal to itself.") | |
248 | 262 | } | |
249 | 263 | } | |
254 | 268 | ||
255 | 269 | ||
256 | 270 | ||
257 | - | @Callable( | |
258 | - | func claimDuckRewards ( | |
259 | - | let | |
260 | - | if (( | |
271 | + | @Callable(V) | |
272 | + | func claimDuckRewards (U) = { | |
273 | + | let W = T(U, V) | |
274 | + | if ((W == W)) | |
261 | 275 | then { | |
262 | - | let | |
263 | - | if (( | |
264 | - | then [ScriptTransfer( | |
276 | + | let al = t(invoke(I(), "claimReward", [U], V.payments)) | |
277 | + | if ((al == al)) | |
278 | + | then [ScriptTransfer(V.caller, al, J())] | |
265 | 279 | else throw("Strict value is not equal to itself.") | |
266 | 280 | } | |
267 | 281 | else throw("Strict value is not equal to itself.") | |
268 | 282 | } | |
269 | 283 | ||
270 | 284 | ||
285 | + | @Verifier(am) | |
286 | + | func an () = if (e()) | |
287 | + | then sigVerify(am.bodyBytes, am.proofs[0], am.senderPublicKey) | |
288 | + | else { | |
289 | + | let ao = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
290 | + | let ap = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
291 | + | let aq = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
292 | + | let ar = if (sigVerify(am.bodyBytes, am.proofs[0], ao)) | |
293 | + | then 1 | |
294 | + | else if (sigVerify(am.bodyBytes, am.proofs[1], ao)) | |
295 | + | then 1 | |
296 | + | else if (sigVerify(am.bodyBytes, am.proofs[2], ao)) | |
297 | + | then 1 | |
298 | + | else 0 | |
299 | + | let as = if (sigVerify(am.bodyBytes, am.proofs[0], ap)) | |
300 | + | then 1 | |
301 | + | else if (sigVerify(am.bodyBytes, am.proofs[1], ap)) | |
302 | + | then 1 | |
303 | + | else if (sigVerify(am.bodyBytes, am.proofs[2], ap)) | |
304 | + | then 1 | |
305 | + | else 0 | |
306 | + | let at = if (sigVerify(am.bodyBytes, am.proofs[0], aq)) | |
307 | + | then 1 | |
308 | + | else if (sigVerify(am.bodyBytes, am.proofs[1], aq)) | |
309 | + | then 1 | |
310 | + | else if (sigVerify(am.bodyBytes, am.proofs[2], aq)) | |
311 | + | then 1 | |
312 | + | else 0 | |
313 | + | let au = ((ar + as) + at) | |
314 | + | let c = am | |
315 | + | (au >= 2) | |
316 | + | } | |
317 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | func a (b) = (b + "_owner") | |
5 | - | ||
6 | - | ||
7 | - | func c (d) = (d + "_duck_house") | |
8 | - | ||
9 | - | ||
10 | - | func e (b) = (b + "_filled_spots") | |
11 | - | ||
12 | - | ||
13 | - | func f (g) = { | |
14 | - | let h = getBoolean(g) | |
15 | - | if ($isInstanceOf(h, "Boolean")) | |
4 | + | func a (b) = { | |
5 | + | let c = getBoolean(this, b) | |
6 | + | if ($isInstanceOf(c, "Boolean")) | |
16 | 7 | then { | |
17 | - | let | |
18 | - | | |
8 | + | let d = c | |
9 | + | d | |
19 | 10 | } | |
20 | 11 | else false | |
21 | 12 | } | |
22 | 13 | ||
23 | 14 | ||
24 | - | func j (k,g) = { | |
25 | - | let h = getString(k, g) | |
26 | - | if ($isInstanceOf(h, "String")) | |
15 | + | func e () = a("TESTENV") | |
16 | + | ||
17 | + | ||
18 | + | func f (g) = (g + "_owner") | |
19 | + | ||
20 | + | ||
21 | + | func h (i) = (i + "_duck_house") | |
22 | + | ||
23 | + | ||
24 | + | func j (g) = (g + "_filled_spots") | |
25 | + | ||
26 | + | ||
27 | + | func k (b) = { | |
28 | + | let c = getBoolean(b) | |
29 | + | if ($isInstanceOf(c, "Boolean")) | |
27 | 30 | then { | |
28 | - | let l = h | |
29 | - | l | |
31 | + | let d = c | |
32 | + | d | |
33 | + | } | |
34 | + | else false | |
35 | + | } | |
36 | + | ||
37 | + | ||
38 | + | func l (m,b) = { | |
39 | + | let c = getString(m, b) | |
40 | + | if ($isInstanceOf(c, "String")) | |
41 | + | then { | |
42 | + | let n = c | |
43 | + | n | |
30 | 44 | } | |
31 | 45 | else "" | |
32 | 46 | } | |
33 | 47 | ||
34 | 48 | ||
35 | - | func | |
49 | + | func o (b) = l(this, b) | |
36 | 50 | ||
37 | 51 | ||
38 | - | func | |
39 | - | let | |
40 | - | if ($isInstanceOf( | |
52 | + | func p (b) = { | |
53 | + | let c = getInteger(this, b) | |
54 | + | if ($isInstanceOf(c, "Int")) | |
41 | 55 | then { | |
42 | - | let | |
43 | - | | |
56 | + | let d = c | |
57 | + | d | |
44 | 58 | } | |
45 | 59 | else 0 | |
46 | 60 | } | |
47 | 61 | ||
48 | 62 | ||
49 | - | func | |
50 | - | let | |
51 | - | if ($isInstanceOf( | |
63 | + | func q (r) = { | |
64 | + | let c = r | |
65 | + | if ($isInstanceOf(c, "String")) | |
52 | 66 | then { | |
53 | - | let | |
54 | - | | |
67 | + | let s = c | |
68 | + | s | |
55 | 69 | } | |
56 | 70 | else throw("wrong type, expected: String") | |
57 | 71 | } | |
58 | 72 | ||
59 | 73 | ||
60 | - | func | |
61 | - | let | |
62 | - | if ($isInstanceOf( | |
74 | + | func t (r) = { | |
75 | + | let c = r | |
76 | + | if ($isInstanceOf(c, "Int")) | |
63 | 77 | then { | |
64 | - | let | |
65 | - | | |
78 | + | let u = c | |
79 | + | u | |
66 | 80 | } | |
67 | 81 | else throw("wrong type, expected: Int") | |
68 | 82 | } | |
69 | 83 | ||
70 | 84 | ||
71 | - | func | |
85 | + | func v () = "static_oracleAddress" | |
72 | 86 | ||
73 | 87 | ||
74 | - | func | |
88 | + | func w () = "static_itemsAddress" | |
75 | 89 | ||
76 | 90 | ||
77 | - | func | |
91 | + | func x () = "static_extraFee" | |
78 | 92 | ||
79 | 93 | ||
80 | - | func | |
94 | + | func y () = "static_feeAggregator" | |
81 | 95 | ||
82 | 96 | ||
83 | - | func | |
97 | + | func z () = "static_eggAssetId" | |
84 | 98 | ||
85 | 99 | ||
86 | - | func | |
100 | + | func A () = "static_farmingAddressNew" | |
87 | 101 | ||
88 | 102 | ||
89 | - | func | |
103 | + | func B () = "static_maxDucks" | |
90 | 104 | ||
91 | 105 | ||
92 | - | func | |
106 | + | func C () = "stakeNFT" | |
93 | 107 | ||
94 | 108 | ||
95 | - | func | |
109 | + | func D () = "static_without_perch" | |
96 | 110 | ||
97 | 111 | ||
98 | - | func | |
112 | + | func E () = "static_type" | |
99 | 113 | ||
100 | 114 | ||
101 | - | func | |
115 | + | func F () = "static_boost" | |
102 | 116 | ||
103 | 117 | ||
104 | - | func | |
118 | + | func G () = Address(fromBase58String(o(v()))) | |
105 | 119 | ||
106 | 120 | ||
107 | - | func | |
121 | + | func H () = Address(fromBase58String(l(G(), w()))) | |
108 | 122 | ||
109 | 123 | ||
110 | - | func | |
124 | + | func I () = Address(fromBase58String(l(G(), A()))) | |
111 | 125 | ||
112 | 126 | ||
113 | - | func | |
127 | + | func J () = fromBase58String(l(G(), z())) | |
114 | 128 | ||
115 | 129 | ||
116 | - | func | |
130 | + | func K () = Address(fromBase58String(l(G(), y()))) | |
117 | 131 | ||
118 | 132 | ||
119 | - | func | |
133 | + | func L () = p(B()) | |
120 | 134 | ||
121 | 135 | ||
122 | - | func | |
136 | + | func M () = o(E()) | |
123 | 137 | ||
124 | 138 | ||
125 | - | func | |
139 | + | func N () = p(F()) | |
126 | 140 | ||
127 | 141 | ||
128 | - | func | |
142 | + | func O (P) = (takeRight(value(value(assetInfo(P)).name), 1) == "U") | |
129 | 143 | ||
130 | 144 | ||
131 | - | func | |
145 | + | func Q (R) = if (isDefined(R.assetId)) | |
132 | 146 | then throw("WCAP: Please attach waves") | |
133 | 147 | else { | |
134 | - | let | |
135 | - | if (( | |
136 | - | then throw((("WCAP: Please attach exactly " + toString( | |
137 | - | else [ScriptTransfer( | |
148 | + | let S = getIntegerValue(G(), x()) | |
149 | + | if ((R.amount != S)) | |
150 | + | then throw((("WCAP: Please attach exactly " + toString(S)) + " amount of wavelets")) | |
151 | + | else [ScriptTransfer(K(), S, unit)] | |
138 | 152 | } | |
139 | 153 | ||
140 | 154 | ||
141 | - | func | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | if (( | |
155 | + | func T (U,V) = { | |
156 | + | let g = o(h(U)) | |
157 | + | let W = o(f(g)) | |
158 | + | let m = toString(V.caller) | |
159 | + | if ((W != m)) | |
146 | 160 | then throw("Don't try to steal someone duck!") | |
147 | - | else | |
161 | + | else g | |
148 | 162 | } | |
149 | 163 | ||
150 | 164 | ||
151 | - | @Callable( | |
152 | - | func configureOracle ( | |
165 | + | @Callable(V) | |
166 | + | func configureOracle (X,M) = if ((V.caller != this)) | |
153 | 167 | then throw("admin only") | |
154 | 168 | else { | |
155 | - | let | |
156 | - | then [IntegerEntry( | |
157 | - | else if (( | |
158 | - | then [IntegerEntry( | |
159 | - | else if (( | |
160 | - | then [IntegerEntry( | |
169 | + | let Y = if ((M == "ART-BIGHOUSE")) | |
170 | + | then [IntegerEntry(F(), 15), IntegerEntry(B(), 10), BooleanEntry(D(), true)] | |
171 | + | else if ((M == "ART-HOUSE")) | |
172 | + | then [IntegerEntry(F(), 30), IntegerEntry(B(), 4), BooleanEntry(D(), false)] | |
173 | + | else if ((M == "ART-XMAS_STBLE")) | |
174 | + | then [IntegerEntry(F(), 5), IntegerEntry(B(), 6), BooleanEntry(D(), false)] | |
161 | 175 | else throw("Unknown type!") | |
162 | - | ([StringEntry( | |
176 | + | ([StringEntry(v(), X), StringEntry(E(), M)] ++ Y) | |
163 | 177 | } | |
164 | 178 | ||
165 | 179 | ||
166 | 180 | ||
167 | - | @Callable( | |
181 | + | @Callable(V) | |
168 | 182 | func stakeDuckHouse () = { | |
169 | - | let | |
170 | - | let | |
171 | - | let | |
172 | - | let | |
173 | - | if (( | |
183 | + | let W = toString(V.caller) | |
184 | + | let Z = value(V.payments[0]) | |
185 | + | let aa = Q(V.payments[1]) | |
186 | + | let ab = toBase58String(value(Z.assetId)) | |
187 | + | if ((Z.amount != 1)) | |
174 | 188 | then throw("NFT is not attached") | |
175 | 189 | else { | |
176 | - | let | |
177 | - | if (( | |
178 | - | then if (( | |
190 | + | let ac = q(invoke(H(), "checkArtefactDetails", [ab], nil)) | |
191 | + | if ((ac == ac)) | |
192 | + | then if ((ac != M())) | |
179 | 193 | then throw("Wrong artefact") | |
180 | - | else ([StringEntry( | |
194 | + | else ([StringEntry(f(ab), W)] ++ aa) | |
181 | 195 | else throw("Strict value is not equal to itself.") | |
182 | 196 | } | |
183 | 197 | } | |
184 | 198 | ||
185 | 199 | ||
186 | 200 | ||
187 | - | @Callable( | |
188 | - | func unstakeDuckHouse ( | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if (( | |
201 | + | @Callable(V) | |
202 | + | func unstakeDuckHouse (g) = { | |
203 | + | let ad = toString(V.caller) | |
204 | + | let ae = o(f(g)) | |
205 | + | let aa = Q(V.payments[0]) | |
206 | + | if ((ae == "")) | |
193 | 207 | then throw("This duckhouse is not staked!") | |
194 | - | else if (( | |
208 | + | else if ((ae != ad)) | |
195 | 209 | then throw("This duckhouse is not yours!") | |
196 | - | else if (( | |
210 | + | else if ((p(j(g)) != 0)) | |
197 | 211 | then throw("Please first remove your ducks from the duckhouse") | |
198 | - | else ([ScriptTransfer( | |
212 | + | else ([ScriptTransfer(V.caller, 1, fromBase58String(g)), DeleteEntry(f(g))] ++ aa) | |
199 | 213 | } | |
200 | 214 | ||
201 | 215 | ||
202 | 216 | ||
203 | - | @Callable( | |
204 | - | func stakeDuck ( | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | if (( | |
217 | + | @Callable(V) | |
218 | + | func stakeDuck (g,af) = { | |
219 | + | let P = value(value(V.payments[1]).assetId) | |
220 | + | let m = toString(V.caller) | |
221 | + | let ae = o(f(g)) | |
222 | + | if ((ae == "")) | |
209 | 223 | then throw("This duckhouse is not staked!") | |
210 | - | else if (( | |
224 | + | else if ((ae != m)) | |
211 | 225 | then throw("This duckhouse is not yours!") | |
212 | 226 | else { | |
213 | - | let | |
214 | - | if (( | |
227 | + | let ag = p(j(g)) | |
228 | + | if ((ag == L())) | |
215 | 229 | then throw("No space in duck house left!") | |
216 | 230 | else { | |
217 | - | let | |
218 | - | if (( | |
231 | + | let ah = invoke(H(), "manipulateBoost", [N(), toBase58String(P)], nil) | |
232 | + | if ((ah == ah)) | |
219 | 233 | then { | |
220 | - | let | |
221 | - | if (( | |
222 | - | then [IntegerEntry( | |
234 | + | let ai = invoke(I(), C(), [af, true, k(D())], V.payments) | |
235 | + | if ((ai == ai)) | |
236 | + | then [IntegerEntry(j(g), (ag + 1)), StringEntry(h(toBase58String(P)), g)] | |
223 | 237 | else throw("Strict value is not equal to itself.") | |
224 | 238 | } | |
225 | 239 | else throw("Strict value is not equal to itself.") | |
226 | 240 | } | |
227 | 241 | } | |
228 | 242 | } | |
229 | 243 | ||
230 | 244 | ||
231 | 245 | ||
232 | - | @Callable( | |
233 | - | func unstakeDuck ( | |
234 | - | let | |
235 | - | if (( | |
246 | + | @Callable(V) | |
247 | + | func unstakeDuck (U) = { | |
248 | + | let g = T(U, V) | |
249 | + | if ((g == g)) | |
236 | 250 | then { | |
237 | - | let | |
238 | - | if (( | |
251 | + | let aj = t(invoke(I(), "unstakeNFT", [U], V.payments)) | |
252 | + | if ((aj == aj)) | |
239 | 253 | then { | |
240 | - | let | |
241 | - | if (( | |
254 | + | let ag = p(j(g)) | |
255 | + | if ((ag == 0)) | |
242 | 256 | then throw("You aren't staking any ducks!") | |
243 | 257 | else { | |
244 | - | let | |
245 | - | if (( | |
246 | - | then [ScriptTransfer( | |
258 | + | let ak = invoke(H(), "manipulateBoost", [-(N()), U], nil) | |
259 | + | if ((ak == ak)) | |
260 | + | then [ScriptTransfer(V.caller, aj, J()), ScriptTransfer(V.caller, 1, fromBase58String(U)), DeleteEntry(h(U)), IntegerEntry(j(g), (ag - 1))] | |
247 | 261 | else throw("Strict value is not equal to itself.") | |
248 | 262 | } | |
249 | 263 | } | |
250 | 264 | else throw("Strict value is not equal to itself.") | |
251 | 265 | } | |
252 | 266 | else throw("Strict value is not equal to itself.") | |
253 | 267 | } | |
254 | 268 | ||
255 | 269 | ||
256 | 270 | ||
257 | - | @Callable( | |
258 | - | func claimDuckRewards ( | |
259 | - | let | |
260 | - | if (( | |
271 | + | @Callable(V) | |
272 | + | func claimDuckRewards (U) = { | |
273 | + | let W = T(U, V) | |
274 | + | if ((W == W)) | |
261 | 275 | then { | |
262 | - | let | |
263 | - | if (( | |
264 | - | then [ScriptTransfer( | |
276 | + | let al = t(invoke(I(), "claimReward", [U], V.payments)) | |
277 | + | if ((al == al)) | |
278 | + | then [ScriptTransfer(V.caller, al, J())] | |
265 | 279 | else throw("Strict value is not equal to itself.") | |
266 | 280 | } | |
267 | 281 | else throw("Strict value is not equal to itself.") | |
268 | 282 | } | |
269 | 283 | ||
270 | 284 | ||
285 | + | @Verifier(am) | |
286 | + | func an () = if (e()) | |
287 | + | then sigVerify(am.bodyBytes, am.proofs[0], am.senderPublicKey) | |
288 | + | else { | |
289 | + | let ao = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
290 | + | let ap = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
291 | + | let aq = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
292 | + | let ar = if (sigVerify(am.bodyBytes, am.proofs[0], ao)) | |
293 | + | then 1 | |
294 | + | else if (sigVerify(am.bodyBytes, am.proofs[1], ao)) | |
295 | + | then 1 | |
296 | + | else if (sigVerify(am.bodyBytes, am.proofs[2], ao)) | |
297 | + | then 1 | |
298 | + | else 0 | |
299 | + | let as = if (sigVerify(am.bodyBytes, am.proofs[0], ap)) | |
300 | + | then 1 | |
301 | + | else if (sigVerify(am.bodyBytes, am.proofs[1], ap)) | |
302 | + | then 1 | |
303 | + | else if (sigVerify(am.bodyBytes, am.proofs[2], ap)) | |
304 | + | then 1 | |
305 | + | else 0 | |
306 | + | let at = if (sigVerify(am.bodyBytes, am.proofs[0], aq)) | |
307 | + | then 1 | |
308 | + | else if (sigVerify(am.bodyBytes, am.proofs[1], aq)) | |
309 | + | then 1 | |
310 | + | else if (sigVerify(am.bodyBytes, am.proofs[2], aq)) | |
311 | + | then 1 | |
312 | + | else 0 | |
313 | + | let au = ((ar + as) + at) | |
314 | + | let c = am | |
315 | + | (au >= 2) | |
316 | + | } | |
317 | + |
github/deemru/w8io/026f985 85.99 ms ◑