abi loading bugfix
This commit is contained in:
@@ -6,14 +6,10 @@ from .contract_proxy import ContractProxy
|
|||||||
|
|
||||||
|
|
||||||
def get_contract_data(name):
|
def get_contract_data(name):
|
||||||
try:
|
# if name == 'Vault':
|
||||||
# try the interface file first
|
# name = 'IVault'
|
||||||
with open(f'../contract/out/I{name}.sol/I{name}.json', 'rt') as file:
|
with open(f'../contract/out/{name}.sol/{name}.json', 'rt') as file:
|
||||||
return json.load(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)
|
|
||||||
|
|
||||||
|
|
||||||
def get_contract_event(contract_name:str, event_name:str):
|
def get_contract_event(contract_name:str, event_name:str):
|
||||||
|
|||||||
Reference in New Issue
Block a user