tx · J1dfTGD5c2L46L9o891ki6iC66cKaeUQu7W9v9EBhYag 3N1oZwpYE3p4x63jWiKpszmfLU3Lk3KtSWe: -0.01200000 Waves 2024.10.18 21:15 [3332586] smart account 3N1oZwpYE3p4x63jWiKpszmfLU3Lk3KtSWe > SELF 0.00000000 Waves
{ "type": 13, "id": "J1dfTGD5c2L46L9o891ki6iC66cKaeUQu7W9v9EBhYag", "fee": 1200000, "feeAssetId": null, "timestamp": 1729275368214, "version": 2, "chainId": 84, "sender": "3N1oZwpYE3p4x63jWiKpszmfLU3Lk3KtSWe", "senderPublicKey": "CqqNd9FdJdY64okp1oAAQ8z3kyrEcd6UKxtboqZgrSaP", "proofs": [ "U9ayhyCtLPcQHRJEVhFfGf8uAt9K1GkRLP4M17R6DLHqsPHMhZ9WG6ErQtPYJu5EBdXbbKMKvGqih5jpdSezxJL" ], "script": "base64:BgIRCAISAwoBCBIAEgQKAgQIEgAXAQdnZXRCb29sAQNrZXkEByRtYXRjaDAJAJsIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACB0Jvb2xlYW4EAWIFByRtYXRjaDAFAWIHAQlpc1Rlc3RFbnYACQEHZ2V0Qm9vbAECB1RFU1RFTlYBF3N0YXRpY0tleV9vcmFjbGVBZGRyZXNzAAIUc3RhdGljX29yYWNsZUFkZHJlc3MBGHN0YXRpY0tleV9icmVlZGVyQWRkcmVzcwACFXN0YXRpY19icmVlZGVyQWRkcmVzcwEWc3RhdGljS2V5X2l0ZW1zQWRkcmVzcwACE3N0YXRpY19pdGVtc0FkZHJlc3MBEnN0YXRpY0tleV9leHRyYUZlZQACD3N0YXRpY19leHRyYUZlZQEYc3RhdGljS2V5X2V4dHJhRmVlUmVtb3ZlAAIVc3RhdGljX2V4dHJhRmVlUmVtb3ZlARdzdGF0aWNLZXlfZmVlQWdncmVnYXRvcgACFHN0YXRpY19mZWVBZ2dyZWdhdG9yAAl3ZWFyYWJsZXMJAMwIAgIIQVJULUNBUEUJAMwIAgIHQV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nAgUPc2lnbmF0dXJlc0NvdW50AALeIUoS", "height": 3332586, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EnKXPiVbchaW82oGzZ23AuJYdyGQmfLVwfgFniQj4G8C Next: GcfYNFwa8wzERYTomDtNgdyEtAhTjfH3T5qHYn36Lcjz Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getBool (key) = match getBoolean(this, key) { | |
5 | 5 | case b: Boolean => | |
6 | 6 | b | |
7 | 7 | case _ => | |
8 | 8 | false | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func isTestEnv () = getBool("TESTENV") | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func staticKey_oracleAddress () = "static_oracleAddress" | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func staticKey_breederAddress () = "static_breederAddress" | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func staticKey_itemsAddress () = "static_itemsAddress" | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func staticKey_extraFee () = "static_extraFee" | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func staticKey_extraFeeRemove () = "static_extraFeeRemove" | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func staticKey_feeAggregator () = "static_feeAggregator" | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | let wearables = ["ART-CAPE", "ART-HAT", "ART-XSCARF", "ART-XSWEATER"] | |
34 | 34 | ||
35 | 35 | func keyArtefactDuck (duckId,wearable) = ((duckId + "_") + wearable) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func keyTypesDuck (duckId,type) = ((duckId + "_") + type) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
42 | 42 | case a: String => | |
43 | 43 | a | |
44 | 44 | case _ => | |
45 | 45 | "" | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func tryGetString (key) = tryGetStringExternal(this, key) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func asInt (value) = match value { | |
53 | 53 | case int: Int => | |
54 | 54 | int | |
55 | 55 | case _ => | |
56 | 56 | throw("wrong type, expected: Int") | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func asString (value) = match value { | |
61 | 61 | case string: String => | |
62 | 62 | string | |
63 | 63 | case _ => | |
64 | 64 | throw("wrong type, expected: String") | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress()))) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getItemsAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_itemsAddress()))) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator()))) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func checkAdditionalPayment (payment,amountOverride) = if (isDefined(payment.assetId)) | |
81 | 81 | then throw("WCAP: Please attach waves") | |
82 | 82 | else { | |
83 | 83 | let feeAmount = if ((amountOverride != 0)) | |
84 | 84 | then amountOverride | |
85 | 85 | else getIntegerValue(getOracle(), staticKey_extraFee()) | |
86 | 86 | if ((payment.amount != feeAmount)) | |
87 | 87 | then throw((("WCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets")) | |
88 | 88 | else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)] | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func tryGetCosmeticItem (item) = { | |
93 | 93 | let key = ("direct_cosmetic_" + item) | |
94 | 94 | match getInteger(getItemsAddress(), key) { | |
95 | 95 | case a: Int => | |
96 | 96 | a | |
97 | 97 | case _ => | |
98 | 98 | unit | |
99 | 99 | } | |
100 | 100 | } | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func tryGetType (wearable) = tryGetStringExternal(getItemsAddress(), ("type_cosmetic_" + wearable)) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func wearItem (assetIdWearAble,duckId) = { | |
107 | 107 | let artefactName = asString(invoke(getItemsAddress(), "checkArtefactDetails", [assetIdWearAble], nil)) | |
108 | 108 | if ((artefactName == artefactName)) | |
109 | 109 | then if (if (!(containsElement(wearables, artefactName))) | |
110 | 110 | then !(isDefined(tryGetCosmeticItem(artefactName))) | |
111 | 111 | else false) | |
112 | 112 | then throw("WRITD: Unsupported wearable") | |
113 | 113 | else { | |
114 | 114 | let artefactId = tryGetString(keyArtefactDuck(duckId, artefactName)) | |
115 | 115 | let boostDuck = if ((artefactName == "ART-XSCARF")) | |
116 | 116 | then invoke(getItemsAddress(), "manipulateBoost", [69, duckId], nil) | |
117 | 117 | else nil | |
118 | 118 | if ((boostDuck == boostDuck)) | |
119 | 119 | then if ((artefactId != "")) | |
120 | 120 | then throw(("Duck is already wearing a " + artefactName)) | |
121 | 121 | else { | |
122 | 122 | let type = tryGetType(artefactName) | |
123 | 123 | let typeOnDuck = if ((type != "")) | |
124 | 124 | then (tryGetString(keyTypesDuck(duckId, type)) != "") | |
125 | 125 | else throw(("Type undefined, please contact admins " + artefactName)) | |
126 | 126 | if (typeOnDuck) | |
127 | 127 | then throw("You can only attach 1 from each type to your duck!") | |
128 | 128 | else { | |
129 | 129 | let typeResult = if ((type != "")) | |
130 | 130 | then [StringEntry(keyTypesDuck(duckId, type), assetIdWearAble)] | |
131 | 131 | else nil | |
132 | 132 | ([StringEntry(keyArtefactDuck(duckId, artefactName), assetIdWearAble)] ++ typeResult) | |
133 | 133 | } | |
134 | 134 | } | |
135 | 135 | else throw("Strict value is not equal to itself.") | |
136 | 136 | } | |
137 | 137 | else throw("Strict value is not equal to itself.") | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(i) | |
142 | 142 | func configureOracle (oracle) = if ((i.caller != this)) | |
143 | 143 | then throw("admin only") | |
144 | 144 | else [StringEntry(staticKey_oracleAddress(), oracle)] | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | ||
148 | 148 | @Callable(i) | |
149 | 149 | func wearItemToDuck () = { | |
150 | 150 | let firstPayment = value(i.payments[0]) | |
151 | 151 | let secondPayment = value(i.payments[1]) | |
152 | 152 | let validPayment = checkAdditionalPayment(i.payments[2], 0) | |
153 | 153 | let duckId = toBase58String(value(firstPayment.assetId)) | |
154 | 154 | let secondAssetId = toBase58String(value(secondPayment.assetId)) | |
155 | 155 | if (if ((firstPayment.amount != 1)) | |
156 | 156 | then true | |
157 | 157 | else (secondPayment.amount != 1)) | |
158 | 158 | then throw("WRITD: NFT is not attached") | |
159 | 159 | else { | |
160 | 160 | let children = asInt(invoke(getBreederAddress(), "validateAndGetChildren", [duckId], nil)) | |
161 | 161 | if ((children == children)) | |
162 | 162 | then ((wearItem(secondAssetId, duckId) ++ [ScriptTransfer(i.caller, 1, firstPayment.assetId)]) ++ validPayment) | |
163 | 163 | else throw("Strict value is not equal to itself.") | |
164 | 164 | } | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | ||
169 | 169 | @Callable(i) | |
170 | 170 | func removeItemFromDuck (burnItem,artefactName) = { | |
171 | 171 | let wavesFee = if (burnItem) | |
172 | 172 | then 0 | |
173 | 173 | else getIntegerValue(getOracle(), staticKey_extraFeeRemove()) | |
174 | 174 | let duckPayment = value(i.payments[0]) | |
175 | 175 | let roboDuckPayment = value(i.payments[1]) | |
176 | 176 | let validPayment = checkAdditionalPayment(i.payments[2], wavesFee) | |
177 | 177 | let duckId = toBase58String(value(duckPayment.assetId)) | |
178 | 178 | let roboDuckId = toBase58String(value(roboDuckPayment.assetId)) | |
179 | 179 | if (if ((duckPayment.amount != 1)) | |
180 | 180 | then true | |
181 | 181 | else (roboDuckPayment.amount != 1)) | |
182 | 182 | then throw("WRITD: NFT is not attached") | |
183 | 183 | else { | |
184 | 184 | let children = asInt(invoke(getBreederAddress(), "validateAndGetChildren", [duckId], nil)) | |
185 | 185 | if ((children == children)) | |
186 | 186 | then { | |
187 | 187 | let artefactNameRoboduck = asString(invoke(getItemsAddress(), "checkArtefactDetails", [roboDuckId], nil)) | |
188 | 188 | if ((artefactNameRoboduck == artefactNameRoboduck)) | |
189 | 189 | then if ((artefactNameRoboduck != "ART-ROBODUCK")) | |
190 | 190 | then throw("Only rododuck can remove items!") | |
191 | 191 | else if (if (!(containsElement(wearables, artefactName))) | |
192 | 192 | then !(isDefined(tryGetCosmeticItem(artefactName))) | |
193 | 193 | else false) | |
194 | 194 | then throw("WRITD: Unsupported wearable") | |
195 | 195 | else { | |
196 | 196 | let artefactId = tryGetString(keyArtefactDuck(duckId, artefactName)) | |
197 | 197 | let boostDuck = if ((artefactName == "ART-XSCARF")) | |
198 | 198 | then invoke(getItemsAddress(), "manipulateBoost", [69, duckId], nil) | |
199 | 199 | else nil | |
200 | 200 | if ((boostDuck == boostDuck)) | |
201 | 201 | then if ((artefactId == "")) | |
202 | 202 | then throw(("Duck not wearing a " + artefactName)) | |
203 | 203 | else { | |
204 | 204 | let type = tryGetType(artefactName) | |
205 | 205 | let typeResult = if ((type != "")) | |
206 | 206 | then [DeleteEntry(keyTypesDuck(duckId, type))] | |
207 | 207 | else nil | |
208 | 208 | let burn = if (burnItem) | |
209 | 209 | then [Burn(fromBase58String(artefactId), 1)] | |
210 | 210 | else [ScriptTransfer(i.caller, 1, fromBase58String(artefactId))] | |
211 | 211 | ((([DeleteEntry(keyArtefactDuck(duckId, artefactName)), ScriptTransfer(i.caller, 1, duckPayment.assetId), Burn(fromBase58String(roboDuckId), 1)] ++ burn) ++ validPayment) ++ typeResult) | |
212 | 212 | } | |
213 | 213 | else throw("Strict value is not equal to itself.") | |
214 | 214 | } | |
215 | 215 | else throw("Strict value is not equal to itself.") | |
216 | 216 | } | |
217 | 217 | else throw("Strict value is not equal to itself.") | |
218 | 218 | } | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | ||
223 | 223 | @Callable(i) | |
224 | 224 | func wearXItemsToDuck () = { | |
225 | 225 | let validPayment = checkAdditionalPayment(i.payments[1], 0) | |
226 | 226 | if ((3 > size(i.payments))) | |
227 | 227 | then throw("WWXITD: Please attach at least 1 item and 1 duck!") | |
228 | 228 | else if ((size(i.payments) > 7)) | |
229 | 229 | then throw("WWXITD: You can only attach 5 items and one duck!") | |
230 | 230 | else { | |
231 | 231 | func handleItem (acc,payment) = { | |
232 | 232 | let index = indexOf(i.payments, payment) | |
233 | 233 | if ((index == 0)) | |
234 | 234 | then { | |
235 | 235 | let duckId = toBase58String(value(payment.assetId)) | |
236 | 236 | if ((payment.amount != 1)) | |
237 | 237 | then throw("WRITD: Duck is not attached") | |
238 | 238 | else { | |
239 | 239 | let children = asInt(invoke(getBreederAddress(), "validateAndGetChildren", [duckId], nil)) | |
240 | 240 | if ((children == children)) | |
241 | 241 | then (acc ++ [ScriptTransfer(i.caller, 1, payment.assetId)]) | |
242 | 242 | else throw("Strict value is not equal to itself.") | |
243 | 243 | } | |
244 | 244 | } | |
245 | 245 | else (acc ++ wearItem(toBase58String(value(payment.assetId)), toBase58String(value(i.payments[1].assetId)))) | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ({ | |
249 | 249 | let $l = i.payments | |
250 | 250 | let $s = size($l) | |
251 | 251 | let $acc0 = nil | |
252 | 252 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
253 | 253 | then $a | |
254 | 254 | else handleItem($a, $l[$i]) | |
255 | 255 | ||
256 | 256 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
257 | 257 | then $a | |
258 | 258 | else throw("List size exceeds 6") | |
259 | 259 | ||
260 | 260 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
261 | 261 | } ++ validPayment) | |
262 | 262 | } | |
263 | 263 | } | |
264 | 264 | ||
265 | 265 | ||
266 | 266 | @Verifier(tx) | |
267 | 267 | func verify () = if (isTestEnv()) | |
268 | 268 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
269 | 269 | else { | |
270 | 270 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
271 | 271 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
272 | 272 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
273 | 273 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
274 | 274 | then 1 | |
275 | 275 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
276 | 276 | then 1 | |
277 | 277 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
278 | 278 | then 1 | |
279 | 279 | else 0 | |
280 | 280 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
281 | 281 | then 1 | |
282 | 282 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
283 | 283 | then 1 | |
284 | 284 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
285 | 285 | then 1 | |
286 | 286 | else 0 | |
287 | 287 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
288 | 288 | then 1 | |
289 | 289 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
290 | 290 | then 1 | |
291 | 291 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
292 | 292 | then 1 | |
293 | 293 | else 0 | |
294 | 294 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
295 | 295 | match tx { | |
296 | 296 | case _ => | |
297 | 297 | (signaturesCount >= 2) | |
298 | 298 | } | |
299 | 299 | } | |
300 | 300 |
github/deemru/w8io/169f3d6 36.43 ms ◑