tx · 6KHFVaNueH8uFxiXHAc84mvqg6CGr7vbETFCh5sAvVwj

3Mu8XbQMWkzpp7bPBTjpfJAsr6BZRGkJ7DJ:  -0.01400000 Waves

2019.09.08 14:12 [667024] smart account 3Mu8XbQMWkzpp7bPBTjpfJAsr6BZRGkJ7DJ > SELF 0.00000000 Waves

{ "type": 13, "id": "6KHFVaNueH8uFxiXHAc84mvqg6CGr7vbETFCh5sAvVwj", "fee": 1400000, "feeAssetId": null, "timestamp": 1567941201319, "version": 1, "sender": "3Mu8XbQMWkzpp7bPBTjpfJAsr6BZRGkJ7DJ", "senderPublicKey": "9hAjKAPiZsttXfKLFXed8BFDtedqe2KVibkhFNmkkvoH", "proofs": [ "2kRJKsDXY82UVAK9jm3rTNML7bAfZvGVVs6mTjFKJVGHMzgnLHiUdEExYcyV9SzbTQVDY2tiqtqbo2rChxrduofq" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAABJtYXhBdWN0aW9uRHVyYXRpb24JAABoAAAAAgAAAAAAAAAFoAAAAAAAAAAAHgAAAAAOcmV2ZWFsRHVyYXRpb24JAABoAAAAAgAAAAAAAAAFoAAAAAAAAAAABwEAAAAKaGFzaFN0cmluZwAAAAEAAAAEZGF0YQQAAAAGcmVzdWx0CQACWgAAAAEJAAH3AAAAAQkAAZsAAAABBQAAAARkYXRhBQAAAAZyZXN1bHQBAAAACWFkZFRvTGlzdAAAAAIAAAAEbGlzdAAAAAl3aGF0VG9BZGQDCQAAAAAAAAIJAASzAAAAAgUAAAAEbGlzdAUAAAAJd2hhdFRvQWRkAP//////////CQABLAAAAAIJAAEsAAAAAgUAAAAEbGlzdAIAAAABIAUAAAAJd2hhdFRvQWRkBQAAAARsaXN0AQAAAA5yZW1vdmVGcm9tTGlzdAAAAAIAAAAEbGlzdAAAAAx3aGF0VG9SZW1vdmUEAAAAA2lkeAkABLMAAAACBQAAAARsaXN0BQAAAAx3aGF0VG9SZW1vdmUEAAAABnJlc3VsdAMJAQAAAAlpc0RlZ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3JpcHRUcmFuc2ZlcgAAAAMFAAAACndpbm5lckFkZHIFAAAACWxvdEFtb3VudAUAAAAIbG90QXNzZXQFAAAAA25pbAAAAADbDrqJ", "chainId": 84, "height": 667024, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = (1440 * 30)
5+
6+let b = (1440 * 7)
7+
8+func c (d) = {
9+ let e = toBase64String(sha256(toBytes(d)))
10+ e
11+ }
12+
13+
14+func f (g,h) = if ((indexOf(g, h) == -1))
15+ then ((g + " ") + h)
16+ else g
17+
18+
19+func i (g,j) = {
20+ let k = indexOf(g, j)
21+ let e = if (isDefined(k))
22+ then (take(g, value(k)) + takeRight(g, (value(k) + size(j))))
23+ else g
24+ e
25+ }
26+
27+
28+@Callable(l)
29+func startAuction (m,n,o,p) = {
30+ let q = toBase58String(l.transactionId)
31+ let r = (lastBlock.height + m)
32+ let s = (r + b)
33+ let t = toBase58String(l.caller.bytes)
34+ let u = (t + "_organizer")
35+ let v = getString(this, u)
36+ let w = if (isDefined(v))
37+ then value(v)
38+ else ""
39+ let x = ((w + " ") + q)
40+ let y = extract(l.payment)
41+ if ((m > a))
42+ then throw(("Duration is too long. Must be less than " + toString(a)))
43+ else if (!(isDefined(y.assetId)))
44+ then throw("Payment currency should not be in WAVES")
45+ else if ((y.amount != 1))
46+ then throw("Payment amount should be only one NFT")
47+ else if ((0 >= n))
48+ then throw("Start price should be > 0")
49+ else if ((n >= p))
50+ then throw((("Start price should be < deposit (" + toString(p)) + ")"))
51+ else if ((0 >= m))
52+ then throw("Duration should be > 0")
53+ else WriteSet([DataEntry((q + "_reveal_start"), r), DataEntry((q + "_closing_start"), s), DataEntry((q + "_deposit"), p), DataEntry((q + "_unrevealed_count"), 0), DataEntry((q + "_top_price"), 0), DataEntry((q + "_second_price"), 0), DataEntry((q + "_settle"), false), DataEntry((q + "_organizer"), t), DataEntry((q + "_lot_assetId"), if (isDefined(y.assetId))
54+ then toBase58String(value(y.assetId))
55+ else "WAVES"), DataEntry((q + "_lot_amount"), y.amount), DataEntry((q + "_startPrice"), n), DataEntry((q + "_priceAssetId"), o), DataEntry((q + "_top_price"), n), DataEntry((q + "_second_price"), n), DataEntry(u, x), DataEntry("test", c(("123" + toString(n))))])
56+ }
57+
58+
59+
60+@Callable(l)
61+func bid (q,z) = {
62+ let y = extract(l.payment)
63+ let A = if (isDefined(y.assetId))
64+ then toBase58String(value(y.assetId))
65+ else "WAVES"
66+ let B = toBase58String(l.caller.bytes)
67+ let C = getIntegerValue(this, (q + "_reveal_start"))
68+ let n = getIntegerValue(this, (q + "_startPrice"))
69+ let o = getStringValue(this, (q + "_priceAssetId"))
70+ let t = getStringValue(this, (q + "_organizer"))
71+ let p = getIntegerValue(this, (q + "_deposit"))
72+ let D = getIntegerValue(this, (q + "_unrevealed_count"))
73+ let E = getString(this, (B + "_bidder"))
74+ let F = isDefined(getString(this, ((q + B) + "_bid_hash")))
75+ if ((B == t))
76+ then throw("Organizer can not bid")
77+ else if ((lastBlock.height >= C))
78+ then throw("Auction already finished")
79+ else if (if (!(F))
80+ then (o != A)
81+ else false)
82+ then throw((("Bid must be in asset '" + o) + "'"))
83+ else if (!(isDefined(t)))
84+ then throw("Organizer should be defined")
85+ else if (if (!(F))
86+ then (y.amount != p)
87+ else false)
88+ then throw("Payment should be equel to deposit")
89+ else {
90+ let G = if (F)
91+ then 0
92+ else 1
93+ WriteSet([DataEntry(((q + B) + "_revealed"), false), DataEntry(((q + B) + "_bid_hash"), z), DataEntry(((q + B) + "_settle"), false), DataEntry((q + "_unrevealed_count"), (D + G)), DataEntry((B + "_bidder"), (((if (isDefined(E))
94+ then value(E)
95+ else "") + " ") + q))])
96+ }
97+ }
98+
99+
100+
101+@Callable(l)
102+func reveal (q,H,I) = {
103+ let B = toBase58String(l.caller.bytes)
104+ let t = getStringValue(this, (q + "_organizer"))
105+ let J = getStringValue(this, ((q + B) + "_bid_hash"))
106+ let K = getBooleanValue(this, ((q + B) + "_revealed"))
107+ let r = getIntegerValue(this, (q + "_reveal_start"))
108+ let s = getIntegerValue(this, (q + "_closing_start"))
109+ let L = getIntegerValue(this, (q + "_top_price"))
110+ let M = getIntegerValue(this, (q + "_second_price"))
111+ let N = getString(this, (q + "_winner"))
112+ let D = getIntegerValue(this, (q + "_unrevealed_count"))
113+ let O = toString(H)
114+ let P = (I + O)
115+ let Q = c(P)
116+ if (!(isDefined(t)))
117+ then throw("Organizer is not defined")
118+ else if (!(isDefined(J)))
119+ then throw("Bid is not defined")
120+ else if (if ((r > lastBlock.height))
121+ then true
122+ else (lastBlock.height > s))
123+ then throw(((((("Auction should be revealed between reveal (" + toString(r)) + ") and closing (") + toString(s)) + ") time, now is ") + toString(lastBlock.height)))
124+ else if ((Q != J))
125+ then throw("Bid hash from bidMount and sault is not equel with hash from the caller bid")
126+ else if ((K == true))
127+ then throw("The bid has been already revealed")
128+ else {
129+ let R = if ((H > L))
130+ then H
131+ else L
132+ let S = if ((L == 0))
133+ then R
134+ else if ((H > L))
135+ then L
136+ else if ((H > M))
137+ then H
138+ else M
139+ let T = if ((H > R))
140+ then B
141+ else if (isDefined(N))
142+ then value(N)
143+ else B
144+ WriteSet([DataEntry((q + "_top_price"), R), DataEntry((q + "_second_price"), S), DataEntry((q + "_winner"), T), DataEntry(((q + B) + "_revealed"), true), DataEntry((q + "_unrevealed_count"), (D - 1))])
145+ }
146+ }
147+
148+
149+
150+@Callable(l)
151+func withdraw (q) = {
152+ let y = l.payment
153+ let B = toBase58String(l.caller.bytes)
154+ let s = getIntegerValue(this, (q + "_closing_start"))
155+ let D = getIntegerValue(this, (q + "_unrevealed_count"))
156+ let t = getStringValue(this, (q + "_organizer"))
157+ let U = getIntegerValue(this, (q + "_reveal_start"))
158+ let N = getString(this, (q + "_winner"))
159+ let V = getStringValue(this, (q + "_lot_assetId"))
160+ let W = getIntegerValue(this, (q + "_lot_amount"))
161+ let o = getStringValue(this, (q + "_priceAssetId"))
162+ let X = getBooleanValue(this, (q + "_settle"))
163+ let Y = getIntegerValue(this, (q + "_second_price"))
164+ let p = getIntegerValue(this, (q + "_deposit"))
165+ let Z = if ((V == "WAVES"))
166+ then unit
167+ else fromBase58String(V)
168+ let aa = if (if ((o == "WAVES"))
169+ then true
170+ else (o == ""))
171+ then unit
172+ else fromBase58String(o)
173+ if (!(isDefined(t)))
174+ then throw("Organizer shoud exist")
175+ else if (if ((s > (U - lastBlock.height)))
176+ then (D != 0)
177+ else false)
178+ then throw("Its too early to withdraw")
179+ else if (if ((B == t))
180+ then true
181+ else (B == N))
182+ then if ((X == true))
183+ then throw("Illegal state, settle shoould be false")
184+ else if (!(isDefined(N)))
185+ then if (isDefined(getString(this, (q + "_lot_passed"))))
186+ then throw("Organizer has already got his lot back")
187+ else {
188+ let ab = addressFromStringValue(value(t))
189+ ScriptResult(WriteSet([DataEntry((q + "_settle"), true), DataEntry((t + "_organizer"), i(getStringValue(this, (t + "_organizer")), q))]), TransferSet([ScriptTransfer(ab, W, Z)]))
190+ }
191+ else {
192+ let ac = addressFromStringValue(value(N))
193+ let ab = addressFromStringValue(value(t))
194+ ScriptResult(WriteSet([DataEntry((q + "_settle"), true), DataEntry(((q + value(N)) + "_settle"), true), DataEntry((value(N) + "_bidder"), i(getStringValue(this, (value(N) + "_bidder")), q)), DataEntry((t + "_organizer"), i(getStringValue(this, (t + "_organizer")), q))]), TransferSet([ScriptTransfer(ab, Y, aa), ScriptTransfer(ac, W, Z), ScriptTransfer(ac, (p - Y), aa)]))
195+ }
196+ else {
197+ let ad = getBooleanValue(this, ((q + B) + "_settle"))
198+ let ae = if (isDefined(ad))
199+ then (value(ad) == true)
200+ else false
201+ if (ae)
202+ then throw("Illegal state, settle shoould be false")
203+ else ScriptResult(WriteSet([DataEntry(((q + B) + "_settle"), true), DataEntry((B + "_bidder"), i(getStringValue(this, (B + "_bidder")), q))]), TransferSet([ScriptTransfer(l.caller, p, aa)]))
204+ }
205+ }
206+
207+
208+
209+@Callable(l)
210+func instantBuy (q) = {
211+ let y = extract(l.payment)
212+ let A = if (isDefined(y.assetId))
213+ then toBase58String(value(y.assetId))
214+ else "WAVES"
215+ let B = toBase58String(l.caller.bytes)
216+ let V = getStringValue(this, (q + "_lot_assetId"))
217+ let o = getStringValue(this, (q + "_priceAssetId"))
218+ let p = getIntegerValue(this, (q + "_deposit"))
219+ let X = getBooleanValue(this, (q + "_settle"))
220+ let t = getStringValue(this, (q + "_organizer"))
221+ let C = getIntegerValue(this, (q + "_reveal_start"))
222+ if ((lastBlock.height >= C))
223+ then throw("Only avialible diring budding phase")
224+ else if (if ((A != o))
225+ then true
226+ else (y.amount != p))
227+ then throw("Invalid payment")
228+ else if (X)
229+ then throw("Already settled")
230+ else {
231+ let N = B
232+ let ab = addressFromStringValue(value(t))
233+ let ac = addressFromStringValue(value(N))
234+ let W = getIntegerValue(this, (q + "_lot_amount"))
235+ let Z = if ((V == "WAVES"))
236+ then unit
237+ else fromBase58String(V)
238+ ScriptResult(WriteSet([DataEntry((q + "_settle"), true), DataEntry(((q + value(N)) + "_settle"), true), DataEntry((value(N) + "_bidder"), i(getStringValue(this, (value(N) + "_bidder")), q)), DataEntry((t + "_organizer"), i(getStringValue(this, (t + "_organizer")), q))]), TransferSet([ScriptTransfer(ab, p, y.assetId), ScriptTransfer(ac, W, Z)]))
239+ }
240+ }
241+
242+

github/deemru/w8io/169f3d6 
54.97 ms