tx · usnLYL1V1ZohL7sJj2PFoviAVj53QxkYpNi2HQamwin

3Mv28W8yEY1ai8y7eE1kG97ypbG4CF7d28y:  -0.01000000 Waves

2021.01.17 01:26 [1356573] smart account 3Mv28W8yEY1ai8y7eE1kG97ypbG4CF7d28y > SELF 0.00000000 Waves

{ "type": 13, "id": "usnLYL1V1ZohL7sJj2PFoviAVj53QxkYpNi2HQamwin", "fee": 1000000, "feeAssetId": null, "timestamp": 1610836050788, "version": 2, "chainId": 84, "sender": "3Mv28W8yEY1ai8y7eE1kG97ypbG4CF7d28y", "senderPublicKey": "aRBvB5VU5HdLjgKyKqNMyQcy4TAg9LBkZEZ67NLkMZb", "proofs": [ "2VSNYe8wF2kPLBpZBW2V6TnpKWm9wxHFjPtx4jVLSrds3ZX3aJcoBL7PhVBi1JG8sjKVa7maAxfz3KJXGTpKpRX5" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAASQ2FuIG9ubHkgdXNlIFdhdmVzBAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFcHJpY2UEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwkAAGYAAAACBQAAAAVwcmljZQgFAAAAA3BtdAAAAAZhbW91bnQJAAACAAAAAQIAAAAaUGF5bWVudCBzZW50IGlzIG5vdCBlbm91Z2gDCQAAZgAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAAVwcmljZQkAAAIAAAABAgAAABhQYXltZW50IHNlbnQgaXMgdG9vIG11Y2gJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAgc3RhdHVzOnB1cmNoYXNlX2l0ZW1fQV9jdXN0b21lcl8FAAAAD2N1c3RvbWVyQWRkcmVzcwIAAAAJY29uZmlybWVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAH3ByaWNlOnB1cmNoYXNlX2l0ZW1fQV9jdXN0b21lcl8FAAAAD2N1c3RvbWVyQWRkcmVzcwUAAAAFcHJpY2UFAAAAA25pbAAAAAD0UCf7", "height": 1356573, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none 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 only use Waves")
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("Payment sent is not enough")
21+ else if ((pmt.amount > price))
22+ then throw("Payment sent is too much")
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/169f3d6 
20.44 ms