-
Notifications
You must be signed in to change notification settings - Fork 6
Deposit contract + actions #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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))); |
There was a problem hiding this comment.
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.
Note
Introduce Eth2 DepositContract, add viem ABI/actions and client integration, plus end-to-end tests, and bump package versions.
DepositContractincontracts/src/DepositContract.solimplementingdeposit,get_deposit_root,get_deposit_count, and ERC-165 support.contracts/foundry.toml(via_ir = true).seismic-viem):depositContractAbiand actions insrc/abis/depositContract.tsandsrc/actions/depositContract.ts(read:getDepositRoot,getDepositCount; write:deposit; exportDEPOSIT_CONTRACT_ADDRESS).createShieldedPublicClient/createShieldedWalletClientto include deposit contract public/wallet actions and export address viasrc/index.ts.1.0.51.seismic-viem-tests):tests/contract/depositContract.tswith ABI/bytecode fixtures; wire into test runner and exports.contracts/test/ShieldedDelegationAccount.t.sol.seismic-reactpeer toseismic-viem >=1.0.51and version to1.0.51.Written by Cursor Bugbot for commit b2e30c5. This will update automatically on new commits. Configure here.