tx · G2b5daxv2K4QSwAGATA3HodzQ2BAxRbyD5wrtWKN5PaZ

3NCnq1VZiNRCNuNgLSqWMT5zrL55rmMgo8C:  -0.01000000 Waves

2021.01.20 20:17 [1362042] smart account 3NCnq1VZiNRCNuNgLSqWMT5zrL55rmMgo8C > SELF 0.00000000 Waves

{ "type": 13, "id": "G2b5daxv2K4QSwAGATA3HodzQ2BAxRbyD5wrtWKN5PaZ", "fee": 1000000, "feeAssetId": null, "timestamp": 1611163036074, "version": 2, "chainId": 84, "sender": "3NCnq1VZiNRCNuNgLSqWMT5zrL55rmMgo8C", "senderPublicKey": "2moUc4gCvsAmBvZePwqndibxcX6eyhG8w5K83Xdr1Mvg", "proofs": [ "ziowKiXiF1ceivk9MLxmxTRMbC75pDmjEUeQk8WXz86znwZaT6YywyGMsCX8DGBrbUJrBQkdHYEsh4kUbNCruQ9" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAASQ2FuIG9ubHkgdXNlIFdhdmVzBAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFcHJpY2UEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwkAAGYAAAACBQAAAAVwcmljZQgFAAAAA3BtdAAAAAZhbW91bnQJAAACAAAAAQIAAAAaUGF5bWVudCBzZW50IGlzIG5vdCBlbm91Z2gDCQAAZgAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAAVwcmljZQkAAAIAAAABAgAAABhQYXltZW50IHNlbnQgaXMgdG9vIG11Y2gJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAgc3RhdHVzOnB1cmNoYXNlX2l0ZW1fQV9jdXN0b21lcl8FAAAAD2N1c3RvbWVyQWRkcmVzcwIAAAAJY29uZmlybWVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAH3ByaWNlOnB1cmNoYXNlX2l0ZW1fQV9jdXN0b21lcl8FAAAAD2N1c3RvbWVyQWRkcmVzcwUAAAAFcHJpY2UFAAAAA25pbAAAAAD0UCf7", "height": 1362042, "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(a)
7+func purchase () = {
8+ let b = extract(a.payment)
9+ if (isDefined(b.assetId))
10+ then throw("Can only use Waves")
11+ else {
12+ let c = toBase58String(a.caller.bytes)
13+ let d = {
14+ let e = getInteger(this, "item_A_coupon_price")
15+ if ($isInstanceOf(e, "Int"))
16+ then {
17+ let f = e
18+ f
19+ }
20+ else 0
21+ }
22+ if ((d > b.amount))
23+ then throw("Payment sent is not enough")
24+ else if ((b.amount > d))
25+ then throw("Payment sent is too much")
26+ else WriteSet([DataEntry(("status:purchase_item_A_customer_" + c), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + c), d)])
27+ }
28+ }
29+
30+

github/deemru/w8io/026f985 
20.71 ms