ABIs

Examples

Note

These examples are crafted as a Jupyter notebook. You can download the original notebook file here.

Also note that inside Jupyter notebooks, await can be used freely outside of asyncio.run().

abis

Reference

async ctc.evm.async_decompile_function_abis(bytecode, sort=None)

decompile solidity-style function ABI’s from contract bytecode

Return type

Sequence[Mapping[str, Any]]

async ctc.evm.async_get_contract_abi(contract_address, *, network=None, provider=None, use_db=True, db_query=None, db_intake=None, block=None, proxy_implementation=None, verbose=True)

retrieve abi of contract either from local database or block explorer

for addresses that change ABI’s over time, use db_query=False to skip cache

async ctc.evm.async_get_event_abi(*, contract_abi=None, contract_address=None, event_name=None, event_hash=None, event_abi=None, network=None)

get event ABI from local database or block explorer

async ctc.evm.async_get_function_abi(*, function_name=None, contract_abi=None, contract_address=None, n_parameters=None, parameter_types=None, function_selector=None, network=None)

get function ABI from local database or block explorer

ctc.binary.get_event_hash ctc.binary.get_event_indexed_names ctc.binary.get_event_indexed_types ctc.binary.get_event_signature ctc.binary.get_event_unindexed_names ctc.binary.get_event_unindexed_types ctc.binary.get_function_output_names ctc.binary.get_function_output_types ctc.binary.get_function_parameter_names ctc.binary.get_function_parameter_types ctc.binary.get_function_selector ctc.binary.get_function_signature