Skip to content

Commit

Permalink
fix: idk
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jan 27, 2025
1 parent 9e062ff commit 3682b85
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/ape_ethereum/ecosystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,12 +1150,13 @@ def _enrich_calltree(self, call: dict, **kwargs) -> dict:
except KeyError:
name = call["method_id"]
else:
assert isinstance(method_abi, MethodABI) # For mypy

# Check if method name duplicated. If that is the case, use selector.
times = len([x for x in contract_type.methods if x.name == method_abi.name])
name = (method_abi.name if times == 1 else method_abi.selector) or call["method_id"]
call = self._enrich_calldata(call, method_abi, **kwargs)
if isinstance(method_abi, MethodABI):
# Check if method name duplicated. If that is the case, use selector.
times = len([x for x in contract_type.methods if x.name == method_abi.name])
name = (method_abi.name if times == 1 else method_abi.selector) or call["method_id"]
call = self._enrich_calldata(call, method_abi, **kwargs)
else:
name = call.get("method_id") or "0x"
else:
name = call.get("method_id") or "0x"

Expand Down

0 comments on commit 3682b85

Please sign in to comment.