File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def load_all_contracts(self) -> List[dict]:
3636 raise FileNotFoundError (
3737 "File with contracts ABIs registry_contracts.json not found" )
3838
39- def load_contract_by_name (self , contract_name : str ) -> dict :
39+ def load_contract_by_name (self , contract_name : str , contract_address : str = None ) -> dict :
4040 """
4141 Get contract address from Registry contract by name
4242
@@ -47,7 +47,7 @@ def load_contract_by_name(self, contract_name: str) -> dict:
4747 """
4848 try :
4949 account_contract_address = self .registry .functions .getAddressForString (
50- contract_name ).call ()
50+ contract_name ).call () if contract_address == None else contract_address
5151 with open ('sdk/registry_contracts.json' ) as json_file :
5252 contracts_data = json .load (json_file )
5353 return {"address" : account_contract_address , "abi" : contracts_data [contract_name ]["ABI" ]}
You can’t perform that action at this time.
0 commit comments