Skip to content

Commit 50e6221

Browse files
committed
Change path in registry and base_wrapper to create SC objects
1 parent 02a9126 commit 50e6221

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

celo_sdk/contracts/base_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def create_contract(self, contract_name: str, contract_address: str, abi: list):
8383
if contract_obj:
8484
raise Exception("Such a contract already created")
8585
contract_module = import_module(
86-
f"sdk.contracts.{contract_name}Wrapper")
86+
f"celo_sdk.contracts.{contract_name}Wrapper")
8787
contract_obj = getattr(contract_module, contract_name)
8888
contract = contract_obj(
8989
self.web3, self.registry, contract_address, abi, self.wallet)

celo_sdk/registry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def load_all_contracts(self) -> List[dict]:
1919
Return addresses and ABIs of all the known contracts
2020
"""
2121
try:
22-
with open('sdk/registry_contracts.json') as json_file:
22+
with open('celo_sdk/registry_contracts.json') as json_file:
2323
contracts_data = json.load(json_file)
2424
result = []
2525
for k, v in contracts_data.items():
@@ -48,7 +48,7 @@ def load_contract_by_name(self, contract_name: str, contract_address: str = None
4848
try:
4949
account_contract_address = self.registry.functions.getAddressForString(
5050
contract_name).call() if contract_address == None else contract_address
51-
with open('sdk/registry_contracts.json') as json_file:
51+
with open('celo_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"]}
5454
except KeyError:
@@ -63,7 +63,7 @@ def set_registry(self):
6363
Set Registry contract object
6464
"""
6565
try:
66-
with open('sdk/registry_contracts.json') as json_file:
66+
with open('celo_sdk/registry_contracts.json') as json_file:
6767
contracts_data = json.load(json_file)
6868
registry = self.web3.eth.contract(
6969
contracts_data["Registry"]["Address"], abi=contracts_data["Registry"]["ABI"])

0 commit comments

Comments
 (0)