Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains new BigQuery UDFs to decode EVM calls and events without knowing an ABI using 2 key functions:
abi_functions.PARSE_CALL(input)
abi_functions.PARSE_EVENT(data, topics)
To support ABI-less decoding, each of the above function uses a large ~1MB library containing 2 compressed maps, one covering known call methods and known event topics. Using the call 4byte methodID or the event's topic[0], the most likely ABI is synthesized from the map and decoding is attempted. For events, given the number of topics observed and the ABI guess, any mismatch results in combinatorial search on all possible indexed combinations, with the first success considered valid.
How It Works:
PARSE_CALL
andPARSE_EVENT
is to build a 1MB library of 2 compressed maps:call_map
andevent_map
signatures
table is compiled by aggregating ABI signatures with 2.8MM+ records from multiple open-source repos. However most of these hex signatures have never bee observed on chain.numObservations
fromlogs
andtransactions
) and presence in ABI contracts (numContracts
fromcontracts
) incrypto_ethereum.{
EVM Chains to build a reduced dataset