tx · HPDKLUAukCvjbuc4QukyFrhN4bsWm9cTXpQvR8nZhQGf 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7: -0.01400000 Waves 2021.08.01 06:29 [1638720] smart account 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7 > SELF 0.00000000 Waves
{ "type": 13, "id": "HPDKLUAukCvjbuc4QukyFrhN4bsWm9cTXpQvR8nZhQGf", "fee": 1400000, "feeAssetId": null, "timestamp": 1627788682065, "version": 2, "chainId": 84, "sender": "3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7", "senderPublicKey": "3tp5fNYyPi4jMnkf6s1k4kBqvJ7nm57SxzvLyi8RkxT2", "proofs": [ "3YJsnJsinnn2Pw5mQtdBdY9RmPrkNMbeYyWqDQSXRe8mxJ5B8RgxdfpL3yJFUPFT3VvayoGZxDX3o6B4uKcvQvyQ" ], "script": "base64:AAIEAAAAAAAABZsIAhIDCgEIEgYKBAgBCAESBwoFCAgBCAESAwoBCBIECgIICBIECgIICBIFCgMICAgaCgoCYTESBE5PTkUaDAoCYTISBlZPVEVSUxoMCgJhMxIGUVVPUlVNGg4KAmE0EghGRUFUVVJFRBoOCgJhNRIIREVMSVNURUQaDAoCYTYSBlZPVElORxoMCgJhNxIGUkVWRUFMGhQKAmE4Eg5nZXRTdHJpbmdCeUtleRoJCgJhORIDa2V5Gg0KAmIxEgckbWF0Y2gwGgcKAmIyEgFhGhUKAmIzEg9nZXRJbnRlZ2VyQnlLZXkaGwoCYjQSFWdldEtleVN1cHBsaWVyQWNjb3VudBoNCgJiNRIHYWNjb3VudBoYCgJiNhISZ2V0U3VwcGxpZXJBY2NvdW50GhAKAmI3EgpnZXRLZXlJdGVtGg4KAmI4EghzdXBwbGllchoLCgJiORIFdGl0bGUaEwoCYzESDXN1cHBsaWVyVGl0bGUaGAoCYzISEmdldEtleUl0ZW1TdXBwbGllchoKCgJjMxIEaXRlbRoVCgJjNBIPZ2V0S2V5SXRlbVRpdGxlGhUKA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JoNgAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAAmIxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAJoOAUAAAACYjEJAAH0AAAAAwgFAAAAAmg2AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACaDYAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACaDYAAAAPc2VuZGVyUHVibGljS2V5BypE6uU=", "height": 1638720, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EBxHbqxCYHq1EaFLeLrvufUsd9oDANDbCdcHVdsMDRJJ Next: G3u36WkzkW8TzfYbPCB1ifjQHk3hCyX7gy3Q8zTmiMVh Diff:
Old | New | Differences | |
---|---|---|---|
219 | 219 | let supplierBalanceKey = getKeyBalanceSupplier(supplier) | |
220 | 220 | let newSupplierBalance = (getValueBalanceSupplier(supplier) + pmt.amount) | |
221 | 221 | let coupon = getKeyCoupon(assetId) | |
222 | - | [IntegerEntry(userItemCounter, newValueUserItemCounter), IntegerEntry(supplierBalanceKey, newSupplierBalance), StringEntry(getKeyCouponItem(coupon), item)] | |
222 | + | [IntegerEntry(userItemCounter, newValueUserItemCounter), IntegerEntry(supplierBalanceKey, newSupplierBalance), StringEntry(getKeyCouponItem(coupon), item), ScriptTransfer(i.caller, 1, fromBase58String(assetId))] | |
223 | 223 | } | |
224 | 224 | } | |
225 | 225 | } |
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 getKeyItemExpireDate (item) = (item + "_expiredate") | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getKeyCommit (item,user) = (((item + "_") + user) + "_commit") | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getKeyCommitsCount (item) = (item + "_cmtcnt") | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal") | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getKeyItemStatus (item) = (item + "_status") | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getKeyVotesCount (item,vote) = ((item + "_res:") + vote) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getKeyBalanceSupplier (account) = (account + "_balance") | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getKeyCoupon (assetId) = ("coupon_" + assetId) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getKeyCouponItem (coupon) = (coupon + "_item") | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func getValueBalanceSupplier (account) = { | |
89 | 89 | let supplierBalanceKey = getKeyBalanceSupplier(account) | |
90 | 90 | match getInteger(this, supplierBalanceKey) { | |
91 | 91 | case a: Int => | |
92 | 92 | a | |
93 | 93 | case _ => | |
94 | 94 | 0 | |
95 | 95 | } | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getValueUserItemCounter (user,item) = { | |
100 | 100 | let userItemCounterKey = getKeyUserItemCounter(user, item) | |
101 | 101 | match getInteger(this, userItemCounterKey) { | |
102 | 102 | case a: Int => | |
103 | 103 | a | |
104 | 104 | case _ => | |
105 | 105 | 0 | |
106 | 106 | } | |
107 | 107 | } | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getValueItemPrice (item) = { | |
111 | 111 | let keyItemPrice = getKeyItemPrice(item) | |
112 | 112 | getIntegerValue(this, keyItemPrice) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getValueItemSupplier (item) = getStringByKey(getKeyItemSupplier(item)) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getValueItemExpireTime (item) = getIntegerByKey(getKeyItemExpireDate(item)) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getValueCommit (item,user) = getStringByKey(getKeyCommit(item, user)) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getValueCommitsCount (item) = getIntegerByKey(getKeyCommitsCount(item)) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getValueReveal (item,user) = getStringByKey(getKeyReveal(item, user)) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getValueItemStatus (item) = getStringByKey(getKeyItemStatus(item)) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getValueVotesCount (item,vote) = getIntegerByKey(getKeyVotesCount(item, vote)) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | @Callable(i) | |
138 | 138 | func registerSupplier (data) = { | |
139 | 139 | let supplier = toBase58String(i.caller.bytes) | |
140 | 140 | let account = getSupplierAccount(supplier) | |
141 | 141 | if ((account != NONE)) | |
142 | 142 | then throw("This address has already registred as supplier") | |
143 | 143 | else [StringEntry(getKeySupplierAccount(supplier), data)] | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | ||
148 | 148 | @Callable(i) | |
149 | 149 | func addItem (title,price,data,expire) = { | |
150 | 150 | let supplier = toBase58String(i.caller.bytes) | |
151 | 151 | let account = getSupplierAccount(supplier) | |
152 | 152 | let item = getKeyItem(supplier, title) | |
153 | 153 | if ((account == NONE)) | |
154 | 154 | then throw("You should register as supplier to add an item") | |
155 | 155 | else if ((0 >= price)) | |
156 | 156 | then throw("Purchase amount cannot be less than item price") | |
157 | 157 | else if ((getValueItemSupplier(item) != NONE)) | |
158 | 158 | then throw("An item already exists") | |
159 | 159 | else [StringEntry(getKeyItemSupplier(item), supplier), StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)] | |
160 | 160 | } | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | ||
164 | 164 | @Callable(i) | |
165 | 165 | func updateItem (item,title,price,data,expire) = { | |
166 | 166 | let supplier = toBase58String(i.caller.bytes) | |
167 | 167 | let account = getSupplierAccount(supplier) | |
168 | 168 | let itemSupplier = getValueItemSupplier(item) | |
169 | 169 | if ((account == NONE)) | |
170 | 170 | then throw("You should register as supplier to remove an item") | |
171 | 171 | else if (if ((item == NONE)) | |
172 | 172 | then true | |
173 | 173 | else (supplier != itemSupplier)) | |
174 | 174 | then throw(("You don't owned item " + item)) | |
175 | 175 | else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)] | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | ||
180 | 180 | @Callable(i) | |
181 | 181 | func removeItem (item) = { | |
182 | 182 | let supplier = toBase58String(i.caller.bytes) | |
183 | 183 | let account = getSupplierAccount(supplier) | |
184 | 184 | let itemSupplier = getValueItemSupplier(item) | |
185 | 185 | if ((account == NONE)) | |
186 | 186 | then throw("You should register as supplier to remove an item") | |
187 | 187 | else if (if ((item == NONE)) | |
188 | 188 | then true | |
189 | 189 | else (supplier != itemSupplier)) | |
190 | 190 | then throw(("You don't owned item " + item)) | |
191 | 191 | else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item)), DeleteEntry(getKeyItemExpireDate(item))] | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | ||
196 | 196 | @Callable(i) | |
197 | 197 | func purchase (item,assetId) = { | |
198 | 198 | let pmt = i.payments[0] | |
199 | 199 | if (isDefined(pmt.assetId)) | |
200 | 200 | then throw("You can buy tokens only with Waves tokens") | |
201 | 201 | else { | |
202 | 202 | let userAddress = toBase58String(i.caller.bytes) | |
203 | 203 | let price = getValueItemPrice(item) | |
204 | 204 | let supplier = getValueItemSupplier(item) | |
205 | 205 | let expire = getValueItemExpireTime(item) | |
206 | 206 | if (if ((expire > 0)) | |
207 | 207 | then (lastBlock.timestamp >= expire) | |
208 | 208 | else false) | |
209 | 209 | then throw("Coupon expired") | |
210 | 210 | else if ((price > pmt.amount)) | |
211 | 211 | then throw("Purchase amount cannot be less than item price") | |
212 | 212 | else if ((pmt.amount > price)) | |
213 | 213 | then throw("Purchase amount cannot be higher than item price") | |
214 | 214 | else if ((supplier == NONE)) | |
215 | 215 | then throw("Supplier does not exists") | |
216 | 216 | else { | |
217 | 217 | let userItemCounter = getKeyUserItemCounter(userAddress, item) | |
218 | 218 | let newValueUserItemCounter = (getValueUserItemCounter(userAddress, item) + 1) | |
219 | 219 | let supplierBalanceKey = getKeyBalanceSupplier(supplier) | |
220 | 220 | let newSupplierBalance = (getValueBalanceSupplier(supplier) + pmt.amount) | |
221 | 221 | let coupon = getKeyCoupon(assetId) | |
222 | - | [IntegerEntry(userItemCounter, newValueUserItemCounter), IntegerEntry(supplierBalanceKey, newSupplierBalance), StringEntry(getKeyCouponItem(coupon), item)] | |
222 | + | [IntegerEntry(userItemCounter, newValueUserItemCounter), IntegerEntry(supplierBalanceKey, newSupplierBalance), StringEntry(getKeyCouponItem(coupon), item), ScriptTransfer(i.caller, 1, fromBase58String(assetId))] | |
223 | 223 | } | |
224 | 224 | } | |
225 | 225 | } | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | ||
229 | 229 | @Callable(i) | |
230 | 230 | func voteCommit (item,hash) = { | |
231 | 231 | let user = toBase58String(i.caller.bytes) | |
232 | 232 | let commitsCount = getValueCommitsCount(item) | |
233 | 233 | let status = getValueItemStatus(item) | |
234 | 234 | if ((commitsCount >= VOTERS)) | |
235 | 235 | then throw("Reached max number of voters") | |
236 | 236 | else if ((getValueCommit(item, user) != NONE)) | |
237 | 237 | then throw("You voted already") | |
238 | 238 | else if ((getKeyItemSupplier(item) == NONE)) | |
239 | 239 | then throw("Item does not exists") | |
240 | 240 | else if (if ((status != NONE)) | |
241 | 241 | then (status != VOTING) | |
242 | 242 | else false) | |
243 | 243 | then throw("Voting is not active for this item now") | |
244 | 244 | else { | |
245 | 245 | let newStatus = if ((commitsCount == VOTERS)) | |
246 | 246 | then REVEAL | |
247 | 247 | else VOTING | |
248 | 248 | [StringEntry(getKeyCommit(item, user), hash), IntegerEntry(getKeyCommitsCount(item), (commitsCount + 1)), StringEntry(getKeyItemStatus(item), newStatus)] | |
249 | 249 | } | |
250 | 250 | } | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | ||
254 | 254 | @Callable(i) | |
255 | 255 | func voteReveal (item,vote,salt) = { | |
256 | 256 | let user = toBase58String(i.caller.bytes) | |
257 | 257 | let status = getValueItemStatus(item) | |
258 | 258 | let newVotesCount = (getValueVotesCount(item, vote) + 1) | |
259 | 259 | let saltedVote = toBase58String(sha256(toBytes(((item + vote) + salt)))) | |
260 | 260 | if ((saltedVote != getValueCommit(item, user))) | |
261 | 261 | then throw("Reveal data is not valid") | |
262 | 262 | else if ((VOTERS > getValueCommitsCount(item))) | |
263 | 263 | then throw("Max number of voters not reached") | |
264 | 264 | else if ((getValueReveal(item, user) != NONE)) | |
265 | 265 | then throw("You voted already") | |
266 | 266 | else if (if ((status != VOTING)) | |
267 | 267 | then (status != REVEAL) | |
268 | 268 | else false) | |
269 | 269 | then throw("Voting is not active for this item now") | |
270 | 270 | else if (if ((vote != FEATURED)) | |
271 | 271 | then (vote != DELISTED) | |
272 | 272 | else false) | |
273 | 273 | then throw("Provided voting option is incorrect") | |
274 | 274 | else { | |
275 | 275 | let newStatus = if ((newVotesCount >= QUORUM)) | |
276 | 276 | then vote | |
277 | 277 | else REVEAL | |
278 | 278 | [StringEntry(getKeyReveal(item, user), vote), IntegerEntry(getKeyVotesCount(item, user), newVotesCount), StringEntry(getKeyItemStatus(item), newStatus)] | |
279 | 279 | } | |
280 | 280 | } | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | @Verifier(tx) | |
284 | 284 | func verify () = match tx { | |
285 | 285 | case t: SetScriptTransaction => | |
286 | 286 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
287 | 287 | case t: IssueTransaction => | |
288 | 288 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
289 | 289 | case t: TransferTransaction => | |
290 | 290 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
291 | 291 | case _ => | |
292 | 292 | false | |
293 | 293 | } | |
294 | 294 |
github/deemru/w8io/169f3d6 44.00 ms ◑