tx · 1WWTFMu5bdszJd9Xv7dXM5iPomBLpKvUAknz8mBaFd5 3N1MvvKPNWqQ9JWYV1vWE84GnMKP3mENpSg: -0.01400000 Waves 2019.07.05 12:53 [572054] smart account 3N1MvvKPNWqQ9JWYV1vWE84GnMKP3mENpSg > SELF 0.00000000 Waves
{ "type": 13, "id": "1WWTFMu5bdszJd9Xv7dXM5iPomBLpKvUAknz8mBaFd5", "fee": 1400000, "feeAssetId": null, "timestamp": 1562320482924, "version": 1, "sender": "3N1MvvKPNWqQ9JWYV1vWE84GnMKP3mENpSg", "senderPublicKey": "GBcKAM5muVn8dBji3B7ciEqt4XzrT4CBrAKXoTVfbw7", "proofs": [ "5apbr5qkuHYjSADWAfLWvwHYA1TWNXqfK57Mcv4h8dHdeVefvBWEs7YTUtsm1Qpgt3puHuMWmcgUpZf5rnxjGQWY" ], "script": "base64:AAIDAAAAAAAAAAAAAAAhAAAAAAROT05FAgAAAARub25lAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAAAD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ZvdGVDb3VudAAAAAIFAAAABGl0ZW0FAAAABHZvdGUFAAAADG5ld1ZvdGVDb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEGdldEtleUl0ZW1TdGF0dXMAAAABBQAAAARpdGVtAwkAAGcAAAACBQAAAAxuZXdWb3RlQ291bnQFAAAABlFVT1JVTQUAAAAEdm90ZQUAAAAGUkVWRUFMBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlee9+EMI=", "chainId": 84, "height": 572054, "spentComplexity": 0 } View: original | compacted Prev: HapicqVsT1h5UBtqTNRejEFy53GYLSyzd6dtkpMDXVBv Next: none Diff:
Old | New | Differences | |
---|---|---|---|
103 | 103 | func N (p,M) = h(L(p, M)) | |
104 | 104 | ||
105 | 105 | ||
106 | - | @Callable(O) | |
107 | - | func addItem (w,P,Q) = { | |
108 | - | let R = toBase58String(O.caller.bytes) | |
109 | - | let p = u(R, w) | |
110 | - | if ((0 >= P)) | |
106 | + | func O () = extract(addressFromString("3N3M8E7uF1QstBzTMeobiUg1rGFttQNbgCz")) | |
107 | + | ||
108 | + | ||
109 | + | let P = "blacklist" | |
110 | + | ||
111 | + | func Q (B) = (B + "_verifier_status") | |
112 | + | ||
113 | + | ||
114 | + | func R (S,B) = { | |
115 | + | let n = { | |
116 | + | let k = getString(S, Q(B)) | |
117 | + | if ($isInstanceOf(k, "String")) | |
118 | + | then { | |
119 | + | let l = k | |
120 | + | l | |
121 | + | } | |
122 | + | else a | |
123 | + | } | |
124 | + | n | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | @Callable(T) | |
129 | + | func addItem (w,U,V) = { | |
130 | + | let W = toBase58String(T.caller.bytes) | |
131 | + | let p = u(W, w) | |
132 | + | let X = R(O(), W) | |
133 | + | if ((0 >= U)) | |
111 | 134 | then throw("Purchase amount cannot be less that item price") | |
112 | 135 | else if ((z(p) != a)) | |
113 | 136 | then throw("This item already exist") | |
114 | - | else WriteSet([DataEntry(y(p), R), DataEntry(o(p), P), DataEntry(x(p), Q)]) | |
137 | + | else if ((X == P)) | |
138 | + | then throw("Supplier's account has been blacklisted") | |
139 | + | else WriteSet([DataEntry(y(p), W), DataEntry(o(p), U), DataEntry(x(p), V), DataEntry(Q(W), X)]) | |
115 | 140 | } | |
116 | 141 | ||
117 | 142 | ||
118 | 143 | ||
119 | - | @Callable( | |
144 | + | @Callable(T) | |
120 | 145 | func purchase (p) = { | |
121 | - | let | |
122 | - | if (isDefined( | |
146 | + | let Y = extract(T.payment) | |
147 | + | if (isDefined(Y.assetId)) | |
123 | 148 | then throw("Waves token only at this moment") | |
124 | 149 | else { | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | if (( | |
150 | + | let Z = toBase58String(T.caller.bytes) | |
151 | + | let U = q(p) | |
152 | + | let W = z(p) | |
153 | + | if ((U > Y.amount)) | |
129 | 154 | then throw("Purchase amount can not be less than item price") | |
130 | - | else if (( | |
155 | + | else if ((Y.amount > U)) | |
131 | 156 | then throw("Purchase amount can not be higher than item price") | |
132 | - | else if (( | |
157 | + | else if ((W == a)) | |
133 | 158 | then throw("Supplier does not exist") | |
134 | - | else WriteSet([DataEntry(r( | |
159 | + | else WriteSet([DataEntry(r(Z, p), (t(Z, p) + 1)), DataEntry(A(W), (C(W) + Y.amount))]) | |
135 | 160 | } | |
136 | 161 | } | |
137 | 162 | ||
138 | 163 | ||
139 | 164 | ||
140 | - | @Callable( | |
165 | + | @Callable(T) | |
141 | 166 | func withdraw () = { | |
142 | - | let | |
143 | - | let | |
144 | - | if ((0 >= | |
167 | + | let W = toBase58String(T.caller.bytes) | |
168 | + | let aa = C(W) | |
169 | + | if ((0 >= aa)) | |
145 | 170 | then throw("Insufficient Balance") | |
146 | - | else ScriptResult(WriteSet([DataEntry(A( | |
171 | + | else ScriptResult(WriteSet([DataEntry(A(W), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(W), aa, unit)])) | |
147 | 172 | } | |
148 | 173 | ||
149 | 174 | ||
150 | 175 | ||
151 | - | @Callable( | |
152 | - | func voteCommit (p, | |
153 | - | let s = toBase58String( | |
154 | - | let | |
155 | - | let | |
156 | - | if (( | |
176 | + | @Callable(T) | |
177 | + | func voteCommit (p,ab) = { | |
178 | + | let s = toBase58String(T.caller.bytes) | |
179 | + | let ac = G(p) | |
180 | + | let ad = K(p) | |
181 | + | if ((ac >= b)) | |
157 | 182 | then throw("Reached max numbers of voters") | |
158 | 183 | else if ((E(p, s) != a)) | |
159 | 184 | then throw("User has already participated") | |
160 | 185 | else if ((y(p) == a)) | |
161 | 186 | then throw("Item does not exist") | |
162 | - | else if (if (( | |
163 | - | then ( | |
187 | + | else if (if ((ad != a)) | |
188 | + | then (ad != d) | |
164 | 189 | else false) | |
165 | 190 | then throw("Voting is not possible") | |
166 | - | else WriteSet([DataEntry(D(p, s), | |
191 | + | else WriteSet([DataEntry(D(p, s), ab), DataEntry(F(p), (ac + 1)), DataEntry(J(p), if ((ac == b)) | |
167 | 192 | then e | |
168 | 193 | else d)]) | |
169 | 194 | } | |
170 | 195 | ||
171 | 196 | ||
172 | 197 | ||
173 | - | @Callable( | |
174 | - | func voteReveal (p,M, | |
175 | - | let s = toBase58String( | |
176 | - | let | |
177 | - | let | |
178 | - | if ((toBase58String(sha256(toBytes((M + | |
198 | + | @Callable(T) | |
199 | + | func voteReveal (p,M,ae) = { | |
200 | + | let s = toBase58String(T.caller.bytes) | |
201 | + | let ad = K(p) | |
202 | + | let af = (N(p, M) + 1) | |
203 | + | if ((toBase58String(sha256(toBytes((M + ae)))) != E(p, s))) | |
179 | 204 | then throw("reveal data is not valid") | |
180 | 205 | else if ((b > G(p))) | |
181 | 206 | then throw("Max number of votes hasn't been reached yet") | |
182 | 207 | else if ((I(p, s) != a)) | |
183 | 208 | then throw("user has already participated") | |
184 | - | else if (if (( | |
185 | - | then ( | |
209 | + | else if (if ((ad != d)) | |
210 | + | then (ad != e) | |
186 | 211 | else false) | |
187 | 212 | then throw("wrong status") | |
188 | 213 | else if (if ((M != f)) | |
189 | 214 | then (M != g) | |
190 | 215 | else false) | |
191 | 216 | then throw("wrong vote") | |
192 | - | else if (if (( | |
217 | + | else if (if ((ad == f)) | |
193 | 218 | then true | |
194 | - | else ( | |
219 | + | else (ad == g)) | |
195 | 220 | then throw("Vote has finished") | |
196 | - | else WriteSet([DataEntry(H(p, s), M), DataEntry(L(p, M), | |
221 | + | else WriteSet([DataEntry(H(p, s), M), DataEntry(L(p, M), af), DataEntry(J(p), if ((af >= c)) | |
197 | 222 | then M | |
198 | 223 | else e)]) | |
199 | 224 | } | |
200 | 225 | ||
201 | 226 | ||
202 | - | @Verifier( | |
203 | - | func | |
227 | + | @Verifier(ag) | |
228 | + | func ah () = sigVerify(ag.bodyBytes, ag.proofs[0], ag.senderPublicKey) | |
204 | 229 |
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) = (p + "_price") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func q (p) = h(o(p)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func r (s,p) = ((p + "_user") + "_cnt") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func t (s,p) = h(r(s, p)) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func u (v,w) = ("item_" + toBase58String(sha256(toBytes((v + w))))) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func x (p) = (p + "_data") | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func y (p) = (p + "_owner") | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func z (p) = m(y(p)) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func A (B) = (B + "_balance") | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func C (B) = h(A(B)) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func D (p,s) = (((p + "_") + s) + "_commit") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func E (p,s) = m(D(p, s)) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func F (p) = (p + "_comcnt") | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func G (p) = h(F(p)) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func H (p,s) = (((p + "_") + s) + "_reveal") | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func I (p,s) = m(H(p, s)) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func J (p) = (p + "_status") | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func K (p) = m(J(p)) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func L (p,M) = ((p + "_res:") + M) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func N (p,M) = h(L(p, M)) | |
104 | 104 | ||
105 | 105 | ||
106 | - | @Callable(O) | |
107 | - | func addItem (w,P,Q) = { | |
108 | - | let R = toBase58String(O.caller.bytes) | |
109 | - | let p = u(R, w) | |
110 | - | if ((0 >= P)) | |
106 | + | func O () = extract(addressFromString("3N3M8E7uF1QstBzTMeobiUg1rGFttQNbgCz")) | |
107 | + | ||
108 | + | ||
109 | + | let P = "blacklist" | |
110 | + | ||
111 | + | func Q (B) = (B + "_verifier_status") | |
112 | + | ||
113 | + | ||
114 | + | func R (S,B) = { | |
115 | + | let n = { | |
116 | + | let k = getString(S, Q(B)) | |
117 | + | if ($isInstanceOf(k, "String")) | |
118 | + | then { | |
119 | + | let l = k | |
120 | + | l | |
121 | + | } | |
122 | + | else a | |
123 | + | } | |
124 | + | n | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | @Callable(T) | |
129 | + | func addItem (w,U,V) = { | |
130 | + | let W = toBase58String(T.caller.bytes) | |
131 | + | let p = u(W, w) | |
132 | + | let X = R(O(), W) | |
133 | + | if ((0 >= U)) | |
111 | 134 | then throw("Purchase amount cannot be less that item price") | |
112 | 135 | else if ((z(p) != a)) | |
113 | 136 | then throw("This item already exist") | |
114 | - | else WriteSet([DataEntry(y(p), R), DataEntry(o(p), P), DataEntry(x(p), Q)]) | |
137 | + | else if ((X == P)) | |
138 | + | then throw("Supplier's account has been blacklisted") | |
139 | + | else WriteSet([DataEntry(y(p), W), DataEntry(o(p), U), DataEntry(x(p), V), DataEntry(Q(W), X)]) | |
115 | 140 | } | |
116 | 141 | ||
117 | 142 | ||
118 | 143 | ||
119 | - | @Callable( | |
144 | + | @Callable(T) | |
120 | 145 | func purchase (p) = { | |
121 | - | let | |
122 | - | if (isDefined( | |
146 | + | let Y = extract(T.payment) | |
147 | + | if (isDefined(Y.assetId)) | |
123 | 148 | then throw("Waves token only at this moment") | |
124 | 149 | else { | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | if (( | |
150 | + | let Z = toBase58String(T.caller.bytes) | |
151 | + | let U = q(p) | |
152 | + | let W = z(p) | |
153 | + | if ((U > Y.amount)) | |
129 | 154 | then throw("Purchase amount can not be less than item price") | |
130 | - | else if (( | |
155 | + | else if ((Y.amount > U)) | |
131 | 156 | then throw("Purchase amount can not be higher than item price") | |
132 | - | else if (( | |
157 | + | else if ((W == a)) | |
133 | 158 | then throw("Supplier does not exist") | |
134 | - | else WriteSet([DataEntry(r( | |
159 | + | else WriteSet([DataEntry(r(Z, p), (t(Z, p) + 1)), DataEntry(A(W), (C(W) + Y.amount))]) | |
135 | 160 | } | |
136 | 161 | } | |
137 | 162 | ||
138 | 163 | ||
139 | 164 | ||
140 | - | @Callable( | |
165 | + | @Callable(T) | |
141 | 166 | func withdraw () = { | |
142 | - | let | |
143 | - | let | |
144 | - | if ((0 >= | |
167 | + | let W = toBase58String(T.caller.bytes) | |
168 | + | let aa = C(W) | |
169 | + | if ((0 >= aa)) | |
145 | 170 | then throw("Insufficient Balance") | |
146 | - | else ScriptResult(WriteSet([DataEntry(A( | |
171 | + | else ScriptResult(WriteSet([DataEntry(A(W), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(W), aa, unit)])) | |
147 | 172 | } | |
148 | 173 | ||
149 | 174 | ||
150 | 175 | ||
151 | - | @Callable( | |
152 | - | func voteCommit (p, | |
153 | - | let s = toBase58String( | |
154 | - | let | |
155 | - | let | |
156 | - | if (( | |
176 | + | @Callable(T) | |
177 | + | func voteCommit (p,ab) = { | |
178 | + | let s = toBase58String(T.caller.bytes) | |
179 | + | let ac = G(p) | |
180 | + | let ad = K(p) | |
181 | + | if ((ac >= b)) | |
157 | 182 | then throw("Reached max numbers of voters") | |
158 | 183 | else if ((E(p, s) != a)) | |
159 | 184 | then throw("User has already participated") | |
160 | 185 | else if ((y(p) == a)) | |
161 | 186 | then throw("Item does not exist") | |
162 | - | else if (if (( | |
163 | - | then ( | |
187 | + | else if (if ((ad != a)) | |
188 | + | then (ad != d) | |
164 | 189 | else false) | |
165 | 190 | then throw("Voting is not possible") | |
166 | - | else WriteSet([DataEntry(D(p, s), | |
191 | + | else WriteSet([DataEntry(D(p, s), ab), DataEntry(F(p), (ac + 1)), DataEntry(J(p), if ((ac == b)) | |
167 | 192 | then e | |
168 | 193 | else d)]) | |
169 | 194 | } | |
170 | 195 | ||
171 | 196 | ||
172 | 197 | ||
173 | - | @Callable( | |
174 | - | func voteReveal (p,M, | |
175 | - | let s = toBase58String( | |
176 | - | let | |
177 | - | let | |
178 | - | if ((toBase58String(sha256(toBytes((M + | |
198 | + | @Callable(T) | |
199 | + | func voteReveal (p,M,ae) = { | |
200 | + | let s = toBase58String(T.caller.bytes) | |
201 | + | let ad = K(p) | |
202 | + | let af = (N(p, M) + 1) | |
203 | + | if ((toBase58String(sha256(toBytes((M + ae)))) != E(p, s))) | |
179 | 204 | then throw("reveal data is not valid") | |
180 | 205 | else if ((b > G(p))) | |
181 | 206 | then throw("Max number of votes hasn't been reached yet") | |
182 | 207 | else if ((I(p, s) != a)) | |
183 | 208 | then throw("user has already participated") | |
184 | - | else if (if (( | |
185 | - | then ( | |
209 | + | else if (if ((ad != d)) | |
210 | + | then (ad != e) | |
186 | 211 | else false) | |
187 | 212 | then throw("wrong status") | |
188 | 213 | else if (if ((M != f)) | |
189 | 214 | then (M != g) | |
190 | 215 | else false) | |
191 | 216 | then throw("wrong vote") | |
192 | - | else if (if (( | |
217 | + | else if (if ((ad == f)) | |
193 | 218 | then true | |
194 | - | else ( | |
219 | + | else (ad == g)) | |
195 | 220 | then throw("Vote has finished") | |
196 | - | else WriteSet([DataEntry(H(p, s), M), DataEntry(L(p, M), | |
221 | + | else WriteSet([DataEntry(H(p, s), M), DataEntry(L(p, M), af), DataEntry(J(p), if ((af >= c)) | |
197 | 222 | then M | |
198 | 223 | else e)]) | |
199 | 224 | } | |
200 | 225 | ||
201 | 226 | ||
202 | - | @Verifier( | |
203 | - | func | |
227 | + | @Verifier(ag) | |
228 | + | func ah () = sigVerify(ag.bodyBytes, ag.proofs[0], ag.senderPublicKey) | |
204 | 229 |
github/deemru/w8io/026f985 52.26 ms ◑