abi loading bugfix

This commit is contained in:
Tim Olson
2023-12-08 03:10:15 -04:00
parent 5e11c9b138
commit 5cf8289323

View File

@@ -6,14 +6,10 @@ from .contract_proxy import ContractProxy
def get_contract_data(name):
try:
# try the interface file first
with open(f'../contract/out/I{name}.sol/I{name}.json', 'rt') as file:
return json.load(file)
except FileNotFoundError:
# if no interface exists, use the plain name
with open(f'../contract/out/{name}.sol/{name}.json', 'rt') as file:
return json.load(file)
# if name == 'Vault':
# name = 'IVault'
with open(f'../contract/out/{name}.sol/{name}.json', 'rt') as file:
return json.load(file)
def get_contract_event(contract_name:str, event_name:str):