tx · HJSFVVpbDq4iVTRdDDCd24pz71eEFqhUuj5UZ1MjKU52 3MtELerncMfYVZvRuEeMvgvsj7jUnshXWuw: -0.01400000 Waves 2019.11.04 00:34 [749253] smart account 3MtELerncMfYVZvRuEeMvgvsj7jUnshXWuw > SELF 0.00000000 Waves
{ "type": 13, "id": "HJSFVVpbDq4iVTRdDDCd24pz71eEFqhUuj5UZ1MjKU52", "fee": 1400000, "feeAssetId": null, "timestamp": 1572816718294, "version": 1, "sender": "3MtELerncMfYVZvRuEeMvgvsj7jUnshXWuw", "senderPublicKey": "FXsc9LG44fGFsWEUFctaZ8pr75ZoWQuPc75fhhG6CQb7", "proofs": [ "2bLcD3uzzNavz66ESWtuTzYVD4mLfzqvzA8HXZkwzJwPLGX5ukLJLCicDUEBCfize8LcwZDkNdJYnp3hFAyscQkx" ], "script": "base64:AAIDAAAAAAAAAB0IARIDCgEIEgUKAwgBCBIAEgQKAggIEgUKAwgICAAAACAAAAAAC2FsaWNlUHViS2V5AQAAACDX7EL0fX6l5Q8xnNOHhmzsBtLIfcaqkBcB//AMYv5XXgAAAAAJYm9iUHViS2V5AQAAACDsEpMXzzUbpi2Ff0Mjrb6D9V66oNMCyG1kL2a1kcQmVQAAAAAMY29vcGVyUHViS2V5AQAAACCASY5fiAuofxMqf5Ivw/e0xG6jnCiQ2b9d7EzQoCSpIgAAAAAETk9ORQIAAAAEbm9uZQAAAAAGVk9URVJTAAAAAAAAAAADAAAAAAZRVU9SVU0AAAAAAAAAAAIAAAAABlZPVElORwIAAAAGdm90aW5nAAAAAAZSRVZFQUwCAAAABnJldmVhbAAAAAAIRkVBVFVSRUQCAAAACGZlYXR1cmVkAAAAAAhERUxJU1RFRAIAAAAIZGVsaXN0ZWQBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAAB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Qm9iMQUAAAAHQ29vcGVyMgcGAwUAAAAEQm9iMQUAAAAHQ29vcGVyMwcGAwUAAAAEQm9iMgUAAAAHQ29vcGVyMQcGAwUAAAAEQm9iMgUAAAAHQ29vcGVyMwcGAwUAAAAEQm9iMwUAAAAHQ29vcGVyMQcGAwUAAAAEQm9iMwUAAAAHQ29vcGVyMgcEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYDAwUAAAALQWxpY2VBbmRCb2IGBQAAAA5BbGljZUFuZENvb3BlcgYFAAAADEJvYkFuZENvb3BlcrGZ47M=", "chainId": 84, "height": 749253, "spentComplexity": 0 } View: original | compacted Prev: 9DQntgwT3Hrh8LNV6uVE6X8pKLqedSgzsjwr3c2tSqN3 Next: 9ftHk5EzwWYwMrCtFA5HthCLpzR9bRNr2nhKS5f3GBXK Diff:
Old | New | Differences | |
---|---|---|---|
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | + | ||
173 | + | @Callable(i) | |
174 | + | func voteReveal (item,vote,salt) = { | |
175 | + | let user = toBase58String(i.caller.bytes) | |
176 | + | let status = getValueItemStatus(item) | |
177 | + | let newVoteCount = (getValueVoteCount(item, vote) + 1) | |
178 | + | if ((toBase58String(sha256(toBytes((vote + salt)))) != getValueCommit(item, user))) | |
179 | + | then throw("Revealed data is not valid") | |
180 | + | else if ((VOTERS > getValueCommitsCount(item))) | |
181 | + | then throw("max number of voters has not reached yet") | |
182 | + | else if ((getValueReveal(item, user) != NONE)) | |
183 | + | then throw("User has already participated") | |
184 | + | else if (if ((status != VOTING)) | |
185 | + | then (status != REVEAL) | |
186 | + | else false) | |
187 | + | then throw("Wrong status") | |
188 | + | else if (if ((vote != FEATURED)) | |
189 | + | then (vote != DELISTED) | |
190 | + | else false) | |
191 | + | then throw("Wrong vote") | |
192 | + | else if (if ((status == FEATURED)) | |
193 | + | then true | |
194 | + | else (status == DELISTED)) | |
195 | + | then throw("Vote has finished") | |
196 | + | else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM)) | |
197 | + | then vote | |
198 | + | else REVEAL)]) | |
199 | + | } | |
200 | + | ||
201 | + | ||
172 | 202 | @Verifier(tx) | |
173 | 203 | func verify () = { | |
174 | 204 | let Alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let alicePubKey = base58'FXsc9LG44fGFsWEUFctaZ8pr75ZoWQuPc75fhhG6CQb7' | |
5 | 5 | ||
6 | 6 | let bobPubKey = base58'GtXeMqkP3JUjRf7EDptgqdEu5wkrkG4d2sbfUi5hYQVi' | |
7 | 7 | ||
8 | 8 | let cooperPubKey = base58'9dnEr8G5eVHGJ5LkzueoK512pE3XBYBpe2ReLVcsrawT' | |
9 | 9 | ||
10 | 10 | let NONE = "none" | |
11 | 11 | ||
12 | 12 | let VOTERS = 3 | |
13 | 13 | ||
14 | 14 | let QUORUM = 2 | |
15 | 15 | ||
16 | 16 | let VOTING = "voting" | |
17 | 17 | ||
18 | 18 | let REVEAL = "reveal" | |
19 | 19 | ||
20 | 20 | let FEATURED = "featured" | |
21 | 21 | ||
22 | 22 | let DELISTED = "delisted" | |
23 | 23 | ||
24 | 24 | func getNumberByKey (key) = { | |
25 | 25 | let num = match getInteger(this, key) { | |
26 | 26 | case a: Int => | |
27 | 27 | a | |
28 | 28 | case _ => | |
29 | 29 | 0 | |
30 | 30 | } | |
31 | 31 | num | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func getStrByKey (key) = { | |
36 | 36 | let str = match getString(this, key) { | |
37 | 37 | case a: String => | |
38 | 38 | a | |
39 | 39 | case _ => | |
40 | 40 | NONE | |
41 | 41 | } | |
42 | 42 | str | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func getKeyCommit (item,user) = (((item + "_") + user) + "_commit") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getValueCommit (item,user) = getStrByKey(getKeyCommit(item, user)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getKeyCommitsCount (item) = (item + "_comcnt") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getValueCommitsCount (item) = getNumberByKey(getKeyCommitsCount(item)) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal") | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getValueReveal (item,user) = getStrByKey(getKeyReveal(item, user)) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getKeyItemStatus (item) = (item + "_status") | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item)) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getKeyVoteCount (item,vote) = ((item + "_res:") + vote) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getValueVoteCount (item,vote) = getNumberByKey(getKeyVoteCount(item, vote)) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getKeyItemPrice (item) = (item + "_price") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getValueItemPrice (item) = getNumberByKey(getKeyItemPrice(item)) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getKeyUserItemCounter (user,item) = (((item + "user") + user) + "_cnt") | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item)) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title))))) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func getKeyItemData (item) = (item + "_data") | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func getKeyItemSupplier (item) = (item + "_owner") | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item)) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getKeyBalanceSupplier (account) = (account + "_balance") | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getValueBalanceSupplier (account) = getNumberByKey(getKeyBalanceSupplier(account)) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | @Callable(i) | |
107 | 107 | func purchase (item) = { | |
108 | 108 | let pmt = extract(i.payment) | |
109 | 109 | if (isDefined(pmt.assetId)) | |
110 | 110 | then throw("Can use WAVES only at the moment") | |
111 | 111 | else { | |
112 | 112 | let customerAddress = toBase58String(i.caller.bytes) | |
113 | 113 | let price = getValueItemPrice(item) | |
114 | 114 | let supplierAddress = getValueItemSupplier(item) | |
115 | 115 | if ((price > pmt.amount)) | |
116 | 116 | then throw("Purchase amount can not be less than item price") | |
117 | 117 | else if ((pmt.amount > price)) | |
118 | 118 | then throw("Purchase amount can not be more than item price") | |
119 | 119 | else if ((supplierAddress == NONE)) | |
120 | 120 | then throw("Supplier does not exist") | |
121 | 121 | else WriteSet([DataEntry(getKeyUserItemCounter(customerAddress, item), (getValueUserItemCounter(customerAddress, item) + 1)), DataEntry(getKeyBalanceSupplier(supplierAddress), (getValueBalanceSupplier(supplierAddress) + pmt.amount))]) | |
122 | 122 | } | |
123 | 123 | } | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | ||
127 | 127 | @Callable(i) | |
128 | 128 | func addItem (title,price,data) = { | |
129 | 129 | let supplierAddress = toBase58String(i.caller.bytes) | |
130 | 130 | let item = getKeyItem(supplierAddress, title) | |
131 | 131 | if ((0 >= price)) | |
132 | 132 | then throw("purchase amount can not be less than item price") | |
133 | 133 | else if ((getValueItemSupplier(item) != NONE)) | |
134 | 134 | then throw("An item is already") | |
135 | 135 | else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data)]) | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(i) | |
141 | 141 | func withdraw () = { | |
142 | 142 | let supplierAddress = toBase58String(i.caller.bytes) | |
143 | 143 | let balance = getValueBalanceSupplier(supplierAddress) | |
144 | 144 | if ((0 >= balance)) | |
145 | 145 | then throw("insufficient balance") | |
146 | 146 | else ScriptResult(WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(supplierAddress), balance, unit)])) | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | ||
151 | 151 | @Callable(i) | |
152 | 152 | func voteCommit (item,hash) = { | |
153 | 153 | let user = toBase58String(i.caller.bytes) | |
154 | 154 | let commits = getValueCommitsCount(item) | |
155 | 155 | let status = getValueItemStatus(item) | |
156 | 156 | if ((commits >= VOTERS)) | |
157 | 157 | then throw("Reached max number of voters") | |
158 | 158 | else if ((getValueCommit(item, user) != NONE)) | |
159 | 159 | then throw("User has aready participated") | |
160 | 160 | else if ((getKeyItemSupplier(item) == NONE)) | |
161 | 161 | then throw("Item does not exist") | |
162 | 162 | else if (if ((status != NONE)) | |
163 | 163 | then (status != VOTING) | |
164 | 164 | else false) | |
165 | 165 | then throw("Voting is not possible") | |
166 | 166 | else WriteSet([DataEntry(getKeyCommit(item, user), hash), DataEntry(getKeyCommitsCount(item), (commits + 1)), DataEntry(getKeyItemStatus(item), if ((commits == VOTERS)) | |
167 | 167 | then REVEAL | |
168 | 168 | else VOTING)]) | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | + | ||
173 | + | @Callable(i) | |
174 | + | func voteReveal (item,vote,salt) = { | |
175 | + | let user = toBase58String(i.caller.bytes) | |
176 | + | let status = getValueItemStatus(item) | |
177 | + | let newVoteCount = (getValueVoteCount(item, vote) + 1) | |
178 | + | if ((toBase58String(sha256(toBytes((vote + salt)))) != getValueCommit(item, user))) | |
179 | + | then throw("Revealed data is not valid") | |
180 | + | else if ((VOTERS > getValueCommitsCount(item))) | |
181 | + | then throw("max number of voters has not reached yet") | |
182 | + | else if ((getValueReveal(item, user) != NONE)) | |
183 | + | then throw("User has already participated") | |
184 | + | else if (if ((status != VOTING)) | |
185 | + | then (status != REVEAL) | |
186 | + | else false) | |
187 | + | then throw("Wrong status") | |
188 | + | else if (if ((vote != FEATURED)) | |
189 | + | then (vote != DELISTED) | |
190 | + | else false) | |
191 | + | then throw("Wrong vote") | |
192 | + | else if (if ((status == FEATURED)) | |
193 | + | then true | |
194 | + | else (status == DELISTED)) | |
195 | + | then throw("Vote has finished") | |
196 | + | else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM)) | |
197 | + | then vote | |
198 | + | else REVEAL)]) | |
199 | + | } | |
200 | + | ||
201 | + | ||
172 | 202 | @Verifier(tx) | |
173 | 203 | func verify () = { | |
174 | 204 | let Alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey) | |
175 | 205 | let Alice2 = sigVerify(tx.bodyBytes, tx.proofs[1], alicePubKey) | |
176 | 206 | let Alice3 = sigVerify(tx.bodyBytes, tx.proofs[2], alicePubKey) | |
177 | 207 | let Bob1 = sigVerify(tx.bodyBytes, tx.proofs[0], bobPubKey) | |
178 | 208 | let Bob2 = sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey) | |
179 | 209 | let Bob3 = sigVerify(tx.bodyBytes, tx.proofs[2], bobPubKey) | |
180 | 210 | let Cooper1 = sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubKey) | |
181 | 211 | let Cooper2 = sigVerify(tx.bodyBytes, tx.proofs[1], cooperPubKey) | |
182 | 212 | let Cooper3 = sigVerify(tx.bodyBytes, tx.proofs[2], cooperPubKey) | |
183 | 213 | let AliceAndBob = if (if (if (if (if (if (Alice1) | |
184 | 214 | then Bob2 | |
185 | 215 | else false) | |
186 | 216 | then true | |
187 | 217 | else if (Alice1) | |
188 | 218 | then Bob3 | |
189 | 219 | else false) | |
190 | 220 | then true | |
191 | 221 | else if (Alice2) | |
192 | 222 | then Bob1 | |
193 | 223 | else false) | |
194 | 224 | then true | |
195 | 225 | else if (Alice2) | |
196 | 226 | then Bob3 | |
197 | 227 | else false) | |
198 | 228 | then true | |
199 | 229 | else if (Alice3) | |
200 | 230 | then Bob1 | |
201 | 231 | else false) | |
202 | 232 | then true | |
203 | 233 | else if (Alice3) | |
204 | 234 | then Bob2 | |
205 | 235 | else false | |
206 | 236 | let AliceAndCooper = if (if (if (if (if (if (Cooper1) | |
207 | 237 | then Alice2 | |
208 | 238 | else false) | |
209 | 239 | then true | |
210 | 240 | else if (Cooper1) | |
211 | 241 | then Alice3 | |
212 | 242 | else false) | |
213 | 243 | then true | |
214 | 244 | else if (Cooper2) | |
215 | 245 | then Alice1 | |
216 | 246 | else false) | |
217 | 247 | then true | |
218 | 248 | else if (Cooper2) | |
219 | 249 | then Alice3 | |
220 | 250 | else false) | |
221 | 251 | then true | |
222 | 252 | else if (Cooper3) | |
223 | 253 | then Alice1 | |
224 | 254 | else false) | |
225 | 255 | then true | |
226 | 256 | else if (Cooper3) | |
227 | 257 | then Alice2 | |
228 | 258 | else false | |
229 | 259 | let BobAndCooper = if (if (if (if (if (if (Bob1) | |
230 | 260 | then Cooper2 | |
231 | 261 | else false) | |
232 | 262 | then true | |
233 | 263 | else if (Bob1) | |
234 | 264 | then Cooper3 | |
235 | 265 | else false) | |
236 | 266 | then true | |
237 | 267 | else if (Bob2) | |
238 | 268 | then Cooper1 | |
239 | 269 | else false) | |
240 | 270 | then true | |
241 | 271 | else if (Bob2) | |
242 | 272 | then Cooper3 | |
243 | 273 | else false) | |
244 | 274 | then true | |
245 | 275 | else if (Bob3) | |
246 | 276 | then Cooper1 | |
247 | 277 | else false) | |
248 | 278 | then true | |
249 | 279 | else if (Bob3) | |
250 | 280 | then Cooper2 | |
251 | 281 | else false | |
252 | 282 | match tx { | |
253 | 283 | case d: SetScriptTransaction => | |
254 | 284 | true | |
255 | 285 | case _ => | |
256 | 286 | if (if (AliceAndBob) | |
257 | 287 | then true | |
258 | 288 | else AliceAndCooper) | |
259 | 289 | then true | |
260 | 290 | else BobAndCooper | |
261 | 291 | } | |
262 | 292 | } | |
263 | 293 |
github/deemru/w8io/169f3d6 67.86 ms ◑