diff --git a/brownie/network/middlewares/caching.py b/brownie/network/middlewares/caching.py index e584ddd6c..d379e0dc5 100644 --- a/brownie/network/middlewares/caching.py +++ b/brownie/network/middlewares/caching.py @@ -111,6 +111,12 @@ def __init__(self, w3: Web3) -> None: @classmethod def get_layer(cls, w3: Web3, network_type: str) -> Optional[int]: if network_type == "live": + try: + # ensure that the node client supports filters + block_filter = w3.eth.filter("latest") + block_filter.get_new_entries() + except ValueError: + return None return 0 else: return None