Skip to content

Commit

Permalink
Add third arg state override set. Fix ethereum#1921
Browse files Browse the repository at this point in the history
  • Loading branch information
edd34 committed Apr 1, 2021
1 parent 836996f commit 16d3971
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions web3/eth.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,9 @@ def sign_munger(
def call_munger(
self,
transaction: TxParams,
block_identifier: Optional[BlockIdentifier] = None
) -> Tuple[TxParams, BlockIdentifier]:
block_identifier: Optional[BlockIdentifier] = None,
state_override: Optional[TxParams] = None,
) -> Tuple[TxParams, BlockIdentifier, TxParams]:
# TODO: move to middleware
if 'from' not in transaction and is_checksum_address(self.default_account):
transaction = assoc(transaction, 'from', self.default_account)
Expand All @@ -531,7 +532,7 @@ def call_munger(
if block_identifier is None:
block_identifier = self.default_block

return (transaction, block_identifier)
return (transaction, block_identifier, state_override)

call: Method[Callable[..., Union[bytes, bytearray]]] = Method(
RPC.eth_call,
Expand Down

0 comments on commit 16d3971

Please sign in to comment.