tx · 4iHebNf6aNwdP6orw8yEaqwdA1a9LTAZeyHbUbxYWudK

3N1oZwpYE3p4x63jWiKpszmfLU3Lk3KtSWe:  -0.01200000 Waves

2024.10.07 20:25 [3316720] smart account 3N1oZwpYE3p4x63jWiKpszmfLU3Lk3KtSWe > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
33.44 ms