tx · 4pmMk77JTvuC4iiQmVC7U9SrJJiZEXWShL75b4SdvCTm

3MwXiQUfgfpCezrGWTowg9712x1QdUYURLr:  -0.04000000 Waves

2021.06.18 06:44 [1575467] smart account 3MwXiQUfgfpCezrGWTowg9712x1QdUYURLr > SELF 0.00000000 Waves

{ "type": 13, "id": "4pmMk77JTvuC4iiQmVC7U9SrJJiZEXWShL75b4SdvCTm", "fee": 4000000, "feeAssetId": null, "timestamp": 1623998697150, "version": 2, "chainId": 84, "sender": "3MwXiQUfgfpCezrGWTowg9712x1QdUYURLr", "senderPublicKey": "DGW2gVYMGhgqhMjxiy4aWMAnrpDYoqfxT7fzdTKjyLZZ", "proofs": [ "3UATspeSTAZSjLCk3rgSFHEDgqJNUhgm39hWRcfp8P5obYt6aGH6hTemDfXcp961pZsjXfx35pDnTcsgNKQdURDN" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAgQ2FuIHVzZSBXYXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5QdXJjaGFzZSBhbW91bnQgY2Fubm90IGJlIGxlc3MgdGhhbiBpdGVtIHByaWNlAwkAAGYAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UJAAACAAAAAQIAAAAwUHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBoaWdoZXIgdGhhbiBpdGVtIHByaWNlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAIHN0YXR1czpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MCAAAACWNvbmZpcm1lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAB9wcmljZTpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MFAAAABXByaWNlBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleUbHEAs=", "height": 1575467, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8excGbNam4xFcYCJDiPpLR7fn6SWcA1qQfE82XDZjq8F Next: Hpw2HzTc9AeAgqqague5z5AeLeWfYaxdNKV9TUYPpXXH Full:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
6+@Callable(a)
7+func purchase () = {
8+ let b = extract(a.payment)
9+ if (isDefined(b.assetId))
10+ then throw("Can use Waves only at the moment")
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("Purchase amount cannot be less than item price")
24+ else if ((b.amount > d))
25+ then throw("Purchase amount cannot be higher than item price")
26+ else WriteSet([DataEntry(("status:purchase_item_A_customer_" + c), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + c), d)])
27+ }
28+ }
629
7-@Verifier(a)
8-func b () = {
9- let c = a
10- if ($isInstanceOf(c, "DataTransaction"))
11- then {
12- let d = c
13- true
14- }
15- else if ($isInstanceOf(c, "SetScriptTransaction"))
16- then {
17- let e = c
18- sigVerify(a.bodyBytes, a.proofs[0], a.senderPublicKey)
19- }
20- else false
21- }
30+
31+@Verifier(g)
32+func h () = sigVerify(g.bodyBytes, g.proofs[0], g.senderPublicKey)
2233

github/deemru/w8io/169f3d6 
25.35 ms