-
Notifications
You must be signed in to change notification settings - Fork 1
/
bot-builder.py
48 lines (38 loc) · 1.24 KB
/
bot-builder.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import sys
import os
def main(command):
if command == "test":
# do testing
#go test .\contract_modules\uniswap_v2
print("testing")
os.system('go test ./contract_modules/uniswap_v2/.')
os.system('go build ./cmd/bot/.')
print("running")
os.system('bot')
#foundry test --args="--arg1=value1 --arg2=value2"
#create fork with foundry
#generate calldata with go
#deploy contract with foundry on fork
#
elif command == "buildDebugRun":
print("building")
os.system('go build -gcflags "all=-N -l" ./cmd/bot/.')
print("running")
os.system('dlv debug bot')
elif command == "buildDebugRunDataCollector":
print("building")
os.system('go build -gcflags "all=-N -l" ./cmd/data_collector/.')
print("running")
os.system('dlv debug data_collector')
elif command == "build":
print("building")
os.system('go build ./cmd/bot/.')
elif command == "buildRun":
print("building")
os.system('go build ./cmd/bot/.')
print("running")
os.system('bot')
if len(sys.argv) == 1:
print("test / build")
exit(1)
main(sys.argv[1])