From b5de1a3a8e37b5d9fa8328b4600ebf8de874e0db Mon Sep 17 00:00:00 2001 From: Keri Date: Thu, 7 Feb 2019 11:28:39 -0700 Subject: [PATCH] Add block_identifier example --- docs/contracts.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/contracts.rst b/docs/contracts.rst index 61c6dfbade..ae7f57bd29 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -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:: @@ -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.