Skip to content

Commit

Permalink
Add section to ambiguous section of the contract docs
Browse files Browse the repository at this point in the history
  • Loading branch information
reedsa committed Sep 13, 2024
1 parent e1d16e5 commit 054b8e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/web3.contract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,12 @@ You can interact with the web3.py contract API as follows:
Invoke Ambiguous Contract Functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Calling overloaded functions can be done as you would expect. Passing arguments will
disambiguate which function you want to call.

If there is a need to first retrieve the function, you can use the contract instance's
``get_function_by_signature`` method to get the function you want to call.

Below is an example of a contract that has multiple functions of the same name,
and the arguments are ambiguous. You can use the :meth:`Contract.get_function_by_signature`
method to reference the intended function and call it with the correct arguments.
Expand Down

0 comments on commit 054b8e5

Please sign in to comment.