Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ens client mainnet base url #2368

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,12 @@ def __init__(self, ethereum_client: EthereumClient, redis: Redis):
api_key=api_key,
subgraph_id=subgraph_id,
)
# Else, provide fallback for Sepolia, Holesky and Mainnet
# Else, provide fallback for Sepolia, Holesky or empty configuration.
else:
logger.warning(
"Using fallback EnsClient configuration. This configuration is not suitable for production and it is "
"recommended to setup a Subgraph API key. See https://docs.ens.domains/web/subgraph"
"recommended to setup a Subgraph API key. Mandatory for networks other than Sepolia or Holesky."
"See https://docs.ens.domains/web/subgraph"
)
config = self.fallback_ens_client()

Expand All @@ -197,9 +198,7 @@ def fallback_ens_client(self) -> EnsClient.Config:
"https://api.studio.thegraph.com/query/49574/ensholesky/version/latest",
)
else:
return EnsClient.Config(
"https://api.thegraph.com/subgraphs/name/ensdomains/ens/",
)
return EnsClient.Config("")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a log indicating that fallback will not be configured because there is not any fallback for the network?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it would already be well indicated with this log. WDYT?


def get_metadata_cache_key(self, address: str, token_id: int):
return f"metadata:{address}:{token_id}"
Expand Down
Loading