27 lines
803 B
Plaintext
Executable File
27 lines
803 B
Plaintext
Executable File
#!/usr/bin/env pyston3
|
|
|
|
import argparse
|
|
import logging
|
|
import os
|
|
import os.path
|
|
import sys
|
|
import traceback
|
|
|
|
sys.path.insert(0, os.path.abspath(
|
|
os.path.join(os.path.dirname(__file__), "..")))
|
|
import mango # nopep8
|
|
|
|
parser = argparse.ArgumentParser(description="Shows the on-chain data of a Mango Markets Group.")
|
|
mango.ContextBuilder.add_command_line_parameters(parser)
|
|
args: argparse.Namespace = mango.parse_args(parser)
|
|
|
|
try:
|
|
context = mango.ContextBuilder.from_command_line_parameters(args)
|
|
|
|
group = mango.Group.load(context)
|
|
print(group)
|
|
except Exception as exception:
|
|
logging.critical(f"show-group stopped because of exception: {exception} - {traceback.format_exc()}")
|
|
except:
|
|
logging.critical(f"show-group stopped because of uncatchable error: {traceback.format_exc()}")
|