Skip to content

Commit b1b5057

Browse files
author
Stuart Reed
committed
Newsfragments for #3408
1 parent 832907d commit b1b5057

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

newsfragments/3408.breaking.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Upgrades to use latest ``ABI`` utilities and typings from ``eth-utils`` and ``eth-typing``.
2+
* New ``ABI`` functions from ``eth-utils`` are now included in the ``web3.utils.abi`` module.
3+
* Typings for ``ABI`` components are now available in the ``eth-typing`` package. ``ABI`` types previously in ``web3.types`` have been removed.
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.

newsfragments/3408.docs.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use autodoc and update ABI functions with docstrings and doctests.

newsfragments/3408.feature.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
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+
* ``get_constructor_function_abi`` returns the constructor function as an ``ABIConstructor`` type.
5+
* ``get_receive_function_abi`` returns the receive function as an ``ABIReceive`` type.
6+
* ``get_fallback_function_abi`` returns the fallback function as an ``ABIFallback`` type.
7+
* ``check_if_arguments_can_be_encoded`` returns true if the arguments can be encoded with the given ABI.
8+
* ``get_event_abi`` returns the ``ABI`` of an event given the name.
9+
* ``get_event_log_topics`` returns the log topics of an event given the name.
10+
* ``log_topics_to_bytes`` returns the log topics as bytes.

newsfragments/3408.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Move ``get_abi_input_names`` and ``get_abi_output_names`` to ``eth-utils`` and re-export in ``web3.utils.abi``.

0 commit comments

Comments
 (0)