tx · 2Gc1ChoJABFaa7RwRLbV8Bhmimxor89mL2NM5UcxyheH 3N4LwDMgdFYmuTPSSMDG9XUBxh58SuFrkg5: -0.01400000 Waves 2019.07.03 07:42 [568769] smart account 3N4LwDMgdFYmuTPSSMDG9XUBxh58SuFrkg5 > SELF 0.00000000 Waves
{ "type": 13, "id": "2Gc1ChoJABFaa7RwRLbV8Bhmimxor89mL2NM5UcxyheH", "fee": 1400000, "feeAssetId": null, "timestamp": 1562128894460, "version": 1, "sender": "3N4LwDMgdFYmuTPSSMDG9XUBxh58SuFrkg5", "senderPublicKey": "Gxyog9TfcQ5vAbvv8M5gFtxfN6YDuSzQPnn2QPLZHQ8W", "proofs": [ "4ikYuGQx48ArvJAJd91edoBKZWfZTvdbStAvKeQv6ssSYHCU7CJvjQGrcakba4FNHJH65PCuFfpLffRETnZZmVeH" ], "script": "base64:AAIDAAAAAAAAAAAAAAAhAAAAAAROT05FAgAAAARub25lAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAD2dldEtleUl0ZW1QcmljZQAAAAEAAAAEaXRlbQkAASwAAAACBQAAAARpdGVtAgAAAAZfcHJpY2UBAAAAEWdldFZhbHVlSXRlbVByaWNlAAAAAQAAAARpdGVtCQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABCQEAAAAPZ2V0S2V5SXRlbV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V3Vm90ZUNvdW50BQAAAAZRVU9SVU0FAAAABHZvdGUFAAAABlJFVkVBTAUAAAADbmlsAAAAAHhFkrk=", "chainId": 84, "height": 568769, "spentComplexity": 0 } View: original | compacted Prev: 9eBwpAHo8Af81WbbsHZk4tSipb5ZoE72TvpAro9FR5Dh Next: none Diff:
Old | New | Differences | |
---|---|---|---|
117 | 117 | if ($isInstanceOf(e, "String")) | |
118 | 118 | then { | |
119 | 119 | let f = e | |
120 | - | | |
120 | + | f | |
121 | 121 | } | |
122 | 122 | else a | |
123 | 123 | } |
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 | func b (c) = { | |
7 | 7 | let d = { | |
8 | 8 | let e = getInteger(this, c) | |
9 | 9 | if ($isInstanceOf(e, "Int")) | |
10 | 10 | then { | |
11 | 11 | let f = e | |
12 | 12 | f | |
13 | 13 | } | |
14 | 14 | else 0 | |
15 | 15 | } | |
16 | 16 | d | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func g (c) = { | |
21 | 21 | let h = { | |
22 | 22 | let e = getString(this, c) | |
23 | 23 | if ($isInstanceOf(e, "String")) | |
24 | 24 | then { | |
25 | 25 | let f = e | |
26 | 26 | f | |
27 | 27 | } | |
28 | 28 | else a | |
29 | 29 | } | |
30 | 30 | h | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func i (j) = (j + "_price") | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func k (j) = b(i(j)) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func l (m,j) = (((j + "_") + m) + "_cnt") | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func n (m,j) = b(l(m, j)) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func o (p,q) = ("item_" + toBase58String(sha256(toBytes((p + q))))) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func r (j) = (j + "_data") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func s (j) = (j + "_owner") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func t (j) = g(s(j)) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func u (v) = (v + "_balance") | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func w (v) = b(u(v)) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | let x = 3 | |
65 | 65 | ||
66 | 66 | let y = 2 | |
67 | 67 | ||
68 | 68 | let z = "voting" | |
69 | 69 | ||
70 | 70 | let A = "reveal" | |
71 | 71 | ||
72 | 72 | let B = "featured" | |
73 | 73 | ||
74 | 74 | let C = "delisted" | |
75 | 75 | ||
76 | 76 | func D (j,m) = (((j + "_") + m) + "_commit") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func E (j,m) = g(D(j, m)) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func F (j) = (j + "_comcnt") | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func G (j) = b(F(j)) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func H (j,m) = (((j + "_") + m) + "_reveal") | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func I (j,m) = g(H(j, m)) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func J (j) = (j + "_status") | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func K (j) = g(J(j)) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func L (j,M) = ((j + "_res") + M) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func N (j,M) = b(L(j, M)) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func O () = extract(addressFromString("3N4ynv5cxsVeGSMoHBhiKKYcMmgZcDz8rzh")) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | let P = "blacklisted" | |
110 | 110 | ||
111 | 111 | func Q (R) = (R + "_verified_status") | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func S (T,v) = { | |
115 | 115 | let h = { | |
116 | 116 | let e = getString(T, Q(v)) | |
117 | 117 | if ($isInstanceOf(e, "String")) | |
118 | 118 | then { | |
119 | 119 | let f = e | |
120 | - | | |
120 | + | f | |
121 | 121 | } | |
122 | 122 | else a | |
123 | 123 | } | |
124 | 124 | h | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | @Callable(U) | |
129 | 129 | func addItem (q,V,W) = { | |
130 | 130 | let R = toBase58String(U.caller.bytes) | |
131 | 131 | let j = o(R, q) | |
132 | 132 | let X = S(O(), R) | |
133 | 133 | if ((0 >= V)) | |
134 | 134 | then throw("purchase amount cannot be less than price") | |
135 | 135 | else if ((t(j) != a)) | |
136 | 136 | then throw("an item is already exist") | |
137 | 137 | else if ((X == P)) | |
138 | 138 | then throw("your account is blacklisted") | |
139 | 139 | else WriteSet([DataEntry(s(j), R), DataEntry(i(j), V), DataEntry(r(j), W), DataEntry(Q(R), X)]) | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | ||
144 | 144 | @Callable(Y) | |
145 | 145 | func purchase (j) = { | |
146 | 146 | let Z = extract(Y.payment) | |
147 | 147 | if (isDefined(Z.assetId)) | |
148 | 148 | then throw("You can use only Waves to purchase an item") | |
149 | 149 | else { | |
150 | 150 | let aa = toBase58String(Y.caller.bytes) | |
151 | 151 | let V = k(j) | |
152 | 152 | let R = t(j) | |
153 | 153 | if ((V > Z.amount)) | |
154 | 154 | then throw("purchase amount less than item price") | |
155 | 155 | else if ((Z.amount > V)) | |
156 | 156 | then throw("purchase amount higher than item price") | |
157 | 157 | else WriteSet([DataEntry(l(aa, j), (n(aa, j) + 1)), DataEntry(u(R), (w(R) + Z.amount))]) | |
158 | 158 | } | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | ||
163 | 163 | @Callable(ab) | |
164 | 164 | func withdraw () = { | |
165 | 165 | let R = toBase58String(ab.caller.bytes) | |
166 | 166 | let ac = w(R) | |
167 | 167 | if ((0 >= ac)) | |
168 | 168 | then throw("insufficient funds") | |
169 | 169 | else ScriptResult(WriteSet([DataEntry(u(R), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(R), ac, unit)])) | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | ||
174 | 174 | @Callable(ad) | |
175 | 175 | func voteCommit (j,ae) = { | |
176 | 176 | let m = toBase58String(ad.caller.bytes) | |
177 | 177 | let af = G(j) | |
178 | 178 | let ag = K(j) | |
179 | 179 | if ((af >= x)) | |
180 | 180 | then throw("reached max num of voters") | |
181 | 181 | else if ((E(j, m) != a)) | |
182 | 182 | then throw("user has already participated") | |
183 | 183 | else if ((s(j) == a)) | |
184 | 184 | then throw("item does not exist") | |
185 | 185 | else if (if ((ag != a)) | |
186 | 186 | then (ag != z) | |
187 | 187 | else false) | |
188 | 188 | then throw("voting is not possible") | |
189 | 189 | else WriteSet([DataEntry(D(j, m), ae), DataEntry(F(j), (af + 1)), DataEntry(J(j), if ((af == x)) | |
190 | 190 | then A | |
191 | 191 | else z)]) | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | ||
196 | 196 | @Callable(ah) | |
197 | 197 | func voteReveal (j,M,ai) = { | |
198 | 198 | let m = toBase58String(ah.caller.bytes) | |
199 | 199 | let ag = K(j) | |
200 | 200 | let aj = N(j, M) | |
201 | 201 | if ((toBase58String(sha256(toBytes((M + ai)))) != E(j, m))) | |
202 | 202 | then throw("reveal data is not valid") | |
203 | 203 | else if ((x > G(j))) | |
204 | 204 | then throw("max num of voters has not reached yet") | |
205 | 205 | else if ((I(j, m) != a)) | |
206 | 206 | then throw("user has already participated") | |
207 | 207 | else if (if ((ag != z)) | |
208 | 208 | then (ag != A) | |
209 | 209 | else false) | |
210 | 210 | then throw("wrong status") | |
211 | 211 | else if (if ((M != B)) | |
212 | 212 | then (M != C) | |
213 | 213 | else false) | |
214 | 214 | then throw("wrong vote") | |
215 | 215 | else if (if ((ag == B)) | |
216 | 216 | then (ag == C) | |
217 | 217 | else false) | |
218 | 218 | then throw("votу has finished") | |
219 | 219 | else WriteSet([DataEntry(H(j, m), M), DataEntry(L(j, M), aj), DataEntry(J(j), if ((aj >= y)) | |
220 | 220 | then M | |
221 | 221 | else A)]) | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 |
github/deemru/w8io/026f985 43.51 ms ◑