feat(protocol-core): backfill deployment addresses for five chains - #34
Open
henrypalacios wants to merge 1 commit into
Open
feat(protocol-core): backfill deployment addresses for five chains#34henrypalacios wants to merge 1 commit into
henrypalacios wants to merge 1 commit into
Conversation
Populate `deployments` and `multicall` for Base, MANTRA, Soneium, Somnia and X Layer. Base carries an Algebra v4 entry and a v2 entry; MANTRA, Soneium and Somnia carry Algebra v4; X Layer carries Algebra v3. Each of these chains already declared a live protocol version but held no addresses, so every consumer routing on them had to keep its own contract map alongside the chain identity this package already models. Deployment coverage now spans every registered chain that declares a protocol version. Ethereum stays without deployments: it is a reference chain for cross-chain price feeds, with no QuickSwap contracts. Pin each new value by chain, protocol version and role. Deployed addresses are immutable, so a fixture change is either a transcription error or a genuine redeploy, and neither should pass silently. Some literals repeat across chains and roles — one deployer at one nonce yields the same address on several chains — so the guard has to be an exact value per slot rather than a structural rule.
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.
Summary
deploymentsandmulticallfor Base (8453), MANTRA (5888), Soneium (1868), Somnia (5031) and X Layer (196).Why
Each of these five chains already declared a live protocol version in
protocols[]but carried no contract addresses.ChainConfigmodels chain identity and, since the deployment schema landed, contract deployments too — but only Polygon, Manta Pacific and Immutable zkEVM were populated. Consumers routing on the other chains had to keep their own contract maps next to the chain identity this package already provides, and those maps drift independently of the registry.Ethereum stays without
deploymentsand withoutmulticall. Itsprotocolslist is empty: it is a reference chain for cross-chain price feeds and stablecoin addresses, with no QuickSwap contracts to record.Changes
src/chains/base.tssrc/chains/mantra.tssrc/chains/soneium.tssrc/chains/somnia.tssrc/chains/xlayer.tssrc/__tests__/chains/deployments.test.tsDEPLOYMENT_FIXTUREStable pinning all 26 new deployment addresses by chain, version and rolesrc/__tests__/chains/chain-data.test.tsData only —
types.ts,deployments.ts,deploymentCoherence.tsandregistry.tsare untouched, and every added field was already optional onChainConfig. Each entry populates exactly the fields its family defines: the Algebra v3 and v4 entries carrypoolDeployer, the Base v2 entry carries onlyfactoryandswapRouter.On repeated address literals
Several values in this diff appear more than once across chains and roles. X Layer's
quoteris the same literal as Polygon'swrappedNative; X Layer'smulticallmatches Immutable zkEVM's; X Layer'spoolDeployermatches Manta Pacific'sfactory; MANTRA'smulticallis the canonical Multicall3 address deployed on many chains.These are correct. One deployer at one nonce produces the same address on every EVM chain, and each of these contracts is live at that address on its own chain — verified against chain state. The fixtures therefore pin an exact value per slot rather than asserting any structural rule about uniqueness: reused addresses are ordinary here, and a uniqueness rule would reject valid production data.
Test plan
pnpm test— 13 files, 276 tests pass, no type errors (172 before)pnpm test:coverage— 100% statements, branches, functions and linespnpm validate:addresses— 86 addresses validated across 9 chains, coherence clean (54 before)pnpm lint— cleanpnpm typecheck— cleanpnpm build— CJS, ESM and declaration builds succeed