Skip to content

Commit

Permalink
chore[docs]: implements does not check event declarations (vyperlan…
Browse files Browse the repository at this point in the history
…g#4052)

as of v0.4.0, `implements` does not check that events are (re-)defined
in the implementing contract

---------

Co-authored-by: Charles Cooper <[email protected]>
  • Loading branch information
pcaversaccio and charles-cooper authored May 25, 2024
1 parent b9244e8 commit abf795a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ This imports the defined interface from the vyper file at ``an_interface.vy`` (o

Interfaces that implement functions with return values that require an upper bound (e.g. ``Bytes``, ``DynArray``, or ``String``), the upper bound defined in the interface represents the lower bound of the implementation. Assuming a function ``my_func`` returns a value ``String[1]`` in the interface, this would mean for the implementation function of ``my_func`` that the return value must have **at least** length 1. This behavior might change in the future.

.. note::

Prior to v0.4.0, ``implements`` required that events defined in an interface were re-defined in the "implementing" contract. As of v0.4.0, this is no longer required because events can be used just by importing them. Any events used in a contract will automatically be exported in the ABI output.


Extracting Interfaces
=====================

Expand Down

0 comments on commit abf795a

Please sign in to comment.