Repository navigation
feat(bridge): fund the launch chains from Ethereum, Arbitrum and Optimism - #120
Closed
Vasanthdev2004 wants to merge 2 commits into
Closed
Vasanthdev2004 wants to merge 2 commits into
Vasanthdev2004 wants to merge 2 commits into
Conversation
…mism The bridge now takes money in from Ethereum (1), Arbitrum (42161) and Optimism (10) to Base, Robinhood Chain and Arc. The three are funding sources only: nothing is ever bridged to them. - types: funding networks with ETH and Circle's native USDC (checked on-chain, never USDC.e); BRIDGE_DESTINATION_IDS, BRIDGE_FUNDING_IDS, isBridgeDestination(), isBridgeFundingChain() - validation and client: a request, quote, fee rejection, saved transfer or status naming a funding network as destination is refused - route changes: no reverse from a funding network; picking the destination as the source moves the destination to another launch chain instead of swapping a funding network into it - wallet config adds the three chains; their reads go through /api/rpc?chain=ethereum|arbitrum|optimism (ETHEREUM_RPC_URL etc., else public nodes) with the same read-only allowlist and per-IP budget - panel: "Fund from" group in the source picker, launch chains only in the destination picker, a "Send from" shortcut when the wallet sits on a funding network; wallet menu shows no unsupported warning for them - tests: 30 new routes verify (46 in all) with exact approvals of each network's own USDC, token substitution refused, catalogue drift fails closed, proxy upstreams and unknown keys; live suite 46/46 - docs/bridge.md and .env.example
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Collaborator
Author
|
Closed in favour of #135, which holds the whole bridge update in one PR. The commits from this PR are in it unchanged. |
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.
Stacked on #119 (USDG), which is stacked on #118 (Relay router fix). Base is
feat/bridge-routesso this diff shows only the funding change; GitHub retargets it as the lower PRs merge.What
People can now fund Base, Robinhood Chain and Arc from Ethereum, Arbitrum and Optimism. The three are sources only: money comes in from them, nothing is ever bridged to them.
Each funding network sends ETH or Circle's native USDC, checked on-chain (symbol
USDC, nameUSD Coin, 6 decimals):0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB480xaf88d065e77c8cC2239327C5EDb3A432268e58310x0b2C639c533813f4Aa9D7837CAf62653d097Ff85Bridged USDC.e is not offered.
How
/chainslists all three with protocol.v2 namesethereum/arbitrum/optimism, the pinned depository and the v3.2 router. Their quotes are the same direct-deposit orders (depositNative, or an exact approval thendepositErc20) settled through the Base solver hub. The validator checks a funding network's catalogue entry exactly as it checks a launch chain's.wagmi.tsadds the three chains so the wallet can switch to them. Their reads (balance, allowance, gas, receipts) go through/api/rpc?chain=ethereum|arbitrum|optimismwith the same read-only allowlist and per-IP budget. Upstreams areETHEREUM_RPC_URL/ARBITRUM_RPC_URL/OPTIMISM_RPC_URL; unset, they fall back to public nodes. No CSP change.For Kevin
ETHEREUM_RPC_URL,ARBITRUM_RPC_URLandOPTIMISM_RPC_URL. The same Alchemy key covers all three.Checks
tscclean,eslintclean on the touched filesRUN_BRIDGE_LIVE_TESTS=1, unsigned, example address): 46/46 routes verify (16 between launch chains, 30 from funding networks)No wallet signed anything. A small real transfer from each funding network is still needed before calling this exercised.