add native-is-erc20 chain smoke test variants#145
Merged
david-uniswap merged 1 commit intoMay 28, 2026
Merged
Conversation
Adds V2/V3/V4 smoke test variants in script/smoke/native-is-erc20/
for chains where the native gas token is itself an ERC-20 (CELO, Arc,
similar Circle partner chains). On these chains the WETH9 dependency
is wired to UnsupportedProtocol (or similar) which reverts on
deposit/withdraw, so the standard smoke tests halt at the WETH wrap
step.
These variants skip the WETH leg entirely and use two freshly-deployed
TestTokens to exercise the same v2/v3/v4 + UR code paths. Chain-
agnostic via vm.parseJsonAddress reads from deployments/json/<id>.json,
matching the parent PR's pattern.
Tested end-to-end on Arc Mainnet (chain 5042). All three pass:
- V2: pair created, 1000:1000 liquidity, swap 1 A -> 0.996 B (0.3% fee)
- V3: pool init at 1:1, position minted, exactInputSingle 1 A -> 0.996 B
- V4: pool init, modifyLiquidities mint with Permit2 dual-approval,
swap via UR V4_SWAP command
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ericneil-sanc
approved these changes
May 27, 2026
ca202da
into
david-nick/robinhood-smoke-tests
3 checks passed
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
Stacked on top of #139. Adds V2/V3/V4 smoke test variants in
script/smoke/native-is-erc20/for chains where the native gas token is itself an ERC-20 (Arc, CELO, and similar Circle-style partner chains).Motivation
On these chains the WETH9 dependency in the deploy gets wired to
UnsupportedProtocol(or any other placeholder that reverts ondeposit/withdraw), because there is no realIWETH9-compliant wrapper. The standard smoke tests from #139 all halt atIWETH9(weth).deposit{value:...}()on these chains, even though the contract deployment itself is functional.These variants drop the WETH leg entirely and use two freshly-deployed
TestTokens to exercise the same v2/v3/v4 + UR code paths.What's in this PR
script/smoke/native-is-erc20/V2SmokeNativeIsERC20.s.soladdLiquidity,swapExactTokensForTokensvia Router02script/smoke/native-is-erc20/V3SmokeNativeIsERC20.s.solcreatePool+initialize, NPMmint, SwapRouter02exactInputSinglescript/smoke/native-is-erc20/V4SmokeNativeIsERC20.s.solinitializePool, Permit2 dual-approval,modifyLiquiditiesmint, StateView reads, URV4_SWAPcommandChain-agnostic via
vm.parseJsonAddressreads fromdeployments/json/<chainId>.json, matching #139's pattern.Tested on Arc Mainnet (chain 5042)
All three variants ran end-to-end on Arc with the WETH9-as-UnsupportedProtocol deploy from #144:
1 A -> 0.996 B(the standard 0.3% fee math)exactInputSingle 1 A -> 0.996 BmodifyLiquidities(MINT_POSITION + SETTLE_PAIR), URV4_SWAPcommand swaps A -> B successfullyWhen to use
script/smoke/from add chain-agnostic smoke tests for v2, v3, v4 (with UR swap) #139.native-is-erc20/variants in this PR.Note on gas estimation
On Arc specifically, forge's
eth_estimateGasreturns tight per-tx estimates that can cause the v2/v3 swap txs to OOG during the K-invariant check. Workaround: pass--gas-estimate-multiplier 200when broadcasting. Likely worth surfacing in #139's README too once both PRs land.Test plan
🤖 Generated with Claude Code