Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion web3/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def _set_function_info(self) -> None:

def call(
self, transaction: Optional[TxParams] = None,
block_identifier: BlockIdentifier = 'latest',
block_identifier: BlockIdentifier = None,
state_override: Optional[CallOverrideParams] = None,
) -> Any:
"""
Expand Down Expand Up @@ -1542,6 +1542,8 @@ def call_contract_function(


def parse_block_identifier(web3: 'Web3', block_identifier: BlockIdentifier) -> BlockIdentifier:
if block_identifier is None:
return web3.eth.default_block
if isinstance(block_identifier, int):
return parse_block_identifier_int(web3, block_identifier)
elif block_identifier in ['latest', 'earliest', 'pending']:
Expand Down