tx · 5iEA3oZjeqTBadABVhbNQaX5Mf6NhPwP57Ui3JK4vovL

3NAH9wsZ5Gr1LW7eZTnbbFAGL3omhKK7YWK:  -0.01000000 Waves

2022.04.27 21:57 [2027271] smart account 3NAH9wsZ5Gr1LW7eZTnbbFAGL3omhKK7YWK > SELF 0.00000000 Waves

{ "type": 13, "id": "5iEA3oZjeqTBadABVhbNQaX5Mf6NhPwP57Ui3JK4vovL", "fee": 1000000, "feeAssetId": null, "timestamp": 1651085851258, "version": 2, "chainId": 84, "sender": "3NAH9wsZ5Gr1LW7eZTnbbFAGL3omhKK7YWK", "senderPublicKey": "EdiZKeSSzmoYqkk6ce532zc65KcUXi9HckEuP7sWPHmW", "proofs": [ "YX4pLM3rbMSKP1NGLhvoCa6wVCkXxRhdMGhUCw9w1mpDeiTzmQmzSvKM9ryJbQaGs1MWVhf2begDa6N9duATLy6" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAgY2FuIHVzZSBXQVZFUyBvbmx5IGF0IHRoZSBtb21lbnQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5wdXJjaGFzZSBhbW91bnQgY2Fubm90IGJlIGxlc3MgdGhhbiBpdGVtIHByaWNlAwkAAGYAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UJAAACAAAAAQIAAAAwcHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBoaWdoZXIgdGhhbiBpdGVtIHByaWNlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAIHN0YXR1czpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MCAAAACWNvbmZpcm1lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAB9wcmljZTpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MFAAAABXByaWNlBQAAAANuaWwAAAAAxZ6lEQ==", "height": 2027271, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 4Q9mi4c6aa9MAZpEX1u9ji4V79qDpyRZ3uGEWm4skKXQ Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+
5+
6+@Callable(i)
7+func purchase () = {
8+ let pmt = extract(i.payment)
9+ if (isDefined(pmt.assetId))
10+ then throw("can use WAVES only at the moment")
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 ((price > pmt.amount))
20+ then throw("purchase amount cannot be less than item price")
21+ else if ((pmt.amount > price))
22+ then throw("purchase amount cannot be higher than item price")
23+ else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
24+ }
25+ }
26+
27+

github/deemru/w8io/026f985 
16.84 ms