tx · 8a2RiMTdezb3nFeqn3CoJmhibQ5LRMj89RXbnF1PDPx1 3Ms6Ht5bdVJa6sQnRBUg9nfNpEp7obSad8o: -0.05000000 Waves 2019.08.12 17:45 [627981] smart account 3Ms6Ht5bdVJa6sQnRBUg9nfNpEp7obSad8o > SELF 0.00000000 Waves
{ "type": 13, "id": "8a2RiMTdezb3nFeqn3CoJmhibQ5LRMj89RXbnF1PDPx1", "fee": 5000000, "feeAssetId": null, "timestamp": 1565621105133, "version": 1, "sender": "3Ms6Ht5bdVJa6sQnRBUg9nfNpEp7obSad8o", "senderPublicKey": "Ebb2ffqL8cMnNmXPNvHLy53xrK7t5WaSFhneCPBSoxop", "proofs": [ "38tPC2NvnovTXpC9EdYhkPGmAAMBwre6nRojPbFgwTANRHDxbjfKYPsLzcbJ8wJ8z1zRkpYmbtwWj7skEa5BGWhr" ], "script": "base64:AAIDAAAAAAAAAAAAAAAhAAAAAAROT05FAgAAAARub25lAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWkFAAAAByRtYXRjaDAFAAAAAWkAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzBQAAAAROT05FBQAAAANzdHIBAAAAD2dldEtleUl0ZW1QcmljZQAAAAEAAAAEaXRlbQkAASwAAAACBQAAAARpdGVtAgAAAAZfcHJpY2UBAAAAEWdldFZhbHVlSXRlbVByaWNlAAAAAQAAAARpdGVtCQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABCQEAAAAPZ2V0S2V5S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GLQ7jynfqSm8qYppi4tFQ1ph6N6NmghLSsPp7kegr Diff:
Old | New | Differences | |
---|---|---|---|
113 | 113 | ||
114 | 114 | func S (T,w) = { | |
115 | 115 | let h = { | |
116 | - | let e = getString(addressFromStringValue("3MwyDYbjXQ9VRWnPkubmGgypox7663uCLxT"), | |
116 | + | let e = getString(addressFromStringValue("3MwyDYbjXQ9VRWnPkubmGgypox7663uCLxT"), R(w)) | |
117 | 117 | if ($isInstanceOf(e, "String")) | |
118 | 118 | then { | |
119 | 119 | let U = e |
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 i = e | |
26 | 26 | i | |
27 | 27 | } | |
28 | 28 | else a | |
29 | 29 | } | |
30 | 30 | h | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func j (k) = (k + "_price") | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func l (k) = b(j(k)) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func m (n,k) = (((k + "_") + n) + "_cnt") | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func o (n,k) = b(m(n, k)) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func p (q,r) = ("item_" + toBase58String(sha256(toBytes((q + r))))) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func s (k) = (k + "_data") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func t (k) = (k + "_owner") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func u (k) = g(t(k)) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func v (w) = (w + "_balance") | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func x (w) = b(v(w)) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | let y = 3 | |
65 | 65 | ||
66 | 66 | let z = 2 | |
67 | 67 | ||
68 | 68 | let A = "voting" | |
69 | 69 | ||
70 | 70 | let B = "reveal" | |
71 | 71 | ||
72 | 72 | let C = "featured" | |
73 | 73 | ||
74 | 74 | let D = "delisted" | |
75 | 75 | ||
76 | 76 | func E (k,n) = (((k + "_") + n) + "_commit") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func F (k,n) = g(E(k, n)) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func G (k) = (k + "_comcnt") | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func H (k) = b(G(k)) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func I (k,n) = (((k + "_") + n) + "_reveal") | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func J (k,n) = g(I(k, n)) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func K (k) = (k + "_status") | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func L (k) = g(K(k)) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func M (k,N) = ((k + "_res:") + N) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func O (k,N) = b(M(k, N)) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func P () = addressFromStringValue("3MwyDYbjXQ9VRWnPkubmGgypox7663uCLxT") | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | let Q = "blacklisted" | |
110 | 110 | ||
111 | 111 | func R (w) = (w + "_verifier_status") | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func S (T,w) = { | |
115 | 115 | let h = { | |
116 | - | let e = getString(addressFromStringValue("3MwyDYbjXQ9VRWnPkubmGgypox7663uCLxT"), | |
116 | + | let e = getString(addressFromStringValue("3MwyDYbjXQ9VRWnPkubmGgypox7663uCLxT"), R(w)) | |
117 | 117 | if ($isInstanceOf(e, "String")) | |
118 | 118 | then { | |
119 | 119 | let U = e | |
120 | 120 | U | |
121 | 121 | } | |
122 | 122 | else a | |
123 | 123 | } | |
124 | 124 | h | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | @Callable(V) | |
129 | 129 | func addItem (r,W,X) = { | |
130 | 130 | let Y = toBase58String(V.caller.bytes) | |
131 | 131 | let k = p(Y, r) | |
132 | 132 | let Z = R(Y) | |
133 | 133 | let aa = P() | |
134 | 134 | let ab = S(addressFromStringValue("3MwyDYbjXQ9VRWnPkubmGgypox7663uCLxT"), R(Y)) | |
135 | 135 | throw(("supplierWhiteList: " + ab)) | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(V) | |
141 | 141 | func purchase (k) = { | |
142 | 142 | let ac = extract(V.payment) | |
143 | 143 | if (isDefined(ac.assetId)) | |
144 | 144 | then throw("Only payments in WAVES are avalible") | |
145 | 145 | else { | |
146 | 146 | let ad = toBase58String(V.caller.bytes) | |
147 | 147 | let W = l(k) | |
148 | 148 | let Y = u(k) | |
149 | 149 | if ((W > ac.amount)) | |
150 | 150 | then throw("Please send exact coupon price") | |
151 | 151 | else if ((ac.amount > W)) | |
152 | 152 | then throw("Please send exact coupon price") | |
153 | 153 | else WriteSet([DataEntry(m(ad, k), (o(ad, k) + 1)), DataEntry(v(Y), (x(Y) + ac.amount))]) | |
154 | 154 | } | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | ||
159 | 159 | @Callable(V) | |
160 | 160 | func withdraw () = { | |
161 | 161 | let Y = toBase58String(V.caller.bytes) | |
162 | 162 | let ae = x(Y) | |
163 | 163 | if ((0 >= ae)) | |
164 | 164 | then throw("Ballance is zero") | |
165 | 165 | else ScriptResult(WriteSet([DataEntry(v(Y), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(Y), ae, unit)])) | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | ||
170 | 170 | @Callable(V) | |
171 | 171 | func voteCommit (k,af) = { | |
172 | 172 | let n = toBase58String(V.caller.bytes) | |
173 | 173 | let ag = H(k) | |
174 | 174 | let ah = L(k) | |
175 | 175 | if ((ag >= y)) | |
176 | 176 | then throw("We have reached necessary number of voters") | |
177 | 177 | else if ((F(k, n) != a)) | |
178 | 178 | then throw("User has already voted") | |
179 | 179 | else if ((t(k) == a)) | |
180 | 180 | then throw("Item does not exist") | |
181 | 181 | else if (if ((ah != a)) | |
182 | 182 | then (ah != A) | |
183 | 183 | else false) | |
184 | 184 | then throw("Voting is not possible") | |
185 | 185 | else WriteSet([DataEntry(E(k, n), af), DataEntry(G(k), (ag + 1)), DataEntry(K(k), if ((ag == y)) | |
186 | 186 | then B | |
187 | 187 | else A)]) | |
188 | 188 | } | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | ||
192 | 192 | @Callable(V) | |
193 | 193 | func revealVotes (k,N,ai) = { | |
194 | 194 | let n = toBase58String(V.caller.bytes) | |
195 | 195 | let ag = H(k) | |
196 | 196 | let ah = L(k) | |
197 | 197 | let aj = (O(k, N) + 1) | |
198 | 198 | if ((toBase58String(sha256(toBytes((N + ai)))) != F(k, n))) | |
199 | 199 | then throw("Reveal data is not valid") | |
200 | 200 | else if ((y > H(k))) | |
201 | 201 | then throw("Necessary number of voters hasn't reached yet") | |
202 | 202 | else if ((J(k, n) != a)) | |
203 | 203 | then throw("User has already revealed his vote") | |
204 | 204 | else if (if ((ah != A)) | |
205 | 205 | then (ah != B) | |
206 | 206 | else false) | |
207 | 207 | then throw("Wrong status of vote") | |
208 | 208 | else if (if ((N != C)) | |
209 | 209 | then (N != D) | |
210 | 210 | else false) | |
211 | 211 | then throw("Wrong vote") | |
212 | 212 | else if (if ((ah == C)) | |
213 | 213 | then true | |
214 | 214 | else (ah == D)) | |
215 | 215 | then throw("Voting complited") | |
216 | 216 | else WriteSet([DataEntry(I(k, n), N), DataEntry(M(k, N), aj), DataEntry(K(k), if ((aj >= z)) | |
217 | 217 | then N | |
218 | 218 | else B)]) | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 |
github/deemru/w8io/026f985 29.39 ms ◑