tx · Bo2uV34tACpagpH34BkScBDjB7vZM8VN4bTj6wYKNBAc 3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6: -0.01000000 Waves 2021.07.01 20:42 [1594859] smart account 3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6 > SELF 0.00000000 Waves
{ "type": 13, "id": "Bo2uV34tACpagpH34BkScBDjB7vZM8VN4bTj6wYKNBAc", "fee": 1000000, "feeAssetId": null, "timestamp": 1625161359142, "version": 2, "chainId": 84, "sender": "3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6", "senderPublicKey": "4f5Wt4MDH3Qt6DMuZQid3zoj463xCUkNdUWjUcChuedh", "proofs": [ "tK5quunCdGSgrqgPu4CXxno6xyXZ7S4yKRcBArUAFgKwfJrExaSbZ6BAZ63gfrKLdymPyZeJhTeLrdzhULCvyqx" ], "script": "base64:AAIFAAAAAAAAABYIAhIDCgEIEgMKAQgSAwoBCBIDCgEIAAAAAwAAAAADSlBOAQAAACBFqLGvjcwUgk68Uea/woMfyoMncahjkWcixg2ZF+iMxQAAAAAER09MRAEAAAAgLR44CaQZZUypJtV0fmMzG/7TvBdMmwMi7yR7k3IM0LwAAAAACUJMT0NLU1RFUAAAAAAAAAAACgAAAAQAAAABaQEAAAAHYnV5VW5pdAAAAAEAAAAHYXNzZXRJRAQAAAAEY29zdAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAABWNvc3RfBQAAAAdhc3NldElEAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVd29ya3Mgd2l0aCB3YXZlcyBvbmx5AwkBAAAAAiE9AAAA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AAgUAAAAEdGhpcwkAASwAAAACAgAAAAV3YWl0XwUAAAAHYXNzZXRJRAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAZjYWxsZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAHbmV3V2FpdAkAAGQAAAACCAUAAAAJbGFzdEJsb2NrAAAABmhlaWdodAUAAAAJQkxPQ0tTVEVQAwkBAAAAAiE9AAAAAgUAAAAGY2FsbGVyBQAAAAVvd25lcgkAAAIAAAABAgAAABJZb3UgYXJlIG5vdCBvd25lciEDCQAAZgAAAAIFAAAABHdhaXQIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0CQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAABFTdGlsbCB3YWl0IGJsb2NrIAkAAaQAAAABCAUAAAAJbGFzdEJsb2NrAAAABmhlaWdodAIAAAASIGZvciBuZXcgYWR2ZW50dXJlCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAehIAUAAAADSlBOCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAABXdhaXRfBQAAAAdhc3NldElEBQAAAAduZXdXYWl0BQAAAANuaWwAAAAAmFYHQQ==", "height": 1594859, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DvtgnqAPt46NDaVP8CxdUxs3QbJaeoUJ9cbCw8S5ybCL Next: HESPyhCPjpF34ttbvtQM6wsrG39iXq3AQfbu18sqP9Q2 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'5gvKrU3yetdPyMisTo8JiE737U9ZXLp4XkCy2aeE7BbA' | |
5 | 5 | ||
6 | 6 | let b = base58'4385BhNBpLMpBM2Gdt8Z6edjdxYgV4Eb2eE5VvUmxrLK' | |
7 | 7 | ||
8 | 8 | let c = 10 | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | 11 | func buyUnit (e) = { | |
12 | 12 | let f = { | |
13 | 13 | let g = getInteger(this, ("cost_" + e)) | |
14 | 14 | if ($isInstanceOf(g, "Int")) | |
15 | 15 | then { | |
16 | 16 | let h = g | |
17 | 17 | h | |
18 | 18 | } | |
19 | 19 | else 0 | |
20 | 20 | } | |
21 | 21 | let i = value(d.payments[0]) | |
22 | 22 | if (isDefined(i.assetId)) | |
23 | 23 | then throw("works with waves only") | |
24 | 24 | else if ((i.amount != f)) | |
25 | 25 | then throw("Wrong cost") | |
26 | 26 | else [ScriptTransfer(d.caller, 1, fromBase58String(e)), StringEntry(("owner_" + e), toBase58String(d.caller.bytes))] | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Callable(d) | |
32 | 32 | func fightWith (j) = { | |
33 | 33 | let k = fromBase58String(j) | |
34 | 34 | let l = { | |
35 | 35 | let g = assetInfo(k) | |
36 | 36 | if ($isInstanceOf(g, "Asset")) | |
37 | 37 | then { | |
38 | 38 | let m = g | |
39 | 39 | m.name | |
40 | 40 | } | |
41 | 41 | else throw("Can't find asset") | |
42 | 42 | } | |
43 | 43 | let n = split(l, "-") | |
44 | 44 | let o = n[2] | |
45 | 45 | let p = fromBase16String(take(o, 2)) | |
46 | 46 | throw(toUtf8String(p)) | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(d) | |
52 | 52 | func goToForest (e) = { | |
53 | 53 | let q = { | |
54 | 54 | let g = getString(this, ("owner_" + e)) | |
55 | 55 | if ($isInstanceOf(g, "String")) | |
56 | 56 | then { | |
57 | 57 | let h = g | |
58 | 58 | h | |
59 | 59 | } | |
60 | 60 | else "" | |
61 | 61 | } | |
62 | 62 | let r = { | |
63 | 63 | let g = getInteger(this, ("wait_" + e)) | |
64 | 64 | if ($isInstanceOf(g, "Int")) | |
65 | 65 | then { | |
66 | 66 | let h = g | |
67 | 67 | h | |
68 | 68 | } | |
69 | 69 | else 0 | |
70 | 70 | } | |
71 | 71 | let s = toBase58String(d.caller.bytes) | |
72 | 72 | let t = (lastBlock.height + (c * 3)) | |
73 | 73 | let u = ((lastBlock.height % 100) + 1) | |
74 | 74 | if ((s != q)) | |
75 | 75 | then throw("You are not owner!") | |
76 | 76 | else if ((r > lastBlock.height)) | |
77 | 77 | then throw((("Still wait block " + toString(lastBlock.height)) + " for forest-walking")) | |
78 | 78 | else [ScriptTransfer(d.caller, u, b), IntegerEntry(("wait_" + e), t)] | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | ||
83 | 83 | @Callable(d) | |
84 | 84 | func goToAdventure (e) = { | |
85 | 85 | let q = { | |
86 | 86 | let g = getString(this, ("owner_" + e)) | |
87 | 87 | if ($isInstanceOf(g, "String")) | |
88 | 88 | then { | |
89 | 89 | let h = g | |
90 | 90 | h | |
91 | 91 | } | |
92 | 92 | else "" | |
93 | 93 | } | |
94 | 94 | let r = { | |
95 | 95 | let g = getInteger(this, ("wait_" + e)) | |
96 | 96 | if ($isInstanceOf(g, "Int")) | |
97 | 97 | then { | |
98 | 98 | let h = g | |
99 | 99 | h | |
100 | 100 | } | |
101 | 101 | else 0 | |
102 | 102 | } | |
103 | 103 | let s = toBase58String(d.caller.bytes) | |
104 | 104 | let t = (lastBlock.height + c) | |
105 | 105 | if ((s != q)) | |
106 | 106 | then throw("You are not owner!") | |
107 | 107 | else if ((r > lastBlock.height)) | |
108 | 108 | then throw((("Still wait block " + toString(lastBlock.height)) + " for new adventure")) | |
109 | 109 | else [ScriptTransfer(d.caller, 500000, a), IntegerEntry(("wait_" + e), t)] | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 |
github/deemru/w8io/169f3d6 38.48 ms ◑