tx · 2TXmuwvHRyghCkug98W6jPJCA1hy3E5NTkEWuov1FHqN 3NB6ViLiZv3r5EdQ2Q8GA8GKpuwmG3zevAt: -0.05000000 Waves 2019.08.13 20:20 [629588] smart account 3NB6ViLiZv3r5EdQ2Q8GA8GKpuwmG3zevAt > SELF 0.00000000 Waves
{ "type": 13, "id": "2TXmuwvHRyghCkug98W6jPJCA1hy3E5NTkEWuov1FHqN", "fee": 5000000, "feeAssetId": null, "timestamp": 1565716800296, "version": 1, "sender": "3NB6ViLiZv3r5EdQ2Q8GA8GKpuwmG3zevAt", "senderPublicKey": "3ghbp6Z5eXoKniLSE8XPjn5od7gT1K7qhk6zANBhv9C3", "proofs": [ "4jVt22bfMKL5rovxrBVPeMDRG9BdyfAuFNTdRmKkuTFMuPs22acJbKNCW84mggcLZnELxSTtcXBDFeTqKdWQmS5t" ], "script": "base64:AAIDAAAAAAAAAAAAAAAkAAAAAA5vd25lclB1YmxpY2tleQEAAAAgJ+LupRtywYm1DtC2wa7+mcHTm1BkasCvRteam1vswWgAAAAADGFsbGljZVB1YmtleQEAAAAgdahQG7OF8VCvnmrXif7UUhoQjaCrm/2hFDfEk/59nDEAAAAACWJvYlB1YmtleQEAAAAgoHwmi+qXZSlN20yTARZQ9O8s6pUs/3qey7EnxhpjMk8AAAAADGNvb3BlclB1YmtleQEAAAAgU/w5K0kRwpKzXSOUcyJ72drbib04bPq1q9XqkXENjioAAAAABE5PTkUCAAAABG5vbmUAAAAABlZPVEVSUwAAAAAAAAAAAwAAAAAGUVVPUlVNAAAAAAAAAAACAAAAAAZWT1RJTkcCAAAABnZvdGluZwAAAAAGUkVWRUFMAgAAAAZyZXZlYWwAAAAACEZFQVRVUkVEAgAAAAhmZWF0dXJlZAAAAAAIREVMSVNURUQCAAAACGRlbGlzdGVkAAAAAAh2ZXJpZmllcgIAAAAjM01zOXNVYjdXM0w1NUxMR3hlSFdpcWdUZmRIOXluMm1heWIAAAAACFZFUklGSUVEAgAAAAh2ZXJpZmllZ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hbGljZTIFAAAAB2Nvb3BlcjEHBgMFAAAABmFsaWNlMgUAAAAHY29wcGVyMwcGAwUAAAAGYWxpY2UzBQAAAAdjb29wZXIxBwYDBQAAAAZhbGljZTMFAAAAB2NvcHBlcjIHBAAAAA1ib2JlQW5kQ29vcGVyAwMDAwMDBQAAAAdjb29wZXIxBQAAAARib2IyBwYDBQAAAAdjb29wZXIxBQAAAARib2IzBwYDBQAAAAdjb3BwZXIyBQAAAARib2IxBwYDBQAAAAdjb3BwZXIyBQAAAARib2IzBwYDBQAAAAdjb3BwZXIzBQAAAARib2IxBwYDBQAAAAdjb3BwZXIzBQAAAARib2IyBwQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAOb3duZXJQdWJsaWNrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYDAwUAAAAMYWxsaWNlQW5kQm9iBgUAAAAPYWxsaWNlQW5kQ29vcGVyBgUAAAANYm9iZUFuZENvb3Blcjyf5s4=", "chainId": 84, "height": 629588, "spentComplexity": 0 } View: original | compacted Prev: 4BghezDyeYgPtf78srAny613SVvRKiGLFQp77cUtgM3h Next: 7cZihdB6jum9cwmofEsk1q9K5juMWRe9d7QFZ5hhxtYo Diff:
Old | New | Differences | |
---|---|---|---|
157 | 157 | then throw("can hodl waves only at the moment") | |
158 | 158 | else if ((0 > pmt.amount)) | |
159 | 159 | then throw("Can not deposit negative amount") | |
160 | - | else WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), | |
160 | + | else WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), newBalance)]) | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let ownerPublickey = base58'3ghbp6Z5eXoKniLSE8XPjn5od7gT1K7qhk6zANBhv9C3' | |
5 | 5 | ||
6 | 6 | let allicePubkey = base58'8vHZLEG3BmzYYVjQyNi1m11kh6FeSoVAKKwtsYXC3bqA' | |
7 | 7 | ||
8 | 8 | let bobPubkey = base58'BoU2oQn7y52MZgT1Q7vJCJwUxov9tXb2zpC5gmWQbutJ' | |
9 | 9 | ||
10 | 10 | let cooperPubkey = base58'6equaSt4fnw6gEoLGiL3dTDDGxDc4PY5NyV3gVkEEr1F' | |
11 | 11 | ||
12 | 12 | let NONE = "none" | |
13 | 13 | ||
14 | 14 | let VOTERS = 3 | |
15 | 15 | ||
16 | 16 | let QUORUM = 2 | |
17 | 17 | ||
18 | 18 | let VOTING = "voting" | |
19 | 19 | ||
20 | 20 | let REVEAL = "reveal" | |
21 | 21 | ||
22 | 22 | let FEATURED = "featured" | |
23 | 23 | ||
24 | 24 | let DELISTED = "delisted" | |
25 | 25 | ||
26 | 26 | let verifier = "3Ms9sUb7W3L55LLGxeHWiqgTfdH9yn2mayb" | |
27 | 27 | ||
28 | 28 | let VERIFIED = "verified" | |
29 | 29 | ||
30 | 30 | let BLACKLISTED = "blacklist" | |
31 | 31 | ||
32 | 32 | func getNumberByKey (key) = { | |
33 | 33 | let num = match getInteger(this, key) { | |
34 | 34 | case a: Int => | |
35 | 35 | a | |
36 | 36 | case _ => | |
37 | 37 | 0 | |
38 | 38 | } | |
39 | 39 | num | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func getStrByKey (key) = { | |
44 | 44 | let str = match getString(this, key) { | |
45 | 45 | case a: String => | |
46 | 46 | a | |
47 | 47 | case _ => | |
48 | 48 | NONE | |
49 | 49 | } | |
50 | 50 | str | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getKeyItemPrice (item) = (item + "_price") | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getValueItemPrice (item) = getNumberByKey(getKeyItemPrice(item)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt") | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title))))) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getKeyItemData (item) = (item + "_data") | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getKeyItemSupplier (item) = (item + "_owner") | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item)) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getKeyBalanceSupplier (account) = (account + "_balance") | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getValueBalanceSupplier (account) = getNumberByKey(getKeyBalanceSupplier(account)) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getKeyCommit (item,user) = (((item + "_") + user) + "_commit") | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getValueCommit (item,user) = getStrByKey(getKeyCommit(item, user)) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getKeyCommitsCount (item) = (item + "_comcnt") | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getValueCommitsCount (item) = getNumberByKey(getKeyCommitsCount(item)) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal") | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getValueReveal (item,user) = getStrByKey(getKeyReveal(item, user)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getKeyItemStatus (item) = (item + "_status") | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item)) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getKeyVoteCount (item,voute) = ((item + "_res:") + voute) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getValueVouteCount (item,voute) = getNumberByKey(getKeyVoteCount(item, voute)) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(i) | |
115 | 115 | func purchase (item) = { | |
116 | 116 | let pmt = extract(i.payment) | |
117 | 117 | if (isDefined(pmt.assetId)) | |
118 | 118 | then throw("can use Waves only at the moment") | |
119 | 119 | else { | |
120 | 120 | let userAddress = toBase58String(i.caller.bytes) | |
121 | 121 | let price = getValueItemPrice(item) | |
122 | 122 | let supplierAddress = getValueItemSupplier(item) | |
123 | 123 | if ((price > pmt.amount)) | |
124 | 124 | then throw("purchase amount cannot be less than item price") | |
125 | 125 | else if ((pmt.amount > price)) | |
126 | 126 | then throw("purchase amount cannot be higher than item price") | |
127 | 127 | else if ((supplierAddress == NONE)) | |
128 | 128 | then throw("supplier is not exist") | |
129 | 129 | else WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyBalanceSupplier(supplierAddress), (getValueBalanceSupplier(supplierAddress) + pmt.amount))]) | |
130 | 130 | } | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | ||
135 | 135 | @Callable(i) | |
136 | 136 | func addItem (title,price,data) = { | |
137 | 137 | let supplierAddress = toBase58String(i.caller.bytes) | |
138 | 138 | let item = getKeyItem(supplierAddress, title) | |
139 | 139 | if ((0 >= price)) | |
140 | 140 | then throw("purchase amount cannot be less than item price") | |
141 | 141 | else if ((getValueItemSupplier(item) != NONE)) | |
142 | 142 | then throw("An item is allready exist") | |
143 | 143 | else if ((supplierAddress == BLACKLISTED)) | |
144 | 144 | then throw("supplier's account has been blacklist") | |
145 | 145 | else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data)]) | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | ||
150 | 150 | @Callable(i) | |
151 | 151 | func deposit () = { | |
152 | 152 | let pmt = extract(i.payment) | |
153 | 153 | let supplierAddress = toBase58String(i.caller.bytes) | |
154 | 154 | let balance = getValueBalanceSupplier(supplierAddress) | |
155 | 155 | let newBalance = (balance + pmt.amount) | |
156 | 156 | if (isDefined(pmt.assetId)) | |
157 | 157 | then throw("can hodl waves only at the moment") | |
158 | 158 | else if ((0 > pmt.amount)) | |
159 | 159 | then throw("Can not deposit negative amount") | |
160 | - | else WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), | |
160 | + | else WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), newBalance)]) | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | ||
165 | 165 | @Callable(i) | |
166 | 166 | func withdraw (amount) = { | |
167 | 167 | let supplierAddress = toBase58String(i.caller.bytes) | |
168 | 168 | let balance = getValueBalanceSupplier(supplierAddress) | |
169 | 169 | let newBalance = (balance - amount) | |
170 | 170 | if ((0 > amount)) | |
171 | 171 | then throw("Can not withdraw negative amount") | |
172 | 172 | else if ((0 > newBalance)) | |
173 | 173 | then throw("not enough balance") | |
174 | 174 | else if ((0 >= balance)) | |
175 | 175 | then throw("insufficient balance") | |
176 | 176 | else ScriptResult(WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), newBalance)]), TransferSet([ScriptTransfer(addressFromStringValue(supplierAddress), amount, unit)])) | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | ||
181 | 181 | @Callable(i) | |
182 | 182 | func voteCommit (item,hash) = { | |
183 | 183 | let user = toBase58String(i.caller.bytes) | |
184 | 184 | let commits = getValueCommitsCount(item) | |
185 | 185 | let status = getValueItemStatus(item) | |
186 | 186 | if ((commits >= VOTERS)) | |
187 | 187 | then throw("reached max num of vouters") | |
188 | 188 | else if ((getValueCommit(item, user) != NONE)) | |
189 | 189 | then throw("user has allready participated") | |
190 | 190 | else if ((getKeyItemSupplier(item) == NONE)) | |
191 | 191 | then throw("item dose not exist") | |
192 | 192 | else if (if ((status != NONE)) | |
193 | 193 | then (status != VOTING) | |
194 | 194 | else false) | |
195 | 195 | then throw("vouting is not posible") | |
196 | 196 | else WriteSet([DataEntry(getKeyCommit(item, user), hash), DataEntry(getKeyCommitsCount(item), (commits + 1)), DataEntry(getKeyItemStatus(item), if ((commits == VOTERS)) | |
197 | 197 | then REVEAL | |
198 | 198 | else VOTING)]) | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | ||
203 | 203 | @Callable(i) | |
204 | 204 | func voteReveal (item,vote,salt) = { | |
205 | 205 | let user = toBase58String(i.caller.bytes) | |
206 | 206 | let status = getValueItemStatus(item) | |
207 | 207 | let newVoteCount = getValueVouteCount(item, vote) | |
208 | 208 | if ((toBase58String(sha256(toBytes((vote + salt)))) != getValueCommit(item, user))) | |
209 | 209 | then throw("reveal data is not valid") | |
210 | 210 | else if ((VOTERS > getValueCommitsCount(item))) | |
211 | 211 | then throw("max num of hasn't reached yet") | |
212 | 212 | else if ((getValueReveal(item, user) != NONE)) | |
213 | 213 | then throw("user has already participated") | |
214 | 214 | else if (if ((status != VOTING)) | |
215 | 215 | then (status != REVEAL) | |
216 | 216 | else false) | |
217 | 217 | then throw("wrong status") | |
218 | 218 | else if (if ((vote != FEATURED)) | |
219 | 219 | then (vote != DELISTED) | |
220 | 220 | else false) | |
221 | 221 | then throw("wrong vote") | |
222 | 222 | else if (if ((status == FEATURED)) | |
223 | 223 | then true | |
224 | 224 | else (status == DELISTED)) | |
225 | 225 | then throw("vote has finished") | |
226 | 226 | else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM)) | |
227 | 227 | then vote | |
228 | 228 | else REVEAL)]) | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | @Verifier(tx) | |
233 | 233 | func verify () = { | |
234 | 234 | let alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], allicePubkey) | |
235 | 235 | let alice2 = sigVerify(tx.bodyBytes, tx.proofs[1], allicePubkey) | |
236 | 236 | let alice3 = sigVerify(tx.bodyBytes, tx.proofs[2], allicePubkey) | |
237 | 237 | let bob1 = sigVerify(tx.bodyBytes, tx.proofs[0], bobPubkey) | |
238 | 238 | let bob2 = sigVerify(tx.bodyBytes, tx.proofs[1], bobPubkey) | |
239 | 239 | let bob3 = sigVerify(tx.bodyBytes, tx.proofs[2], bobPubkey) | |
240 | 240 | let cooper1 = sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubkey) | |
241 | 241 | let copper2 = sigVerify(tx.bodyBytes, tx.proofs[1], cooperPubkey) | |
242 | 242 | let copper3 = sigVerify(tx.bodyBytes, tx.proofs[2], cooperPubkey) | |
243 | 243 | let alliceAndBob = if (if (if (if (if (if (alice1) | |
244 | 244 | then bob2 | |
245 | 245 | else false) | |
246 | 246 | then true | |
247 | 247 | else if (alice1) | |
248 | 248 | then bob3 | |
249 | 249 | else false) | |
250 | 250 | then true | |
251 | 251 | else if (alice2) | |
252 | 252 | then bob1 | |
253 | 253 | else false) | |
254 | 254 | then true | |
255 | 255 | else if (alice2) | |
256 | 256 | then bob3 | |
257 | 257 | else false) | |
258 | 258 | then true | |
259 | 259 | else if (alice3) | |
260 | 260 | then bob1 | |
261 | 261 | else false) | |
262 | 262 | then true | |
263 | 263 | else if (alice3) | |
264 | 264 | then bob2 | |
265 | 265 | else false | |
266 | 266 | let alliceAndCooper = if (if (if (if (if (if (alice1) | |
267 | 267 | then copper2 | |
268 | 268 | else false) | |
269 | 269 | then true | |
270 | 270 | else if (alice1) | |
271 | 271 | then copper3 | |
272 | 272 | else false) | |
273 | 273 | then true | |
274 | 274 | else if (alice2) | |
275 | 275 | then cooper1 | |
276 | 276 | else false) | |
277 | 277 | then true | |
278 | 278 | else if (alice2) | |
279 | 279 | then copper3 | |
280 | 280 | else false) | |
281 | 281 | then true | |
282 | 282 | else if (alice3) | |
283 | 283 | then cooper1 | |
284 | 284 | else false) | |
285 | 285 | then true | |
286 | 286 | else if (alice3) | |
287 | 287 | then copper2 | |
288 | 288 | else false | |
289 | 289 | let bobeAndCooper = if (if (if (if (if (if (cooper1) | |
290 | 290 | then bob2 | |
291 | 291 | else false) | |
292 | 292 | then true | |
293 | 293 | else if (cooper1) | |
294 | 294 | then bob3 | |
295 | 295 | else false) | |
296 | 296 | then true | |
297 | 297 | else if (copper2) | |
298 | 298 | then bob1 | |
299 | 299 | else false) | |
300 | 300 | then true | |
301 | 301 | else if (copper2) | |
302 | 302 | then bob3 | |
303 | 303 | else false) | |
304 | 304 | then true | |
305 | 305 | else if (copper3) | |
306 | 306 | then bob1 | |
307 | 307 | else false) | |
308 | 308 | then true | |
309 | 309 | else if (copper3) | |
310 | 310 | then bob2 | |
311 | 311 | else false | |
312 | 312 | match tx { | |
313 | 313 | case d: SetScriptTransaction => | |
314 | 314 | sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublickey) | |
315 | 315 | case d: DataTransaction => | |
316 | 316 | true | |
317 | 317 | case _ => | |
318 | 318 | if (if (alliceAndBob) | |
319 | 319 | then true | |
320 | 320 | else alliceAndCooper) | |
321 | 321 | then true | |
322 | 322 | else bobeAndCooper | |
323 | 323 | } | |
324 | 324 | } | |
325 | 325 |
github/deemru/w8io/169f3d6 40.65 ms ◑