


# https://dexscreener.com/?rankBy=volume&order=desc&chainIds=solana&maxAge=24&min24HTxns=500&min24HSells=200&min24HChg=100

# 将油猴脚本获取的top trader
from base_class import BaseVariableFunction
from base_class import *
baseclass = BaseVariableFunction(__file__)

old_print = print


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


print = timestamped_print
 
print('\n'*5)
print(f"{'{:<6}'.format('ENTER')} {baseclass.scriptfilename} ----------------NOTE-----------NOTE---------------")

def makescreenurl( urlname,urlparam):
    _url = urlname + urlparam
    return '=HYPERLINK("{}","{}")'.format(_url, _url)




df = pd.read_excel( baseclass.dalao_merge_path/"res_dalao.xlsx",dtype=object)
 

# df["url"] = df.apply(lambda ser: makescreenurl(
#     "https://solscan.io/account/" , f"{ser['Maker'] }#defiactivities" ), axis=1)
 
df["url"] = df.apply(lambda ser: makescreenurl(
    "https://solscan.io/account/" , f"{ser['Maker'] }?flow=in&exclude_token=So11111111111111111111111111111111111111111#transfers" ), axis=1)
 

 

 
df.to_excel(baseclass.dalao_merge_path /f"res_dalao.xlsx",index=False)


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