Skip to content

Conversation

@ameya-deshmukh
Copy link
Collaborator

@ameya-deshmukh ameya-deshmukh commented Nov 12, 2025

Note

Introduce Eth2 DepositContract, add viem ABI/actions and client integration, plus end-to-end tests, and bump package versions.

  • Contracts:
    • Add Ethereum 2.0 DepositContract in contracts/src/DepositContract.sol implementing deposit, get_deposit_root, get_deposit_count, and ERC-165 support.
    • Enable IR-based compilation via contracts/foundry.toml (via_ir = true).
  • TypeScript Client (seismic-viem):
    • Add depositContractAbi and actions in src/abis/depositContract.ts and src/actions/depositContract.ts (read: getDepositRoot, getDepositCount; write: deposit; export DEPOSIT_CONTRACT_ADDRESS).
    • Extend createShieldedPublicClient/createShieldedWalletClient to include deposit contract public/wallet actions and export address via src/index.ts.
    • Bump package to 1.0.51.
  • Tests (seismic-viem-tests):
    • Add deposit contract end-to-end test tests/contract/depositContract.ts with ABI/bytecode fixtures; wire into test runner and exports.
  • Misc:
    • Minor function signature formatting in contracts/test/ShieldedDelegationAccount.t.sol.
    • Bump seismic-react peer to seismic-viem >=1.0.51 and version to 1.0.51.

Written by Cursor Bugbot for commit b2e30c5. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

);

// Compute deposit data root (`DepositData` hash tree root)
bytes32 consensus_pubkey_hash = sha256(abi.encodePacked(consensus_pubkey, bytes16(0)));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: SSZ Hashing Mismatch Breaks Deposit Verification

The consensus_pubkey (48 bytes padded to 64) is hashed as a single 64-byte value, but SSZ requires splitting into two 32-byte chunks that are hashed separately before combining. This inconsistency with the consensus_signature handling (which correctly splits chunks) will cause incorrect hash tree root computation and deposit verification failures.

Fix in Cursor Fix in Web

@cdrappi cdrappi changed the title WIP: deposit contract + actions Deposit contract + actions Nov 25, 2025
@cdrappi cdrappi merged commit 485bc0e into main Nov 25, 2025
5 checks passed
@cdrappi cdrappi deleted the ameya/deposit-contract branch November 25, 2025 19:58
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.

3 participants