tx · EmGtU2LRskWcasWYwuwsPNiLh2gdr7CvW53BbhPfr7t4

3NAj7owPjfmLoE3odgXC6cXfB1QzEhnpBtt:  -0.01400000 Waves

2020.11.17 18:44 [1269564] smart account 3NAj7owPjfmLoE3odgXC6cXfB1QzEhnpBtt > SELF 0.00000000 Waves

{ "type": 13, "id": "EmGtU2LRskWcasWYwuwsPNiLh2gdr7CvW53BbhPfr7t4", "fee": 1400000, "feeAssetId": null, "timestamp": 1605627911912, "version": 2, "chainId": 84, "sender": "3NAj7owPjfmLoE3odgXC6cXfB1QzEhnpBtt", "senderPublicKey": "iRqJrgq4rS2ndNGFJoZtKcoTfskkxr3zfTesPWqtKzp", "proofs": [ "2pgFCHZTKbvkH12QxWSnb7Z3PpHpX5K6tzZLqP1Thxg4T9Jr2ib5XPdboNTdNXvoT8aiTHAn3PuE5Gi8W2bNyyqv" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAAdwYXltZW50CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAdwYXltZW50AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAXT25seSBXYXZlcyBhcmUgYWNjZXB0ZWQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAAAAAAAIIBQAAAAdwYXltZW50AAAABmFtb3VudAAAAAAAAAAAAAkAAAIAAAABAgAAABRQdXJjaGFzZSBhbW91bnQgaXMgMAMJAABmAAAAAgUAAAAFcHJpY2UIBQAAAAdwYXltZW50AAAABmFtb3VudAkAAAIAAAABAgAAABpQdXJjaGFzZSBhbW91bnQgaXMgdG9vIGxvdwMJAABmAAAAAggFAAAAB3BheW1lbnQAAAAGYW1vdW50BQAAAAVwcmljZQkAAAIAAAABAgAAABtQdXJjaGFzZSBhbW91bnQgaXMgdG9vIGhpZ2gJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAB9zdGF0dXM6cHVyY2hhc2VfaXRlbV9BX2N1c3RvbWVyBQAAAA9jdXN0b21lckFkZHJlc3MCAAAABHRydWUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAecHJpY2U6cHVyY2hhc2VfaXRlbV9BX2N1c3RvbWVyBQAAAA9jdXN0b21lckFkZHJlc3MFAAAABXByaWNlBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABjO0FBw=", "height": 1269564, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G481CT4A4N2EKS7trqz3Zv4AQYDaucLvEVQtDy6vAt3b Next: 93vym5QArCvNXQpATsNikD8Mp6urYaKwiR7MPBKJp45d Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func purchase () = {
88 let payment = value(i.payments[0])
99 if (isDefined(payment.assetId))
1010 then throw("Only Waves are accepted")
1111 else {
1212 let customerAddress = toBase58String(i.caller.bytes)
1313 let price = match getInteger(this, "item_A_coupon_price") {
1414 case a: Int =>
1515 a
1616 case _ =>
1717 0
1818 }
1919 if ((payment.amount == 0))
2020 then throw("Purchase amount is 0")
2121 else if ((price > payment.amount))
2222 then throw("Purchase amount is too low")
2323 else if ((payment.amount > price))
2424 then throw("Purchase amount is too high")
2525 else [StringEntry(("status:purchase_item_A_customer" + customerAddress), "true"), IntegerEntry(("price:purchase_item_A_customer" + customerAddress), price)]
2626 }
2727 }
2828
2929
3030 @Verifier(tx)
3131 func verify () = true
3232

github/deemru/w8io/026f985 
25.29 ms