diff --git a/multicall/call.py b/multicall/call.py index c5ed6f7f..c4318076 100644 --- a/multicall/call.py +++ b/multicall/call.py @@ -86,13 +86,13 @@ def decode_output( return decoded if len(decoded) > 1 else decoded[0] @eth_retry.auto_retry - def __call__(self, args: Optional[Any] = None, _w3: Optional[Web3] = None) -> Any: + def __call__(self, args: Optional[Any] = None, _w3: Optional[Web3] = None, *, block_id: Optional[int] = None) -> Any: _w3 = self.w3 or _w3 or w3 args = prep_args( self.target, self.signature, args or self.args, - self.block_id, + block_id or self.block_id, self.gas_limit, self.state_override_code, ) @@ -106,7 +106,7 @@ def __await__(self) -> Any: return self.coroutine().__await__() @eth_retry.auto_retry - async def coroutine(self, args: Optional[Any] = None, _w3: Optional[Web3] = None) -> Any: + async def coroutine(self, args: Optional[Any] = None, _w3: Optional[Web3] = None, *, block_id: Optional[int] = None) -> Any: _w3 = self.w3 or _w3 or w3 if self.state_override_code and not state_override_supported(_w3): @@ -119,7 +119,7 @@ async def coroutine(self, args: Optional[Any] = None, _w3: Optional[Web3] = None self.target, self.signature, args or self.args, - self.block_id, + block_id or self.block_id, self.gas_limit, self.state_override_code, ) diff --git a/pyproject.toml b/pyproject.toml index f539ebfc..7d1b9070 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "multicall" -version = "0.7.9" +version = "0.8.0" description = "aggregate results from multiple ethereum contract calls" authors = ["banteg"]