tx · AeayvnYxsLZzdgfgePreLoDebhiXsYtkpHJZoNNkzWj3 3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r: -0.04000000 Waves 2022.02.11 03:14 [1918223] smart account 3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r > SELF 0.00000000 Waves
{ "type": 13, "id": "AeayvnYxsLZzdgfgePreLoDebhiXsYtkpHJZoNNkzWj3", "fee": 4000000, "feeAssetId": null, "timestamp": 1644538487840, "version": 2, "chainId": 84, "sender": "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r", "senderPublicKey": "GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY", "proofs": [ "UD5mXyA9grFpV5bYeFS36mupoBVkKReKzFeJrpNPgSpbriP5BWGYSWCDHyKrhxaHYA6q5bsYsWHhAhCQedNRm5f" ], "script": "base64:AAIFAAAAAAAAAA4IAhIFCgMICAESAwoBCAAAAAQAAAAAEmhvbGRpbmdzQWRkcmVzc1N0cgIAAAAjM045Ujd1NDQ5WjFiNzZRcEpwOXUzZ3pQak1ZUVlucDNWN3IAAAAAEWhvbGRpbmdzUHVibGljS2V5AQAAACDl3SFFs6PsR+lqN3lF13al6d4vKwj2w7NM+AGJl9DbbwAAAAAPaG9sZGluZ3NBZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAABFob2xkaW5nc1B1YmxpY0tleQAAAAAPdHJhbnNmZXJDb3N0UGN0AAAAAAAAAAAZAAAAAgAAAAFpAQAAABFhZGRPd25lckFuZEFtb3VudAAAAAMAAAAHb3duZXJJZAAAAAdhc3NldElkAAAABmFtb3VudAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFc2FsZV8FAAAAB2Fzc2V0SWQCAAAADl9vcmlnaW5hbE93bmVyBQAAAAdvd25lcklkCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAA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AM1BheW1lbnQgYW5kIGFtb3VudCBkbyBub3QgbWF0Y2guIFRoaXMgYXNzZXRzIGNvc3RzIAkAAaQAAAABBQAAAAZhbW91bnQCAAAADWJ1dCB5b3Ugc2VudCAJAAGkAAAAAQUAAAANcGF5bWVudEFtb3VudAQAAAAIdHJhbnNmZXIJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAABCQACWQAAAAEFAAAAB2Fzc2V0SWQFAAAAA25pbAMJAQAAAAIhPQAAAAIFAAAAB293bmVySWQFAAAAEmhvbGRpbmdzQWRkcmVzc1N0cgQAAAAYYW1vdW50VG9SZW1haW5JbkhvbGRpbmdzCQAAaAAAAAIFAAAADXBheW1lbnRBbW91bnQJAABpAAAAAgUAAAAPdHJhbnNmZXJDb3N0UGN0AAAAAAAAAAPoCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAA5wYXltZW50QW1vdW50IAkAAaQAAAABBQAAAA1wYXltZW50QW1vdW50AgAAABwgfCBhbW91bnRUb1JlbWFpbkluSG9sZGluZ3MgCQABpAAAAAEFAAAAGGFtb3VudFRvUmVtYWluSW5Ib2xkaW5ncwIAAAATIHwgdHJhbnNmZXJDb3N0UGN0IAkAAaQAAAABCQAAaQAAAAIFAAAAD3RyYW5zZmVyQ29zdFBjdAAAAAAAAAAD6AUAAAAIdHJhbnNmZXIAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABpzyTWM=", "height": 1918223, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ag2EysF4F4VNfVAGomHcrQn44GTb7KYytgWFoDWQo8rV Next: DAWfUpCma4E2FJK7hJ95XXC2wwMRUh6ZjcB3rzUNxaEb Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r" | |
5 | 5 | ||
6 | 6 | let b = base58'GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY' | |
7 | 7 | ||
8 | 8 | let c = addressFromPublicKey(b) | |
9 | 9 | ||
10 | 10 | let d = 25 | |
11 | 11 | ||
12 | 12 | @Callable(e) | |
13 | 13 | func addOwnerAndAmount (f,g,h) = [StringEntry((("sale_" + g) + "_originalOwner"), f), IntegerEntry((("sale_" + g) + "_amount"), h)] | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(e) | |
18 | 18 | func buyFromHoldings (g) = { | |
19 | 19 | let f = { | |
20 | 20 | let i = getString(this, (("sale_" + g) + "_originalOwner")) | |
21 | 21 | if ($isInstanceOf(i, "Unit")) | |
22 | 22 | then "unset" | |
23 | 23 | else if ($isInstanceOf(i, "String")) | |
24 | 24 | then { | |
25 | 25 | let j = i | |
26 | 26 | j | |
27 | 27 | } | |
28 | 28 | else throw("Match error") | |
29 | 29 | } | |
30 | 30 | let k = valueOrElse(e.payments[0].amount, 0) | |
31 | 31 | let h = { | |
32 | 32 | let i = getInteger(this, (("sale_" + g) + "_amount")) | |
33 | 33 | if ($isInstanceOf(i, "Unit")) | |
34 | 34 | then 0 | |
35 | 35 | else if ($isInstanceOf(i, "Int")) | |
36 | 36 | then { | |
37 | 37 | let j = i | |
38 | 38 | j | |
39 | 39 | } | |
40 | 40 | else throw("Match error") | |
41 | 41 | } | |
42 | 42 | if (if ((f == "unset")) | |
43 | 43 | then true | |
44 | 44 | else (f == "")) | |
45 | 45 | then throw("Original owner not found ") | |
46 | 46 | else if (if ((h == 0)) | |
47 | 47 | then true | |
48 | 48 | else (h > k)) | |
49 | 49 | then throw(((("Payment and amount do not match. This assets costs " + toString(h)) + "but you sent ") + toString(k))) | |
50 | 50 | else { | |
51 | 51 | let l = [ScriptTransfer(e.caller, 1, fromBase58String(g))] | |
52 | 52 | if ((f != a)) | |
53 | 53 | then { | |
54 | 54 | let m = (k * (d / 1000)) | |
55 | 55 | throw(((((("paymentAmount " + toString(k)) + " | amountToRemainInHoldings ") + toString(m)) + " | transferCostPct ") + toString((d / 1000)))) | |
56 | 56 | } | |
57 | 57 | else l | |
58 | 58 | } | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | @Verifier(n) | |
63 | 63 | func o () = true | |
64 | 64 |
github/deemru/w8io/169f3d6 27.43 ms ◑