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