Closed r-hou closed 5 months ago
I am trying to use this package to get the balance of ETH from multiple addresses, below is my code
node_url = 'xxxx' w3 = Web3(Web3.HTTPProvider(node_url)) addresses = ["0xxxxx", "0xxxxx"] def from_wei(status, value): print(status, value) return value / 1e18 multi = Multicall([ Call(multi_call_address, ['getEthBalance(address)(uint256)', addresses[0]], [(addresses[0], from_wei)]), Call(multi_call_address, ['getEthBalance(address)(uint256)', addresses[1]], [(addresses[1], from_wei)]), ], require_success=False, _w3=w3) results = multi() print(results)
then I run the script from console,
python test.py
however, the code doesn't output anything and hang, I try to debug it and find the code gets stucked at
@lru_cache(maxsize=1) def _get_semaphore() -> asyncio.Semaphore: return asyncio.Semaphore()
interestingly, the code can run correctly if I remove the decorator @lru_cache(maxsize=1), may I know how to run it corretly without removing the decorator? Thanks!
fixed in #95, closing this issue
I am trying to use this package to get the balance of ETH from multiple addresses, below is my code
then I run the script from console,
however, the code doesn't output anything and hang, I try to debug it and find the code gets stucked at
interestingly, the code can run correctly if I remove the decorator @lru_cache(maxsize=1), may I know how to run it corretly without removing the decorator? Thanks!