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

Dynamic chainname fetch #175

Merged
merged 8 commits into from
Jul 30, 2024
Merged

Dynamic chainname fetch #175

merged 8 commits into from
Jul 30, 2024

Conversation

koxu1996
Copy link
Contributor

This PR gets rid of CASPER_CHAIN_NAME env variable - it gets fetched dynamically from RPC. In the future we could introduce cache for it.

@koxu1996 koxu1996 self-assigned this Jul 30, 2024
Ok(Json(chain_name))
}

pub async fn get_chain_name_from_rpc(rpc_url: &str) -> Result<String, ()> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would prefer to see rpc_url: &Url

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As you wish: dd881f6.

@marijanp marijanp merged commit 1afd005 into main Jul 30, 2024
4 checks passed
@marijanp marijanp deleted the feature/dynamic-chainname-fetch branch July 30, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants