Skip to content

Commit

Permalink
fix: await methods (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Apr 21, 2023
1 parent 736de9d commit 71c5e40
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions multicall/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def __call__(self, args: Optional[Any] = None, _w3: Optional[Web3] = None) -> An
self.returns,
)

async def __await__(self) -> Any:
return await self.coroutine()
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:
Expand Down
4 changes: 2 additions & 2 deletions multicall/multicall.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def __call__(self) -> Dict[str,Any]:
logger.debug(f"Multicall took {time() - start}s")
return response

async def __await__(self) -> Dict[str,Any]:
return await self.coroutine()
def __await__(self) -> Dict[str,Any]:
return self.coroutine().__await__()

async def coroutine(self) -> Dict[str,Any]:
batches = await gather([
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "multicall"
version = "0.7.2"
version = "0.7.3"
description = "aggregate results from multiple ethereum contract calls"
authors = ["banteg"]

Expand Down

0 comments on commit 71c5e40

Please sign in to comment.