tx · 73GEufqkgET8UiCV3ih7eny1za32Q6iZbVZNve4yKe5T 3MpniGh4Ab64nzX6AXtoL5tzeC5EwSyHuaq: -0.01400000 Waves 2022.01.11 01:30 [1873448] smart account 3MpniGh4Ab64nzX6AXtoL5tzeC5EwSyHuaq > SELF 0.00000000 Waves
{ "type": 13, "id": "73GEufqkgET8UiCV3ih7eny1za32Q6iZbVZNve4yKe5T", "fee": 1400000, "feeAssetId": null, "timestamp": 1641853893731, "version": 2, "chainId": 84, "sender": "3MpniGh4Ab64nzX6AXtoL5tzeC5EwSyHuaq", "senderPublicKey": "HxF3FdYr3sD3ju9Y1wL4d5kmRtKJGhgSSYQkCyo78xGn", "proofs": [ "2DfkdcNsYaHG8cAC5Xs8QfVCgSVtvNMudiHwDJQVBCrJEoLbqzALFdmAY9CVScScjHSHgTjcGEpgzJxCrkS9P2PJ" ], "script": "base64:AAIFAAAAAAAAAIoIAhIAEgASAwoBCBoSCgFhEg1hY2NvdW50UHViS2V5GgYKAWISAWkaDAoBYxIHcGF5bWVudBoRCgFkEgxjdXN0b21lckFkZHIaCgoBZRIFcHJpY2UaDAoBZhIHJG1hdGNoMBoGCgFnEgF0GggKAWgSA2tleRoHCgFpEgJ0eBoLCgFqEgZ2ZXJpZnkAAAABAAAAAAFhAQAAACD74c8fxHITmic4XJURczmbArRsu8kqaItHqXO3wdtFBwAAAAMAAAABYgEAAAAIcHVyY2hhc2UAAAAABAAAAAFjCQABkQAAAAIIBQAAAAFiAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAFjAAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAYT25seSBzaG91bGQgcGF5IGluIHdhdmVzBAAAAAFkCQACWAAAAAEICAUAAAABYgAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAAWUEAAAAAWYJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAAAABZgIAA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ggFAAAAAWkAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAABaQAAAA9zZW5kZXJQdWJsaWNLZXnVIn2J", "height": 1873448, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EGSRFdtxKcD6Pig3ndoRPdzBgdjM65HSXG9suw8XzWRr Next: FBqnYqzcxC2mDudFec3gJsqkbRatDSPat3S3EjNoDiTz Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'HxF3FdYr3sD3ju9Y1wL4d5kmRtKJGhgSSYQkCyo78xGn' | |
5 | 5 | ||
6 | 6 | @Callable(b) | |
7 | 7 | func purchase () = { | |
8 | 8 | let c = b.payments[0] | |
9 | 9 | if (isDefined(c.assetId)) | |
10 | 10 | then throw("Only should pay in waves") | |
11 | 11 | else { | |
12 | 12 | let d = toBase58String(b.caller.bytes) | |
13 | 13 | let e = { | |
14 | 14 | let f = getInteger(this, "item_A_coupon_price") | |
15 | 15 | if ($isInstanceOf(f, "Int")) | |
16 | 16 | then { | |
17 | 17 | let g = f | |
18 | 18 | g | |
19 | 19 | } | |
20 | 20 | else 0 | |
21 | 21 | } | |
22 | 22 | if ((c.amount > e)) | |
23 | 23 | then throw(("payment cant be higher than price" + toString(e))) | |
24 | 24 | else if ((e > c.amount)) | |
25 | 25 | then throw(("payment cant be less than price: " + toString(e))) | |
26 | 26 | else [StringEntry(("status:purchase_item_A_customer_" + d), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + d), e)] | |
27 | 27 | } | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | 32 | @Callable(b) | |
33 | 33 | func setPrices () = if ((b.callerPublicKey == a)) | |
34 | 34 | then [IntegerEntry("item_A_coupon_price", 30000000)] | |
35 | 35 | else throw("Only owner can set prices") | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | ||
39 | 39 | @Callable(b) | |
40 | 40 | func deleteEntry (h) = if ((b.callerPublicKey == a)) | |
41 | 41 | then [DeleteEntry(h)] | |
42 | 42 | else throw("Only owner can delete entries") | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | @Verifier(i) | |
46 | 46 | func j () = sigVerify(i.bodyBytes, i.proofs[0], i.senderPublicKey) | |
47 | 47 |
github/deemru/w8io/169f3d6 37.91 ms ◑