Skip to content

Commit 26b5e85

Browse files
flanaganstevepacrob
authored andcommitted
Correct the .encode_abi example web3.contract.rst
Previously, fn_name was a named argument, used like: ``` contract.encode_abi(fn_name="register", ...) ``` But now, fn_name is the unnamed first argument, used like: ``` contract.encode_abi("register", ...) ``` (I believe, at least - I note that line 326, which defines the class method, uses it this way: ``` .. py:classmethod:: Contract.encode_abi(fn_name, args=None, kwargs=None, data=None) ``` And in my local project `encode_abi("getNames", ...)` worked where `encode_abi(fn_name="getNames", ...)` did not.
1 parent c941d85 commit 26b5e85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/web3.contract.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ Each Contract Factory exposes the following methods.
331331

332332
.. code-block:: python
333333
334-
>>> contract.encode_abi(fn_name="register", args=["rainbows", 10])
334+
>>> contract.encode_abi("register", args=["rainbows", 10])
335335
"0xea87152b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000087261696e626f7773000000000000000000000000000000000000000000000000"
336336
337337

0 commit comments

Comments
 (0)