tx · AHUws8cxfiDFUmwwVXVu3B4ipwPTCvFx9v5tEron3TsV 3MrFUxcMycRcQDahrA16JhvuEKnbmMF3QZP: -0.01400000 Waves 2021.11.18 19:11 [1796695] smart account 3MrFUxcMycRcQDahrA16JhvuEKnbmMF3QZP > SELF 0.00000000 Waves
{ "type": 13, "id": "AHUws8cxfiDFUmwwVXVu3B4ipwPTCvFx9v5tEron3TsV", "fee": 1400000, "feeAssetId": null, "timestamp": 1637251920486, "version": 2, "chainId": 84, "sender": "3MrFUxcMycRcQDahrA16JhvuEKnbmMF3QZP", "senderPublicKey": "HtiJZF4j7Jo8jR12wxtKDkNhS3qCe3qsk8QxnnjVvXyq", "proofs": [ "55vMvL4youNQpURpEMdMU7hHCJQbvMFC37iGucrMo4PKKePpSKP5aDpvzZd4qTPFvvpHRZ5nu5hsWWWoh4qBu9JC" ], "script": "base64:AAIDAAAAAAAAAB0IARIFCgMIAQgSAwoBCBIAEgQKAggIEgUKAwgICAAAACEAAAAADm93bmVyUHVibGljS2V5AQAAACD6+lAsvaY9/ICsFhS1sYMY13YGhvh1jT1AiPapnK+uIAAAAAALcHViS2V5QWxpY2UBAAAAIPr6UCy9pj38gKwWFLWxgxjXdgaG+HWNPUCI9qmcr64gAAAAAAlwdWJLZXlCb2IBAAAAIJSwJHqny7GXkLqb/9sX0sw4nnCkaYeDrScKSJwbx9dLAAAAAAxwdWJLZXlDb29wZXIBAAAAIMviW1daO0ECCbLD7je58oUri4AFkKl3dlICXnEszUFIAAAAAAROT05FAgAAAARub25lAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0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Fuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAC3NpZ25lZEFsaWNlBQAAAAlzaWduZWRCb2IFAAAADHNpZ25lZENvb3BlcgAAAAAAAAAAAqJTVMU=", "height": 1796695, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9j6P8LHettTwSsMB2wUsdAsVtMELBU5fqnN2VNAACBQR Next: HtgHcu5TxXhKYVL4sm75Dqj1nu8WUmgE38NpGVdovore Diff:
Old | New | Differences | |
---|---|---|---|
185 | 185 | then throw("reveal data not valid") | |
186 | 186 | else if ((VOTERS > getValueCommitsCount(item))) | |
187 | 187 | then throw("max num of voters hasn't reached yet") | |
188 | - | else if ((getValueReveal(item, user) != NONE)) | |
189 | - | then throw("user has already participated") | |
190 | - | else if (if ((status != VOTING)) | |
191 | - | then (status != REVEAL) | |
188 | + | else if (if ((status != VOTING)) | |
189 | + | then (status != REVEAL) | |
190 | + | else false) | |
191 | + | then throw("wrong status") | |
192 | + | else if (if ((vote != FEATURED)) | |
193 | + | then (vote != DELISTED) | |
192 | 194 | else false) | |
193 | - | then throw("wrong status") | |
194 | - | else if (if ((vote != FEATURED)) | |
195 | - | then (vote != DELISTED) | |
196 | - | else false) | |
197 | - | then throw("wrong vote") | |
198 | - | else if (if ((status == FEATURED)) | |
199 | - | then true | |
200 | - | else (status == DELISTED)) | |
201 | - | then throw("vote has finished") | |
202 | - | else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM)) | |
203 | - | then vote | |
204 | - | else REVEAL)]) | |
195 | + | then throw("wrong vote") | |
196 | + | else if (if ((status == FEATURED)) | |
197 | + | then true | |
198 | + | else (status == DELISTED)) | |
199 | + | then throw("vote has finished") | |
200 | + | else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM)) | |
201 | + | then vote | |
202 | + | else REVEAL)]) | |
205 | 203 | } | |
206 | 204 | ||
207 | 205 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let ownerPublicKey = base58'HtiJZF4j7Jo8jR12wxtKDkNhS3qCe3qsk8QxnnjVvXyq' | |
5 | 5 | ||
6 | 6 | let pubKeyAlice = base58'HtiJZF4j7Jo8jR12wxtKDkNhS3qCe3qsk8QxnnjVvXyq' | |
7 | 7 | ||
8 | 8 | let pubKeyBob = base58'B1R7zeh6VgTv4Xxe3aHhdoZ9aQgWcqN8LFC9smacE96r' | |
9 | 9 | ||
10 | 10 | let pubKeyCooper = base58'EisxKQktzqqd4UsxE7UgVjSHqoWindUpjoB7dsDwfG4o' | |
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 | func getNumberByKey (key) = { | |
27 | 27 | let num = match getInteger(this, key) { | |
28 | 28 | case t: Int => | |
29 | 29 | t | |
30 | 30 | case _ => | |
31 | 31 | 0 | |
32 | 32 | } | |
33 | 33 | num | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getStrByKey (key) = { | |
38 | 38 | let str = match getString(this, key) { | |
39 | 39 | case t: String => | |
40 | 40 | t | |
41 | 41 | case _ => | |
42 | 42 | NONE | |
43 | 43 | } | |
44 | 44 | str | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getKeyItemPrice (item) = (item + "_price") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getValueItemPrice (item) = getNumberByKey(getKeyItemPrice(item)) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt") | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title))))) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getKeyItemData (item) = (item + "_data") | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getKeyItemSupplier (item) = (item + "_owner") | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getKeyBalanceSupplier (account) = (account + "_balance") | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getValueBalanceSupplier (account) = getNumberByKey(getKeyBalanceSupplier(account)) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getKeyCommit (item,user) = (((item + "_") + user) + "_commit") | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getValueCommit (item,user) = getStrByKey(getKeyCommit(item, user)) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getKeyCommitsCount (item) = (item + "_comcnt") | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getValueCommitsCount (item) = getNumberByKey(getKeyCommitsCount(item)) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal") | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getValueReveal (item,user) = getStrByKey(getKeyReveal(item, user)) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getKeyItemStatus (item) = (item + "_status") | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getKeyVoteCount (item,vote) = ((item + "_res:") + vote) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getValueVoteCount (item,vote) = getNumberByKey(getKeyVoteCount(item, vote)) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | @Callable(i) | |
109 | 109 | func addItem (title,price,data) = { | |
110 | 110 | let supplierAddress = toBase58String(i.caller.bytes) | |
111 | 111 | let item = getKeyItem(supplierAddress, title) | |
112 | 112 | if ((0 >= price)) | |
113 | 113 | then throw("purchase amount cannot be less than item price") | |
114 | 114 | else if ((getValueItemSupplier(item) != NONE)) | |
115 | 115 | then throw("an item is already exist") | |
116 | 116 | else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data)]) | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | ||
121 | 121 | @Callable(i) | |
122 | 122 | func purchase (itemKey) = { | |
123 | 123 | let pmt = extract(i.payment) | |
124 | 124 | if (isDefined(pmt.assetId)) | |
125 | 125 | then throw("can use WAVES only at the moment") | |
126 | 126 | else if (!(isDefined(itemKey))) | |
127 | 127 | then throw("You must select Item") | |
128 | 128 | else { | |
129 | 129 | let customerAddress = toBase58String(i.caller.bytes) | |
130 | 130 | let price = getValueItemPrice(itemKey) | |
131 | 131 | let supplierAddress = getValueItemSupplier(itemKey) | |
132 | 132 | if ((price > pmt.amount)) | |
133 | 133 | then throw("purchase amoun cannot be less than item price") | |
134 | 134 | else if ((pmt.amount > price)) | |
135 | 135 | then throw("purchase amoun cannot be higher than item price") | |
136 | 136 | else if ((supplierAddress == NONE)) | |
137 | 137 | then throw("supplier does not exist") | |
138 | 138 | else WriteSet([DataEntry(getKeyUserItemCounter(customerAddress, itemKey), (getValueUserItemCounter(customerAddress, itemKey) + 1)), DataEntry(getKeyBalanceSupplier(supplierAddress), (getValueBalanceSupplier(supplierAddress) + pmt.amount))]) | |
139 | 139 | } | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | ||
144 | 144 | @Callable(i) | |
145 | 145 | func withdraw () = { | |
146 | 146 | let supplierAddress = toBase58String(i.caller.bytes) | |
147 | 147 | let balance = getValueBalanceSupplier(supplierAddress) | |
148 | 148 | if ((0 >= balance)) | |
149 | 149 | then throw("no money - no honey") | |
150 | 150 | else ScriptResult(WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(supplierAddress), balance, unit)])) | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | ||
155 | 155 | @Callable(i) | |
156 | 156 | func voteCommit (item,hash) = if ((getKeyItemSupplier(item) == NONE)) | |
157 | 157 | then throw("item does not exist") | |
158 | 158 | else { | |
159 | 159 | let user = toBase58String(i.caller.bytes) | |
160 | 160 | let commits = getValueCommitsCount(item) | |
161 | 161 | let status = getValueItemStatus(item) | |
162 | 162 | if ((commits >= VOTERS)) | |
163 | 163 | then throw("reached max num of voters") | |
164 | 164 | else if ((getValueCommit(item, user) != NONE)) | |
165 | 165 | then throw("user has already participated") | |
166 | 166 | else if (if ((status != NONE)) | |
167 | 167 | then (status != VOTING) | |
168 | 168 | else false) | |
169 | 169 | then throw("voting is not possible") | |
170 | 170 | else WriteSet([DataEntry(getKeyCommit(item, user), hash), DataEntry(getKeyCommitsCount(item), (commits + 1)), DataEntry(getKeyItemStatus(item), if (((commits + 1) == VOTERS)) | |
171 | 171 | then REVEAL | |
172 | 172 | else VOTING)]) | |
173 | 173 | } | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | ||
177 | 177 | @Callable(i) | |
178 | 178 | func voteReveal (item,vote,salt) = if ((getKeyItemSupplier(item) == NONE)) | |
179 | 179 | then throw("item does not exist") | |
180 | 180 | else { | |
181 | 181 | let user = toBase58String(i.caller.bytes) | |
182 | 182 | let status = getValueItemStatus(item) | |
183 | 183 | let newVoteCount = (getValueVoteCount(item, vote) + 1) | |
184 | 184 | if ((toBase58String(sha256(toBytes((vote + salt)))) != getValueCommit(item, user))) | |
185 | 185 | then throw("reveal data not valid") | |
186 | 186 | else if ((VOTERS > getValueCommitsCount(item))) | |
187 | 187 | then throw("max num of voters hasn't reached yet") | |
188 | - | else if ((getValueReveal(item, user) != NONE)) | |
189 | - | then throw("user has already participated") | |
190 | - | else if (if ((status != VOTING)) | |
191 | - | then (status != REVEAL) | |
188 | + | else if (if ((status != VOTING)) | |
189 | + | then (status != REVEAL) | |
190 | + | else false) | |
191 | + | then throw("wrong status") | |
192 | + | else if (if ((vote != FEATURED)) | |
193 | + | then (vote != DELISTED) | |
192 | 194 | else false) | |
193 | - | then throw("wrong status") | |
194 | - | else if (if ((vote != FEATURED)) | |
195 | - | then (vote != DELISTED) | |
196 | - | else false) | |
197 | - | then throw("wrong vote") | |
198 | - | else if (if ((status == FEATURED)) | |
199 | - | then true | |
200 | - | else (status == DELISTED)) | |
201 | - | then throw("vote has finished") | |
202 | - | else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM)) | |
203 | - | then vote | |
204 | - | else REVEAL)]) | |
195 | + | then throw("wrong vote") | |
196 | + | else if (if ((status == FEATURED)) | |
197 | + | then true | |
198 | + | else (status == DELISTED)) | |
199 | + | then throw("vote has finished") | |
200 | + | else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM)) | |
201 | + | then vote | |
202 | + | else REVEAL)]) | |
205 | 203 | } | |
206 | 204 | ||
207 | 205 | ||
208 | 206 | @Verifier(tx) | |
209 | 207 | func verify () = { | |
210 | 208 | let signedAlice = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyAlice)) | |
211 | 209 | then true | |
212 | 210 | else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyAlice)) | |
213 | 211 | then true | |
214 | 212 | else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyAlice)) | |
215 | 213 | then 1 | |
216 | 214 | else 0 | |
217 | 215 | let signedBob = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyBob)) | |
218 | 216 | then true | |
219 | 217 | else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyBob)) | |
220 | 218 | then true | |
221 | 219 | else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyBob)) | |
222 | 220 | then 1 | |
223 | 221 | else 0 | |
224 | 222 | let signedCooper = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyCooper)) | |
225 | 223 | then true | |
226 | 224 | else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyCooper)) | |
227 | 225 | then true | |
228 | 226 | else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyCooper)) | |
229 | 227 | then 1 | |
230 | 228 | else 0 | |
231 | 229 | match tx { | |
232 | 230 | case d: SetScriptTransaction => | |
233 | 231 | sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey) | |
234 | 232 | case d: DataTransaction => | |
235 | 233 | true | |
236 | 234 | case _ => | |
237 | 235 | (((signedAlice + signedBob) + signedCooper) >= 2) | |
238 | 236 | } | |
239 | 237 | } | |
240 | 238 |
github/deemru/w8io/026f985 45.59 ms ◑