# Buggy code
def __init__(
    self,
    address: str,
    owner: Optional[AccountsType] = None,
    tx: TransactionReceiptType = None,
) -> None:
    address = _resolve_address(address)
    self.bytecode = web3.eth.getCode(address).hex()[2:]
    if not self.bytecode:
        raise ContractNotFound(f"No contract deployed at {address}")
    self._owner = owner
    self.tx = tx
    self.address = address
    _add_deployment_topics(address, self.abi)

    fn_names = [i["name"] for i in self.abi if i["type"] == "function"]
    for abi in [i for i in self.abi if i["type"] == "function"]:
        name = f"{self._name}.{abi['name']}"
        sig = build_function_signature(abi)
        natspec: Dict = {}
        if self._build.get("natspec"):
            natspec = self._build["natspec"]["methods"].get(sig, {})

        if fn_names.count(abi["name"]) == 1:
            fn = _get_method_object(address, abi, name, owner, natspec)
            self._check_and_set(abi["name"], fn)
            continue

        # special logic to handle function overloading
        if not hasattr(self, abi["name"]):
            overloaded = OverloadedMethod(address, name, owner)
            self._check_and_set(abi["name"], overloaded)
        getattr(self, abi["name"])._add_fn(abi, natspec)


# Traceback (brownie.exceptions.ContractNotFound)
Running 'scripts.dev-deploy.main'...
Transaction sent: 0x36f1599c9b5b5ab9f243f5d0c64e8f2637a355818bc4cf5e1a67168e9e22713e
Gas price: 0.0 gwei   Gas limit: 6721975
ArgobytesOwnedVaultDeployer.constructor confirmed - Block: 1   Gas used: 3545980 (52.75%)
ArgobytesOwnedVaultDeployer deployed at: 0x04246fAA61004668E1C0a388A3bF60E67827A17E

Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/ski/code/argobytes-contracts-brownie/venv/lib/python3.8/site-packages/brownie/network/contract.py", line 190, in _add_from_tx
self.at(tx.contract_address, tx.sender, tx)
File "/home/ski/code/argobytes-contracts-brownie/venv/lib/python3.8/site-packages/brownie/network/contract.py", line 174, in at
contract = ProjectContract(self._project, build, address, owner, tx)
File "/home/ski/code/argobytes-contracts-brownie/venv/lib/python3.8/site-packages/brownie/network/contract.py", line 728, in __init__
_DeployedContractBase.__init__(self, address, owner, tx)
File "/home/ski/code/argobytes-contracts-brownie/venv/lib/python3.8/site-packages/brownie/network/contract.py", line 309, in __init__
raise ContractNotFound(f"No contract deployed at {address}")
brownie.exceptions.ContractNotFound: No contract deployed at 0x04246fAA61004668E1C0a388A3bF60E67827A17E

# Fixed code
def __init__(
    self,
    address: str,
    owner: Optional[AccountsType] = None,
    tx: TransactionReceiptType = None,
) -> None:
    address = _resolve_address(address)
    self.bytecode = web3.eth.getCode(address).hex()[2:]
    if not self.bytecode:
        raise ContractNotFound(f"No contract deployed at {address}")
    self._owner = owner
    self.tx = tx
    self.address = address
    _add_deployment_topics(address, self.abi)

    fn_names = [i["name"] for i in self.abi if i["type"] == "function"]
    for abi in [i for i in self.abi if i["type"] == "function"]:
        name = f"{self._name}.{abi['name']}"
        sig = build_function_signature(abi)
        natspec: Dict = {}
        if self._build.get("natspec"):
            natspec = self._build["natspec"]["methods"].get(sig, {})

        if fn_names.count(abi["name"]) == 1:
            fn = _get_method_object(address, abi, name, owner, natspec)
            self._check_and_set(abi["name"], fn)
            continue

        # special logic to handle function overloading
        if not hasattr(self, abi["name"]):
            overloaded = OverloadedMethod(address, name, owner)
            self._check_and_set(abi["name"], overloaded)
        getattr(self, abi["name"])._add_fn(abi, natspec)

    self._initialized = True