You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Parse and validate contract data using new ``ABI`` utilities.
* Filter elements in a contract's ``ABI``.
* Extract function and event ``ABI`` attributes from a contract.
* Validate arguments passed to a function match the types in the ``ABI``
* Refactor logic and variable naming
- Replace arguments named ``fn_name`` with ``abi_element_name``
- Rename `FunctionIdentifier` to `ABIElementIdentifier`
- Remove redundant logic and `Optional` types
- Integrate new ABI types in ``eth-typing``.
* Newsfragments for #3408
Upgrades to use latest ``ABI`` utilities and typings from ``eth-utils`` and ``eth-typing``.
2
+
* Typings for ``ABI`` components are now available in the ``eth-typing`` package. ``ABI`` types previously in ``web3.types`` have been removed.
3
+
* New versions of existing ABI functions were added to ``eth-utils`` and are now exposed in `web3.py` via ``web3.utils.abi``.
4
+
* ABI exceptions have been renamed in ``web3.exceptions``. The ``ABIEventFunctionNotFound`` and ``FallbackNotFound`` exceptions have been removed. Use ``ABIEventNotFound`` and ``ABIFallbackNotFound`` instead.
5
+
* ``MismatchedABI`` exceptions are raised instead of a ``Web3ValidationError`` for ABI related errors.
6
+
* ``encode_abi`` arguments have been updated to use ``abi_element_name`` instead of ``fn_name``.
Utilities to extract function and event ``ABI`` attributes from a contract. Utilities in the ``web3.utils.abi`` module parse ABI elements and check encodability of provided arguments. ABI functions in ``eth-utils`` are exposed by the ``web3.utils.abi`` module.
2
+
* ``get_abi_element_info`` returns an ``ABIElementInfo`` TypedDict with the ``abi``, ``selector``, and ``arguments``.
3
+
* ``get_abi_element`` returns the ``ABI`` of a function, event, or error given the name and arguments.
4
+
* ``check_if_arguments_can_be_encoded`` returns true if the arguments can be encoded with the given ABI.
5
+
* ``get_event_abi`` returns the ``ABI`` of an event given the name.
6
+
* ``get_event_log_topics`` returns the log topics of an event given the name.
7
+
* ``log_topics_to_bytes`` returns the log topics as bytes.
0 commit comments