Skip to content

Commit

Permalink
fix: key error (#285)
Browse files Browse the repository at this point in the history
* fix: key error

* chore: `black .`

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
BobTheBuidler and github-actions[bot] authored Nov 17, 2024
1 parent d56baa8 commit 7de8fc4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dank_mids/brownie_patch/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ def __get_method_object__(self, name: str) -> DankContractMethod:
from dank_mids import web3

overloaded = self.__method_names__.count(name) > 1

for abi in self.abi:
if abi["function"] != "function" or abi["name"] != name:
if abi["type"] != "function" or abi["name"] != name:
continue

full_name = f"{self._name}.{name}"
sig = build_function_signature(abi)

natspec: Dict[str, Any] = {}
if self._build.get("natspec"):
natspec = self._build["natspec"]["methods"].get(sig, {})
Expand All @@ -224,9 +224,9 @@ def __get_method_object__(self, name: str) -> DankContractMethod:
# special logic to handle function overloading
elif overloaded is True:
overloaded = DankOverloadedMethod(self.address, full_name, self._owner)

overloaded._add_fn(abi, natspec)

return overloaded # type: ignore [return-value]


Expand Down

0 comments on commit 7de8fc4

Please sign in to comment.