tx · 6YA54ZTxz1dJmas96Cycb9vKRYEv23WEfw1HZKbAKtwv 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK: -0.01400000 Waves 2022.08.13 17:16 [2182816] smart account 3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK > SELF 0.00000000 Waves
{ "type": 13, "id": "6YA54ZTxz1dJmas96Cycb9vKRYEv23WEfw1HZKbAKtwv", "fee": 1400000, "feeAssetId": null, "timestamp": 1660400213096, "version": 2, "chainId": 84, "sender": "3N8iygiXd1v34PPaMSQb34SSrBwGxT2DpGK", "senderPublicKey": "FshLkkgzcLs6iQJ1Z8Nnfhm494tC8xZQczf9iXpZep3Y", "proofs": [ "4JqxsmNJtfNL8GW2CK4Di8gy57m1gCNy3MezePvm1AUbaywYCGSZa83uEpKjScr4vEUHn2KdnxYCVaRPs3yqyC6L" ], "script": "base64:AAIDAAAAAAAAABgIARIFCgMBAQgSAwoBCBIDCgEIEgMKAQgAAAABAAAAABJtYXhBdWN0aW9uRHVyYXRpb24AAAAAAAAIBogAAAAEAAAAAWkBAAAADHN0YXJ0QXVjdGlvbgAAAAMAAAAIZHVyYXRpb24AAAAKc3RhcnRQcmljZQAAAAxwcmljZUFzc2V0SWQEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlhdWN0aW9uSWQJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAQAAAAJZW5kSGVpZ2h0CQAAZAAAAAIIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0BQAAAAhkdXJhdGlvbgQAAAALb3JnYW5pc2VyaWQJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAPQXVjdGlvbmR1cmF0aW9uCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAJYXVjdGlvbklkBQAAAAllbmRIZWlnaHQEAAAACW9yZ2FuaXNlcgkBAAAACURhdGFFbnRyeQAAAAIJAA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SWQCAAAACl9vcmdhbml6ZXIEAAAACURBcHBvd25lcgkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwIAAAAKX2RhcHBvd25lcgQAAAAPQXVjdGlvbmR1cmF0aW9uCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAJYXVjdGlvbklkCQAAZAAAAAIIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0AAAAAAAAAAABBAAAAARkaWZmCQAAZQAAAAIFAAAACWVuZEhlaWdodAgFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQEAAAADW9yZ2FuaXplckFkZHIJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQkBAAAABXZhbHVlAAAAAQUAAAAJb3JnYW5pemVyAwMJAQAAAAIhPQAAAAIFAAAACW9yZ2FuaXplcgUAAAAQY2FsbGVyQWRkcmVzc1N0cgYJAQAAAAIhPQAAAAIFAAAACURBcHBvd25lcgUAAAAQY2FsbGVyQWRkcmVzc1N0cgkAAAIAAAABAgAAAC5Zb3UgYXJlIG5vdCBBbGxvd2RlZCB0byBTaWduIHRoaXMgdHJhbnNhY3Rpb24uAwkAAGYAAAACBQAAAARkaWZmAAAAAAAAAAAPCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIFAAAAD0F1Y3Rpb25kdXJhdGlvbgUAAAADbmlsCQAAAgAAAAECAAAAHEF1Y3Rpb24gaXMgYWxyZWFkeSBmaW5pc2hlZC4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleRsMDCE=", "height": 2182816, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EoxizLb6F5hZMmGpSyGYXB3WqFFHjcfbrafhvAVkkQEh Next: EuNQJJkZ28o1UHveJQ4Uk7u9ez8DUnnqadNJMbaudmGX Diff:
Old | New | Differences | |
---|---|---|---|
117 | 117 | let q = toBase58String(b.caller.bytes) | |
118 | 118 | let h = getIntegerValue(this, g) | |
119 | 119 | let x = getStringValue(this, (g + "_organizer")) | |
120 | + | let E = getStringValue(this, "_dappowner") | |
120 | 121 | let j = DataEntry(g, (lastBlock.height + 1)) | |
121 | - | let | |
122 | + | let F = (h - lastBlock.height) | |
122 | 123 | let C = addressFromStringValue(value(x)) | |
123 | - | if ((x != q)) | |
124 | + | if (if ((x != q)) | |
125 | + | then true | |
126 | + | else (E != q)) | |
124 | 127 | then throw("You are not Allowded to Sign this transaction.") | |
125 | - | else if (( | |
128 | + | else if ((F > 15)) | |
126 | 129 | then WriteSet([j]) | |
127 | 130 | else throw("Auction is already finished.") | |
128 | 131 | } | |
129 | 132 | ||
130 | 133 | ||
131 | - | @Verifier( | |
132 | - | func | |
134 | + | @Verifier(G) | |
135 | + | func H () = sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey) | |
133 | 136 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 525960 | |
5 | 5 | ||
6 | 6 | @Callable(b) | |
7 | 7 | func startAuction (c,d,e) = { | |
8 | 8 | let f = extract(b.payment) | |
9 | 9 | let g = toBase58String(b.transactionId) | |
10 | 10 | let h = (lastBlock.height + c) | |
11 | 11 | let i = toBase58String(b.caller.bytes) | |
12 | 12 | let j = DataEntry(g, h) | |
13 | 13 | let k = DataEntry((g + "_organizer"), i) | |
14 | 14 | let l = DataEntry((g + "_lot_assetId"), if (isDefined(f.assetId)) | |
15 | 15 | then toBase58String(value(f.assetId)) | |
16 | 16 | else "WAVES") | |
17 | 17 | let m = DataEntry((g + "_lot_amount"), f.amount) | |
18 | 18 | let n = DataEntry((g + "_startPrice"), d) | |
19 | 19 | let o = DataEntry((g + "_priceAssetId"), e) | |
20 | 20 | if ((c > a)) | |
21 | 21 | then throw(("Duration is too long. Must be less than " + toString(a))) | |
22 | 22 | else WriteSet([j, k, l, m, n, o]) | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | ||
27 | 27 | @Callable(b) | |
28 | 28 | func bid (g) = { | |
29 | 29 | let f = extract(b.payment) | |
30 | 30 | let p = if (isDefined(f.assetId)) | |
31 | 31 | then toBase58String(value(f.assetId)) | |
32 | 32 | else "WAVES" | |
33 | 33 | let q = toBase58String(b.caller.bytes) | |
34 | 34 | let h = getIntegerValue(this, g) | |
35 | 35 | let d = getIntegerValue(this, (g + "_startPrice")) | |
36 | 36 | let e = getStringValue(this, (g + "_priceAssetId")) | |
37 | 37 | let r = getInteger(this, (g + "_winAmount")) | |
38 | 38 | let s = getString(this, (g + "_winner")) | |
39 | 39 | let t = if (isDefined(s)) | |
40 | 40 | then (value(s) == q) | |
41 | 41 | else false | |
42 | 42 | let u = (f.amount + (if (t) | |
43 | 43 | then value(r) | |
44 | 44 | else 0)) | |
45 | 45 | if ((lastBlock.height >= h)) | |
46 | 46 | then throw("Auction already finished.") | |
47 | 47 | else if ((e != p)) | |
48 | 48 | then throw((("Bid must be in asset '" + e) + "'")) | |
49 | 49 | else if (if (if (isDefined(r)) | |
50 | 50 | then (value(r) >= u) | |
51 | 51 | else false) | |
52 | 52 | then true | |
53 | 53 | else if (!(isDefined(r))) | |
54 | 54 | then (d >= u) | |
55 | 55 | else false) | |
56 | 56 | then throw(("Bid must be more then " + toString(if (isDefined(r)) | |
57 | 57 | then value(r) | |
58 | 58 | else d))) | |
59 | 59 | else if (if (t) | |
60 | 60 | then true | |
61 | 61 | else !(isDefined(s))) | |
62 | 62 | then WriteSet([DataEntry((g + "_winner"), q), DataEntry((g + "_winAmount"), u)]) | |
63 | 63 | else { | |
64 | 64 | let v = addressFromStringValue(value(s)) | |
65 | 65 | let w = if (if ((e == "WAVES")) | |
66 | 66 | then true | |
67 | 67 | else (e == "")) | |
68 | 68 | then unit | |
69 | 69 | else fromBase58String(e) | |
70 | 70 | ScriptResult(WriteSet([DataEntry((g + "_winner"), q), DataEntry((g + "_winAmount"), u)]), TransferSet([ScriptTransfer(v, value(r), w)])) | |
71 | 71 | } | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(b) | |
77 | 77 | func withdraw (g) = { | |
78 | 78 | let f = extract(b.payment) | |
79 | 79 | let p = if (isDefined(f.assetId)) | |
80 | 80 | then toBase58String(value(f.assetId)) | |
81 | 81 | else "WAVES" | |
82 | 82 | let q = toBase58String(b.caller.bytes) | |
83 | 83 | let h = getIntegerValue(this, g) | |
84 | 84 | let x = getStringValue(this, (g + "_organizer")) | |
85 | 85 | let s = getString(this, (g + "_winner")) | |
86 | 86 | let y = getStringValue(this, (g + "_lot_assetId")) | |
87 | 87 | let z = getIntegerValue(this, (g + "_lot_amount")) | |
88 | 88 | let e = getStringValue(this, (g + "_priceAssetId")) | |
89 | 89 | let r = getIntegerValue(this, (g + "_winAmount")) | |
90 | 90 | let A = if ((y == "WAVES")) | |
91 | 91 | then unit | |
92 | 92 | else fromBase58String(y) | |
93 | 93 | let w = if (if ((e == "WAVES")) | |
94 | 94 | then true | |
95 | 95 | else (e == "")) | |
96 | 96 | then unit | |
97 | 97 | else fromBase58String(e) | |
98 | 98 | let B = addressFromStringValue(value(s)) | |
99 | 99 | let C = addressFromStringValue(value(x)) | |
100 | 100 | let D = getInteger(this, ((g + "_bidder_") + q)) | |
101 | 101 | if ((h > lastBlock.height)) | |
102 | 102 | then throw("Auction is not finished yet") | |
103 | 103 | else if (!(isDefined(s))) | |
104 | 104 | then if (isDefined(getString(this, (g + "_lot_passed")))) | |
105 | 105 | then throw("Organizer has already got his lot back") | |
106 | 106 | else ScriptResult(WriteSet([DataEntry((g + "_lot_passed"), x)]), TransferSet([ScriptTransfer(C, z, A)])) | |
107 | 107 | else if (isDefined(getString(this, (g + "_lot_passed")))) | |
108 | 108 | then throw("Lot is already passed to the winner, and organizer got his reward") | |
109 | 109 | else ScriptResult(WriteSet([DataEntry((g + "_lot_passed"), toBase58String(B.bytes))]), TransferSet([ScriptTransfer(B, z, A), ScriptTransfer(C, ((r * 95) / 100), w), ScriptTransfer(addressFromPublicKey(base58'59q1hHBmeQgfSRst9Dn52VTBbtCu4SQ7AujhGDjHCqn6'), ((r * 5) / 100), w)])) | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(b) | |
115 | 115 | func Expedite (g) = { | |
116 | 116 | let f = extract(b.payment) | |
117 | 117 | let q = toBase58String(b.caller.bytes) | |
118 | 118 | let h = getIntegerValue(this, g) | |
119 | 119 | let x = getStringValue(this, (g + "_organizer")) | |
120 | + | let E = getStringValue(this, "_dappowner") | |
120 | 121 | let j = DataEntry(g, (lastBlock.height + 1)) | |
121 | - | let | |
122 | + | let F = (h - lastBlock.height) | |
122 | 123 | let C = addressFromStringValue(value(x)) | |
123 | - | if ((x != q)) | |
124 | + | if (if ((x != q)) | |
125 | + | then true | |
126 | + | else (E != q)) | |
124 | 127 | then throw("You are not Allowded to Sign this transaction.") | |
125 | - | else if (( | |
128 | + | else if ((F > 15)) | |
126 | 129 | then WriteSet([j]) | |
127 | 130 | else throw("Auction is already finished.") | |
128 | 131 | } | |
129 | 132 | ||
130 | 133 | ||
131 | - | @Verifier( | |
132 | - | func | |
134 | + | @Verifier(G) | |
135 | + | func H () = sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey) | |
133 | 136 |
github/deemru/w8io/169f3d6 35.88 ms ◑