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