Proxy functionality: substitute IVault

This commit is contained in:
7400
2023-12-06 07:47:22 -08:00
parent 534b5c667b
commit 9a68310d2e

View File

@@ -1,4 +1,4 @@
import json
import json, os, logging
from .. import current_w3 as _current_w3
from .abi import abis
@@ -6,6 +6,9 @@ from .contract_proxy import ContractProxy
def get_contract_data(name):
if name == "Vault" and os.path.exists(f'../contract/out/I{name}.sol/I{name}.json') :
logging.warning("getting abi from IVault.json instead of Vault.json")
name = "IVault" # Special case for proxy Vault
with open(f'../contract/out/{name}.sol/{name}.json', 'rt') as file:
return json.load(file)