-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathshow_config.py
More file actions
60 lines (48 loc) · 1.93 KB
/
Copy pathshow_config.py
File metadata and controls
60 lines (48 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env python3
"""
Script to display current configuration status and environment information.
"""
import os
import sys
from pathlib import Path
# Add the project root to the Python path
sys.path.append(str(Path(__file__).parent))
def show_config_status():
"""Display current configuration status."""
try:
import config
from config.environments import Environment
print("Configuration Status")
print("=" * 50)
print(f"Current Environment: {config.CURRENT_ENV.value.upper()}")
print(f"Environment Variable MX_DEX_ENV: {os.getenv('MX_DEX_ENV', f'Not set (defaults to {config.CURRENT_ENV.value.upper()})')}")
print()
print("Network Configuration:")
print(f" Proxy: {config.DEFAULT_PROXY}")
print(f" API: {config.DEFAULT_API}")
print(f" GraphQL: {config.GRAPHQL}")
print()
print("Wallet Configuration:")
print(f" Owner: {config.DEFAULT_OWNER}")
print(f" Admin: {config.DEFAULT_ADMIN}")
print(f" Accounts: {config.DEFAULT_ACCOUNTS}")
print()
print("Deploy Configuration:")
print(f" Config Save Path: {config.DEFAULT_CONFIG_SAVE_PATH}")
print(f" Deploy Structure: {config.DEPLOY_STRUCTURE_JSON}")
print()
print("Available Environments:")
for env in Environment:
print(f" - {env.value}")
print()
print("To switch environments, set the MX_DEX_ENV environment variable:")
print(" export MX_DEX_ENV=devnet")
print(" export MX_DEX_ENV=chainsim")
print(" export MX_DEX_ENV=mainnet")
except ImportError as e:
print(f"Error importing configuration: {e}")
print("Make sure you're running this script from the project root directory.")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
show_config_status()