tx · FPXzQ3tBxQwn7o7VenCya73YBcSJnYRjCZJvu7nE1mCQ

3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7:  -0.01400000 Waves

2021.08.03 16:38 [1642233] smart account 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7 > SELF 0.00000000 Waves

{ "type": 13, "id": "FPXzQ3tBxQwn7o7VenCya73YBcSJnYRjCZJvu7nE1mCQ", "fee": 1400000, "feeAssetId": null, "timestamp": 1627997979300, "version": 2, "chainId": 84, "sender": "3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7", "senderPublicKey": "3tp5fNYyPi4jMnkf6s1k4kBqvJ7nm57SxzvLyi8RkxT2", "proofs": [ "2PgMzpGpyKsbSd17z6S2NT8BhsgSg7QD6XnM16M3oW32S8xG7cFSgMjk2rPAa7Ps3uDX22FNDgQ4AVcsywDyLLdy" ], "script": "base64:AAIEAAAAAAAAAD4IAhIDCgEIEgYKBAgBCAESBwoFCAgBCAESAwoBCBIDCgEIEgMKAQgSBAoCCAgSABIAEgQKAggIEgUKAwgICAAAADwAAAAABE5PTkUCAAAABE5PTkUAAAAABlZPVEVSUwAAAAAAAAAAAwAAAAAGUVVPUlVNAAAAAAAAAAACAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhBUFBST1ZBTAIAAAAIYXBwcm92YWwAAAAACFJFSkVDVEVEAgAAAAhyZWplY3RlZAAAAAAIQUNDRVBURUQCAAAACGFjY2VwdGVkAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05F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AAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5B2ue1dw=", "height": 1642233, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B1EpEemJ2uPWHsAihkrpgUGcruvJvphbio75UCZLPj3H Next: GuGqgbK7rddoAjHEwufp4TU2gjUphBFn9oGQkengQtaj Diff:
OldNewDifferences
348348 @Callable(i)
349349 func burn () = {
350350 let caller = toBase58String(i.caller.bytes)
351- let pmt = i.payments[0]
351+ let pmt = if ((size(i.payments) == 1))
352+ then i.payments[0]
353+ else throw("An attached coupon is required as payment[0]")
352354 if ((isDefined(pmt.assetId) == false))
353355 then throw("Need a coupon to burn")
354356 else {
368370 let keySupplierAvailableBalance = getKeySupplierAvailableBalance(supplier)
369371 let availableBalance = (getValueSupplierAvailableBalance(supplier) + amount)
370372 [Burn(assetId, 1), IntegerEntry(keySupplierAvailableBalance, availableBalance)]
373+ }
374+ }
375+ }
376+
377+
378+
379+@Callable(i)
380+func widthdraw () = {
381+ let supplier = toBase58String(i.caller.bytes)
382+ let account = getSupplierAccount(supplier)
383+ if ((account != NONE))
384+ then throw("You are not registred as supplier")
385+ else {
386+ let balance = getValueSupplierBalance(supplier)
387+ let available = getValueSupplierAvailableBalance(supplier)
388+ let amount = if ((0 > (balance - available)))
389+ then 0
390+ else available
391+ if ((amount == 0))
392+ then throw("Nothing to withdraw. You need to burn coupon to unlock balance")
393+ else {
394+ let keySupplierBalance = getKeySupplierBalance(supplier)
395+ let keySupplierAvailableBalance = getKeySupplierAvailableBalance(supplier)
396+ let newBalance = (balance - amount)
397+[IntegerEntry(keySupplierAvailableBalance, newBalance), IntegerEntry(keySupplierAvailableBalance, 0), ScriptTransfer(i.caller, amount, unit)]
371398 }
372399 }
373400 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "NONE"
55
66 let VOTERS = 3
77
88 let QUORUM = 2
99
1010 let FEATURED = "featured"
1111
1212 let DELISTED = "delisted"
1313
1414 let VOTING = "voting"
1515
1616 let REVEAL = "reveal"
1717
1818 let APPROVAL = "approval"
1919
2020 let REJECTED = "rejected"
2121
2222 let ACCEPTED = "accepted"
2323
2424 func getStringByKey (key) = match getString(this, key) {
2525 case a: String =>
2626 a
2727 case _ =>
2828 NONE
2929 }
3030
3131
3232 func getIntegerByKey (key) = match getInteger(this, key) {
3333 case a: Int =>
3434 a
3535 case _ =>
3636 0
3737 }
3838
3939
4040 func getKeySupplierAccount (account) = (account + "_account")
4141
4242
4343 func getSupplierAccount (account) = getStringByKey(getKeySupplierAccount(account))
4444
4545
4646 func getKeyItem (supplier,title) = {
4747 let supplierTitle = (supplier + title)
4848 ("item_" + toBase58String(sha256(toBytes(supplierTitle))))
4949 }
5050
5151
5252 func getKeyItemSupplier (item) = (item + "_owner")
5353
5454
5555 func getKeyItemTitle (item) = (item + "_title")
5656
5757
5858 func getKeyItemPrice (item) = (item + "_price")
5959
6060
6161 func getKeyItemData (item) = (item + "_data")
6262
6363
6464 func getKeyItemExpireDate (item) = (item + "_expiredate")
6565
6666
6767 func getKeyItemSoldCounter (item) = (item + "_sold")
6868
6969
7070 func getKeyCommit (item,user) = (((item + "_") + user) + "_commit")
7171
7272
7373 func getKeyCommitsCount (item) = (item + "_cmtcnt")
7474
7575
7676 func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal")
7777
7878
7979 func getKeyItemStatus (item) = (item + "_status")
8080
8181
8282 func getKeyVotesCount (item,vote) = ((item + "_res:") + vote)
8383
8484
8585 func getKeySupplierBalance (supplier) = (supplier + "_balance")
8686
8787
8888 func getKeySupplierAvailableBalance (supplier) = (supplier + "_available")
8989
9090
9191 func getKeyUserItemCounter (user,item) = (((user + "_") + item) + "_counter")
9292
9393
9494 func genPurchaseKey (supplier,item,user,counter) = ("purchase_" + toBase58String(sha256(toBytes(((((((supplier + "_") + item) + "_") + user) + "_") + toString(counter))))))
9595
9696
9797 func getKeyPurchaseStatus (purchase) = (purchase + "_status")
9898
9999
100100 func getKeyPurchaseItem (purchase) = (purchase + "_item")
101101
102102
103103 func getKeyPurchaseSupplier (purchase) = (purchase + "_supplier")
104104
105105
106106 func getKeyPurchaseUser (purchase) = (purchase + "_user")
107107
108108
109109 func getKeyPurchaseAmount (purchase) = (purchase + "_amount")
110110
111111
112112 func getKeyPurchaseTimestamp (purchase) = (purchase + "_timestamp")
113113
114114
115115 func getKeyPurchaseAssetId (purchase) = (purchase + "_assetId")
116116
117117
118118 func getKeyCouponPurchase (assetId) = (("coupon_" + assetId) + "_purchase")
119119
120120
121121 func getKeyCouponItem (assetId) = (("coupon_" + assetId) + "_item")
122122
123123
124124 func getValueSupplierBalance (supplier) = getIntegerByKey(getKeySupplierBalance(supplier))
125125
126126
127127 func getValueSupplierAvailableBalance (supplier) = getIntegerByKey(getKeySupplierAvailableBalance(supplier))
128128
129129
130130 func getValueUserItemCounter (user,item) = getIntegerByKey(getKeyUserItemCounter(user, item))
131131
132132
133133 func getValuePurchaseStatus (purchase) = getStringByKey(getKeyPurchaseStatus(purchase))
134134
135135
136136 func getValuePurchaseItem (purchase) = getStringValue(this, getKeyPurchaseItem(purchase))
137137
138138
139139 func getValuePurchaseSupplier (purchase) = getStringValue(this, getKeyPurchaseSupplier(purchase))
140140
141141
142142 func getValuePurchaseUser (purchase) = getStringValue(this, getKeyPurchaseUser(purchase))
143143
144144
145145 func getValuePurchaseAmount (purchase) = getIntegerValue(this, getKeyPurchaseAmount(purchase))
146146
147147
148148 func getValuePurchaseTimestamp (purchase) = getIntegerByKey(getKeyPurchaseTimestamp(purchase))
149149
150150
151151 func getValuePurchaseAssetId (purchase) = getStringByKey(getKeyPurchaseAssetId(purchase))
152152
153153
154154 func getValueItemPrice (item) = getIntegerValue(this, getKeyItemPrice(item))
155155
156156
157157 func getValueItemSupplier (item) = getStringByKey(getKeyItemSupplier(item))
158158
159159
160160 func getValueItemExpireTime (item) = getIntegerByKey(getKeyItemExpireDate(item))
161161
162162
163163 func getValueItemTitle (item) = getStringByKey(getKeyItemTitle(item))
164164
165165
166166 func getValueItemSoldCounter (item) = getIntegerByKey(getKeyItemSoldCounter(item))
167167
168168
169169 func getValueCouponPurchase (assetId) = getStringByKey(getKeyCouponPurchase(assetId))
170170
171171
172172 func getValueCommit (item,user) = getStringByKey(getKeyCommit(item, user))
173173
174174
175175 func getValueCommitsCount (item) = getIntegerByKey(getKeyCommitsCount(item))
176176
177177
178178 func getValueReveal (item,user) = getStringByKey(getKeyReveal(item, user))
179179
180180
181181 func getValueItemStatus (item) = getStringByKey(getKeyItemStatus(item))
182182
183183
184184 func getValueVotesCount (item,vote) = getIntegerByKey(getKeyVotesCount(item, vote))
185185
186186
187187 @Callable(i)
188188 func registerSupplier (data) = {
189189 let supplier = toBase58String(i.caller.bytes)
190190 let account = getSupplierAccount(supplier)
191191 if ((account != NONE))
192192 then throw("This address has already registred as supplier")
193193 else [StringEntry(getKeySupplierAccount(supplier), data)]
194194 }
195195
196196
197197
198198 @Callable(i)
199199 func addItem (title,price,data,expire) = {
200200 let supplier = toBase58String(i.caller.bytes)
201201 let account = getSupplierAccount(supplier)
202202 let item = getKeyItem(supplier, title)
203203 if ((account == NONE))
204204 then throw("You should register as supplier to add an item")
205205 else if ((0 >= price))
206206 then throw("Purchase amount cannot be less than item price")
207207 else if ((getValueItemSupplier(item) != NONE))
208208 then throw("An item already exists")
209209 else [StringEntry(getKeyItemSupplier(item), supplier), StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)]
210210 }
211211
212212
213213
214214 @Callable(i)
215215 func updateItem (item,title,price,data,expire) = {
216216 let supplier = toBase58String(i.caller.bytes)
217217 let account = getSupplierAccount(supplier)
218218 let itemSupplier = getValueItemSupplier(item)
219219 if ((account == NONE))
220220 then throw("You should register as supplier to remove an item")
221221 else if (if ((item == NONE))
222222 then true
223223 else (supplier != itemSupplier))
224224 then throw(("You don't owned item " + item))
225225 else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)]
226226 }
227227
228228
229229
230230 @Callable(i)
231231 func removeItem (item) = {
232232 let supplier = toBase58String(i.caller.bytes)
233233 let account = getSupplierAccount(supplier)
234234 let itemSupplier = getValueItemSupplier(item)
235235 if ((account == NONE))
236236 then throw("You should register as supplier to remove an item")
237237 else if (if ((item == NONE))
238238 then true
239239 else (supplier != itemSupplier))
240240 then throw(("You don't owned item " + item))
241241 else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item)), DeleteEntry(getKeyItemExpireDate(item))]
242242 }
243243
244244
245245
246246 @Callable(i)
247247 func purchase (item) = {
248248 let pmt = i.payments[0]
249249 if (isDefined(pmt.assetId))
250250 then throw("You can buy tokens only with Waves tokens")
251251 else {
252252 let user = toBase58String(i.caller.bytes)
253253 let price = getValueItemPrice(item)
254254 let supplier = getValueItemSupplier(item)
255255 let expire = getValueItemExpireTime(item)
256256 if (if ((expire > 0))
257257 then (lastBlock.timestamp >= expire)
258258 else false)
259259 then throw("Coupon expired")
260260 else if ((price > pmt.amount))
261261 then throw("Purchase amount cannot be less than item price")
262262 else if ((pmt.amount > price))
263263 then throw("Purchase amount cannot be higher than item price")
264264 else if ((supplier == NONE))
265265 then throw("Supplier does not exists")
266266 else {
267267 let keyUserItemCounter = getKeyUserItemCounter(user, item)
268268 let userItemCounter = (getValueUserItemCounter(user, item) + 1)
269269 let purchase = genPurchaseKey(supplier, item, user, userItemCounter)
270270 let keyPurchaseStatus = getKeyPurchaseStatus(purchase)
271271 let keyPurchaseItem = getKeyPurchaseItem(purchase)
272272 let keyPurchaseSupplier = getKeyPurchaseSupplier(purchase)
273273 let keyPurchaseUser = getKeyPurchaseUser(purchase)
274274 let keyPurchaseAmount = getKeyPurchaseAmount(purchase)
275275 let keyPurchaseTimestamp = getKeyPurchaseTimestamp(purchase)
276276 [IntegerEntry(keyUserItemCounter, userItemCounter), StringEntry(keyPurchaseStatus, APPROVAL), StringEntry(keyPurchaseItem, item), StringEntry(keyPurchaseSupplier, supplier), StringEntry(keyPurchaseUser, user), IntegerEntry(keyPurchaseAmount, pmt.amount), IntegerEntry(keyPurchaseTimestamp, lastBlock.timestamp)]
277277 }
278278 }
279279 }
280280
281281
282282
283283 @Callable(i)
284284 func rejectPurchase (purchase) = {
285285 let caller = toBase58String(i.caller.bytes)
286286 let status = getValuePurchaseStatus(purchase)
287287 let supplier = getValuePurchaseSupplier(purchase)
288288 let item = getValuePurchaseItem(purchase)
289289 if (if ((supplier == NONE))
290290 then true
291291 else (caller != supplier))
292292 then throw("Your are not the owner of this item")
293293 else if ((status != APPROVAL))
294294 then throw("You cannot reject this purchased")
295295 else {
296296 let keyPurchaseStatus = getKeyPurchaseStatus(purchase)
297297 let keyPurchaseAmount = getKeyPurchaseAmount(purchase)
298298 let keySupplierBalance = getKeySupplierBalance(supplier)
299299 let keyItemSoldCounter = getKeyItemSoldCounter(item)
300300 let user = getValuePurchaseUser(purchase)
301301 let amount = getValuePurchaseAmount(purchase)
302302 let supplierBalance = (getValueSupplierBalance(supplier) - amount)
303303 let itemSoldCounter = (getValueItemSoldCounter(item) - 1)
304304 let address = addressFromStringValue(user)
305305 [StringEntry(keyPurchaseStatus, REJECTED), IntegerEntry(keyPurchaseAmount, 0), ScriptTransfer(address, amount, unit)]
306306 }
307307 }
308308
309309
310310
311311 @Callable(i)
312312 func acceptPurchase (purchase,couponAssetId) = {
313313 let caller = toBase58String(i.caller.bytes)
314314 let status = getValuePurchaseStatus(purchase)
315315 let supplier = getValuePurchaseSupplier(purchase)
316316 let item = getValuePurchaseItem(purchase)
317317 let expire = getValueItemExpireTime(item)
318318 if (if ((supplier == NONE))
319319 then true
320320 else (caller != supplier))
321321 then throw("Your are not the owner of this item")
322322 else if ((status != APPROVAL))
323323 then throw("You cannot reject this purchased")
324324 else if ((item == NONE))
325325 then throw("Unexpected error [ tem not found ]")
326326 else if (if ((expire > 0))
327327 then (lastBlock.timestamp >= expire)
328328 else false)
329329 then throw("Coupon expired")
330330 else {
331331 let keyPurchaseStatus = getKeyPurchaseStatus(purchase)
332332 let keyPurchaseAssetId = getKeyPurchaseAssetId(purchase)
333333 let keySupplierBalance = getKeySupplierBalance(supplier)
334334 let keyItemSoldCounter = getKeyItemSoldCounter(item)
335335 let keyCouponPurchase = getKeyCouponPurchase(couponAssetId)
336336 let keyCouponItem = getKeyCouponItem(couponAssetId)
337337 let amount = getValuePurchaseAmount(purchase)
338338 let supplierBalance = (getValueSupplierBalance(supplier) + amount)
339339 let itemSoldCounter = (getValueItemSoldCounter(item) + 1)
340340 let user = getValuePurchaseUser(purchase)
341341 let address = addressFromStringValue(user)
342342 [StringEntry(keyPurchaseStatus, ACCEPTED), StringEntry(keyCouponPurchase, purchase), StringEntry(keyCouponItem, item), StringEntry(keyPurchaseAssetId, couponAssetId), IntegerEntry(keySupplierBalance, supplierBalance), IntegerEntry(keyItemSoldCounter, itemSoldCounter)]
343343 }
344344 }
345345
346346
347347
348348 @Callable(i)
349349 func burn () = {
350350 let caller = toBase58String(i.caller.bytes)
351- let pmt = i.payments[0]
351+ let pmt = if ((size(i.payments) == 1))
352+ then i.payments[0]
353+ else throw("An attached coupon is required as payment[0]")
352354 if ((isDefined(pmt.assetId) == false))
353355 then throw("Need a coupon to burn")
354356 else {
355357 let assetId = match pmt.assetId {
356358 case e: ByteVector =>
357359 e
358360 case _ =>
359361 throw("Need a coupon to burn")
360362 }
361363 let asset = toBase58String(assetId)
362364 let purchase = getValueCouponPurchase(asset)
363365 let supplier = getValuePurchaseSupplier(purchase)
364366 if ((caller != supplier))
365367 then throw("Your are not the supplier for this coupon")
366368 else {
367369 let amount = getValuePurchaseAmount(purchase)
368370 let keySupplierAvailableBalance = getKeySupplierAvailableBalance(supplier)
369371 let availableBalance = (getValueSupplierAvailableBalance(supplier) + amount)
370372 [Burn(assetId, 1), IntegerEntry(keySupplierAvailableBalance, availableBalance)]
373+ }
374+ }
375+ }
376+
377+
378+
379+@Callable(i)
380+func widthdraw () = {
381+ let supplier = toBase58String(i.caller.bytes)
382+ let account = getSupplierAccount(supplier)
383+ if ((account != NONE))
384+ then throw("You are not registred as supplier")
385+ else {
386+ let balance = getValueSupplierBalance(supplier)
387+ let available = getValueSupplierAvailableBalance(supplier)
388+ let amount = if ((0 > (balance - available)))
389+ then 0
390+ else available
391+ if ((amount == 0))
392+ then throw("Nothing to withdraw. You need to burn coupon to unlock balance")
393+ else {
394+ let keySupplierBalance = getKeySupplierBalance(supplier)
395+ let keySupplierAvailableBalance = getKeySupplierAvailableBalance(supplier)
396+ let newBalance = (balance - amount)
397+[IntegerEntry(keySupplierAvailableBalance, newBalance), IntegerEntry(keySupplierAvailableBalance, 0), ScriptTransfer(i.caller, amount, unit)]
371398 }
372399 }
373400 }
374401
375402
376403
377404 @Callable(i)
378405 func voteCommit (item,hash) = {
379406 let user = toBase58String(i.caller.bytes)
380407 let commitsCount = getValueCommitsCount(item)
381408 let status = getValueItemStatus(item)
382409 if ((commitsCount >= VOTERS))
383410 then throw("Reached max number of voters")
384411 else if ((getValueCommit(item, user) != NONE))
385412 then throw("You voted already")
386413 else if ((getKeyItemSupplier(item) == NONE))
387414 then throw("Item does not exists")
388415 else if (if ((status != NONE))
389416 then (status != VOTING)
390417 else false)
391418 then throw("Voting is not active for this item now")
392419 else {
393420 let newStatus = if ((commitsCount == VOTERS))
394421 then REVEAL
395422 else VOTING
396423 [StringEntry(getKeyCommit(item, user), hash), IntegerEntry(getKeyCommitsCount(item), (commitsCount + 1)), StringEntry(getKeyItemStatus(item), newStatus)]
397424 }
398425 }
399426
400427
401428
402429 @Callable(i)
403430 func voteReveal (item,vote,salt) = {
404431 let user = toBase58String(i.caller.bytes)
405432 let status = getValueItemStatus(item)
406433 let newVotesCount = (getValueVotesCount(item, vote) + 1)
407434 let saltedVote = toBase58String(sha256(toBytes(((item + vote) + salt))))
408435 if ((saltedVote != getValueCommit(item, user)))
409436 then throw("Reveal data is not valid")
410437 else if ((VOTERS > getValueCommitsCount(item)))
411438 then throw("Max number of voters not reached")
412439 else if ((getValueReveal(item, user) != NONE))
413440 then throw("You voted already")
414441 else if (if ((status != VOTING))
415442 then (status != REVEAL)
416443 else false)
417444 then throw("Voting is not active for this item now")
418445 else if (if ((vote != FEATURED))
419446 then (vote != DELISTED)
420447 else false)
421448 then throw("Provided voting option is incorrect")
422449 else {
423450 let newStatus = if ((newVotesCount >= QUORUM))
424451 then vote
425452 else REVEAL
426453 [StringEntry(getKeyReveal(item, user), vote), IntegerEntry(getKeyVotesCount(item, user), newVotesCount), StringEntry(getKeyItemStatus(item), newStatus)]
427454 }
428455 }
429456
430457
431458 @Verifier(tx)
432459 func verify () = match tx {
433460 case t: SetScriptTransaction =>
434461 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
435462 case t: IssueTransaction =>
436463 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
437464 case t: TransferTransaction =>
438465 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
439466 case _ =>
440467 false
441468 }
442469

github/deemru/w8io/026f985 
51.58 ms