ape icon indicating copy to clipboard operation
ape copied to clipboard

Method ID caching and common-lookups

Open antazoey opened this issue 1 year ago • 2 comments

Overview

Ape is pretty cool in that it caches and auto-fetches contract types which help identify transaction methods-called. However, it could be better.

Cache method IDs individually.

Benefits:

  1. Works even when ape-etherscan is not installed
  2. Faster - don't need to always look up a contract to know the name of the method (if the name of the method is all you need)

there are probably more benefits too

Specification

  • ship with common method IDs out the gate
  • add new ones to the cache
  • utilize the lookups anywhere, such as in tracing when we couldnt get a contract type/name but we still have the method id bytes

Dependencies

Include links to any open issues that must be resolved before this feature can be implemented.

antazoey avatar Feb 02 '24 18:02 antazoey

This is the service I was thinking of: https://www.4byte.directory/

fubuloubu avatar Feb 02 '24 18:02 fubuloubu