Skip to content

Commit

Permalink
Add block_identifier example
Browse files Browse the repository at this point in the history
  • Loading branch information
kclowes committed Feb 11, 2019
1 parent 6844214 commit b5de1a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/contracts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,8 @@ It can also be invoked using parentheses:
>>> twentyone
21

And a transaction dictionary, with or without the ``transaction`` keyword. For example:
And a transaction dictionary, with or without the ``transaction`` keyword.
You can also optionally include a block identifier. For example:

.. doctest::

Expand All @@ -794,6 +795,9 @@ And a transaction dictionary, with or without the ``transaction`` keyword. For e
>>> twentyone = myContract.caller(transaction={'from': from_address}).multiply7(3)
>>> twentyone
21
>>> twentyone = myContract.caller(block_identifier='latest').multiply7(3)
>>> twentyone
21

Like :py:class:`ContractFunction`, :py:class:`ContractCaller`
provides methods to interact with contract functions.
Expand Down

0 comments on commit b5de1a3

Please sign in to comment.