feat: add Forma (chain 984122) to assets-controllers spot price support#8524
Open
jeremy-consensys wants to merge 1 commit intomainfrom
Open
feat: add Forma (chain 984122) to assets-controllers spot price support#8524jeremy-consensys wants to merge 1 commit intomainfrom
jeremy-consensys wants to merge 1 commit intomainfrom
Conversation
Adds Forma to SPOT_PRICES_SUPPORT_INFO so CodefiTokenPricesServiceV2 recognises it as a supported chain. Maps the native TIA asset to slip44:984122, which the price-api resolves to CoinGecko's `celestia` coin. Without this entry, the service's validateChainIdSupported check returns false and no spot-price request is made for Forma's native token. Pairs with the price-api change that registers eip155:984122 and the same slip44:984122 ref on the server side.
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.
Explanation
Forma (
eip155:984122) uses TIA (Celestia) as its native gas token. Today,CodefiTokenPricesServiceV2.validateChainIdSupportedreturnsfalsefor Forma because its chain ID is not listed inSPOT_PRICES_SUPPORT_INFO, so the extension and mobile clients never even request a spot price for TIA — users see no price when they add Forma as a custom network.Forma had a working price previously via the
SimpleHashServicefallback inva-mmcx-price-api. That fallback was removed in va-mmcx-price-api#409, leaving CoinGecko as the only remaining path. CoinGecko does not recognise Forma as an EVM asset platform (Celestia is Cosmos-based), so the chain → contract-address lookup path doesn't work for Forma. The same approach already shipped for Sei (0x531/slip44:19000118) and Injective (slip44:22000119) applies here: point Forma's native asset at CoinGecko'scelestiacoin directly instead of relying on the platform-indexed path.This PR adds:
to
SPOT_PRICES_SUPPORT_INFO.slip44:984122is a chain-id-derived pseudo-ref mirroring theslip44:8453convention used for Base governance, chosen overslip44:118(Cosmos Hub / ATOM) to avoid collision if ATOM is ever priced throughslip44. The ref matches the companion mapping added tova-mmcx-price-api, which resolves it to CoinGecko'scelestiacoin id.SUPPORTED_CHAIN_IDSis derived fromSPOT_PRICES_SUPPORT_INFO, so the existing parameterisedvalidateChainIdSupportedtest (codefi-v2.test.ts) picks up the new entry automatically. No fixture updates were required.The same pattern will apply to Eden and any future Celestia-based EVM rollup once their chain IDs are published.
References
va-mmcx-price-api:feat/add-forma-tia-price(addsCaip2ChainId.FORMA,SLIP44_ASSET_MAP[FORMA], andSLIP44_ASSET_CONFIGS['slip44:984122'] → 'celestia')Checklist
Note
Low Risk
Low risk: adds a single new
SPOT_PRICES_SUPPORT_INFOmapping for one chain plus changelog entry, with no behavioral changes beyond enabling price lookups for that network.Overview
Enables spot price fetching for Forma (
eip155:984122) by adding a newSPOT_PRICES_SUPPORT_INFOentry mapping its native gas token (TIA) toslip44:984122, allowing the price API to resolve it via CoinGecko.Updates the
assets-controllerschangelog to document the new network/asset mapping.Reviewed by Cursor Bugbot for commit 0ebff90. Bugbot is set up for automated code reviews on this repo. Configure here.