|
@@ -79,14 +79,12 @@ async def main():
|
|
|
arr_url_dalao = arr_dalao_sol_transfer_url , url_type = "sol_transfer")
|
|
|
await asyncio.sleep(3)
|
|
|
|
|
|
- if len(arr_dalao_token_inflow_transfer_url)>0:
|
|
|
+ if len(arr_dalao_token_transfer_url)>0:
|
|
|
await get_onedriver_swapactivities(
|
|
|
- arr_url_dalao = arr_dalao_token_inflow_transfer_url , url_type = "token_inflow")
|
|
|
- await asyncio.sleep(3)
|
|
|
- if len(arr_dalao_token_outflow_transfer_url)>0:
|
|
|
- await get_onedriver_swapactivities(
|
|
|
- arr_url_dalao = arr_dalao_token_outflow_transfer_url , url_type = "token_outflow")
|
|
|
+ arr_url_dalao = arr_dalao_token_transfer_url , url_type = "token_transfer")
|
|
|
await asyncio.sleep(3)
|
|
|
+
|
|
|
+
|
|
|
if len(arr_dalao_usdc_transfer_url)>0:
|
|
|
await get_onedriver_swapactivities(
|
|
|
arr_url_dalao = arr_dalao_usdc_transfer_url , url_type = "usdc_transfer")
|
|
@@ -95,11 +93,11 @@ async def main():
|
|
|
df = pd.read_excel(baseclass.dalao_tran_gmgnOrdex_path /
|
|
|
"input_dalao.xlsx", dtype=object)
|
|
|
|
|
|
-arr_str_dalaoaddress = df['dalaoaddress'].tolist()
|
|
|
|
|
|
+arr_str_dalaoaddress = df['dalaoaddress'].tolist()
|
|
|
arr_dalao_sol_transfer_url =[]
|
|
|
-arr_dalao_token_inflow_transfer_url =[]
|
|
|
-arr_dalao_token_outflow_transfer_url =[]
|
|
|
+arr_dalao_token_transfer_url =[]
|
|
|
+
|
|
|
arr_dalao_usdc_transfer_url =[]
|
|
|
obj_url_2_dalao={
|
|
|
|
|
@@ -107,22 +105,24 @@ obj_url_2_dalao={
|
|
|
def init():
|
|
|
now_time = time.time()
|
|
|
global obj_url_2_dalao
|
|
|
- global arr_dalao_sol_transfer_url ,arr_dalao_token_inflow_transfer_url ,arr_dalao_token_outflow_transfer_url , arr_dalao_usdc_transfer_url
|
|
|
- for str_dalaoaddress in arr_str_dalaoaddress:
|
|
|
- # file = baseclass.dalao_solscan_info_path / f"ori_txhash_{str_dalaoaddress}.csv"
|
|
|
+ global arr_dalao_sol_transfer_url ,arr_dalao_token_transfer_url , arr_dalao_usdc_transfer_url
|
|
|
+ for str_dalaoaddress in arr_str_dalaoaddress:
|
|
|
+
|
|
|
sol_transfer_file = baseclass.dalao_solscan_info_path / f"sol_transfer_{str_dalaoaddress}.csv"
|
|
|
- token_inflow_transfer_file = baseclass.dalao_solscan_info_path / f"token_inflow_{str_dalaoaddress}.csv"
|
|
|
- token_outflow_transfer_file = baseclass.dalao_solscan_info_path / f"token_outflow_{str_dalaoaddress}.csv"
|
|
|
+ token_transfer_file = baseclass.dalao_solscan_info_path / f"token_transfer_{str_dalaoaddress}.csv"
|
|
|
usdc_transfer_file = baseclass.dalao_solscan_info_path / f"usdc_transfer_{str_dalaoaddress}.csv"
|
|
|
|
|
|
|
|
|
url_sol_transfer = f"https://api-v2.solscan.io/v2/account/transfer/export?address={str_dalaoaddress}&activity_type[]=ACTIVITY_SPL_TRANSFER&activity_type[]=ACTIVITY_SPL_MINT&amount[]=0.3&amount[]=undefined&token=So11111111111111111111111111111111111111111&exclude_amount_zero=true&remove_spam=true"
|
|
|
- url_token_inflow_transfer = f"https://api-v2.solscan.io/v2/account/transfer/export?address={str_dalaoaddress}&activity_type[]=ACTIVITY_SPL_TRANSFER&activity_type[]=ACTIVITY_SPL_MINT&exclude_token=So11111111111111111111111111111111111111111&exclude_amount_zero=true&remove_spam=true&flow=in"
|
|
|
- url_token_outflow_transfer = f"https://api-v2.solscan.io/v2/account/transfer/export?address={str_dalaoaddress}&activity_type[]=ACTIVITY_SPL_TRANSFER&activity_type[]=ACTIVITY_SPL_MINT&exclude_token=So11111111111111111111111111111111111111111&exclude_amount_zero=true&remove_spam=true&flow=out"
|
|
|
+ # url_token_inflow_transfer = f"https://api-v2.solscan.io/v2/account/transfer/export?address={str_dalaoaddress}&activity_type[]=ACTIVITY_SPL_TRANSFER&activity_type[]=ACTIVITY_SPL_MINT&exclude_token=So11111111111111111111111111111111111111111&exclude_amount_zero=true&remove_spam=true&flow=in"
|
|
|
+ # url_token_outflow_transfer = f"https://api-v2.solscan.io/v2/account/transfer/export?address={str_dalaoaddress}&activity_type[]=ACTIVITY_SPL_TRANSFER&activity_type[]=ACTIVITY_SPL_MINT&exclude_token=So11111111111111111111111111111111111111111&exclude_amount_zero=true&remove_spam=true&flow=out"
|
|
|
+ url_token_transfer = f"https://api-v2.solscan.io/v2/account/transfer/export?address={str_dalaoaddress}&activity_type[]=ACTIVITY_SPL_TRANSFER&activity_type[]=ACTIVITY_SPL_MINT&exclude_token=So11111111111111111111111111111111111111111&exclude_amount_zero=true&remove_spam=true"
|
|
|
+
|
|
|
+
|
|
|
url_usdc_transfer = f"https://api-v2.solscan.io/v2/account/transfer/export?address={str_dalaoaddress}&activity_type[]=ACTIVITY_SPL_TRANSFER&activity_type[]=ACTIVITY_SPL_MINT&amount[]=100&amount[]=undefined&token=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&exclude_amount_zero=true&remove_spam=true"
|
|
|
obj_url_2_dalao[url_sol_transfer] =str_dalaoaddress
|
|
|
- obj_url_2_dalao[url_token_inflow_transfer] =str_dalaoaddress
|
|
|
- obj_url_2_dalao[url_token_outflow_transfer] =str_dalaoaddress
|
|
|
+
|
|
|
+ obj_url_2_dalao[url_token_transfer] =str_dalaoaddress
|
|
|
obj_url_2_dalao[url_usdc_transfer] =str_dalaoaddress
|
|
|
|
|
|
|
|
@@ -136,26 +136,17 @@ def init():
|
|
|
else:
|
|
|
arr_dalao_sol_transfer_url.append(url_sol_transfer)
|
|
|
|
|
|
- if token_inflow_transfer_file.exists():
|
|
|
- modified_time = token_inflow_transfer_file.stat().st_mtime
|
|
|
+ if token_transfer_file.exists():
|
|
|
+ modified_time = token_transfer_file.stat().st_mtime
|
|
|
# 3 * 60 分钟内不会在获取
|
|
|
if(now_time -modified_time >3*60*60):
|
|
|
- arr_dalao_token_inflow_transfer_url.append(url_token_inflow_transfer)
|
|
|
+ arr_dalao_token_transfer_url.append(url_token_transfer)
|
|
|
else:
|
|
|
pass
|
|
|
else:
|
|
|
- arr_dalao_token_inflow_transfer_url.append(url_token_inflow_transfer)
|
|
|
-
|
|
|
- if token_outflow_transfer_file.exists():
|
|
|
- modified_time = token_outflow_transfer_file.stat().st_mtime
|
|
|
- # 3 * 60 分钟内不会在获取
|
|
|
- if(now_time -modified_time >3*60*60):
|
|
|
- arr_dalao_token_outflow_transfer_url.append(url_token_outflow_transfer)
|
|
|
- else:
|
|
|
- pass
|
|
|
- else:
|
|
|
- arr_dalao_token_outflow_transfer_url.append(url_token_outflow_transfer)
|
|
|
+ arr_dalao_token_transfer_url.append(url_token_transfer)
|
|
|
|
|
|
+
|
|
|
if usdc_transfer_file.exists():
|
|
|
modified_time = usdc_transfer_file.stat().st_mtime
|
|
|
# 3 * 60 分钟内不会在获取
|
|
@@ -170,7 +161,7 @@ def init():
|
|
|
|
|
|
|
|
|
init()
|
|
|
-if len(arr_dalao_sol_transfer_url) ==0 and len(arr_dalao_token_inflow_transfer_url) ==0 and len(arr_dalao_token_outflow_transfer_url) ==0 and len(arr_dalao_usdc_transfer_url)==0:
|
|
|
+if len(arr_dalao_sol_transfer_url) ==0 and len(arr_dalao_token_transfer_url) ==0 and len(arr_dalao_usdc_transfer_url)==0:
|
|
|
print("dont has dalao need get")
|
|
|
exit()
|
|
|
|