tx · Gt2NH17aJycRZQR3UqjybJQXiPRQrhjg422VcCQxBJRX

3MzFjVphaDKp1oZjd5KmCYou3wCzCzTmEFe:  -0.00100000 Waves

2022.09.19 17:44 [2236145] smart account 3MzFjVphaDKp1oZjd5KmCYou3wCzCzTmEFe > SELF 0.00000000 Waves

{ "type": 13, "id": "Gt2NH17aJycRZQR3UqjybJQXiPRQrhjg422VcCQxBJRX", "fee": 100000, "feeAssetId": null, "timestamp": 1663598662240, "version": 2, "chainId": 84, "sender": "3MzFjVphaDKp1oZjd5KmCYou3wCzCzTmEFe", "senderPublicKey": "FFVf3kC6HkjRMmf8W6Zr2bNKhJ5EN5W1vG44GbgvHd9Z", "proofs": [ "5tbLLkgFfdSSBx3kNxHWntjBhaykiM6uKuGYVmm5Hpa9VHFippmeXRgH1DfAeZkBTucySnXLph159LeQAEak2i5W" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAABAAAACkNvdXBvblR5cGUEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACBjYW4gdXNlIFdBVkVTIG9ubHkgYXQgdGhlIG1vbWVudAQAAAAPY3VzdG9tZXJBZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABXByaWNlBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgkAASwAAAACAgAAAAVJdGVtXwUAAAAKQ291cG9uVHlwZQIAAAANX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAABXByaWNlCQAAAgAAAAECAAAAKVB1cmNoYXNlIGFtb3VudCBzaG91bGQgYmUgZXF1YWwgdG8gcHJpY2UgCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAABZzdGF0dXM6IHB1cmNoYXNlX2l0ZW1fBQAAAApDb3Vwb25UeXBlAgAAAApfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MCAAAACWNvbmZpcm1lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAVcHJpY2U6IHB1cmNoYXNlX2l0ZW1fBQAAAApDb3Vwb25UeXBlAgAAAApfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MFAAAABXByaWNlBQAAAANuaWwAAAAArN32Dw==", "height": 2236145, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B7hkcnyvHN66SqHNnEEEBaTSBHVfAnxAV7Fd9UvUeFNu Next: G6DAxYWgrrwBWBFg4uwSHuQHzqxV8y7fjyjruXmhRAJf Diff:
OldNewDifferences
44
55
66 @Callable(a)
7-func purchase () = {
8- let b = extract(a.payment)
9- if (isDefined(b.assetId))
7+func purchase (b) = {
8+ let c = extract(a.payment)
9+ if (isDefined(c.assetId))
1010 then throw("can use WAVES only at the moment")
1111 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"))
12+ let d = toBase58String(a.caller.bytes)
13+ let e = {
14+ let f = getInteger(this, (("Item_" + b) + "_coupon_price"))
15+ if ($isInstanceOf(f, "Int"))
1616 then {
17- let f = e
18- f
17+ let g = f
18+ g
1919 }
2020 else 0
2121 }
22- if ((b.amount != d))
22+ if ((c.amount != e))
2323 then throw("Purchase amount should be equal to price ")
24- else WriteSet([DataEntry(("status: purchase_item_A_customer_" + c), "confirmed"), DataEntry(("price: purchase_item_A_customer_" + c), d)])
24+ else WriteSet([DataEntry(((("status: purchase_item_" + b) + "_customer_") + d), "confirmed"), DataEntry(((("price: purchase_item_" + b) + "_customer_") + d), e)])
2525 }
2626 }
2727
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
7-func purchase () = {
8- let b = extract(a.payment)
9- if (isDefined(b.assetId))
7+func purchase (b) = {
8+ let c = extract(a.payment)
9+ if (isDefined(c.assetId))
1010 then throw("can use WAVES only at the moment")
1111 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"))
12+ let d = toBase58String(a.caller.bytes)
13+ let e = {
14+ let f = getInteger(this, (("Item_" + b) + "_coupon_price"))
15+ if ($isInstanceOf(f, "Int"))
1616 then {
17- let f = e
18- f
17+ let g = f
18+ g
1919 }
2020 else 0
2121 }
22- if ((b.amount != d))
22+ if ((c.amount != e))
2323 then throw("Purchase amount should be equal to price ")
24- else WriteSet([DataEntry(("status: purchase_item_A_customer_" + c), "confirmed"), DataEntry(("price: purchase_item_A_customer_" + c), d)])
24+ else WriteSet([DataEntry(((("status: purchase_item_" + b) + "_customer_") + d), "confirmed"), DataEntry(((("price: purchase_item_" + b) + "_customer_") + d), e)])
2525 }
2626 }
2727
2828

github/deemru/w8io/169f3d6 
43.80 ms