Module selectors

Module selectors 

Source
Expand description

Support for handling/identifying selectors.

Structsยง

Artifact ๐Ÿ”’
OpenChainClient
A client that can request API data from OpenChain.
ParsedSignatures
PossibleSigs
RawSelectorImportData
SelectorImportEffect ๐Ÿ”’
SelectorImportRequest ๐Ÿ”’
SelectorImportResponse
SelectorImportResult ๐Ÿ”’
Signature ๐Ÿ”’
SignatureResponse ๐Ÿ”’
SELECTOR_LOOKUP_URL response.
SignatureResult ๐Ÿ”’

Enumsยง

SelectorImportData
SelectorKind
The kind of selector to fetch from OpenChain.
SelectorOrSig

Constantsยง

BASE_URL ๐Ÿ”’
MAX_TIMEDOUT_REQ ๐Ÿ”’
How many request can time out before we decide this is a spurious connection.
REQ_TIMEOUT ๐Ÿ”’
The standard request timeout for API requests.
SELECTOR_IMPORT_URL ๐Ÿ”’
SELECTOR_LOOKUP_URL ๐Ÿ”’

Functionsยง

decode_calldata
Fetches all possible signatures and attempts to abi decode the calldata using OpenChain.
decode_event_topic
Fetches an event signature given the 32 byte topic using OpenChain.
decode_function_selector
Fetches a function signature given the selector using OpenChain.
decode_selector
Decodes the given function or event selector using OpenChain.
decode_selectors
Decodes the given function or event selectors using OpenChain.
import_selectors
uploads selectors to OpenChain using the given data
parse_signatures
Parses a list of tokens into function, event, and error signatures. Also handles JSON artifact files Ignores invalid tokens
pretty_calldata
Pretty print calldata and if available, fetch possible function signatures.

Type Aliasesยง

OpenChainSignatures
List of signatures for a given SelectorKind.