tx · 4HfTk4tcknpqz2zqNW15VZmTtYEHxvxcuVqrGHGWGwVG 3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE: -0.04000000 Waves 2022.05.04 08:57 [2036551] smart account 3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE > SELF 0.00000000 Waves
{ "type": 13, "id": "4HfTk4tcknpqz2zqNW15VZmTtYEHxvxcuVqrGHGWGwVG", "fee": 4000000, "feeAssetId": null, "timestamp": 1651643832068, "version": 2, "chainId": 84, "sender": "3N19jxhEYkphA6vga9hXTPsU5YfRMR27YoE", "senderPublicKey": "B3JNxLE1zmVDjs6MqSA1d3N7V6dS5Rq2wvxZqqVHo1fK", "proofs": [ "doWN85AiS6ZurUiEnKX7QejXtgd4kDFxc1oPxjNmTYVA7cm6v7ib3r5cBZvJc821RQd4zD7PFmQqsSsjRH5Caq9" ], "script": "base64:AAIFAAAAAAAAACQIAhIDCgEIEggKBggICAgICBIDCgEEEgcKBQgICAgIEgMKAQgAAAALAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAAmExAgAAAAxzd2FwX2Fzc2V0MV8AAAAAAnN0AgAAAA9hZGRyZXNzX3N0YWtlcl8AAAAAA3NzdAIAAAANYWRkcmVzc19wb29sXwAAAAADc3dwAgAAAA1hZGRyZXNzX3N3YXBfAAAAAAJhMgIAAAAMc3dhcF9hc3NldDJfAAAAAANhYTECAAAAB3Bvb2xfMV8AAAAAA2FhMgIAAAAHcG9vbF8yXwAAAAADc3QxAgAAAA5zdGFrZXJfYWRkcmVzcwAAAAAEdHlwZQIAAAAFdHlwZV8AAAAFAAAAAWkBAAAADGFkZE1haW5Bc3NldAAAAAEAAAACaWQEAAAABFBNQUEJAAQdAAAAAgUAAAAEdGhpcwUAAAAEbWFpbgMJAAAAAAAAAggFAAAAAWkAAAAGY2FsbGVyBQAAAAR0aGlzAwkBAAAACWlzRGVmaW5lZAAAAAEFAAAABFBNQUEJAAACAAAAA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ZUVudHJ5AAAAAQkAASwAAAACBQAAAAFsBQAAAARwcmFpCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAAJzdAUAAAAEUE1BQQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIFAAAAA2FhMQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIFAAAAA2FhMgUAAAAHYWRkcmVzcwUAAAADbmlsBQAAAAdiYmVudHJ5CQAAAgAAAAECAAAALk9ubHkgdGhlIEFkbWluIGl0c2VsZiBjYW4gaW52b2tlIHRoaXMgZnVuY3Rpb24AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXntvw28", "height": 2036551, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GmkDBn7DxE7aDqatThpZp7RBY9oazHAT5aqf8ofLtbp4 Next: 8WTqCoRZA8wuP9ib7s8ygMLWnvcp5zNMmCmxJ1fk15uq Diff:
Old | New | Differences | |
---|---|---|---|
72 | 72 | let PMAA = getStringValue(this, address) | |
73 | 73 | if ((i.caller == this)) | |
74 | 74 | then if ((PAA == "swap")) | |
75 | - | then [DeleteEntry((a1 + address)), DeleteEntry((a2 + address)), DeleteEntry(address), DeleteEntry((st + PMAA))] | |
75 | + | then [DeleteEntry((type + address)), DeleteEntry((a1 + address)), DeleteEntry((a2 + address)), DeleteEntry(address), DeleteEntry((st + PMAA))] | |
76 | 76 | else { | |
77 | 77 | let prai = getStringValue((sst + address)) | |
78 | - | let bbentry = [DeleteEntry((sst + address)), DeleteEntry((l + prai)), DeleteEntry(address), DeleteEntry((st + PMAA)), DeleteEntry((aa1 + address)), DeleteEntry((aa2 + address))] | |
78 | + | let bbentry = [DeleteEntry((type + address)), DeleteEntry((sst + address)), DeleteEntry((l + prai)), DeleteEntry(address), DeleteEntry((st + PMAA)), DeleteEntry((aa1 + address)), DeleteEntry((aa2 + address))] | |
79 | 79 | bbentry | |
80 | 80 | } | |
81 | 81 | 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 main = "main_asset" | |
5 | 5 | ||
6 | 6 | let l = "lp_asset_" | |
7 | 7 | ||
8 | 8 | let a1 = "swap_asset1_" | |
9 | 9 | ||
10 | 10 | let st = "address_staker_" | |
11 | 11 | ||
12 | 12 | let sst = "address_pool_" | |
13 | 13 | ||
14 | 14 | let swp = "address_swap_" | |
15 | 15 | ||
16 | 16 | let a2 = "swap_asset2_" | |
17 | 17 | ||
18 | 18 | let aa1 = "pool_1_" | |
19 | 19 | ||
20 | 20 | let aa2 = "pool_2_" | |
21 | 21 | ||
22 | 22 | let st1 = "staker_address" | |
23 | 23 | ||
24 | 24 | let type = "type_" | |
25 | 25 | ||
26 | 26 | @Callable(i) | |
27 | 27 | func addMainAsset (id) = { | |
28 | 28 | let PMAA = getString(this, main) | |
29 | 29 | if ((i.caller == this)) | |
30 | 30 | then if (isDefined(PMAA)) | |
31 | 31 | then throw("Main asset has been previously added.") | |
32 | 32 | else [StringEntry(main, id)] | |
33 | 33 | else throw("Only the Admin itself can invoke this function") | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | ||
38 | 38 | @Callable(i) | |
39 | 39 | func addPool (address,pair,lp,staker,asset1,asset2) = { | |
40 | 40 | let PMAA = getString(this, address) | |
41 | 41 | if ((i.caller == this)) | |
42 | 42 | then if (isDefined(PMAA)) | |
43 | 43 | then throw("The pool has been previously added.") | |
44 | 44 | else [StringEntry((sst + address), pair), StringEntry((l + pair), lp), StringEntry(address, staker), StringEntry((st + staker), address), StringEntry((aa1 + address), asset1), StringEntry((aa2 + address), asset2), StringEntry((type + address), "pools")] | |
45 | 45 | else throw("Only the Admin itself can invoke this function") | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | ||
50 | 50 | @Callable(i) | |
51 | 51 | func activate (v) = if ((i.caller == this)) | |
52 | 52 | then [BooleanEntry("activate", v)] | |
53 | 53 | else throw("Only the Admin itself can invoke this function") | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | ||
57 | 57 | @Callable(i) | |
58 | 58 | func addSwap (address,pair,asset1,asset2,staker) = { | |
59 | 59 | let PMAA = getString(this, address) | |
60 | 60 | if ((i.caller == this)) | |
61 | 61 | then if (isDefined(PMAA)) | |
62 | 62 | then throw("The address for this swap has been previously added.") | |
63 | 63 | else [StringEntry((a1 + address), asset1), StringEntry((a2 + address), asset2), StringEntry(address, staker), StringEntry((st + staker), address), StringEntry((type + address), "swap")] | |
64 | 64 | else throw("Only the Admin itself can invoke this function") | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Callable(i) | |
70 | 70 | func removeSwapOrPool (address) = { | |
71 | 71 | let PAA = getStringValue(this, (type + address)) | |
72 | 72 | let PMAA = getStringValue(this, address) | |
73 | 73 | if ((i.caller == this)) | |
74 | 74 | then if ((PAA == "swap")) | |
75 | - | then [DeleteEntry((a1 + address)), DeleteEntry((a2 + address)), DeleteEntry(address), DeleteEntry((st + PMAA))] | |
75 | + | then [DeleteEntry((type + address)), DeleteEntry((a1 + address)), DeleteEntry((a2 + address)), DeleteEntry(address), DeleteEntry((st + PMAA))] | |
76 | 76 | else { | |
77 | 77 | let prai = getStringValue((sst + address)) | |
78 | - | let bbentry = [DeleteEntry((sst + address)), DeleteEntry((l + prai)), DeleteEntry(address), DeleteEntry((st + PMAA)), DeleteEntry((aa1 + address)), DeleteEntry((aa2 + address))] | |
78 | + | let bbentry = [DeleteEntry((type + address)), DeleteEntry((sst + address)), DeleteEntry((l + prai)), DeleteEntry(address), DeleteEntry((st + PMAA)), DeleteEntry((aa1 + address)), DeleteEntry((aa2 + address))] | |
79 | 79 | bbentry | |
80 | 80 | } | |
81 | 81 | else throw("Only the Admin itself can invoke this function") | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | @Verifier(tx) | |
86 | 86 | func verify () = match tx { | |
87 | 87 | case _ => | |
88 | 88 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
89 | 89 | } | |
90 | 90 |
github/deemru/w8io/169f3d6 714.27 ms ◑