tx · 93vym5QArCvNXQpATsNikD8Mp6urYaKwiR7MPBKJp45d

3NAj7owPjfmLoE3odgXC6cXfB1QzEhnpBtt:  -0.01400000 Waves

2020.11.17 18:51 [1269574] smart account 3NAj7owPjfmLoE3odgXC6cXfB1QzEhnpBtt > SELF 0.00000000 Waves

{ "type": 13, "id": "93vym5QArCvNXQpATsNikD8Mp6urYaKwiR7MPBKJp45d", "fee": 1400000, "feeAssetId": null, "timestamp": 1605628369691, "version": 2, "chainId": 84, "sender": "3NAj7owPjfmLoE3odgXC6cXfB1QzEhnpBtt", "senderPublicKey": "iRqJrgq4rS2ndNGFJoZtKcoTfskkxr3zfTesPWqtKzp", "proofs": [ "5eBE6DnKDi9H1b5nsjMfvEZPSnpUm5ig4uQQjHHn1ynHw5nqDTMwtbsFRsQPc3fJfEPekwRbYuFgqGJ4WfchMEWT" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAAAwYJAAACAAAAAQIAAAAFSGVsbG8JAAACAAAAAQIAAAAFV2l0YW0AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABkc+nFA=", "height": 1269574, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EmGtU2LRskWcasWYwuwsPNiLh2gdr7CvW53BbhPfr7t4 Next: Bf7xxNkvNfeqbhkFTMs7wzeHAbMdMxvHM4QWZ5vsGEjM Diff:
OldNewDifferences
44
55
66 @Callable(i)
7-func purchase () = {
8- let payment = value(i.payments[0])
9- if (isDefined(payment.assetId))
10- then throw("Only Waves are accepted")
11- else {
12- let customerAddress = toBase58String(i.caller.bytes)
13- let price = match getInteger(this, "item_A_coupon_price") {
14- case a: Int =>
15- a
16- case _ =>
17- 0
18- }
19- if ((payment.amount == 0))
20- then throw("Purchase amount is 0")
21- else if ((price > payment.amount))
22- then throw("Purchase amount is too low")
23- else if ((payment.amount > price))
24- then throw("Purchase amount is too high")
25- else [StringEntry(("status:purchase_item_A_customer" + customerAddress), "true"), IntegerEntry(("price:purchase_item_A_customer" + customerAddress), price)]
26- }
27- }
7+func purchase () = if (true)
8+ then throw("Hello")
9+ else throw("Witam")
2810
2911
3012 @Verifier(tx)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func purchase () = {
8- let payment = value(i.payments[0])
9- if (isDefined(payment.assetId))
10- then throw("Only Waves are accepted")
11- else {
12- let customerAddress = toBase58String(i.caller.bytes)
13- let price = match getInteger(this, "item_A_coupon_price") {
14- case a: Int =>
15- a
16- case _ =>
17- 0
18- }
19- if ((payment.amount == 0))
20- then throw("Purchase amount is 0")
21- else if ((price > payment.amount))
22- then throw("Purchase amount is too low")
23- else if ((payment.amount > price))
24- then throw("Purchase amount is too high")
25- else [StringEntry(("status:purchase_item_A_customer" + customerAddress), "true"), IntegerEntry(("price:purchase_item_A_customer" + customerAddress), price)]
26- }
27- }
7+func purchase () = if (true)
8+ then throw("Hello")
9+ else throw("Witam")
2810
2911
3012 @Verifier(tx)
3113 func verify () = true
3214

github/deemru/w8io/026f985 
20.79 ms