tx · BXoq9HPYdUTBdzkxg48CZzV35jXg784ytdQVzcHdenJb 3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9: -0.01400000 Waves 2019.08.04 10:01 [615808] smart account 3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9 > SELF 0.00000000 Waves
{ "type": 13, "id": "BXoq9HPYdUTBdzkxg48CZzV35jXg784ytdQVzcHdenJb", "fee": 1400000, "feeAssetId": null, "timestamp": 1564902183560, "version": 1, "sender": "3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9", "senderPublicKey": "BZri78A6CXpGPmAHZNwqQXoNfWamwRZiuaBas3VdDKZp", "proofs": [ "5m9hgXB9SYGVR3s9adKy1YJ9YUNBPYGs9mB4GYLad5648a6boh7xiUYSTz5Dtr2p5pY8sBGi3wTzEooGju358uTy" ], "script": "base64:AAIDAAAAAAAAAAAAAAAdAAAAAAROT05FAgAAAARub25lAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAEAAAALZ2V0TnVtQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAAADc3RyAQAAAAxnZX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HJ5AAAAAgkBAAAAEGdldEtleUl0ZW1TdGF0dXMAAAABBQAAAARpdGVtAwkAAAAAAAACBQAAAAdjb21taXRzBQAAAAZWT1RFUlMFAAAABlJFVkVBTAUAAAAGVk9USU5HBQAAAANuaWwAAAAAjReghg==", "chainId": 84, "height": 615808, "spentComplexity": 0 } View: original | compacted Prev: 9RN7yAfyy3mkY8sVBbFT1J8mW1qVoiTKRGjXYVQPt7aR Next: GrYmihKNvvZh5gaxTFbwmksP5KHFznUBkVqU7yHXr4jU Diff:
Old | New | Differences | |
---|---|---|---|
156 | 156 | if ((W >= b)) | |
157 | 157 | then throw("Reached max n. of votes") | |
158 | 158 | else if ((w(p, q) != a)) | |
159 | - | then throw("User already voted for this item") | |
159 | + | then throw((("User " + q) + " already voted for this item")) | |
160 | 160 | else if ((F(p) == a)) | |
161 | 161 | then throw("Item does not exist") | |
162 | 162 | else if (if ((X != a)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "none" | |
5 | 5 | ||
6 | 6 | let b = 3 | |
7 | 7 | ||
8 | 8 | let c = 2 | |
9 | 9 | ||
10 | 10 | let d = "voting" | |
11 | 11 | ||
12 | 12 | let e = "reveal" | |
13 | 13 | ||
14 | 14 | let f = "featured" | |
15 | 15 | ||
16 | 16 | let g = "delisted" | |
17 | 17 | ||
18 | 18 | func h (i) = { | |
19 | 19 | let j = { | |
20 | 20 | let k = getInteger(this, i) | |
21 | 21 | if ($isInstanceOf(k, "Int")) | |
22 | 22 | then { | |
23 | 23 | let l = k | |
24 | 24 | l | |
25 | 25 | } | |
26 | 26 | else 0 | |
27 | 27 | } | |
28 | 28 | j | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func m (i) = { | |
33 | 33 | let n = { | |
34 | 34 | let k = getString(this, i) | |
35 | 35 | if ($isInstanceOf(k, "String")) | |
36 | 36 | then { | |
37 | 37 | let l = k | |
38 | 38 | l | |
39 | 39 | } | |
40 | 40 | else a | |
41 | 41 | } | |
42 | 42 | n | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func o (p,q) = (((p + "_") + q) + "_commit") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func r (p) = (p + "_comcnt") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func s (p,q) = (((p + "_") + q) + "_reveal") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func t (p) = (p + "_status") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func u (p,v) = ((p + "_res:") + v) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func w (p,q) = m(o(p, q)) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func x (p) = h(r(p)) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func y (p,q) = m(s(p, q)) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func z (p) = m(t(p)) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func A (p,q) = h(u(p, q)) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func B (q,p) = (((p + "_") + q) + "_cnt") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func C (D,E) = ("item" + toBase58String(sha256(toBytes((D + E))))) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func F (p) = (p + "_owner") | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func G (p) = (p + "_price") | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func H (p) = (p + "_data") | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func I (p) = m(F(p)) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func J (p) = h(G(p)) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func K (q,p) = h(G(p)) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func L (M) = (M + "_balance") | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func N (M) = h(L(M)) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | @Callable(O) | |
107 | 107 | func purchase (p) = { | |
108 | 108 | let P = extract(O.payment) | |
109 | 109 | if (isDefined(P.assetId)) | |
110 | 110 | then throw("Can use only WAVES at the moment.") | |
111 | 111 | else { | |
112 | 112 | let Q = drop(toBase58String(O.caller.bytes), 10) | |
113 | 113 | let R = J(p) | |
114 | 114 | let S = I(p) | |
115 | 115 | if ((R > P.amount)) | |
116 | 116 | then throw(((("Amount cannot be less than item price. You specified amount: " + toString(P.amount)) + "but price is ") + toString(R))) | |
117 | 117 | else if ((P.amount > R)) | |
118 | 118 | then throw(((((("Amount cannot be greater than item price. You specified amount: " + toString(P.amount)) + " but price of item: ") + p) + " is ") + toString(R))) | |
119 | 119 | else if ((S == a)) | |
120 | 120 | then throw("Supplier not found.") | |
121 | 121 | else WriteSet([DataEntry(B(Q, p), (K(Q, p) + 1)), DataEntry(L(S), (N(S) + P.amount))]) | |
122 | 122 | } | |
123 | 123 | } | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | ||
127 | 127 | @Callable(O) | |
128 | 128 | func addItem (E,R,T) = { | |
129 | 129 | let S = drop(toBase58String(O.caller.bytes), 10) | |
130 | 130 | let p = C(S, E) | |
131 | 131 | if ((0 >= R)) | |
132 | 132 | then throw("Price must be positive.") | |
133 | 133 | else if ((I(p) != a)) | |
134 | 134 | then throw("An item like this already exists.") | |
135 | 135 | else WriteSet([DataEntry(F(p), S), DataEntry(G(p), R), DataEntry(H(p), T)]) | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(O) | |
141 | 141 | func withdraw () = { | |
142 | 142 | let S = toBase58String(O.caller.bytes) | |
143 | 143 | let U = N(S) | |
144 | 144 | if ((0 >= U)) | |
145 | 145 | then throw("Insufficient Balance") | |
146 | 146 | else ScriptResult(WriteSet([DataEntry(L(S), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(S), U, unit)])) | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | ||
151 | 151 | @Callable(O) | |
152 | 152 | func voteCommit (p,V) = { | |
153 | 153 | let q = toBase58String(O.caller.bytes) | |
154 | 154 | let W = x(p) | |
155 | 155 | let X = z(p) | |
156 | 156 | if ((W >= b)) | |
157 | 157 | then throw("Reached max n. of votes") | |
158 | 158 | else if ((w(p, q) != a)) | |
159 | - | then throw("User already voted for this item") | |
159 | + | then throw((("User " + q) + " already voted for this item")) | |
160 | 160 | else if ((F(p) == a)) | |
161 | 161 | then throw("Item does not exist") | |
162 | 162 | else if (if ((X != a)) | |
163 | 163 | then (X != d) | |
164 | 164 | else false) | |
165 | 165 | then throw("It is not possible to vote now.") | |
166 | 166 | else WriteSet([DataEntry(o(p, q), V), DataEntry(r(p), (W + 1)), DataEntry(t(p), if ((W == b)) | |
167 | 167 | then e | |
168 | 168 | else d)]) | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 |
github/deemru/w8io/026f985 31.08 ms ◑