vault abi from IVault

This commit is contained in:
Tim Olson
2023-12-05 23:16:40 -04:00
parent 245323ddb6
commit 7d2653746a

View File

@@ -6,6 +6,12 @@ from .contract_proxy import ContractProxy
def get_contract_data(name): 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: with open(f'../contract/out/{name}.sol/{name}.json', 'rt') as file:
return json.load(file) return json.load(file)