
# import copy
# import datetime
import shutil
# import numpy as np
# import sys
from base_class import BaseVariableFunction
from base_class import *
# import math
# import json
# import os
# import time
# import pandas as pd
old_print = print


def timestamped_print(*args, **kwargs):
    old_print(datetime.datetime.utcnow().replace(
        microsecond=0), *args, **kwargs)


print = timestamped_print

baseclass = BaseVariableFunction(__file__)
base_library = baseclass.open_base_library()

# 获取一个contract 的createtxhash by bscscan api
print('\n'*5)
print(f"{'{:<6}'.format('ENTER')} {baseclass.scriptfilename} ----------------NOTE-----------NOTE---------------")


def main():
    mintLpAddress_json_file = baseclass.librarydata_path/"mintLpAddress.json"
    mintLpAddress_csv_file = baseclass.librarydata_path/"mintLpAddress.csv"

    df = pd.read_json(mintLpAddress_json_file,
                      orient='index').reset_index(names='LPAddress')

    df.to_csv(mintLpAddress_csv_file, index=False)


main()

print(f"{'{:<6}'.format('END')} {baseclass.scriptfilename} ----------------NOTE-----------NOTE---------------")
