Skip to content

Commit

Permalink
feat: detect ots capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
banteg committed Apr 12, 2024
1 parent 131d61b commit a070592
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ape_geth/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ def perform_query(self, query: QueryType) -> Iterator: # type: ignore[override]

@estimate_query.register
def estimate_contract_creation_query(self, query: ContractCreationQuery) -> Optional[int]:
if provider := self.network_manager.active_provider:
if not isinstance(provider, EthereumNodeProvider):
return None
elif uri := provider.http_uri:
return 225 if uri.startswith("http://") else 600

if self.provider._ots_api_level is not None:
return 300
return None

@perform_query.register
Expand Down

0 comments on commit a070592

Please sign in to comment.