web3data.handlers.contract¶
This module contains the address subhandler.
-
class
web3data.handlers.contract.
ContractHandler
(initial_headers: Dict[str, str], chain: web3data.chains.Chains)[source]¶ Bases:
web3data.handlers.base.BaseHandler
The subhandler for contract-related queries.
-
audit
(address: str, **kwargs) → Dict[source]¶ Retrieves the vulnerabilities audit for the specified contract (if available).
The automated security checks are provided by MythX. Check out their stellar service over at https://mythx.io/.
- Parameters
address – The address to fetch information for
kwargs – Additional query parameter options
- Returns
The API response parsed into a dict
-
details
(address: str, **kwargs) → Dict[source]¶ Retrieves all the detailed information for the specified contract (ABI, bytecode, sourcecode…).
- Parameters
address – The address to fetch information for
kwargs – Additional query parameter options
- Returns
The API response parsed into a dict
-
functions
(address: str, **kwargs) → Dict[source]¶ Retrieves the functions of the specified contract (if available).
If not available on chain, the byte code is decompiled and a list of functions is extracted from it.
- Parameters
address – The address to fetch information for
kwargs – Additional query parameter options
- Returns
The API response parsed into a dict
-