Smart contracts: get supported languages for filter from the API instead of ENV#3200
Merged
Smart contracts: get supported languages for filter from the API instead of ENV#3200
Conversation
isstuev
approved these changes
Jan 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description and Related Issue(s)
Resolves #3158
This PR replaces the
NEXT_PUBLIC_VIEWS_CONTRACT_LANGUAGE_FILTERSenvironment variable with a dynamic API-based approach. The verified contracts page language filter now fetches supported languages from the backend API (/api/v2/config/smart-contracts/languages) instead of relying on a static environment variable configuration.Proposed Changes
NEXT_PUBLIC_VIEWS_CONTRACT_LANGUAGE_FILTERSenvironment variable fromENVS.mdand added it toDEPRECATED_ENVS.mdgeneral:config_contract_languagesto fetch contract languages from the backendVerifiedContractsFiltercomponent to fetch languages dynamically from the API instead of using the ENV variableOpSuperchainVerifiedContractscomponent to remove the chain config dependency for language filtersEnvironment Variables Changes
NEXT_PUBLIC_VIEWS_CONTRACT_LANGUAGE_FILTERS: This variable previously allowed configuring which contract languages would appear as filter options on the verified contracts page. It has been replaced with configuration retrieved from the API endpoint/api/v2/config/smart-contracts/languages, making the language filter options dynamic and consistent with backend capabilities.Breaking or Incompatible Changes
This change removes the
NEXT_PUBLIC_VIEWS_CONTRACT_LANGUAGE_FILTERSenvironment variable. Users who were using this variable to customize the language filter options will need to configure the supported languages through the backend API instead. The filter will now automatically display all languages supported by the backend.Additional Information
The implementation includes proper loading states and error handling for the API call. The filter component gracefully handles the API response and formats language names using the existing
formatLanguageNameutility function.Checklist for PR author