Skip to content

Commit

Permalink
Merge branch 'master' into feat/binopt
Browse files Browse the repository at this point in the history
  • Loading branch information
HodanPlodky authored Nov 28, 2024
2 parents 07140cb + e98e004 commit 15aea85
Show file tree
Hide file tree
Showing 36 changed files with 818 additions and 244 deletions.
15 changes: 15 additions & 0 deletions docs/using-modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@ The ``_times_two()`` helper function in the above module can be immediately used
The other functions cannot be used yet, because they touch the ``ownable`` module's state. There are two ways to declare a module so that its state can be used.

Using a module as an interface
==============================

A module can be used as an interface with the ``__at__`` syntax.

.. code-block:: vyper
import ownable
an_ownable: ownable.__interface__
def call_ownable(addr: address):
self.an_ownable = ownable.__at__(addr)
self.an_ownable.transfer_ownership(...)
Initializing a module
=====================

Expand Down
Loading

0 comments on commit 15aea85

Please sign in to comment.