Set up new chain foundational metadata (evms_info, prices, base sources, evms_blockchains_list)
sets up foundational metadata for a new chain.
when to use: use when adding a new chain's foundational metadata (evms_info, native/prices tokens, base sources, and evms_blockchains_list).
<issue_id>: linear issue id (e.g., CUR2-554)<chain>: chain name (e.g., kaia, monad)/catalyst-foundational-metadata CUR2-554 xlayer
dune mcp server: user-dune-mcp.
for ad-hoc sql, prefer temporary execution if the dune mcp supports it in-session. only create saved/throwaway queries with createDuneQuery when temporary execution is not available or when a later step explicitly needs a query_id.
fallback sequence when query_id is required: create query with (pass sql in ) -> run with (using returned ) -> fetch rows with (using returned ).
createDuneQueryqueryexecuteQueryByIdquery_idgetExecutionResultsexecution_iddbt_subprojects/dex/models/trades/kaia/, .../mezo/). ordering: mimic existing; if unclear, append. swap chain name in: file paths, model names, schema entries, blockchain values.select * from dune.blockchains where name = '<chain>' (substitute <chain> with the chain name). extract: chain_id, name (display name), token_address (native token).select min(time) from <chain>.blocks where number <> 0 (substitute <chain>).main is up to date: fetch latest, pull if behind, exit if diverged.<issue_id>-<chain>-foundational-metadata, create off main, checkout, warn if exists. don't commit/push anything.add evm chain info
dbt_subprojects/daily_spellbook/models/evms/evms_info.sql(chain_id, '<chain>', 'Name', 'Layer 1/2', ...)chain_id, name, first_block_time, token_addresswrapped_native_token_address column must be the wrapped token contract (e.g., WETH, WHBAR), NOT the native/zero addressadd native token
dbt_subprojects/tokens/models/prices/prices_native_tokens.sqlcreate prices tokens model
dbt_subprojects/tokens/models/prices/<chain>/prices_<chain>_tokens.sqlquery_id: 6293737, query_parameters: [{"key":"chain","value":"<chain>","type":"text"}] (substitute <chain>)prices_native_tokens.sql. Duplicating creates dupes in prices.day/hour/minute pipelineshttps://api.coinpaprika.com/v1/search?q=<token>&categories=currencies), add to VALUESscripts/check_tokens.py which validates every ID — missing/inactive IDs fail the buildcreate schema file
dbt_subprojects/tokens/models/prices/<chain>/_schema.ymladd to prices union
dbt_subprojects/tokens/models/prices/prices_tokens.sqlref('prices_<chain>_tokens') to fungible_prices_modelsdefine raw data sources
sources/_base_sources/evm/<chain>_base_sources.ymlsources/_base_sources/evm/<chain>_docs_block.mdscripts/generate_evm_*.pyintegrate into aggregate EVM models
<chain> to dbt_subprojects/daily_spellbook/macros/helpers/evms_blockchains_list.sqlfinal checks
pipenv shell, then run dbt compile in dbt_subprojects/tokens and in dbt_subprojects/daily_spellbook. Fix any errors.