tx · ACqAV4b3gh8L5hriwF3v1HZwWZmTm9Je245Bhghd7fyP 3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE: -0.04000000 Waves 2022.05.04 11:27 [2036696] smart account 3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE > SELF 0.00000000 Waves
{ "type": 13, "id": "ACqAV4b3gh8L5hriwF3v1HZwWZmTm9Je245Bhghd7fyP", "fee": 4000000, "feeAssetId": null, "timestamp": 1651652812757, "version": 2, "chainId": 84, "sender": "3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE", "senderPublicKey": "B3JNxLE1zmVDjs6MqSA1d3N7V6dS5Rq2wvxZqqVHo1fK", "proofs": [ "91TUpWyhEMotacSjYgKMFAz59dyhjyKW3pkNrRd1T4eobS2BG5kDzPHBQzxND9v3jyvU1zPP6EVU6jA6wr3Rqrg" ], "script": "base64:AAIFAAAAAAAAACQIAhIDCgEIEggKBggICAgICBIDCgEEEgcKBQgICAgIEgMKAQgAAAARAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAAmExAgAAAAxzd2FwX2Fzc2V0MV8AAAAAAnN0AgAAAA9hZGRyZXNzX3N0YWtlcl8AAAAAA3NzdAIAAAANYWRkcmVzc19wb29sXwAAAAADc3dwAgAAAA1hZGRyZXNzX3N3YXBfAAAAAAJhMgIAAAAMc3dhcF9hc3NldDJfAAAAAANhYTECAAAAB3Bvb2xfMV8AAAAAA2FhMgIAAAAHcG9vbF8yXwAAAAADc3QxAgAAAA5zdGFrZXJfYWRkcmVzcwAAAAAEdHlwZQIAAAAFdHlwZV8AAAAACWxlYXNlUG9vbAkBAAAAB0FkZHJlc3MAAAABCAUAAAAEdGhpcwAAAAVieXRlcwAAAAACc2ECAAAAD1NUQUtJTkdfQU1PVU5UXwAAAAACbGECAAAADUxFQVNFX0FNT1VOVF8AAAAAAml4AgAAAANJRF8AAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAAAABQEAA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gkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAAJhMQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIFAAAAAmEyBQAAAAdhZGRyZXNzBQAAAANuaWwFAAAACWRlbGV0RW50eQQAAAAHYmJlbnRyeQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgIAAAAFUE9PTF8FAAAABFBNQUEJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACAgAAAAlscF9hc3NldF8FAAAABFBNQUEJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAANhYTEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAANhYTIFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAAR0eXBlBQAAAAdhZGRyZXNzBQAAAANuaWwFAAAAB2JiZW50cnkJAAACAAAAAQIAAAAuT25seSB0aGUgQWRtaW4gaXRzZWxmIGNhbiBpbnZva2UgdGhpcyBmdW5jdGlvbgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlefPkuf4=", "height": 2036696, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7V1vRz9kVybdPesFfpstoYRkBsivipHs4wsqbwxx2dit Next: FojiDjck3sVZ4wKiy9Fef5RrU23FVGP6javx8ahypcai Diff:
Old | New | Differences | |
---|---|---|---|
72 | 72 | if ((s.caller == this)) | |
73 | 73 | then if (isDefined(B)) | |
74 | 74 | then throw("The address for this swap has been previously added.") | |
75 | - | else [StringEntry(v, A), StringEntry(r, v), StringEntry((c + r), y), StringEntry((g + r), z), StringEntry((k + r), "swap")] | |
75 | + | else [StringEntry(("swap_" + v), A), StringEntry(r, v), StringEntry((c + r), y), StringEntry((g + r), z), StringEntry((k + r), "swap")] | |
76 | 76 | else throw("Only the Admin itself can invoke this function") | |
77 | 77 | } | |
78 | 78 | ||
85 | 85 | if ((s.caller == this)) | |
86 | 86 | then if ((D == "swap")) | |
87 | 87 | then { | |
88 | - | let E = [DeleteEntry(B), DeleteEntry(r), DeleteEntry((k + r)), DeleteEntry((c + r)), DeleteEntry((g + r))] | |
88 | + | let E = [DeleteEntry(("swap_" + B)), DeleteEntry(r), DeleteEntry((k + r)), DeleteEntry((c + r)), DeleteEntry((g + r))] | |
89 | 89 | E | |
90 | 90 | } | |
91 | 91 | else { | |
92 | - | let F = [ | |
92 | + | let F = [DeleteEntry(r), DeleteEntry(("POOL_" + B)), DeleteEntry(("lp_asset_" + B)), DeleteEntry((h + r)), DeleteEntry((i + r)), DeleteEntry((k + r))] | |
93 | 93 | F | |
94 | 94 | } | |
95 | 95 | else throw("Only the Admin itself can invoke this function") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "main_asset" | |
5 | 5 | ||
6 | 6 | let b = "lp_asset_" | |
7 | 7 | ||
8 | 8 | let c = "swap_asset1_" | |
9 | 9 | ||
10 | 10 | let d = "address_staker_" | |
11 | 11 | ||
12 | 12 | let e = "address_pool_" | |
13 | 13 | ||
14 | 14 | let f = "address_swap_" | |
15 | 15 | ||
16 | 16 | let g = "swap_asset2_" | |
17 | 17 | ||
18 | 18 | let h = "pool_1_" | |
19 | 19 | ||
20 | 20 | let i = "pool_2_" | |
21 | 21 | ||
22 | 22 | let j = "staker_address" | |
23 | 23 | ||
24 | 24 | let k = "type_" | |
25 | 25 | ||
26 | 26 | let l = Address(this.bytes) | |
27 | 27 | ||
28 | 28 | let m = "STAKING_AMOUNT_" | |
29 | 29 | ||
30 | 30 | let n = "LEASE_AMOUNT_" | |
31 | 31 | ||
32 | 32 | let o = "ID_" | |
33 | 33 | ||
34 | 34 | let p = 5 | |
35 | 35 | ||
36 | 36 | func q (r) = toString(valueOrErrorMessage(addressFromString(r), (("Can't parse " + r) + " as address"))) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | @Callable(s) | |
40 | 40 | func addMainAsset (t) = if ((s.caller == this)) | |
41 | 41 | then [StringEntry(a, t)] | |
42 | 42 | else throw("Only the Admin itself can invoke this function") | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Callable(s) | |
47 | 47 | func addPool (u,v,w,x,y,z) = { | |
48 | 48 | let r = q(u) | |
49 | 49 | let A = q(x) | |
50 | 50 | let B = getString(this, r) | |
51 | 51 | if ((s.caller == this)) | |
52 | 52 | then if (isDefined(B)) | |
53 | 53 | then throw("The pool has been previously added.") | |
54 | 54 | else [StringEntry(r, v), StringEntry(("POOL_" + v), A), StringEntry((b + v), w), StringEntry((h + r), y), StringEntry((i + r), z), StringEntry((k + r), "pools")] | |
55 | 55 | else throw("Only the Admin itself can invoke this function") | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | ||
60 | 60 | @Callable(s) | |
61 | 61 | func activate (C) = if ((s.caller == this)) | |
62 | 62 | then [BooleanEntry("activate", C)] | |
63 | 63 | else throw("Only the Admin itself can invoke this function") | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | ||
67 | 67 | @Callable(s) | |
68 | 68 | func addSwap (u,x,v,y,z) = { | |
69 | 69 | let r = q(u) | |
70 | 70 | let A = q(x) | |
71 | 71 | let B = getString(this, r) | |
72 | 72 | if ((s.caller == this)) | |
73 | 73 | then if (isDefined(B)) | |
74 | 74 | then throw("The address for this swap has been previously added.") | |
75 | - | else [StringEntry(v, A), StringEntry(r, v), StringEntry((c + r), y), StringEntry((g + r), z), StringEntry((k + r), "swap")] | |
75 | + | else [StringEntry(("swap_" + v), A), StringEntry(r, v), StringEntry((c + r), y), StringEntry((g + r), z), StringEntry((k + r), "swap")] | |
76 | 76 | else throw("Only the Admin itself can invoke this function") | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | ||
81 | 81 | @Callable(s) | |
82 | 82 | func removeSwapOrPool (r) = { | |
83 | 83 | let D = getStringValue(this, (k + r)) | |
84 | 84 | let B = getStringValue(this, r) | |
85 | 85 | if ((s.caller == this)) | |
86 | 86 | then if ((D == "swap")) | |
87 | 87 | then { | |
88 | - | let E = [DeleteEntry(B), DeleteEntry(r), DeleteEntry((k + r)), DeleteEntry((c + r)), DeleteEntry((g + r))] | |
88 | + | let E = [DeleteEntry(("swap_" + B)), DeleteEntry(r), DeleteEntry((k + r)), DeleteEntry((c + r)), DeleteEntry((g + r))] | |
89 | 89 | E | |
90 | 90 | } | |
91 | 91 | else { | |
92 | - | let F = [ | |
92 | + | let F = [DeleteEntry(r), DeleteEntry(("POOL_" + B)), DeleteEntry(("lp_asset_" + B)), DeleteEntry((h + r)), DeleteEntry((i + r)), DeleteEntry((k + r))] | |
93 | 93 | F | |
94 | 94 | } | |
95 | 95 | else throw("Only the Admin itself can invoke this function") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | @Verifier(G) | |
100 | 100 | func H () = { | |
101 | 101 | let I = G | |
102 | 102 | sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey) | |
103 | 103 | } | |
104 | 104 |
github/deemru/w8io/169f3d6 36.39 ms ◑