Skip to content

feat(v2): publish DepositRouter.sol source + deploy script#13

Merged
MrTalecky merged 1 commit into
mainfrom
chore/publish-deposit-router
Apr 24, 2026
Merged

feat(v2): publish DepositRouter.sol source + deploy script#13
MrTalecky merged 1 commit into
mainfrom
chore/publish-deposit-router

Conversation

@MrTalecky

Copy link
Copy Markdown
Member

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 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 it on both.

  • README.md — lists DepositRouter in the contract table + DepositIntent in EIP-712 intents.

Verification (code-only)

  • Source copied verbatim from flipcoin-app canonical at contracts/v2/DepositRouter.sol.
  • forge build — compiles clean.
  • forge test --summary387 existing tests still pass (no regressions).
  • Deploy script uses existing Base Sepolia addresses (VaultV2, DelegationRegistry, USDC).

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 compilation
  • forge test --summary — 387/387 pass
  • Follow-up: write DepositRouter.t.sol covering executeDepositIntent, cancelDepositIntent, bumpNonce, admin functions, and DelegationRegistry integration

🤖 Generated with Claude Code

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>
@MrTalecky MrTalecky merged commit db664df into main Apr 24, 2026
2 checks passed
@MrTalecky MrTalecky deleted the chore/publish-deposit-router branch April 24, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant