What should you test on Base Sepolia before shipping a bridge?
How to test bridge deposits and withdrawals on Base Sepolia: verify ETH and paired tokens, complete prove and finalize, then replay failed messages before shipping.
The Tareom Editors5 min read

Test complete ETH and paired ERC-20 deposits, one withdrawal from initiation through finalization, and failure and replay paths before shipping a bridge integration. Base Sepolia uses chain ID 84532 and settles to Ethereum Sepolia, so your checks should follow the transaction across both networks.
- ETH deposit: Send ETH from Sepolia and assert the recipient’s Base Sepolia balance and the L2 transaction hash your indexer records.
- ERC-20 deposit: Use a correctly paired token and assert the L2 token balance and indexed transaction hash.
- Full withdrawal: Initiate, prove and finalize a withdrawal, checking its status at each stage.
- Failed-message replay: Cause the L2 call to run out of gas, then replay it and confirm the intended result.
- Wrong token pair: Submit a token that is not the configured pair and confirm your integration rejects it.
Prove both sides of deposits and the full withdrawal lifecycle
A deposit test is complete only when you can connect the L1 transaction to the expected L2 result. The Base bridge moves supported assets between Ethereum and Base, and its testnet flows should be exercised against Sepolia and Base Sepolia. If you need context on the Base bridge deposit flow, use it alongside your chain configuration; the Base bridge’s contract addresses and finalization period should come from that configuration.
For an ETH deposit, record the Sepolia transaction hash, wait for the corresponding Base Sepolia transaction, and assert the recipient’s balance change. Also confirm that your indexer stores the L2 transaction hash, not just the L1 deposit hash. That lets you check whether your app can show users the transaction that delivered their funds.
For an ERC-20 deposit, first confirm that the L1 token and L2 token are a valid pair. ERC-20 bridging requires a token pair; one route is to create the L2 token with OptimismMintableERC20Factory. Assert the expected L2 token address and balance after the deposit. A wrong-pair test should verify your integration stops the deposit or reports a clear error before treating the asset as bridged.
Withdrawals need a longer test because initiation, proving and finalization are separate steps. Initiate a withdrawal on Base Sepolia, track it through the prove step, then finalize it on Ethereum Sepolia when it becomes eligible. Use viem’s OP Stack actions to track status, and assert the user receives the expected asset on L1. A transaction that has only been initiated has not completed the withdrawal.
Read contract addresses and the finalization period from the chain configuration for the network you are testing. Don’t hardcode them into the integration. The configuration is ready when it identifies the expected Sepolia and Base Sepolia networks, the contracts your flow calls, and the applicable withdrawal timing. This keeps the test pointed at the intended contracts and makes the waiting period part of the status your app displays.
Related questions
Where do I get Base Sepolia ETH?
Use a Base Sepolia faucet to get test ETH for gas on the L2. Deposits also need ETH on Ethereum Sepolia to pay for the L1 transaction. Check that your wallet is on the right network before sending funds; test ETH on one chain does not pay gas on the other.
Where are Base Sepolia bridge contract addresses listed?
Read them from the official Base or OP Stack chain configuration used by your integration. Resolve addresses at runtime or from a maintained network config, and verify the selected chain ID is 84532 before sending a transaction. Keep the finalization period in configuration too, so your withdrawal status follows the network setting.
Handle failed messages before release
A deposit can reach Base Sepolia while its L2 call fails. If the call runs out of gas because minGasLimit is too low, L2CrossDomainMessenger stores a failed message that must be replayed. Your test should deliberately use a value low enough to trigger that path, confirm the message is recorded as failed, replay it, and then check the resulting L2 state.
Also verify what the user sees between failure and replay. The interface should identify that the L2 action failed and explain that the message needs replay; it should not present the deposit as fully successful just because the L1 transaction completed. After replay, confirm the app and indexer update to the resulting L2 transaction.
These checks matter because production issues often sit in withdrawals and failed messages, where a transaction can remain incomplete or need another action. Ship only when deposits produce the expected L2 state, withdrawals reach L1 through prove and finalize, and a failed message can be replayed and clearly tracked.
Questions after the testnet checklist
How should a UI show a withdrawal waiting to be proven?
Show it as initiated and waiting to be proven, with the transaction reference and current network. Keep it distinct from a proven withdrawal and one that has been finalized. Update the status from the OP Stack action results and the configured finalization period, rather than implying the user can already claim the funds.
How do I estimate minGasLimit for custom messages?
Measure gas for the L2 action your message actually performs, then test with enough headroom for the target call and its inputs. Exercise both a successful call and a deliberately underfunded call on Base Sepolia. Since message complexity affects gas use, validate the estimate against the specific payload instead of relying on one value for every message.
What changes when switching config to mainnet?
Switch the chain IDs, contract addresses, token pairs and finalization period to the mainnet configuration, then verify each value before enabling transactions. Keep the same deposit, withdrawal, replay and wrong-pair checks in your release process. Testnet success does not make testnet addresses or assets valid on mainnet.