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:BgIRCAISAwoBCBIAEgQKAgQIEgAVARdzdGF0aWNLZXlfb3JhY2xlQWRkcmVzcwACFHN0YXRpY19vcmFjbGVBZGRyZXNzARhzdGF0aWNLZXlfYnJlZWRlckFkZHJlc3MAAhVzdGF0aWNfYnJlZWRlckFkZHJlc3MBFnN0YXRpY0tleV9pdGVtc0FkZHJlc3MAAhNzdGF0aWNfaXRlbXNBZGRyZXNzARJzdGF0aWNLZXlfZXh0cmFGZWUAAg9zdGF0aWNfZXh0cmFGZWUBGHN0YXRpY0tleV9leHRyYUZlZVJlbW92ZQACFXN0YXRpY19leHRyYUZlZVJlbW92ZQEXc3RhdGljS2V5X2ZlZUFnZ3JlZ2F0b3IAAhRzdGF0aWNfZmVlQWdncmVnYXRvcgAJd2VhcmFibGVzCQDMCAICCEFSVC1DQVBFCQDMCAICB0FSVC1IQVQJAMwIAgIKQVJULVhTQ0FSRgkAzAgCAgxBUlQtWFNXRUFURVIFA25pbAEPa2V5QXJ0ZWZhY3REdWNrAgZkdWNrSWQId2VhcmFibGUJAKwCAgkArAICBQZkdWNrSWQCAV8F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AhjaGlsZHJlbgkBBWFzSW50AQkA/AcECQERZ2V0QnJlZWRlckFkZHJlc3MAAhZ2YWxpZGF0ZUFuZEdldENoaWxkcmVuCQDMCAIFBmR1Y2tJZAUDbmlsBQNuaWwDCQAAAgUIY2hpbGRyZW4FCGNoaWxkcmVuCQDOCAIFA2FjYwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAAQgFB3BheW1lbnQHYXNzZXRJZAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQDOCAIFA2FjYwkBCHdlYXJJdGVtAgkA2AQBCQEFdmFsdWUBCAUHcGF5bWVudAdhc3NldElkCQDYBAEJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAEHYXNzZXRJZAkAzggCCgACJGwIBQFpCHBheW1lbnRzCgACJHMJAJADAQUCJGwKAAUkYWNjMAUDbmlsCgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQpoYW5kbGVJdGVtAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhNMaXN0IHNpemUgZXhjZWVkcyA2CQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGBQx2YWxpZFBheW1lbnQAFCB/fA==", "height": 3310593, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5XtFPcExVvWtUxBnpdaRBA5wDjDgnPW8dyMpyTAUbjYK Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a () = "static_oracleAddress"
55
66
77 func b () = "static_breederAddress"
88
99
1010 func c () = "static_itemsAddress"
1111
1212
1313 func d () = "static_extraFee"
1414
1515
1616 func e () = "static_extraFeeRemove"
1717
1818
1919 func f () = "static_feeAggregator"
2020
2121
2222 let g = ["ART-CAPE", "ART-HAT", "ART-XSCARF", "ART-XSWEATER"]
2323
2424 func h (i,j) = ((i + "_") + j)
2525
2626
2727 func k (i,l) = ((i + "_") + l)
2828
2929
3030 func m (n,o) = {
3131 let p = getString(n, o)
3232 if ($isInstanceOf(p, "String"))
3333 then {
3434 let q = p
3535 q
3636 }
3737 else ""
3838 }
3939
4040
4141 func r (o) = m(this, o)
4242
4343
4444 func s (t) = {
4545 let p = t
4646 if ($isInstanceOf(p, "Int"))
4747 then {
4848 let u = p
4949 u
5050 }
5151 else throw("wrong type, expected: Int")
5252 }
5353
5454
5555 func v (t) = {
5656 let p = t
5757 if ($isInstanceOf(p, "String"))
5858 then {
5959 let w = p
6060 w
6161 }
6262 else throw("wrong type, expected: String")
6363 }
6464
6565
6666 func x () = Address(fromBase58String(r(a())))
6767
6868
6969 func y () = Address(fromBase58String(m(x(), b())))
7070
7171
7272 func z () = Address(fromBase58String(m(x(), c())))
7373
7474
7575 func A () = Address(fromBase58String(m(x(), f())))
7676
7777
7878 func B (C,D) = if (isDefined(C.assetId))
7979 then throw("WCAP: Please attach waves")
8080 else {
8181 let E = if ((D != 0))
8282 then D
8383 else getIntegerValue(x(), d())
8484 if ((C.amount != E))
8585 then throw((("WCAP: Please attach exactly " + toString(E)) + " amount of wavelets"))
8686 else [ScriptTransfer(A(), E, unit)]
8787 }
8888
8989
9090 func F (G) = {
9191 let o = ("direct_cosmetic_" + G)
9292 let p = getInteger(z(), o)
9393 if ($isInstanceOf(p, "Int"))
9494 then {
9595 let q = p
9696 q
9797 }
9898 else unit
9999 }
100100
101101
102102 func H (j) = m(z(), ("type_cosmetic_" + j))
103103
104104
105105 func I (J,i) = {
106106 let K = v(invoke(z(), "checkArtefactDetails", [J], nil))
107107 if ((K == K))
108108 then if (if (!(containsElement(g, K)))
109109 then !(isDefined(F(K)))
110110 else false)
111111 then throw("WRITD: Unsupported wearable")
112112 else {
113113 let L = r(h(i, K))
114114 let M = if ((K == "ART-XSCARF"))
115115 then invoke(z(), "manipulateBoost", [69, i], nil)
116116 else nil
117117 if ((M == M))
118118 then if ((L != ""))
119119 then throw(("Duck is already wearing a " + K))
120120 else {
121121 let l = H(K)
122122 let N = if ((l != ""))
123123 then (r(k(i, l)) != "")
124124 else throw(("Type undefined, please contact admins " + K))
125125 if (N)
126126 then throw("You can only attach 1 from each type to your duck!")
127127 else {
128128 let O = if ((l != ""))
129129 then [StringEntry(k(i, l), J)]
130130 else nil
131131 ([StringEntry(h(i, K), J)] ++ O)
132132 }
133133 }
134134 else throw("Strict value is not equal to itself.")
135135 }
136136 else throw("Strict value is not equal to itself.")
137137 }
138138
139139
140140 @Callable(P)
141141 func configureOracle (Q) = if ((P.caller != this))
142142 then throw("admin only")
143143 else [StringEntry(a(), Q)]
144144
145145
146146
147147 @Callable(P)
148148 func wearItemToDuck () = {
149149 let R = value(P.payments[0])
150150 let S = value(P.payments[1])
151151 let T = B(P.payments[2], 0)
152152 let i = toBase58String(value(R.assetId))
153153 let U = toBase58String(value(S.assetId))
154154 if (if ((R.amount != 1))
155155 then true
156156 else (S.amount != 1))
157157 then throw("WRITD: NFT is not attached")
158158 else {
159159 let V = s(invoke(y(), "validateAndGetChildren", [i], nil))
160160 if ((V == V))
161161 then ((I(U, i) ++ [ScriptTransfer(P.caller, 1, R.assetId)]) ++ T)
162162 else throw("Strict value is not equal to itself.")
163163 }
164164 }
165165
166166
167167
168168 @Callable(P)
169169 func removeItemFromDuck (W,K) = {
170170 let X = if (W)
171171 then 0
172172 else getIntegerValue(x(), e())
173173 let Y = value(P.payments[0])
174174 let Z = value(P.payments[1])
175175 let T = B(P.payments[2], X)
176176 let i = toBase58String(value(Y.assetId))
177177 let aa = toBase58String(value(Z.assetId))
178178 if (if ((Y.amount != 1))
179179 then true
180180 else (Z.amount != 1))
181181 then throw("WRITD: NFT is not attached")
182182 else {
183183 let V = s(invoke(y(), "validateAndGetChildren", [i], nil))
184184 if ((V == V))
185185 then {
186186 let ab = v(invoke(z(), "checkArtefactDetails", [aa], nil))
187187 if ((ab == ab))
188188 then if ((ab != "ART-ROBODUCK"))
189189 then throw("Only rododuck can remove items!")
190190 else if (if (!(containsElement(g, K)))
191191 then !(isDefined(F(K)))
192192 else false)
193193 then throw("WRITD: Unsupported wearable")
194194 else {
195195 let L = r(h(i, K))
196196 let M = if ((K == "ART-XSCARF"))
197197 then invoke(z(), "manipulateBoost", [69, i], nil)
198198 else nil
199199 if ((M == M))
200200 then if ((L == ""))
201201 then throw(("Duck not wearing a " + K))
202202 else {
203203 let l = H(K)
204204 let O = if ((l != ""))
205205 then [DeleteEntry(k(i, l))]
206206 else nil
207207 let ac = if (W)
208208 then [Burn(fromBase58String(L), 1)]
209209 else [ScriptTransfer(P.caller, 1, fromBase58String(L))]
210210 ((([DeleteEntry(h(i, K)), ScriptTransfer(P.caller, 1, Y.assetId), Burn(fromBase58String(aa), 1)] ++ ac) ++ T) ++ O)
211211 }
212212 else throw("Strict value is not equal to itself.")
213213 }
214214 else throw("Strict value is not equal to itself.")
215215 }
216216 else throw("Strict value is not equal to itself.")
217217 }
218218 }
219219
220220
221221
222222 @Callable(P)
223223 func wearXItemsToDuck () = {
224224 let T = B(P.payments[1], 0)
225225 if ((3 > size(P.payments)))
226226 then throw("WWXITD: Please attach at least 1 item and 1 duck!")
227227 else if ((size(P.payments) > 7))
228228 then throw("WWXITD: You can only attach 5 items and one duck!")
229229 else {
230230 func ad (ae,C) = {
231231 let af = indexOf(P.payments, C)
232232 if ((af == 0))
233233 then {
234234 let i = toBase58String(value(C.assetId))
235235 if ((C.amount != 1))
236236 then throw("WRITD: Duck is not attached")
237237 else {
238238 let V = s(invoke(y(), "validateAndGetChildren", [i], nil))
239239 if ((V == V))
240240 then (ae ++ [ScriptTransfer(P.caller, 1, C.assetId)])
241241 else throw("Strict value is not equal to itself.")
242242 }
243243 }
244244 else (ae ++ I(toBase58String(value(C.assetId)), toBase58String(value(P.payments[1].assetId))))
245245 }
246246
247247 ({
248248 let ag = P.payments
249249 let ah = size(ag)
250250 let ai = nil
251251 func aj (ak,al) = if ((al >= ah))
252252 then ak
253253 else ad(ak, ag[al])
254254
255255 func am (ak,al) = if ((al >= ah))
256256 then ak
257257 else throw("List size exceeds 6")
258258
259259 am(aj(aj(aj(aj(aj(aj(ai, 0), 1), 2), 3), 4), 5), 6)
260260 } ++ T)
261261 }
262262 }
263263
264264

github/deemru/w8io/026f985 
30.28 ms