The utils module houses public utility functions and classes.



Return the input names for an ABI function or event.


Return the output names an ABI function or event.


class utils.SimpleCache

The main cache class being used internally by web3.py. In some cases, it may prove useful to set your own cache size and pass in your own instance of this class where supported.

Exception Handling

utils.handle_offchain_lookup(offchain_lookup_payload, transaction)

Handle OffchainLookup reverts on contract function calls manually. For an example, see CCIP Read support for offchain lookup within the examples section.

utils.async_handle_offchain_lookup(offchain_lookup_payload, transaction)

The async version of the handle_offchain_lookup() utility method described above.