tx · BaH2HTzbjpWKJiNWKDLE6Tgw9Uv3nYPo3fuRgTaah2pt 3N3A5ytTFmeT6yY7uHBR1x4RaURVqd2vFih: -0.01100000 Waves 2024.10.03 14:08 [3310593] smart account 3N3A5ytTFmeT6yY7uHBR1x4RaURVqd2vFih > SELF 0.00000000 Waves
{ "type": 13, "id": "BaH2HTzbjpWKJiNWKDLE6Tgw9Uv3nYPo3fuRgTaah2pt", "fee": 1100000, "feeAssetId": null, "timestamp": 1727953744390, "version": 2, "chainId": 84, "sender": "3N3A5ytTFmeT6yY7uHBR1x4RaURVqd2vFih", "senderPublicKey": "FCkc6XaNdqHBY98YHzkNmomKLXrs8QG3w1zKAuACmZgF", "proofs": [ "2VKDvz4Aq2VrozevBJSD52kW8PUzXTcV3BzkwZwRMfzJHKwXRXiRUvd2zBw3YUN1m1tTTGiapVrWYvcsSYDFbzK2" ], "script": "base64:BgIRCAISAwoBCBIAEgQKAgQIEgAVARdzdGF0aWNLZXlfb3JhY2xlQWRkcmVzcwACFHN0YXRpY19vcmFjbGVBZGRyZXNzARhzdGF0aWNLZXlfYnJlZWRlckFkZHJlc3MAAhVzdGF0aWNfYnJlZWRlckFkZHJlc3MBFnN0YXRpY0tleV9pdGVtc0FkZHJlc3MAAhNzdGF0aWNfaXRlbXNBZGRyZXNzARJzdGF0aWNLZXlfZXh0cmFGZWUAAg9zdGF0aWNfZXh0cmFGZWUBGHN0YXRpY0tleV9leHRyYUZlZVJlbW92ZQACFXN0YXRpY19leHRyYUZlZVJlbW92ZQEXc3RhdGljS2V5X2ZlZUFnZ3JlZ2F0b3IAAhRzdGF0aWNfZmVlQWdncmVnYXRvcgAJd2VhcmFibGVzCQDMCAICCEFSVC1DQVBFCQDMCAICB0FSVC1IQVQJAMwIAgIKQVJULVhTQ0FSRgkAzAgCAgxBUlQtWFNXRUFURVIFA25pbAEPa2V5QXJ0ZWZhY3REdWNrAgZkdWNrSWQId2VhcmFibGUJAKwCAgkArAICBQZkdWNrSWQCAV8FC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hjaGlsZHJlbgkBBWFzSW50AQkA/AcECQERZ2V0QnJlZWRlckFkZHJlc3MAAhZ2YWxpZGF0ZUFuZEdldENoaWxkcmVuCQDMCAIFBmR1Y2tJZAUDbmlsBQNuaWwDCQAAAgUIY2hpbGRyZW4FCGNoaWxkcmVuCQDOCAIFA2FjYwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAAQgFB3BheW1lbnQHYXNzZXRJZAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQDOCAIFA2FjYwkBCHdlYXJJdGVtAgkA2AQBCQEFdmFsdWUBCAUHcGF5bWVudAdhc3NldElkCQDYBAEJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAEHYXNzZXRJZAkAzggCCgACJGwIBQFpCHBheW1lbnRzCgACJHMJAJADAQUCJGwKAAUkYWNjMAUDbmlsCgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQpoYW5kbGVJdGVtAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhNMaXN0IHNpemUgZXhjZWVkcyA2CQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGBQx2YWxpZFBheW1lbnQAFCB/fA==", "height": 3310593, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5XtFPcExVvWtUxBnpdaRBA5wDjDgnPW8dyMpyTAUbjYK Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a () = "static_oracleAddress" | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func b () = "static_breederAddress" | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func c () = "static_itemsAddress" | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func d () = "static_extraFee" | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func e () = "static_extraFeeRemove" | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func f () = "static_feeAggregator" | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | let g = ["ART-CAPE", "ART-HAT", "ART-XSCARF", "ART-XSWEATER"] | |
23 | 23 | ||
24 | 24 | func h (i,j) = ((i + "_") + j) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func k (i,l) = ((i + "_") + l) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func m (n,o) = { | |
31 | 31 | let p = getString(n, o) | |
32 | 32 | if ($isInstanceOf(p, "String")) | |
33 | 33 | then { | |
34 | 34 | let q = p | |
35 | 35 | q | |
36 | 36 | } | |
37 | 37 | else "" | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func r (o) = m(this, o) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func s (t) = { | |
45 | 45 | let p = t | |
46 | 46 | if ($isInstanceOf(p, "Int")) | |
47 | 47 | then { | |
48 | 48 | let u = p | |
49 | 49 | u | |
50 | 50 | } | |
51 | 51 | else throw("wrong type, expected: Int") | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func v (t) = { | |
56 | 56 | let p = t | |
57 | 57 | if ($isInstanceOf(p, "String")) | |
58 | 58 | then { | |
59 | 59 | let w = p | |
60 | 60 | w | |
61 | 61 | } | |
62 | 62 | else throw("wrong type, expected: String") | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func x () = Address(fromBase58String(r(a()))) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func y () = Address(fromBase58String(m(x(), b()))) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func z () = Address(fromBase58String(m(x(), c()))) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func A () = Address(fromBase58String(m(x(), f()))) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func B (C,D) = if (isDefined(C.assetId)) | |
79 | 79 | then throw("WCAP: Please attach waves") | |
80 | 80 | else { | |
81 | 81 | let E = if ((D != 0)) | |
82 | 82 | then D | |
83 | 83 | else getIntegerValue(x(), d()) | |
84 | 84 | if ((C.amount != E)) | |
85 | 85 | then throw((("WCAP: Please attach exactly " + toString(E)) + " amount of wavelets")) | |
86 | 86 | else [ScriptTransfer(A(), E, unit)] | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func F (G) = { | |
91 | 91 | let o = ("direct_cosmetic_" + G) | |
92 | 92 | let p = getInteger(z(), o) | |
93 | 93 | if ($isInstanceOf(p, "Int")) | |
94 | 94 | then { | |
95 | 95 | let q = p | |
96 | 96 | q | |
97 | 97 | } | |
98 | 98 | else unit | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func H (j) = m(z(), ("type_cosmetic_" + j)) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func I (J,i) = { | |
106 | 106 | let K = v(invoke(z(), "checkArtefactDetails", [J], nil)) | |
107 | 107 | if ((K == K)) | |
108 | 108 | then if (if (!(containsElement(g, K))) | |
109 | 109 | then !(isDefined(F(K))) | |
110 | 110 | else false) | |
111 | 111 | then throw("WRITD: Unsupported wearable") | |
112 | 112 | else { | |
113 | 113 | let L = r(h(i, K)) | |
114 | 114 | let M = if ((K == "ART-XSCARF")) | |
115 | 115 | then invoke(z(), "manipulateBoost", [69, i], nil) | |
116 | 116 | else nil | |
117 | 117 | if ((M == M)) | |
118 | 118 | then if ((L != "")) | |
119 | 119 | then throw(("Duck is already wearing a " + K)) | |
120 | 120 | else { | |
121 | 121 | let l = H(K) | |
122 | 122 | let N = if ((l != "")) | |
123 | 123 | then (r(k(i, l)) != "") | |
124 | 124 | else throw(("Type undefined, please contact admins " + K)) | |
125 | 125 | if (N) | |
126 | 126 | then throw("You can only attach 1 from each type to your duck!") | |
127 | 127 | else { | |
128 | 128 | let O = if ((l != "")) | |
129 | 129 | then [StringEntry(k(i, l), J)] | |
130 | 130 | else nil | |
131 | 131 | ([StringEntry(h(i, K), J)] ++ O) | |
132 | 132 | } | |
133 | 133 | } | |
134 | 134 | else throw("Strict value is not equal to itself.") | |
135 | 135 | } | |
136 | 136 | else throw("Strict value is not equal to itself.") | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(P) | |
141 | 141 | func configureOracle (Q) = if ((P.caller != this)) | |
142 | 142 | then throw("admin only") | |
143 | 143 | else [StringEntry(a(), Q)] | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Callable(P) | |
148 | 148 | func wearItemToDuck () = { | |
149 | 149 | let R = value(P.payments[0]) | |
150 | 150 | let S = value(P.payments[1]) | |
151 | 151 | let T = B(P.payments[2], 0) | |
152 | 152 | let i = toBase58String(value(R.assetId)) | |
153 | 153 | let U = toBase58String(value(S.assetId)) | |
154 | 154 | if (if ((R.amount != 1)) | |
155 | 155 | then true | |
156 | 156 | else (S.amount != 1)) | |
157 | 157 | then throw("WRITD: NFT is not attached") | |
158 | 158 | else { | |
159 | 159 | let V = s(invoke(y(), "validateAndGetChildren", [i], nil)) | |
160 | 160 | if ((V == V)) | |
161 | 161 | then ((I(U, i) ++ [ScriptTransfer(P.caller, 1, R.assetId)]) ++ T) | |
162 | 162 | else throw("Strict value is not equal to itself.") | |
163 | 163 | } | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | ||
168 | 168 | @Callable(P) | |
169 | 169 | func removeItemFromDuck (W,K) = { | |
170 | 170 | let X = if (W) | |
171 | 171 | then 0 | |
172 | 172 | else getIntegerValue(x(), e()) | |
173 | 173 | let Y = value(P.payments[0]) | |
174 | 174 | let Z = value(P.payments[1]) | |
175 | 175 | let T = B(P.payments[2], X) | |
176 | 176 | let i = toBase58String(value(Y.assetId)) | |
177 | 177 | let aa = toBase58String(value(Z.assetId)) | |
178 | 178 | if (if ((Y.amount != 1)) | |
179 | 179 | then true | |
180 | 180 | else (Z.amount != 1)) | |
181 | 181 | then throw("WRITD: NFT is not attached") | |
182 | 182 | else { | |
183 | 183 | let V = s(invoke(y(), "validateAndGetChildren", [i], nil)) | |
184 | 184 | if ((V == V)) | |
185 | 185 | then { | |
186 | 186 | let ab = v(invoke(z(), "checkArtefactDetails", [aa], nil)) | |
187 | 187 | if ((ab == ab)) | |
188 | 188 | then if ((ab != "ART-ROBODUCK")) | |
189 | 189 | then throw("Only rododuck can remove items!") | |
190 | 190 | else if (if (!(containsElement(g, K))) | |
191 | 191 | then !(isDefined(F(K))) | |
192 | 192 | else false) | |
193 | 193 | then throw("WRITD: Unsupported wearable") | |
194 | 194 | else { | |
195 | 195 | let L = r(h(i, K)) | |
196 | 196 | let M = if ((K == "ART-XSCARF")) | |
197 | 197 | then invoke(z(), "manipulateBoost", [69, i], nil) | |
198 | 198 | else nil | |
199 | 199 | if ((M == M)) | |
200 | 200 | then if ((L == "")) | |
201 | 201 | then throw(("Duck not wearing a " + K)) | |
202 | 202 | else { | |
203 | 203 | let l = H(K) | |
204 | 204 | let O = if ((l != "")) | |
205 | 205 | then [DeleteEntry(k(i, l))] | |
206 | 206 | else nil | |
207 | 207 | let ac = if (W) | |
208 | 208 | then [Burn(fromBase58String(L), 1)] | |
209 | 209 | else [ScriptTransfer(P.caller, 1, fromBase58String(L))] | |
210 | 210 | ((([DeleteEntry(h(i, K)), ScriptTransfer(P.caller, 1, Y.assetId), Burn(fromBase58String(aa), 1)] ++ ac) ++ T) ++ O) | |
211 | 211 | } | |
212 | 212 | else throw("Strict value is not equal to itself.") | |
213 | 213 | } | |
214 | 214 | else throw("Strict value is not equal to itself.") | |
215 | 215 | } | |
216 | 216 | else throw("Strict value is not equal to itself.") | |
217 | 217 | } | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(P) | |
223 | 223 | func wearXItemsToDuck () = { | |
224 | 224 | let T = B(P.payments[1], 0) | |
225 | 225 | if ((3 > size(P.payments))) | |
226 | 226 | then throw("WWXITD: Please attach at least 1 item and 1 duck!") | |
227 | 227 | else if ((size(P.payments) > 7)) | |
228 | 228 | then throw("WWXITD: You can only attach 5 items and one duck!") | |
229 | 229 | else { | |
230 | 230 | func ad (ae,C) = { | |
231 | 231 | let af = indexOf(P.payments, C) | |
232 | 232 | if ((af == 0)) | |
233 | 233 | then { | |
234 | 234 | let i = toBase58String(value(C.assetId)) | |
235 | 235 | if ((C.amount != 1)) | |
236 | 236 | then throw("WRITD: Duck is not attached") | |
237 | 237 | else { | |
238 | 238 | let V = s(invoke(y(), "validateAndGetChildren", [i], nil)) | |
239 | 239 | if ((V == V)) | |
240 | 240 | then (ae ++ [ScriptTransfer(P.caller, 1, C.assetId)]) | |
241 | 241 | else throw("Strict value is not equal to itself.") | |
242 | 242 | } | |
243 | 243 | } | |
244 | 244 | else (ae ++ I(toBase58String(value(C.assetId)), toBase58String(value(P.payments[1].assetId)))) | |
245 | 245 | } | |
246 | 246 | ||
247 | 247 | ({ | |
248 | 248 | let ag = P.payments | |
249 | 249 | let ah = size(ag) | |
250 | 250 | let ai = nil | |
251 | 251 | func aj (ak,al) = if ((al >= ah)) | |
252 | 252 | then ak | |
253 | 253 | else ad(ak, ag[al]) | |
254 | 254 | ||
255 | 255 | func am (ak,al) = if ((al >= ah)) | |
256 | 256 | then ak | |
257 | 257 | else throw("List size exceeds 6") | |
258 | 258 | ||
259 | 259 | am(aj(aj(aj(aj(aj(aj(ai, 0), 1), 2), 3), 4), 5), 6) | |
260 | 260 | } ++ T) | |
261 | 261 | } | |
262 | 262 | } | |
263 | 263 | ||
264 | 264 |
github/deemru/w8io/026f985 30.28 ms ◑