tx · 31aAiprzaiwBDpmDU4z7cNTq1rxDHvV2dXnoJzemFNR4

3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx:  -0.01000000 Waves

2023.04.07 09:12 [2523782] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves

{ "type": 13, "id": "31aAiprzaiwBDpmDU4z7cNTq1rxDHvV2dXnoJzemFNR4", "fee": 1000000, "feeAssetId": null, "timestamp": 1680848064767, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "4doF4CYwezqo2AogcG4KXXYt7qraLVdcZavwYNYkUrxDFATzGTipu3ySdZiPfcXEu4gA1wAE7kjjR8UCsV4Uqhi7" ], "script": "base64:BgIECAISAAABAWkBBXRva2VuAAQFYXNzZXQJAMIIBQIEc2h1YgIZVGhpcyBpcyBhbiBvcmRpbmFyeSB0b2tlbgCAreIEAAIGBAdhc3NldElkCQC4CAEFBWFzc2V0BAVBbGljZQkBB0FkZHJlc3MBARoBVPvdLTABo9Q+QkAylsp39nATsJ7dxL+FRAkAzAgCBQVhc3NldAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQVBbGljZQDoBwUHYXNzZXRJZAUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleRKhomc=", "height": 2523782, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F2YxQXMvHWoFfFFeijAUD8j8iCHeaikP2A66BcD6nFYP Next: 98NbKY5XfA4fhXbbJ5CZwfBgySRDo9HVHcrmxDCKQo32 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "_"
54
6-let b = "buy"
75
8-let c = "price"
9-
10-let d = "sell"
11-
12-let e = 30
13-
14-let f = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
15-
16-let g = base58''
17-
18-let h = "bid"
19-
20-let i = true
21-
22-let j = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
23-
24-let k = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
25-
26-func l (m) = {
27- let n = assetInfo(m)
28- if ($isInstanceOf(n, "Asset"))
29- then {
30- let o = n
31- if (if ((o.decimals == 0))
32- then (o.quantity == 1)
33- else false)
34- then (o.reissuable == false)
35- else false
36- }
37- else false
6+@Callable(a)
7+func token () = {
8+ let b = Issue("shub", "This is an ordinary token", 10000000, 2, true)
9+ let c = calculateAssetId(b)
10+ let d = Address(base58'3NCspLgbmcyQ76ZL6Jw4gFZLmbhwdKKXUQs')
11+[b, ScriptTransfer(d, 1000, c)]
3812 }
3913
4014
41-@Callable(p)
42-func addAuction (q,r,s,t,u) = {
43- let v = toBase58String(p.transactionId)
44- let w = value(p.payments[0].assetId)
45- let x = value(s)
46- let y = (lastBlock.height + t)
47- let z = p.caller.bytes
48- let A = {
49- let n = getString(this, (((toBase58String(w) + a) + "nft_status_") + toBase58String(z)))
50- if ($isInstanceOf(n, "String"))
51- then {
52- let B = n
53- true
54- }
55- else false
56- }
57- if ((A == true))
58- then throw("Already in auction list")
59- else if ((t > e))
60- then throw(("Duration is too long. Must be less than or equal to 30 " + toString(e)))
61- else if ((p.payments[0].assetId == unit))
62- then throw("NFT not attached")
63- else if ((p.payments[0].assetId == f))
64- then throw("NFT not attached")
65- else [StringEntry(((v + "nft_start_auction_date") + toBase58String(z)), q), StringEntry(((v + "nft_end_auction_date") + toBase58String(z)), r), StringEntry((v + "_nft_start_price"), s), StringEntry((v + "_nft_owner"), toString(p.caller)), StringEntry((v + "_nft_on_auction"), toBase58String(w)), StringEntry((v + "_previous_bidder"), "none"), StringEntry((v + "_highest_bid"), "0"), StringEntry((v + "_winner_of_nft"), "0"), StringEntry((v + "_bidder_count"), "0"), StringEntry((v + "_nft_status"), "OPEN")]
66- }
67-
68-
69-
70-@Callable(p)
71-func placeBid (C,w,D,E,F) = {
72- let v = toBase58String(p.transactionId)
73- let z = p.caller.bytes
74- let m = fromBase58String(w)
75- let G = p.payments[0].assetId
76- let H = p.payments[0].amount
77- let I = getStringValue(this, (C + "_highest_bid"))
78- let J = getString(this, (C + "_previous_bidder"))
79- let K = getStringValue(this, (C + "_bidder_count"))
80- let L = getStringValue(this, (C + "_winner_of_nft"))
81- let A = getStringValue(this, (C + "_nft_status"))
82- if ((A != "OPEN"))
83- then throw("Not open for auction")
84- else if ((parseIntValue(I) >= H))
85- then throw("Bid is less then starting/highest Bid")
86- else if ((I == "0"))
87- then [StringEntry((C + "_highest_bid"), toString(H)), StringEntry((C + "_winner_of_nft"), toBase58String(p.caller.bytes)), StringEntry((C + "_bidder_count"), toString((parseIntValue(K) + 1))), StringEntry((C + "_nft_id"), toBase58String(m)), StringEntry((C + "_nft_owner"), D), StringEntry((((v + "_") + C) + "_highest_bid"), toString(H)), StringEntry((((v + "_") + C) + "_winner"), toBase58String(p.caller.bytes)), StringEntry((((v + "_") + C) + "_bidder_count"), toString((parseIntValue(K) + 1))), StringEntry((((v + "_") + C) + "_nft_id"), toBase58String(m)), StringEntry((((v + "_") + C) + "_nft_owner"), D), StringEntry((v + "_bid_for_nft_by"), toBase58String(z)), StringEntry((v + "_bid_price_place"), E), StringEntry((v + "_previous_bid_amount_refund_to_address"), L), StringEntry((v + "_prevoius_bid_amount_refund"), I)]
88- else if ((I != "0"))
89- then [ScriptTransfer(Address(fromBase58String(L)), parseIntValue(I), G), StringEntry((v + "_previous_bid_amount_refund_to_address"), L), StringEntry((v + "_prevoius_bid_amount_refund"), I), StringEntry((C + "_bidder_count"), toString((parseIntValue(K) + 1))), StringEntry((C + "_highest_bid"), toString(H)), StringEntry((C + "_winner_of_nft"), toBase58String(p.caller.bytes)), StringEntry((C + "_nft_id"), toBase58String(m)), StringEntry((C + "_nft_owner"), D), StringEntry((((v + "_") + C) + "_highest_bid"), toString(H)), StringEntry((((v + "_") + C) + "_winner"), toBase58String(p.caller.bytes)), StringEntry((((v + "_") + C) + "_bidder_count"), toString((parseIntValue(K) + 1))), StringEntry((((v + "_") + C) + "_nft_id"), toBase58String(m)), StringEntry((((v + "_") + C) + "_nft_owner"), D), StringEntry((v + "_bid_for_nft_by"), toBase58String(z)), StringEntry((v + "_bid_price_place"), E)]
90- else nil
91- }
92-
93-
94-
95-@Callable(p)
96-func acceptBidOffer (C,w,M,F) = {
97- let N = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
98- let v = toBase58String(p.transactionId)
99- let O = fromBase58String(F)
100- let z = p.caller.bytes
101- let m = fromBase58String(w)
102- let P = getStringValue(this, (C + "_highest_bid"))
103- let Q = ((parseIntValue(P) / 1000) * 975)
104- let R = ((parseIntValue(P) / 1000) * 25)
105- let S = getStringValue(this, (C + "_winner_of_nft"))
106- if ((F == N))
107- then [ScriptTransfer(Address(z), Q, O), ScriptTransfer(Address(fromBase58String(S)), 1, m), StringEntry((v + "_amount_paid_to_owner"), P), StringEntry((v + "_nft_transfer_to"), S), StringEntry((v + "_nft_status"), "REWARDED"), StringEntry((C + "_amount_paid_to_owner"), P), StringEntry((C + "_nft_transfer_to"), S), StringEntry((C + "_nft_status"), "REWARDED")]
108- else if ((F == "WAVES"))
109- then [ScriptTransfer(Address(z), Q, unit), ScriptTransfer(Address(fromBase58String(S)), 1, m), StringEntry((v + "_amount_paid_to_owner"), P), StringEntry((v + "_nft_transfer_to"), S), StringEntry((v + "_nft_status"), "REWARDED"), StringEntry((C + "_amount_paid_to_owner"), P), StringEntry((C + "_nft_transfer_to"), S), StringEntry((C + "_nft_status"), "REWARDED")]
110- else nil
111- }
112-
113-
114-
115-@Callable(p)
116-func cancelAuction (C) = {
117- let v = toBase58String(p.transactionId)
118- let z = p.caller.bytes
119- let T = getStringValue(this, (C + "_nft_status"))
120- let U = getStringValue(this, (C + "_winner_of_nft"))
121- let V = getStringValue(this, (C + "_nft_owner"))
122- let w = getStringValue(this, (C + "_nft_on_auction"))
123- let W = getStringValue(this, (C + "_highest_bid"))
124- if ((U == "0"))
125- then [StringEntry(((v + C) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(V)), 1, fromBase58String(w))]
126- else if ((U != "0"))
127- then throw("soory you can't cancel it because already auction placed by someone")
128- else nil
129- }
130-
131-
132-
133-@Callable(p)
134-func nftback (C) = {
135- let z = p.caller.bytes
136- let w = getStringValue(this, (C + "_nft_on_auction"))
137- let V = getStringValue(this, (C + "_nft_owner"))
138-[StringEntry((C + "_nft_status"), "Auction_time over"), ScriptTransfer(Address(fromBase58String(V)), 1, fromBase58String(w))]
139- }
140-
141-
142-
143-@Callable(p)
144-func withdrawMoney (C,F) = {
145- let z = p.caller.bytes
146- let N = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
147- let v = toBase58String(p.transactionId)
148- let O = fromBase58String(F)
149- let X = getStringValue(this, (C + "_highest_bid"))
150- let Y = getStringValue(this, (C + "_winner"))
151- let Z = getStringValue(this, (C + "_nft_id"))
152- if ((F == N))
153- then [StringEntry((C + "_nft_bid"), "WITHDRAW"), StringEntry((C + "_nft_id"), Z), StringEntry((C + "_bidding_price_refund_amount"), X), ScriptTransfer(p.caller, parseIntValue(X), O)]
154- else if ((F == "WAVES"))
155- then [StringEntry((C + "_nft_bid"), "WITHDRAW"), StringEntry((C + "_nft_id"), Z), StringEntry((C + "_bidding_price_refund_amount"), X), ScriptTransfer(p.caller, parseIntValue(X), unit)]
156- else nil
157- }
158-
159-
160-
161-@Callable(p)
162-func automateFunction (C,F) = {
163- let z = p.caller.bytes
164- let w = getStringValue(this, (C + "_nft_on_auction"))
165- let V = getStringValue(this, (C + "_nft_owner"))
166- let N = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
167- let O = fromBase58String(F)
168- let I = getStringValue(this, (C + "_highest_bid"))
169- let L = getStringValue(this, (C + "_winner_of_nft"))
170- let U = getStringValue(this, (C + "_winner_of_nft"))
171- if ((U == "0"))
172- then [ScriptTransfer(Address(fromBase58String(V)), 1, fromBase58String(w))]
173- else if (if ((U != "0"))
174- then (F == N)
175- else false)
176- then [ScriptTransfer(Address(fromBase58String(V)), 1, fromBase58String(w)), ScriptTransfer(Address(fromBase58String(L)), parseIntValue(I), O)]
177- else if (if ((U != "0"))
178- then (F == "WAVES")
179- else false)
180- then [ScriptTransfer(Address(fromBase58String(V)), 1, fromBase58String(w)), ScriptTransfer(Address(fromBase58String(L)), parseIntValue(I), unit)]
181- else nil
182- }
183-
15+@Verifier(e)
16+func f () = sigVerify(e.bodyBytes, e.proofs[0], e.senderPublicKey)
18417

github/deemru/w8io/169f3d6 
39.38 ms