tx · EMtK1S8XUS4H9wVLNYcpSNMMe9EpMemYeJJjAWiXXNcD 3N8UaqrCTjypGPWXSvFJVSLv23bfuiPoJAh: -0.01000000 Waves 2023.03.13 02:00 [2487442] smart account 3N8UaqrCTjypGPWXSvFJVSLv23bfuiPoJAh > SELF 0.00000000 Waves
{ "type": 13, "id": "EMtK1S8XUS4H9wVLNYcpSNMMe9EpMemYeJJjAWiXXNcD", "fee": 1000000, "feeAssetId": null, "timestamp": 1678662057982, "version": 2, "chainId": 84, "sender": "3N8UaqrCTjypGPWXSvFJVSLv23bfuiPoJAh", "senderPublicKey": "6Q6JdfeHgdjpVbDxjoVAbQhxeGaQXS7B4WYGzk2tYsGT", "proofs": [ "MEDHsrQtzbgmGisHMUp6d1QeYZNdBWc391pQsV2rZAEaGGUkoNVR28e1kQyVraLf9CDnQMVGUhJ3K7ykeVvCY9F" ], "script": "base64:BgI2CAISAwoBBBIHCgUEBAQEBBIECgIBARIDCgEEEgMKAQQSAwoBCBIDCgEBEgQKAggBEgQKAggBEwACYW8CCGFkZHJlc3NfAAJhYwIIYWN0aXZhdGUABnBvb2xBYwIOYWN0aXZhdGVfcG9vbHMABnN3YXBBYwINYWN0aXZhdGVfc3dhcAAGbmZldEFjAgxhY3RpdmF0ZV9uZnQAC2xpcXVpZGl0eUFjAhJhY3RpdmF0ZV9saXF1aWRpdHkAA2JjRAITYmxvY2tfZGlzdHJpYnVpdGlvbgAJYnJpZGdlc0FjAhBhY3RpdmF0ZV9icmlkZ2VzAANhQUQCBWFkbWluAAJvQwIHb3JhY2xlXwACb1QCDHRvdGFsX29yYWNsZQAFd2F2ZXMCBVdBVkVTAAZhV2F2ZXMCDGFjY2VwdF93YXZlcwAFV0FWRVMFBHVuaXQBEWFkbWluVmVyaWZpY2F0aW9uAQFpBAckbWF0Y2gwCQCdCAIFBHRoaXMCBWFkbWluAwkAAQIFByRtYXRjaDACBlN0cmluZwQBdAUHJG1hdGNoMAkAAAIJAQdBZGRyZXNzAQkA2QQ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aW4Av5WpUA==", "height": 2487442, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8eUvo2sFT22UkxvQaP4LsHUY9oVfLV4kSFPfoyAkJGqD Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let ao = "address_" | |
5 | 5 | ||
6 | 6 | let ac = "activate" | |
7 | 7 | ||
8 | 8 | let poolAc = "activate_pools" | |
9 | 9 | ||
10 | 10 | let swapAc = "activate_swap" | |
11 | 11 | ||
12 | 12 | let nfetAc = "activate_nft" | |
13 | 13 | ||
14 | 14 | let liquidityAc = "activate_liquidity" | |
15 | 15 | ||
16 | 16 | let bcD = "block_distribuition" | |
17 | 17 | ||
18 | 18 | let bridgesAc = "activate_bridges" | |
19 | 19 | ||
20 | 20 | let aAD = "admin" | |
21 | 21 | ||
22 | 22 | let oC = "oracle_" | |
23 | 23 | ||
24 | 24 | let oT = "total_oracle" | |
25 | 25 | ||
26 | 26 | let waves = "WAVES" | |
27 | 27 | ||
28 | 28 | let aWaves = "accept_waves" | |
29 | 29 | ||
30 | 30 | let WAVES = unit | |
31 | 31 | ||
32 | 32 | func adminVerification (i) = match getString(this, "admin") { | |
33 | 33 | case t: String => | |
34 | 34 | (Address(fromBase58String(t)) == i.caller) | |
35 | 35 | case _ => | |
36 | 36 | (this == i.caller) | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | let rateFee = "percentage_rate_fee_swap" | |
41 | 41 | ||
42 | 42 | let rateFeeLimit = "rate_fee_limit" | |
43 | 43 | ||
44 | 44 | let rateFeeHeight = "rate_fee_height" | |
45 | 45 | ||
46 | 46 | let errorAdmin = "Only the Admin itself can invoke this function" | |
47 | 47 | ||
48 | 48 | @Callable(i) | |
49 | 49 | func activate (v) = if (adminVerification(i)) | |
50 | 50 | then [BooleanEntry(ac, v)] | |
51 | 51 | else throw(errorAdmin) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | ||
55 | 55 | @Callable(i) | |
56 | 56 | func maintenance (pools,swap,stake,bridges,nft) = if (adminVerification(i)) | |
57 | 57 | then [BooleanEntry(poolAc, pools), BooleanEntry(swapAc, swap), BooleanEntry(liquidityAc, stake), BooleanEntry(bridgesAc, bridges), BooleanEntry(nfetAc, nft)] | |
58 | 58 | else throw(errorAdmin) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | ||
62 | 62 | @Callable(i) | |
63 | 63 | func RateFee (rateSwap,limitHeight) = if (adminVerification(i)) | |
64 | 64 | then [IntegerEntry(rateFee, rateSwap), IntegerEntry(rateFeeHeight, limitHeight), IntegerEntry(rateFeeLimit, 100000000000000000)] | |
65 | 65 | else throw(errorAdmin) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Callable(i) | |
70 | 70 | func recommendation (activate) = if (adminVerification(i)) | |
71 | 71 | then [BooleanEntry("RECOMMENDATION", activate)] | |
72 | 72 | else throw(errorAdmin) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(i) | |
77 | 77 | func acceptWaves (activate) = if (adminVerification(i)) | |
78 | 78 | then [BooleanEntry(aWaves, activate)] | |
79 | 79 | else throw(errorAdmin) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | ||
83 | 83 | @Callable(i) | |
84 | 84 | func addAdmin (address) = if (adminVerification(i)) | |
85 | 85 | then [StringEntry(aAD, address)] | |
86 | 86 | else throw(errorAdmin) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(i) | |
91 | 91 | func BlockDistribution (amount) = if (adminVerification(i)) | |
92 | 92 | then [IntegerEntry(bcD, amount)] | |
93 | 93 | else throw(errorAdmin) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | ||
97 | 97 | @Callable(i) | |
98 | 98 | func SetOracle (address,number) = if (adminVerification(i)) | |
99 | 99 | then [StringEntry((oC + toString(number)), address), IntegerEntry(oT, number)] | |
100 | 100 | else throw(errorAdmin) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | ||
104 | 104 | @Callable(i) | |
105 | 105 | func Set (address,T) = { | |
106 | 106 | let ki = if ((T == 1)) | |
107 | 107 | then (ao + "IDO") | |
108 | 108 | else if ((T == 2)) | |
109 | 109 | then (ao + "BRIDGES") | |
110 | 110 | else if ((T == 3)) | |
111 | 111 | then (ao + "FARMS") | |
112 | 112 | else if ((T == 4)) | |
113 | 113 | then (ao + "POOLS") | |
114 | 114 | else (ao + "NFT") | |
115 | 115 | if (adminVerification(i)) | |
116 | 116 | then [StringEntry(ki, address)] | |
117 | 117 | else throw(errorAdmin) | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 |
github/deemru/w8io/169f3d6 26.25 ms ◑