Skip to content

Conversation

@BobTheBuidler
Copy link
Owner

Summary

  • replace tuple-based startswith checks with explicit literal calls so mypyc can hit literal fastpaths

Testing

  • pytest (fails: Python 3.14 cannot install evmspec due to Requires-Python<3.14; also dank_mids/logging.py references logging._acquireLock which is missing in 3.14)
  • PATH=/home/takopi/.npm-global/bin:$PATH PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest -p asyncio-cooperative -p pytest-brownie (fails during collection: dank_mids/logging.py uses logging._acquireLock on 3.14; evmspec not installable on 3.14; brownie/compiled module import errors)

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

else:
raise NotImplementedError(f"type {type(data)} not supported.", data)

P1 Badge Handle successful multicall responses without raising

When Multicall.post() returns a successful RawResponse (i.e., response.exception is falsy), spoof_response currently falls into the else branch and raises using an undefined data symbol. Because post() already raises on response.exception, this means every successful multicall now hits this branch and fails with a NameError/NotImplementedError instead of decoding results. This breaks normal multicall execution for all successful responses.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@BobTheBuidler BobTheBuidler changed the title Avoid tuple allocation in startswith checks perf: avoid tuple allocation in startswith checks Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants