feat: add Alien Base V3 substreams and integration tests for Base#376
feat: add Alien Base V3 substreams and integration tests for Base#376Haikane wants to merge 5 commits into
Conversation
Alien Base V3 is a stock Uniswap V3 fork on Base (factory: 0x0Fd83557b2be93617c9C1C1B6fd549401C74558C, deployed at block 7150708). Core contracts are unmodified, so this reuses the existing ethereum-uniswap-v3-logs-only WASM binary with a new YAML config. Verified via substreams run on Base mainnet: pool creation events indexed correctly for ALB/WETH and WETH/cbBTC pools with correct static attributes (fee, tick_spacing, pool_address). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add header comments documenting the factory address and deployment block for easier auditability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Register alienbase_v3 in the protocol-testing framework: - Clone mapping to reuse ethereum-uniswap-v3-logs-only substreams - Integration test config for WETH/USDC fee-750 pool on Base - Simulation state registry (UniswapV3State) - Executor bytecode mapping (UniswapV3 executor) - Fix hardcoded "ethereum" chain key in executors_json to use dynamic chain name (affects all non-Ethereum tests) Dependencies temporarily point to feat/alienbase-v3 branches for tycho-simulation and tycho-execution. Revert to pinned tags once those PRs merge. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| let chain_model = ChainModel::from(self.chain); | ||
| let chain_key = self.chain.to_string().to_lowercase(); |
There was a problem hiding this comment.
Moved chain_model back to its original position (a461f59). The chain_key variable stays since it replaces the hardcoded "ethereum" key so the executors JSON works for Base chain too.
| tempfile = "3.8.1" | ||
|
|
||
| [patch.crates-io] | ||
| tycho-execution = { git = "https://github.com/propeller-heads/tycho-execution.git", branch = "feat/alienbase-v3" } |
There was a problem hiding this comment.
I think we don't commit patches usually, for testing this is nice but we should probably try to get execution merged and use the latest tag. @dianacarvalho1 @tamaralipows what's the usual process here?
There was a problem hiding this comment.
While the execution/simulation PRs are not merged, this is how it should be done to test! but yeah this needs to be changed before merging.
There was a problem hiding this comment.
Agreed — will remove the [patch.crates-io] section once the execution PR (#335) is merged and update to the latest tag before merging this PR.
There was a problem hiding this comment.
Will update before merging.
There was a problem hiding this comment.
the execution PR link is broken. it is this one
Addresses review comment: the chain_model move was unnecessary. The chain_key variable remains as it's needed to support Base chain (replaces the hardcoded "ethereum" key in executors_json). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The generic UniswapV3 executor runtime has Ethereum's factory address baked in as an immutable, causing InvalidTarget reverts for Alienbase V3 pools on Base. Build a dedicated runtime with the correct factory (0x0Fd83557) and init code hash. All 6 execution tests now pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
base-alienbase-v3.yamlsubstreams config for Alien Base V3 on Base chain0x0Fd83557b2be93617c9C1C1B6fd549401C74558C, deployed block 7150708)ethereum-uniswap-v3-logs-onlyWASM binary; only a new YAML config is neededVerification
.spkgpackages successfullysubstreams runon Base mainnet:0xbcd27a...) at block 8389471: fee=10000 (1%), tick_spacing=200 ✅0x1d6cfe...) at block 34803135: fee=100 (0.01%), tick_spacing=2 ✅Related PRs
Test plan
.spkgpackagingsubstreams run map_pools_createdon Base mainnet (2 pools verified)map_protocol_changesstore backfill (production deployment step)🤖 Generated with Claude Code