-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_me.py
33 lines (24 loc) · 1.14 KB
/
run_me.py
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
import subprocess
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--rpc-url", type=str, help="RPC URL to use", default="https://fullnode.mainnet.sui.io:443")
parser.add_argument("--input-filename", type=str, help="Input filename", default="input_addresses.csv")
parser.add_argument("--end-epoch", type=int, help="End epoch", default=365)
parser.add_argument("--output-filename", default="output.csv")
args = parser.parse_args()
script1 = 'v3.py'
args1 = ['--input-filename', args.input_filename, '--rpc-url', args.rpc_url]
command1 = ['python3', script1] + args1
script2 = 'sui_tracker_v2.py'
args2 = ['--end-epoch', str(args.end_epoch), '--input-filename', args.input_filename, '--rpc-url', args.rpc_url]
command2 = ['python3', script2] + args2
# Run the first script
print(f"Running {script1}...")
subprocess.run(command1, check=True)
# After the first script finishes, run the second script
print(f"Running {script2}...")
subprocess.run(command2, check=True)
print("Both scripts have finished executing.")
if __name__ == "__main__":
main()