tx · 38PrUFiT1pKYmiPUM2zVKa2YKxdz69eJorT8BmCzEXLw

3N1Dhq5ZZyoojQisuTLusYjnGisqrxDwGLy:  -0.01000000 Waves

2022.04.11 18:29 [2004110] smart account 3N1Dhq5ZZyoojQisuTLusYjnGisqrxDwGLy > SELF 0.00000000 Waves

{ "type": 13, "id": "38PrUFiT1pKYmiPUM2zVKa2YKxdz69eJorT8BmCzEXLw", "fee": 1000000, "feeAssetId": null, "timestamp": 1649690985884, "version": 2, "chainId": 84, "sender": "3N1Dhq5ZZyoojQisuTLusYjnGisqrxDwGLy", "senderPublicKey": "4ogfEQE7KGDWQR7Vd5VThqBebZ47NxrMLmAApR3sFuXW", "proofs": [ "5nRXDK6VTacKwgAjBUR4X1auFtDjbTMWp21a7VHQRBthn2uMqkfLDxtoU6J2gaiFEjZutDn8xfiZoGdXzaywwkwj" ], "script": "base64:AAIFAAAAAAAAACkIAhIDCgEIEgkKBwgICAgBAQESCQoHCAgICAEBARIECgIICBIECgIICAAAAAgAAAAACW9yYWNsZUtleQIAAAAJb3JhY2xlS2V5AQAAAAZnZXRTdHIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAAAQAAAAZnZXRJbnQAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAAAAAAGb3JhY2xlCQEAAAAGZ2V0U3RyAAAAAQUAAAAJb3JhY2xlS2V5AAAAAAlvcmFjbGVGZWUJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQUAAAAGb3JhY2xlAAAAAApzY29uZXhEYXBwCQAEJgAAAAEJAQAAABN2YWx1ZU9yRXJy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tUmV3YXJkBQAAABJhZGRyZXNzMlRlYW1SZXdhcmQFAAAAEmFkZHJlc3MzVGVhbVJld2FyZAQAAAAUc2NyaXB0VHJhbnNmZXJTZWxsZXIDCQAAAAAAAAIFAAAABnNlbGxlcgIAAAAABQAAAANuaWwJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAGc2VsbGVyBQAAAAxzZWxsZXJSZXdhcmQICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQFAAAAA25pbAkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgUAAAAac2NyaXB0VHJhbnNmZXJBZGRyZXNzVGVhbTEFAAAAGnNjcmlwdFRyYW5zZmVyQWRkcmVzc1RlYW0yBQAAABpzY3JpcHRUcmFuc2ZlckFkZHJlc3NUZWFtMwUAAAAWc2NyaXB0VHJhbnNmZXJBZGRyZXNzMQUAAAAWc2NyaXB0VHJhbnNmZXJBZGRyZXNzMgUAAAAWc2NyaXB0VHJhbnNmZXJBZGRyZXNzMwUAAAAUc2NyaXB0VHJhbnNmZXJTZWxsZXIAAAAA5zd+YQ==", "height": 2004110, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5UFuuoyDANnumqRwF9KQXxQgkb3b1jJrPfsbF7XZm4TY Next: BNGMkPZLkhYECYhGHcco6G5vXRcKNeH2ZUBre3LhVGVF Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = false
4+let a = "oracleKey"
55
6-let b = "oracleKey"
7-
8-func c (d) = {
9- let e = getString(this, d)
10- if ($isInstanceOf(e, "String"))
6+func b (c) = {
7+ let d = getString(this, c)
8+ if ($isInstanceOf(d, "String"))
119 then {
12- let f = e
13- f
10+ let e = d
11+ e
1412 }
1513 else ""
1614 }
1715
1816
19-let g = c(b)
17+func f (c) = {
18+ let d = getInteger(this, c)
19+ if ($isInstanceOf(d, "Int"))
20+ then {
21+ let e = d
22+ e
23+ }
24+ else 0
25+ }
26+
27+
28+let g = b(a)
2029
2130 let h = value(addressFromString(g))
2231
23-let i = [getString(h, "owner1"), getString(h, "owner2")]
32+let i = addressFromString(valueOrErrorMessage(getString(h, "sconexDapp"), "sconexDapp not found"))
2433
25-let j = valueOrErrorMessage(getString(h, "collectionsDapp"), "collectionDapp not found")
34+let j = valueOrErrorMessage(getString(h, "feeReceiver"), "feeReceiver not found")
2635
27-let k = valueOrErrorMessage(getString(h, "feeReceiver"), "feeReceiver not found")
36+let k = [i]
2837
29-let l = valueOrErrorMessage(getString(h, "certDapp"), "certDapp not found")
30-
31-let m = valueOrErrorMessage(getString(h, "feeDapp"), "feeDapp not found")
32-
33-let n = value(addressFromString(valueOrErrorMessage(getString(h, "userDapp"), "userdapp not found")))
34-
35-let o = fromBase58String(getStringValue(h, "USDNAssetId"))
36-
37-let p = fromBase58String(getStringValue(h, "SconexAssetId"))
38-
39-let q = ["IMAGE", "PDF", "VIDEO"]
40-
41-let r = ["PDF"]
42-
43-let s = valueOrElse(getBoolean(n, "conf_dapp_is_running"), true)
44-
45-let t = valueOrElse(getString(n, "conf_maintenance_msg"), "")
46-
47-let u = "SUSPENDED"
48-
49-let v = "REMOVED"
50-
51-let w = "UNREGISTERED"
52-
53-let x = "BIDTYPE"
54-
55-let y = "TRADITIONAL"
56-
57-let z = "DIRECT"
58-
59-func A (d) = valueOrElse(getString(n, d), "")
38+@Callable(l)
39+func initDapp (m) = if ((l.caller != this))
40+ then throw("You cannot do this action")
41+ else if ((g != ""))
42+ then throw("oracle already set, you can't override!")
43+ else [StringEntry(a, m)]
6044
6145
62-func B (d) = valueOrElse(getString(this, d), "")
46+
47+@Callable(l)
48+func teamSplitFee (n,o,p,q,r,s,t) = if (!(containsElement(k, l.caller)))
49+ then throw("Not allowed")
50+ else if ((0 > r))
51+ then throw("Share 1 can't be negative")
52+ else if (if (if ((r != 0))
53+ then true
54+ else (o != ""))
55+ then !(isDefined(addressFromString(o)))
56+ else false)
57+ then throw("Address 1 is invalid")
58+ else if ((0 > s))
59+ then throw("Share 2 can't be negative")
60+ else if (if (if ((s != 0))
61+ then true
62+ else (p != ""))
63+ then !(isDefined(addressFromString(p)))
64+ else false)
65+ then throw("Address 2 is invalid")
66+ else if ((0 > t))
67+ then throw("Share 3 can't be negative")
68+ else if (if (if ((t != 0))
69+ then true
70+ else (q != ""))
71+ then !(isDefined(addressFromString(q)))
72+ else false)
73+ then throw("Address 3 is invalid")
74+ else if ((((r + s) + t) != 15))
75+ then throw("Sum of shares should be equal to 15")
76+ else [StringEntry((n + "_team_address1"), o), StringEntry((n + "_team_address2"), p), StringEntry((n + "_team_address3"), q), IntegerEntry((n + "_team_share1"), r), IntegerEntry((n + "_team_share2"), s), IntegerEntry((n + "_team_share3"), t)]
6377
6478
65-func C (d,D) = valueOrErrorMessage(getString(this, d), D)
79+
80+@Callable(l)
81+func creatorSplitFee (n,o,p,q,r,s,t) = if (!(containsElement(k, l.caller)))
82+ then throw("Not allowed")
83+ else if ((0 > r))
84+ then throw("Share 1 can't be negative")
85+ else if (if (if ((r != 0))
86+ then true
87+ else (o != ""))
88+ then !(isDefined(addressFromString(o)))
89+ else false)
90+ then throw("Address 1 is invalid")
91+ else if ((0 > s))
92+ then throw("Share 2 can't be negative")
93+ else if (if (if ((s != 0))
94+ then true
95+ else (p != ""))
96+ then !(isDefined(addressFromString(p)))
97+ else false)
98+ then throw("Address 2 is invalid")
99+ else if ((0 > t))
100+ then throw("Share 3 can't be negative")
101+ else if (if (if ((t != 0))
102+ then true
103+ else (q != ""))
104+ then !(isDefined(addressFromString(q)))
105+ else false)
106+ then throw("Address 3 is invalid")
107+ else if ((((r + s) + t) > 85))
108+ then throw("Sum of shares should be smaller or equal then 85")
109+ else [StringEntry((n + "_creator_address1"), o), StringEntry((n + "_creator_address2"), p), StringEntry((n + "_creator_address3"), q), IntegerEntry((n + "_creator_share1"), r), IntegerEntry((n + "_creator_share2"), s), IntegerEntry((n + "_creator_share3"), t)]
66110
67111
68-func E (d) = valueOrErrorMessage(getInteger(h, d), "Integer undefine or 0 in oracle")
69112
70-
71-func F (d) = valueOrElse(getInteger(this, d), 0)
72-
73-
74-func G (d) = valueOrElse(getBoolean(this, d), false)
75-
76-
77-func H (I) = (size(I) == 64)
78-
79-
80-func J (K) = ("user_status_" + K)
81-
82-
83-func L (K,M) = ((("art_date_" + M) + "_") + K)
84-
85-
86-func N (K,M) = ((("art_name_" + M) + "_") + K)
87-
88-
89-func O (K,M) = ((("art_desc_" + M) + "_") + K)
90-
91-
92-func P (K,M) = ((("art_display_cid_" + M) + "_") + K)
93-
94-
95-func Q (K,M) = ((("art_preview_cid_" + M) + "_") + K)
96-
97-
98-func R (K,M) = ((("art_maxmint_" + M) + "_") + K)
99-
100-
101-func S (M) = ("art_highestBidBidId_" + M)
102-
103-
104-func T (U) = ("bid_" + U)
105-
106-
107-func V (K,M) = ((("art_duration_" + M) + "_") + K)
108-
109-
110-func W (K,M) = ((("art_endheight_" + M) + "_") + K)
111-
112-
113-func X (K,M) = ((("art_auctiontype_" + M) + "_") + K)
114-
115-
116-func Y (K,M) = ((("art_issued_" + M) + "_") + K)
117-
118-
119-func Z (aa) = ("nft_issued_" + aa)
120-
121-
122-func ab (aa) = ("nft_artId_" + aa)
123-
124-
125-func ac (K,M) = ((("art_onsale_" + M) + "_") + K)
126-
127-
128-func ad (K,M) = ((("art_entitlement_" + M) + "_") + K)
129-
130-
131-func ae (K,M) = ((("art_tags_" + M) + "_") + K)
132-
133-
134-func af (K,M) = ((("art_type_" + M) + "_") + K)
135-
136-
137-func ag (K,M) = ((("art_price_" + M) + "_") + K)
138-
139-
140-func ah (K,M) = ((("art_assetAccepted_" + M) + "_") + K)
141-
142-
143-func ai (K,aj) = ((("get_hashbytxidaddr_" + aj) + "_") + K)
144-
145-
146-func ak (al) = ("get_owner_by_hash_" + al)
147-
148-
149-func am (al,K) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((al + K)))))
150-
151-
152-func an (K,M) = ((("collection_" + M) + "_") + K)
153-
154-
155-let ao = E(("min_" + toBase58String(o)))
156-
157-let ap = E(("fee_" + toBase58String(p)))
158-
159-func aq (U) = valueOrElse(F(T(U)), 0)
160-
161-
162-func ar (M) = {
163- let U = B(S(M))
164- if ((U == ""))
165- then 0
166- else aq(U)
167- }
168-
169-
170-func as (at,au) = if ((size(at) == 0))
171- then throw("Field cannot be is empty")
172- else if ((size(at) > au))
173- then throw((at + " is too long"))
174- else true
175-
176-
177-func av (K) = {
178- let aw = valueOrElse(getString(n, J(K)), w)
179- if ((aw == w))
180- then "Register this account first with 'Account' tab"
181- else if ((aw == u))
182- then "Account suspended"
183- else if ((aw == v))
184- then "Account removed"
185- else ""
186- }
187-
188-
189-func ax (K,ay,az,aA,aB) = {
190- let aC = av(K)
191- if ((aC != ""))
192- then throw(aC)
193- else if ((size(ay) == 0))
194- then throw("Display CID cannot be empty")
195- else if ((size(ay) != 46))
196- then throw("This doesn't seem a valid CID!")
197- else if (!(as(az, 100)))
198- then throw("100 Char. max name")
199- else if (!(as(aA, 1000)))
200- then throw("1000 Char. max description")
201- else if ((size(split(aB, ",")) > 5))
202- then throw("5 tags max.")
203- else ""
204- }
205-
206-
207-func aD (aE) = if ((size(aE.payments) == 0))
208- then throw("No payment attached")
113+@Callable(l)
114+func payFeeResell (u,v) = if (!(containsElement(k, l.caller)))
115+ then throw("Not allowed")
209116 else {
210- let aF = value(aE.payments[0])
211- let aG = value(aF.amount)
212- $Tuple2(aF, aG)
117+ let w = 3
118+ let x = value(l.payments[0].amount)
119+ let y = value(l.payments[0].assetId)
120+ let z = f((u + "_creator_share1"))
121+ let A = f((u + "_creator_share2"))
122+ let B = f((u + "_creator_share3"))
123+ let C = b((u + "_creator_address1"))
124+ let D = b((u + "_creator_address2"))
125+ let E = b((u + "_creator_address3"))
126+ let F = if ((C == ""))
127+ then 0
128+ else fraction(x, z, 100)
129+ let G = if ((D == ""))
130+ then 0
131+ else fraction(x, A, 100)
132+ let H = if ((E == ""))
133+ then 0
134+ else fraction(x, B, 100)
135+ let I = fraction(x, w, 100)
136+ let J = ((((x - F) - G) - H) - I)
137+ let K = [ScriptTransfer(addressFromStringValue(j), I, l.payments[0].assetId)]
138+ let L = if ((C == ""))
139+ then nil
140+ else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)]
141+ let M = if ((D == ""))
142+ then nil
143+ else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)]
144+ let N = if ((E == ""))
145+ then nil
146+ else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)]
147+ let O = if ((v == ""))
148+ then nil
149+ else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)]
150+ ((((L ++ M) ++ N) ++ K) ++ O)
213151 }
214152
215153
216-func aH (aE) = {
217- let aI = aD(aE)
218- let aF = aI._1
219- let aG = aI._2
220- let aJ = if (if (isDefined(aF.assetId))
221- then (aF.assetId == p)
222- else false)
223- then aF.assetId
224- else throw((("Only " + toBase58String(p)) + " token accepted as transaction fee"))
225- if ((aG != ap))
226- then throw(((("Payment amount should be " + toString(ap)) + " but is: ") + toString(aG)))
227- else $Tuple2(aG, aJ)
228- }
229154
230-
231-func aK (aL,M) = {
232- let e = getInteger(this, Y(aL, M))
233- if ($isInstanceOf(e, "Int"))
234- then {
235- let f = e
236- if ((f != 0))
237- then true
238- else false
239- }
240- else false
241- }
242-
243-
244-func aM (aE,aN,aO) = {
245- let aP = aD(aE)
246- let aF = aP._1
247- let aG = aP._2
248- let aJ = if (!(isDefined(aF.assetId)))
249- then throw("Wrong asset id")
250- else if (if ((size(aN) > 0))
251- then (toBase58String(value(aF.assetId)) == aN)
252- else false)
253- then aF.assetId
254- else throw("Wrong asset id")
255- if (if ((aJ == unit))
256- then (aN != "")
257- else false)
258- then throw("Wrong asset id")
259- else if ((aO != aG))
260- then throw(((("Payment don't match " + toString(aO)) + " ") + toString(aG)))
261- else $Tuple2(aG, aJ)
262- }
263-
264-
265-func aQ (aJ) = if ((aJ != toBase58String(o)))
266- then throw("Only USDN accepted")
267- else true
268-
269-
270-func aR (aJ,aS) = {
271- let aT = ao
272- if (if ((aT > aS))
273- then true
274- else (aJ != toBase58String(o)))
275- then throw(("Wrong minimum sell price " + toString(aT)))
276- else true
277- }
278-
279-
280-func aU (aJ) = if ((aJ == "WAVES"))
281- then throw("Only USDN is accepted!")
282- else fromBase58String(aJ)
283-
284-
285-func aV (aW) = {
286- let aX = B((aW + "_OPEN"))
287- if ((aX == ""))
288- then throw("Bid not found")
289- else {
290- let aY = split(aX, "_")
291- let aZ = parseIntValue(aY[1])
292- let ba = aU(aY[0])
293- if ((0 >= aZ))
294- then throw("Wrong amount")
295- else $Tuple2(aZ, ba)
296- }
297- }
298-
299-
300-func bb (aE) = if (!(s))
301- then throw(t)
302- else $Tuple3(toBase58String(aE.transactionId), toBase58String(aE.caller.bytes), lastBlock.timestamp)
303-
304-
305-func bc (aE,bd,M,be) = {
306- let bf = (toBase58String(aE.caller.bytes) == bd)
307- let bg = F("total_nft_issued")
308- let bh = B(N(bd, M))
309- if ((bh == ""))
310- then throw("Art doesn't exist")
311- else {
312- let bi = G(ac(bd, M))
313- let bj = F(Y(bd, M))
314- let aO = valueOrElse(F(ag(bd, M)), ao)
315- let aN = if (bf)
316- then toBase58String(o)
317- else B(ah(bd, M))
318- let bk = F(R(bd, M))
319- if (if (if (!(be))
320- then !(bf)
321- else false)
322- then if (if ((0 >= aO))
323- then true
324- else !(bi))
325- then true
326- else (0 >= bk)
327- else false)
328- then throw("Art not for sale")
329- else if (if (if (!(be))
330- then bf
331- else false)
332- then (0 >= bk)
333- else false)
334- then throw("Max issuable not set")
335- else $Tuple7(bg, bh, bj, aO, aN, bk, bi)
336- }
337- }
338-
339-
340-func bl (aE,K,bd,M,bm,U,aN,aO,be) = {
341- let aC = av(bd)
342- if (if (be)
343- then (aC != "")
344- else false)
345- then throw(aC)
346- else {
347- let aW = ((((((("bid_" + M) + "_") + bd) + "_") + bm) + "_") + U)
348- let bn = if (be)
349- then aV(aW)
350- else aM(aE, aN, aO)
351- let aG = bn._1
352- let aJ = bn._2
353- $Tuple3(aW, aG, aJ)
354- }
355- }
356-
357-
358-func bo (bd,M,bh,bp,bk,bg,K,bm,U,aE,bi) = {
359- let bq = ((((((((("Creator: " + bd) + ",ArtID: ") + M) + ",Artwork name: ") + bh) + ",Issue: ") + toString(bp)) + "/") + toString(bk))
360- let br = if (if ((bp == bk))
361- then true
362- else !(bi))
363- then false
364- else true
365- let bs = if ((bm != ""))
366- then addressFromStringValue(bm)
367- else aE.caller
368- $Tuple3(br, bs, bq)
369- }
370-
371-
372-func bt (aJ,aW,bu) = {
373- let bv = if (!(isDefined(aJ)))
374- then throw("Only USDN is accepted")
375- else toBase58String(value(aJ))
376- let aX = B((aW + "_OPEN"))
377- let bw = DeleteEntry((aW + "_OPEN"))
378- let bx = StringEntry((aW + "_CLOSED"), ((aX + "_") + toString(bu)))
379- $Tuple3(bv, bw, bx)
380- }
381-
382-
383-func by (aE,M,bd,U,bm,be) = {
384- let bz = bb(aE)
385- let bA = bz._1
386- let K = bz._2
387- let bu = bz._3
388- let bB = bc(aE, bd, M, be)
389- let bg = bB._1
390- let bh = bB._2
391- let bj = bB._3
392- let aO = bB._4
393- let aN = bB._5
394- let bk = bB._6
395- let bi = bB._7
396- let aX = bl(aE, K, bd, M, bm, U, aN, aO, be)
397- let aW = aX._1
398- let aG = aX._2
399- let aJ = aX._3
400- let bp = if ((bj == bk))
401- then throw("Max items sold")
402- else (bj + 1)
403- let bC = bo(bd, M, bh, bp, bk, bg, K, bm, U, aE, bi)
404- let br = bC._1
405- let bs = bC._2
406- let bq = bC._3
407- let bD = invoke(this, "mintNft", [bg, bq, toString(bs)], nil)
408- if ((bD == bD))
409- then {
410- let bE = {
411- let e = bD
412- if ($isInstanceOf(e, "String"))
413- then {
414- let bF = e
415- bF
416- }
417- else throw("Incorrect invoke result")
418- }
419- let bG = bt(aJ, aW, bu)
420- let bv = bG._1
421- let bw = bG._2
422- let bx = bG._3
423- let bH = ((((((("art_sold_" + toString(bp)) + "_of_") + toString(bk)) + "_") + M) + "_") + bd)
424- let bI = if (!(be))
425- then ((((((((((K + "_") + toString(bu)) + "_") + bA) + "_") + toString(aO)) + "_") + aN) + "_") + bE)
426- else ((((((((((toString(bs) + "_") + toString(bu)) + "_") + bA) + "_") + toString(aG)) + "_") + bv) + "_") + bE)
427- let bJ = invoke(valueOrErrorMessage(addressFromString(m), (m + " not found")), "payFee", [M, bd], [AttachedPayment(aJ, aG)])
428- if ((bJ == bJ))
429- then {
430- let bK = StringEntry(bH, bI)
431- let bL = [IntegerEntry(Y(bd, M), bp), StringEntry(("nft_" + bE), bH), IntegerEntry("total_nft_issued", (bg + 1)), BooleanEntry(ac(bd, M), br), StringEntry(Z(bE), bd), StringEntry(ab(bE), M)]
432- let bM = invoke(addressFromStringValue(l), "createCert", [toString(bs), bE, bd], nil)
433- if ((bM == bM))
434- then if (be)
435- then (((bL :+ bK) :+ bx) :+ bw)
436- else bK :: bL
437- else throw("Strict value is not equal to itself.")
438- }
439- else throw("Strict value is not equal to itself.")
440- }
441- else throw("Strict value is not equal to itself.")
442- }
443-
444-
445-func bN (aE,M,bd) = {
446- let bO = bb(aE)
447- let bA = bO._1
448- let K = bO._2
449- let bu = bO._3
450- let bP = aD(aE)
451- let aF = bP._1
452- let aG = bP._2
453- let aJ = if (!(isDefined(aF.assetId)))
454- then throw("Only USDN is accepted!")
455- else toBase58String(value(aF.assetId))
456- let bQ = F(("current_bidamount_" + M))
457- if (!(aQ(aJ)))
458- then throw("asset not accepted")
459- else {
460- let bj = F(Y(bd, M))
461- let bk = F(R(bd, M))
462- if ((0 >= bk))
463- then throw("No max edition set for this artwork")
464- else if ((bj >= bk))
465- then throw("Sold out, you cannot bid")
466- else [StringEntry((((((((("bid_" + M) + "_") + bd) + "_") + K) + "_") + bA) + "_OPEN"), ((((aJ + "_") + toString(aG)) + "_") + toString(bu))), IntegerEntry(("current_bidamount_" + M), (bQ + 1))]
467- }
468- }
469-
470-
471-func bR (aE,M,bd) = {
472- let bS = F(W(bd, M))
473- let bT = ar(M)
474- if ((height > bS))
475- then throw("This auction is finished already!")
476- else {
477- let bU = bb(aE)
478- let bA = bU._1
479- let K = bU._2
480- let bu = bU._3
481- let bV = aD(aE)
482- let aF = bV._1
483- let aG = bV._2
484- if ((bT >= aG))
485- then throw(("Please place a bid higher than: " + toString(bT)))
486- else {
487- let aJ = if (!(isDefined(aF.assetId)))
488- then throw("Only USDN is accepted!")
489- else toBase58String(value(aF.assetId))
490- let bQ = F(("current_bidamount_" + M))
491- let bW = valueOrElse(F(ag(bd, M)), ao)
492- if (!(aQ(aJ)))
493- then throw("asset not accepted")
494- else if ((bW > aG))
495- then throw("Bid is below min price!")
496- else {
497- let bj = F(Y(bd, M))
498- let bk = F(R(bd, M))
499- if ((0 >= bk))
500- then throw("No max edition set for this artwork")
501- else if ((bj >= bk))
502- then throw("Sold out, you cannot bid")
503- else [StringEntry((((((((("bid_" + M) + "_") + bd) + "_") + K) + "_") + bA) + "_OPEN"), ((((aJ + "_") + toString(aG)) + "_") + toString(bu))), IntegerEntry(("current_bidamount_" + M), (bQ + 1)), StringEntry(S(M), toBase58String(aE.transactionId)), IntegerEntry(T(toBase58String(aE.transactionId)), aG)]
504- }
505- }
506- }
507- }
508-
509-
510-func bX (aE,M,bd,U,bm) = {
511- let K = toBase58String(aE.caller.bytes)
512- if ((K != bd))
513- then throw("You cannot do this action")
514- else by(aE, M, bd, U, bm, true)
515- }
516-
517-
518-func bY (M,bd) = {
519- let bj = F(Y(bd, M))
520- let bk = F(R(bd, M))
521- let bZ = F(W(bd, M))
522- let ca = F(V(bd, M))
523- let bS = (ca + height)
524- if ((height > bZ))
525- then if ((bj == bk))
526- then throw("Can't restart auction, max amount sold")
527- else [IntegerEntry(W(bd, M), bS), DeleteEntry(S(M))]
528- else throw("Previous auction isn't completed yet")
529- }
530-
531-
532-func cb (aE,M,bd,U,bm) = {
533- let bS = F(W(bd, M))
534- let cc = B(S(M))
535- if ((height > bS))
536- then if ((U == cc))
537- then {
538- let cd = by(aE, M, bd, U, bm, true)
539- let ce = bY(M, bd)
540- (ce ++ cd)
541- }
542- else throw("This is not the winning bid!")
543- else throw("This auction is not yet finished!")
544- }
545-
546-
547-func cf (aE,M,bd,U) = {
548- let cg = bb(aE)
549- let bA = cg._1
550- let K = cg._2
551- let bu = cg._3
552- let bQ = F(("current_bidamount_" + M))
553- let aW = ((((((("bid_" + M) + "_") + bd) + "_") + K) + "_") + U)
554- let aX = C((aW + "_OPEN"), "Bid not found")
555- let aY = split(aX, "_")
556- let aJ = aU(aY[0])
557- let ch = "CANCELED"
558-[DeleteEntry((aW + "_OPEN")), StringEntry(((aW + "_") + ch), ((aX + "_") + toString(bu))), IntegerEntry(("current_bidamount_" + M), (bQ - 1)), ScriptTransfer(Address(fromBase58String(K)), parseIntValue(aY[1]), aJ)]
559- }
560-
561-
562-func ci (aE,M,bd,U) = {
563- let cg = bb(aE)
564- let bA = cg._1
565- let K = cg._2
566- let bu = cg._3
567- let bQ = F(("current_bidamount_" + M))
568- let aW = ((((((("bid_" + M) + "_") + bd) + "_") + K) + "_") + U)
569- let aX = C((aW + "_OPEN"), "Bid not found")
570- let aY = split(aX, "_")
571- let aJ = aU(aY[0])
572- let ch = "CANCELED"
573- let aZ = parseIntValue(aY[1])
574- let cc = B(S(M))
575- if ((U == cc))
576- then throw("You can't cancel the highest bid!")
577- else [DeleteEntry((aW + "_OPEN")), StringEntry(((aW + "_") + ch), ((aX + "_") + toString(bu))), IntegerEntry(("current_bidamount_" + M), (bQ - 1)), ScriptTransfer(Address(fromBase58String(K)), aZ, aJ)]
578- }
579-
580-
581-@Callable(aE)
582-func initDapp (cj) = if ((aE.caller != this))
583- then throw("You cannot do this action")
584- else if ((g != ""))
585- then throw("oracle already set, you can't override!")
586- else [StringEntry(b, cj)]
587-
588-
589-
590-@Callable(aE)
591-func restartAuctionManual (M) = if ((ar(M) != 0))
592- then throw("Please accept the highest bid!")
593- else bY(M, toBase58String(aE.caller.bytes))
594-
595-
596-
597-@Callable(aE)
598-func mintNft (bg,bq,bs) = if ((aE.caller == this))
599- then {
600- let ck = Address(fromBase58String(bs))
601- let cl = Issue(("SCONEX_" + toString((bg + 1))), bq, 1, 0, false)
602- let bE = calculateAssetId(cl)
603- $Tuple2([cl, ScriptTransfer(ck, 1, bE)], toBase58String(bE))
155+@Callable(l)
156+func payFee (u,v) = if (!(containsElement(k, l.caller)))
157+ then throw("Not allowed")
158+ else {
159+ let x = value(l.payments[0].amount)
160+ let y = value(l.payments[0].assetId)
161+ let P = f((u + "_team_share1"))
162+ let Q = f((u + "_team_share2"))
163+ let R = f((u + "_team_share3"))
164+ let S = b((u + "_team_address1"))
165+ let T = b((u + "_team_address2"))
166+ let U = b((u + "_team_address3"))
167+ let z = f((u + "_creator_address1"))
168+ let A = f((u + "_creator_address2"))
169+ let B = f((u + "_creator_address3"))
170+ let C = b((u + "_creator_address1"))
171+ let D = b((u + "_creator_address2"))
172+ let E = b((u + "_creator_address3"))
173+ let V = if ((S == ""))
174+ then 0
175+ else fraction(x, P, 100)
176+ let W = if ((T == ""))
177+ then 0
178+ else fraction(x, Q, 100)
179+ let X = if ((U == ""))
180+ then 0
181+ else fraction(x, R, 100)
182+ let F = if ((C == ""))
183+ then 0
184+ else fraction(x, z, 100)
185+ let G = if ((D == ""))
186+ then 0
187+ else fraction(x, A, 100)
188+ let H = if ((E == ""))
189+ then 0
190+ else fraction(x, B, 100)
191+ let Y = if ((S == ""))
192+ then nil
193+ else [ScriptTransfer(addressFromStringValue(S), V, l.payments[0].assetId)]
194+ let Z = if ((T == ""))
195+ then nil
196+ else [ScriptTransfer(addressFromStringValue(T), W, l.payments[0].assetId)]
197+ let aa = if ((U == ""))
198+ then nil
199+ else [ScriptTransfer(addressFromStringValue(U), X, l.payments[0].assetId)]
200+ let L = if ((C == ""))
201+ then nil
202+ else [ScriptTransfer(addressFromStringValue(C), F, l.payments[0].assetId)]
203+ let M = if ((D == ""))
204+ then nil
205+ else [ScriptTransfer(addressFromStringValue(D), G, l.payments[0].assetId)]
206+ let N = if ((E == ""))
207+ then nil
208+ else [ScriptTransfer(addressFromStringValue(E), H, l.payments[0].assetId)]
209+ let J = ((((((x - F) - G) - H) - V) - W) - X)
210+ let O = if ((v == ""))
211+ then nil
212+ else [ScriptTransfer(addressFromStringValue(v), J, l.payments[0].assetId)]
213+ ((((((Y ++ Z) ++ aa) ++ L) ++ M) ++ N) ++ O)
604214 }
605- else throw("Only the dApp can mint NFT's")
606-
607-
608-
609-@Callable(aE)
610-func addArtwork (al,az,aA,aB,cm,ay,cn,co,cp,cq) = {
611- let cr = bb(aE)
612- let M = cr._1
613- let K = cr._2
614- let bu = cr._3
615- if (containsElement(q, cm))
616- then {
617- let cs = ax(K, ay, az, aA, aB)
618- if ((cs != ""))
619- then throw("Something went wrong!")
620- else {
621- let ct = aH(aE)
622- let aG = ct._1
623- let aJ = ct._2
624- if (!(isDefined(aG)))
625- then throw("Something went wrong")
626- else {
627- let cu = if (containsElement(r, cm))
628- then [StringEntry(Q(K, M), co)]
629- else nil
630- let cv = invoke(valueOrErrorMessage(addressFromString(j), (j + " not found")), "collectionProcess", [cp, cq, K], nil)
631- if ((cv == cv))
632- then {
633- let cw = {
634- let e = cv
635- if ($isInstanceOf(e, "String"))
636- then {
637- let bF = e
638- bF
639- }
640- else throw("Incorrect invoke result")
641- }
642- let cx = B(am(al, K))
643- if ((cx != ""))
644- then throw("You already added it")
645- else {
646- let cy = B(ak(al))
647- if ((cy != ""))
648- then throw("This hash is already registered")
649- else (cu ++ [StringEntry(ak(al), K), StringEntry(am(al, K), M), IntegerEntry(L(K, M), bu), StringEntry(N(K, M), az), StringEntry(O(K, M), aA), StringEntry(P(K, M), ay), StringEntry(af(K, M), cm), StringEntry(ae(K, M), aB), IntegerEntry(R(K, M), 0), IntegerEntry(Y(K, M), 0), BooleanEntry(ac(K, M), false), StringEntry(ai(K, M), al), StringEntry(ad(K, M), cn), ScriptTransfer(Address(fromBase58String(k)), aG, aJ)])
650- }
651- }
652- else throw("Strict value is not equal to itself.")
653- }
654- }
655- }
656- else throw("Unknown type")
657- }
658-
659-
660-
661-@Callable(aE)
662-func sellArtwork (M,aS,cz,aJ,cA,ca,cB,cC,cD,cE,cF,cG) = {
663- let bJ = invoke(valueOrErrorMessage(addressFromString(m), (m + " not found")), "teamSplitFee", [M, k, "", "", 15, 0, 0], nil)
664- if ((bJ == bJ))
665- then {
666- let cH = invoke(valueOrErrorMessage(addressFromString(m), (m + " not found")), "creatorSplitFee", [M, cB, cC, cD, cE, cF, cG], nil)
667- if ((cH == cH))
668- then {
669- let cI = bb(aE)
670- let bA = cI._1
671- let K = cI._2
672- let bh = B(N(K, M))
673- if (!(containsElement([x, y, z], cA)))
674- then throw("We don't know this auction type")
675- else if ((bh == ""))
676- then throw("This art doesn't match your account")
677- else {
678- let bQ = F(("current_bidamount_" + M))
679- if (!(aQ(aJ)))
680- then throw("Something went wrong!")
681- else if (!(aR(aJ, aS)))
682- then throw("Something went wrong!")
683- else {
684- let aC = av(K)
685- if ((aC != ""))
686- then throw(aC)
687- else {
688- let bj = F(Y(K, M))
689- let bk = F(R(K, M))
690- if ((cz > 10000))
691- then throw("10000 editions max per artwork")
692- else if (if ((bj != 0))
693- then (bj == bk)
694- else false)
695- then throw("Max edition reached.")
696- else if (if ((bj > 0))
697- then (bk != cz)
698- else false)
699- then throw("Cannot change maximum issuable anymore")
700- else if (if ((bQ > 0))
701- then (bk != cz)
702- else false)
703- then throw("Cannot change maximum issuable with active orders")
704- else {
705- let br = if (if ((aS > 0))
706- then (cz > 0)
707- else false)
708- then true
709- else false
710- let bS = (ca + height)
711-[BooleanEntry(ac(K, M), br), IntegerEntry(ag(K, M), aS), IntegerEntry(R(K, M), cz), IntegerEntry(V(K, M), ca), IntegerEntry(W(K, M), bS), StringEntry(ah(K, M), aJ), StringEntry(X(K, M), cA)]
712- }
713- }
714- }
715- }
716- }
717- else throw("Strict value is not equal to itself.")
718- }
719- else throw("Strict value is not equal to itself.")
720- }
721-
722-
723-
724-@Callable(aE)
725-func buyArtwork (M,bd) = {
726- let cA = B(X(bd, M))
727- if ((cA == z))
728- then by(aE, M, bd, "", "", false)
729- else throw("Direct buy only allowed when no auction type is set!")
730- }
731-
732-
733-
734-@Callable(aE)
735-func updateTags (cJ,M,aB) = {
736- let K = toString(addressFromPublicKey(aE.callerPublicKey))
737- if (containsElement(i, K))
738- then if ((size(split(aB, ",")) > 5))
739- then throw("5 tags max.")
740- else {
741- let cK = C(ae(cJ, M), "No tags created with this key, so can't update!")
742- if ((aB == cK))
743- then throw("Tags are the same as old tags!")
744- else [StringEntry(ae(cJ, M), aB)]
745- }
746- else throw("no")
747- }
748-
749-
750-
751-@Callable(aE)
752-func deleteEntry (cL) = {
753- let K = toString(addressFromPublicKey(aE.callerPublicKey))
754- if (containsElement(i, K))
755- then [DeleteEntry(cL)]
756- else throw("no")
757- }
758-
759-
760-
761-@Callable(aE)
762-func setBid (M,bd) = {
763- let cA = B(X(bd, M))
764- if ((cA == x))
765- then bN(aE, M, bd)
766- else if ((cA == y))
767- then bR(aE, M, bd)
768- else throw((("Unknown auction type :" + cA) + ", please contact the admins"))
769- }
770-
771-
772-
773-@Callable(aE)
774-func acceptBid (M,bd,U,bm) = {
775- let cA = B(X(bd, M))
776- if ((cA == x))
777- then bX(aE, M, bd, U, bm)
778- else if ((cA == y))
779- then cb(aE, M, bd, U, bm)
780- else throw((("Unknown auction type :" + cA) + ", please contact the admins"))
781- }
782-
783-
784-
785-@Callable(aE)
786-func cancelBid (M,bd,U) = {
787- let cA = B(X(bd, M))
788- if ((cA == x))
789- then cf(aE, M, bd, U)
790- else ci(aE, M, bd, U)
791- }
792215
793216

github/deemru/w8io/169f3d6 
108.66 ms