From 5cf828932370cceb9c32d0ffade70589e70a645f Mon Sep 17 00:00:00 2001 From: Tim Olson <> Date: Fri, 8 Dec 2023 03:10:15 -0400 Subject: [PATCH] abi loading bugfix --- src/dexorder/contract/__init__.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/dexorder/contract/__init__.py b/src/dexorder/contract/__init__.py index d7f9935..fb3ef83 100644 --- a/src/dexorder/contract/__init__.py +++ b/src/dexorder/contract/__init__.py @@ -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):