tx · VCyz55DrHA7ssaQC2qnfheGS55MNjxaJLP7Kqi6bXK1 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7: -0.01400000 Waves 2021.07.31 04:34 [1637154] smart account 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7 > SELF 0.00000000 Waves
{ "type": 13, "id": "VCyz55DrHA7ssaQC2qnfheGS55MNjxaJLP7Kqi6bXK1", "fee": 1400000, "feeAssetId": null, "timestamp": 1627695220019, "version": 2, "chainId": 84, "sender": "3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7", "senderPublicKey": "3tp5fNYyPi4jMnkf6s1k4kBqvJ7nm57SxzvLyi8RkxT2", "proofs": [ "41vT4hi7Jxx2AS33bWUed3tmi7PKVeAExZuCo9TpAGK1xhcdMpUqqrQFGpHAbMfUK3NqZbtE4suouuAnFuPc9YcJ" ], "script": "base64:AAIEAAAAAAAAAC0IAhIDCgEIEgUKAwgBCBIGCgQICAEIEgMKAQgSAwoBCBIECgIICBIFCgMICAgAAAAgAAAAAAROT05FAgAAAAROT05FAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAIRkVBVFVSRUQCAAAACGZlYXR1cmVkAAAAAAhERUxJU1RFRAIAAAAIZGVsaXN0ZWQAAAAABlZPVElORwIAAAAGdm90aW5nAAAAAAZSRVZFQUwCAAAABnJldmVhbAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQEAAAAPZ2V0SW50ZWdlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEF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kABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAAQZ2V0S2V5SXRlbVN0YXR1cwAAAAEFAAAABGl0ZW0FAAAACW5ld1N0YXR1cwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQdjkUcP", "height": 1637154, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: gNQTakaPDe32YC6Dd7Y3uhJtHC47eLb2zPfHSUSL2oa Next: GYujRyAXesV6ihRh3Q5zWD9ZQAigXjpxVarDn1f5gaEv Diff:
Old | New | Differences | |
---|---|---|---|
154 | 154 | let supplier = toBase58String(i.caller.bytes) | |
155 | 155 | let account = getSupplierAccount(supplier) | |
156 | 156 | let itemSupplier = getValueItemSupplier(item) | |
157 | - | if ((account == NONE)) | |
158 | - | then throw("You should register as supplier to remove an item") | |
159 | - | else if (if ((item == NONE)) | |
160 | - | then true | |
161 | - | else (supplier != itemSupplier)) | |
162 | - | then throw(("You don't owned item " + item)) | |
163 | - | else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)] | |
157 | + | if ((1 == 1)) | |
158 | + | then throw(((((("-> " + supplier) + " === ") + itemSupplier) + " -- / ") + item)) | |
159 | + | else if ((account == NONE)) | |
160 | + | then throw("You should register as supplier to remove an item") | |
161 | + | else if (if ((item == NONE)) | |
162 | + | then true | |
163 | + | else (supplier != itemSupplier)) | |
164 | + | then throw(("You don't owned item " + item)) | |
165 | + | else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)] | |
164 | 166 | } | |
165 | 167 | ||
166 | 168 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let NONE = "NONE" | |
5 | 5 | ||
6 | 6 | let VOTERS = 3 | |
7 | 7 | ||
8 | 8 | let QUORUM = 2 | |
9 | 9 | ||
10 | 10 | let FEATURED = "featured" | |
11 | 11 | ||
12 | 12 | let DELISTED = "delisted" | |
13 | 13 | ||
14 | 14 | let VOTING = "voting" | |
15 | 15 | ||
16 | 16 | let REVEAL = "reveal" | |
17 | 17 | ||
18 | 18 | func getStringByKey (key) = match getString(this, key) { | |
19 | 19 | case a: String => | |
20 | 20 | a | |
21 | 21 | case _ => | |
22 | 22 | NONE | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func getIntegerByKey (key) = match getInteger(this, key) { | |
27 | 27 | case a: Int => | |
28 | 28 | a | |
29 | 29 | case _ => | |
30 | 30 | 0 | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func getKeySupplierAccount (account) = (account + "_account") | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getSupplierAccount (account) = getStringByKey(getKeySupplierAccount(account)) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func getKeyItem (supplier,title) = { | |
41 | 41 | let supplierTitle = (supplier + title) | |
42 | 42 | ("item_" + toBase58String(sha256(toBytes(supplierTitle)))) | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func getKeyItemSupplier (item) = (item + "_owner") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getKeyItemTitle (item) = (item + "_title") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getKeyItemPrice (item) = (item + "_price") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getKeyItemData (item) = (item + "_data") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getKeyCommit (item,user) = (((item + "_") + user) + "_commit") | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getKeyCommitsCount (item) = (item + "_cmtcnt") | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal") | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getKeyItemStatus (item) = (item + "_status") | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getKeyVotesCount (item,vote) = ((item + "_res:") + vote) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt") | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getKeyBalanceSupplier (account) = (account + "_balance") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getValueBalanceSupplier (account) = { | |
80 | 80 | let supplierBalanceKey = getKeyBalanceSupplier(account) | |
81 | 81 | match getInteger(this, supplierBalanceKey) { | |
82 | 82 | case a: Int => | |
83 | 83 | a | |
84 | 84 | case _ => | |
85 | 85 | 0 | |
86 | 86 | } | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getValueUserItemCounter (user,item) = { | |
91 | 91 | let userItemCounterKey = getKeyUserItemCounter(user, item) | |
92 | 92 | match getInteger(this, userItemCounterKey) { | |
93 | 93 | case a: Int => | |
94 | 94 | a | |
95 | 95 | case _ => | |
96 | 96 | 0 | |
97 | 97 | } | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getValueItemPrice (item) = { | |
102 | 102 | let keyItemPrice = getKeyItemPrice(item) | |
103 | 103 | getIntegerValue(this, keyItemPrice) | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getValueItemSupplier (account) = getStringByKey(getKeyItemSupplier(account)) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getValueCommit (item,user) = getStringByKey(getKeyCommit(item, user)) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getValueCommitsCount (item) = getIntegerByKey(getKeyCommitsCount(item)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getValueReveal (item,user) = getStringByKey(getKeyReveal(item, user)) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getValueItemStatus (item) = getStringByKey(getKeyItemStatus(item)) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getValueVotesCount (item,vote) = getIntegerByKey(getKeyVotesCount(item, vote)) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | @Callable(i) | |
126 | 126 | func registerSupplier (data) = { | |
127 | 127 | let supplier = toBase58String(i.caller.bytes) | |
128 | 128 | let account = getSupplierAccount(supplier) | |
129 | 129 | if ((account != NONE)) | |
130 | 130 | then throw("This address has already registred as supplier") | |
131 | 131 | else [StringEntry(getKeySupplierAccount(supplier), data)] | |
132 | 132 | } | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | ||
136 | 136 | @Callable(i) | |
137 | 137 | func addItem (title,price,data) = { | |
138 | 138 | let supplier = toBase58String(i.caller.bytes) | |
139 | 139 | let account = getSupplierAccount(supplier) | |
140 | 140 | let item = getKeyItem(supplier, title) | |
141 | 141 | if ((account == NONE)) | |
142 | 142 | then throw("You should register as supplier to add an item") | |
143 | 143 | else if ((0 >= price)) | |
144 | 144 | then throw("Purchase amount cannot be less than item price") | |
145 | 145 | else if ((getValueItemSupplier(item) != NONE)) | |
146 | 146 | then throw("An item already exists") | |
147 | 147 | else [StringEntry(getKeyItemSupplier(item), supplier), StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)] | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | ||
152 | 152 | @Callable(i) | |
153 | 153 | func updateItem (item,title,price,data) = { | |
154 | 154 | let supplier = toBase58String(i.caller.bytes) | |
155 | 155 | let account = getSupplierAccount(supplier) | |
156 | 156 | let itemSupplier = getValueItemSupplier(item) | |
157 | - | if ((account == NONE)) | |
158 | - | then throw("You should register as supplier to remove an item") | |
159 | - | else if (if ((item == NONE)) | |
160 | - | then true | |
161 | - | else (supplier != itemSupplier)) | |
162 | - | then throw(("You don't owned item " + item)) | |
163 | - | else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)] | |
157 | + | if ((1 == 1)) | |
158 | + | then throw(((((("-> " + supplier) + " === ") + itemSupplier) + " -- / ") + item)) | |
159 | + | else if ((account == NONE)) | |
160 | + | then throw("You should register as supplier to remove an item") | |
161 | + | else if (if ((item == NONE)) | |
162 | + | then true | |
163 | + | else (supplier != itemSupplier)) | |
164 | + | then throw(("You don't owned item " + item)) | |
165 | + | else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)] | |
164 | 166 | } | |
165 | 167 | ||
166 | 168 | ||
167 | 169 | ||
168 | 170 | @Callable(i) | |
169 | 171 | func removeItem (item) = { | |
170 | 172 | let supplier = toBase58String(i.caller.bytes) | |
171 | 173 | let account = getSupplierAccount(supplier) | |
172 | 174 | let itemSupplier = getValueItemSupplier(item) | |
173 | 175 | if ((account == NONE)) | |
174 | 176 | then throw("You should register as supplier to remove an item") | |
175 | 177 | else if (if ((item == NONE)) | |
176 | 178 | then true | |
177 | 179 | else (supplier != itemSupplier)) | |
178 | 180 | then throw(("You don't owned item " + item)) | |
179 | 181 | else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item))] | |
180 | 182 | } | |
181 | 183 | ||
182 | 184 | ||
183 | 185 | ||
184 | 186 | @Callable(i) | |
185 | 187 | func purchase (item) = { | |
186 | 188 | let pmt = i.payments[0] | |
187 | 189 | if (isDefined(pmt.assetId)) | |
188 | 190 | then throw("You can buy tokens only with Waves tokens") | |
189 | 191 | else { | |
190 | 192 | let userAddress = toBase58String(i.caller.bytes) | |
191 | 193 | let price = getValueItemPrice(item) | |
192 | 194 | let supplier = getValueItemSupplier(item) | |
193 | 195 | if ((price > pmt.amount)) | |
194 | 196 | then throw("Purchase amount cannot be less than item price") | |
195 | 197 | else if ((pmt.amount > price)) | |
196 | 198 | then throw("Purchase amount cannot be higher than item price") | |
197 | 199 | else if ((supplier == NONE)) | |
198 | 200 | then throw("Supplier does not exists") | |
199 | 201 | else { | |
200 | 202 | let userItemCounter = getKeyUserItemCounter(userAddress, item) | |
201 | 203 | let newValueUserItemCounter = (getValueUserItemCounter(userAddress, item) + 1) | |
202 | 204 | let supplierBalanceKey = getKeyBalanceSupplier(supplier) | |
203 | 205 | let newSupplierBalance = (getValueBalanceSupplier(supplier) + pmt.amount) | |
204 | 206 | [IntegerEntry(userItemCounter, newValueUserItemCounter), IntegerEntry(supplierBalanceKey, newSupplierBalance)] | |
205 | 207 | } | |
206 | 208 | } | |
207 | 209 | } | |
208 | 210 | ||
209 | 211 | ||
210 | 212 | ||
211 | 213 | @Callable(i) | |
212 | 214 | func voteCommit (item,hash) = { | |
213 | 215 | let user = toBase58String(i.caller.bytes) | |
214 | 216 | let commitsCount = getValueCommitsCount(item) | |
215 | 217 | let status = getValueItemStatus(item) | |
216 | 218 | if ((commitsCount >= VOTERS)) | |
217 | 219 | then throw("Reached max number of voters") | |
218 | 220 | else if ((getValueCommit(item, user) != NONE)) | |
219 | 221 | then throw("You voted already") | |
220 | 222 | else if ((getKeyItemSupplier(item) == NONE)) | |
221 | 223 | then throw("Item does not exists") | |
222 | 224 | else if (if ((status != NONE)) | |
223 | 225 | then (status != VOTING) | |
224 | 226 | else false) | |
225 | 227 | then throw("Voting is not active for this item now") | |
226 | 228 | else { | |
227 | 229 | let newStatus = if ((commitsCount == VOTERS)) | |
228 | 230 | then REVEAL | |
229 | 231 | else VOTING | |
230 | 232 | [StringEntry(getKeyCommit(item, user), hash), IntegerEntry(getKeyCommitsCount(item), (commitsCount + 1)), StringEntry(getKeyItemStatus(item), newStatus)] | |
231 | 233 | } | |
232 | 234 | } | |
233 | 235 | ||
234 | 236 | ||
235 | 237 | ||
236 | 238 | @Callable(i) | |
237 | 239 | func voteReveal (item,vote,salt) = { | |
238 | 240 | let user = toBase58String(i.caller.bytes) | |
239 | 241 | let status = getValueItemStatus(item) | |
240 | 242 | let newVotesCount = (getValueVotesCount(item, vote) + 1) | |
241 | 243 | let saltedVote = toBase58String(sha256(toBytes(((item + vote) + salt)))) | |
242 | 244 | if ((saltedVote != getValueCommit(item, user))) | |
243 | 245 | then throw("Reveal data is not valid") | |
244 | 246 | else if ((VOTERS > getValueCommitsCount(item))) | |
245 | 247 | then throw("Max number of voters not reached") | |
246 | 248 | else if ((getValueReveal(item, user) != NONE)) | |
247 | 249 | then throw("You voted already") | |
248 | 250 | else if (if ((status != VOTING)) | |
249 | 251 | then (status != REVEAL) | |
250 | 252 | else false) | |
251 | 253 | then throw("Voting is not active for this item now") | |
252 | 254 | else if (if ((vote != FEATURED)) | |
253 | 255 | then (vote != DELISTED) | |
254 | 256 | else false) | |
255 | 257 | then throw("Provided voting option is incorrect") | |
256 | 258 | else { | |
257 | 259 | let newStatus = if ((newVotesCount >= QUORUM)) | |
258 | 260 | then vote | |
259 | 261 | else REVEAL | |
260 | 262 | [StringEntry(getKeyReveal(item, user), vote), IntegerEntry(getKeyVotesCount(item, user), newVotesCount), StringEntry(getKeyItemStatus(item), newStatus)] | |
261 | 263 | } | |
262 | 264 | } | |
263 | 265 | ||
264 | 266 | ||
265 | 267 | @Verifier(tx) | |
266 | 268 | func verify () = match tx { | |
267 | 269 | case t: SetScriptTransaction => | |
268 | 270 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
269 | 271 | case _ => | |
270 | 272 | false | |
271 | 273 | } | |
272 | 274 |
github/deemru/w8io/026f985 37.44 ms ◑