feat(v2): publish DepositRouter.sol source + deploy script#13
Merged
Conversation
DepositRouter has been deployed on Base mainnet since block 43786444 (commit #8 added only the address to deployments/base-mainnet.json) but the Solidity source was never published to this repo. Publishes the contract, EIP-712 struct, and deploy script so the canonical protocol source matches what is live on-chain. Changes: - contracts/v2/DepositRouter.sol — delegated VaultV2 deposits via signed DepositIntent (EIP-712). Atomic 3-step flow: 1. usdc.transferFrom(owner, this, amount) 2. vault.deposit(amount) 3. vault.transferBetween(this, owner, amount) Security: CEI pattern, nonReentrant, DelegationRegistry auth, maxDepositPerTx cap, sequential nonces, deadline, pause kill-switch. - contracts/v2/interfaces/Types.sol — added DepositIntent struct (matches the typehash used by the deployed contract). - script/DeployDepositRouter.s.sol — deploys DepositRouter against existing VaultV2 + DelegationRegistry; whitelists on both. - README.md — lists DepositRouter in contract table + DepositIntent in EIP-712 intents. Verification: - forge build — compiles clean. - forge test --summary — 387 existing tests still pass (no regressions). Note: DepositRouter currently has no Foundry test coverage in this repo. That gap exists independently of publication and will be addressed separately. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
DepositRouter has been deployed on Base mainnet since block 43786444 (PR #8 added only the address to
deployments/base-mainnet.json), but the Solidity source was never published to this repo. This PR publishes the contract, EIP-712 struct, and deploy script so the canonical protocol source matches what is live on-chain.Changes
contracts/v2/DepositRouter.sol— delegated VaultV2 deposits via signedDepositIntent(EIP-712). Atomic 3-step flow:usdc.transferFrom(owner, this, amount)vault.deposit(amount)vault.transferBetween(this, owner, amount)Security: CEI pattern,
nonReentrant,DelegationRegistryauth,maxDepositPerTxcap, sequential nonces, deadline, pause kill-switch.contracts/v2/interfaces/Types.sol— addedDepositIntentstruct (matches the typehash used by the deployed contract).script/DeployDepositRouter.s.sol— deploys DepositRouter against existing VaultV2 + DelegationRegistry; whitelists it on both.README.md— lists DepositRouter in the contract table +DepositIntentin EIP-712 intents.Verification (code-only)
contracts/v2/DepositRouter.sol.forge build— compiles clean.forge test --summary— 387 existing tests still pass (no regressions).Known gap (out of scope)
DepositRouter currently has no Foundry test coverage in this repo. That gap exists independently of publication and is tracked as a follow-up.
Test plan
forge build— clean compilationforge test --summary— 387/387 passDepositRouter.t.solcovering executeDepositIntent, cancelDepositIntent, bumpNonce, admin functions, and DelegationRegistry integration🤖 Generated with Claude Code