diff --git a/ape_alchemy/_utils.py b/ape_alchemy/_utils.py index 639bc10..197bb93 100644 --- a/ape_alchemy/_utils.py +++ b/ape_alchemy/_utils.py @@ -15,19 +15,26 @@ "mainnet", ], "avalanche": [ - "fuji", "mainnet", + "fuji", ], "base": [ "mainnet", "sepolia", ], - "berachain": ["bartio"], + "berachain": [ + "bartio", + ], "blast": [ "mainnet", "sepolia", ], - "bsc": ["mainnet", "testnet", "opbnb", "opbnb-testnet"], + "bsc": [ + "mainnet", + "testnet", + "opbnb", + "opbnb-testnet", + ], "crossfi": [ "mainnet", "testnet", diff --git a/ape_alchemy/provider.py b/ape_alchemy/provider.py index a70d1c3..49174e2 100644 --- a/ape_alchemy/provider.py +++ b/ape_alchemy/provider.py @@ -260,32 +260,32 @@ def create_access_list( return super().create_access_list(transaction, block_id=block_id) - def make_request(self, rpc: str, parameters: Optional[Iterable] = None) -> Any: - parameters = parameters or [] - try: - result = self.web3.provider.make_request(RPCEndpoint(rpc), parameters) - except HTTPError as err: - response_data = err.response.json() if err.response else {} - if "error" not in response_data: - raise AlchemyProviderError(str(err)) from err - - error_data = response_data["error"] - message = ( - error_data.get("message", str(error_data)) - if isinstance(error_data, dict) - else error_data - ) - cls = ( - AlchemyFeatureNotAvailable - if "is not available" in message - else AlchemyProviderError - ) - raise cls(message) from err - - if isinstance(result, dict) and (res := result.get("result")): - return res - - return result + # def make_request(self, rpc: str, parameters: Optional[Iterable] = None) -> Any: + # parameters = parameters or [] + # try: + # result = self.web3.provider.make_request(RPCEndpoint(rpc), parameters) + # except HTTPError as err: + # response_data = err.response.json() if err.response else {} + # if "error" not in response_data: + # raise AlchemyProviderError(str(err)) from err + + # error_data = response_data["error"] + # message = ( + # error_data.get("message", str(error_data)) + # if isinstance(error_data, dict) + # else error_data + # ) + # cls = ( + # AlchemyFeatureNotAvailable + # if "is not available" in message + # else AlchemyProviderError + # ) + # raise cls(message) from err + + # if isinstance(result, dict) and (res := result.get("result")): + # return res + + # return result def send_private_transaction(self, txn: TransactionAPI, **kwargs) -> ReceiptAPI: """