Skip to content

Conversation

@ameya-deshmukh
Copy link
Collaborator

@ameya-deshmukh ameya-deshmukh commented Dec 1, 2025

Note

Adds balance validations to the deposit test and refactors the wallet deposit action to call client.writeContract, with client types/docs noting deposit contract actions.

  • Tests (packages/seismic-viem-tests):
    • Deposit flow: capture initial/final account balances and contract balance; assert contract holds expected deposit and account balance decreased by at least the deposit; return balances in test result.
  • SDK Actions (packages/seismic-viem/src/actions/depositContract.ts):
    • Refactor deposit wallet action to call client.writeContract (remove writeContract import).
  • Client (packages/seismic-viem/src/client.ts):
    • Update type docs to include deposit, getDepositRoot, and getDepositCount in public client, and deposit in wallet client.

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

@ameya-deshmukh ameya-deshmukh changed the title feat: add balance check in deposit wallet action feat: add balance check in deposit wallet action test Dec 1, 2025
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 is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 2

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.

): DepositContractWalletActions => ({
deposit: async (args) =>
writeContract(client, {
client.writeContract({
Copy link

Choose a reason for hiding this comment

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

Bug: Deposit now uses shielded instead of transparent transactions

The change from writeContract(client, {...}) to client.writeContract({...}) alters transaction behavior. The standalone writeContract from viem/actions sends standard (unencrypted) transactions. However, due to the client extension order in client.ts, client.writeContract is the shielded version (from shieldedWalletActions) that encrypts calldata. This means deposits now use encrypted transactions instead of transparent ones, which may not be intended for this deposit contract functionality. The transparent version is available as twriteContract.

Fix in Cursor Fix in Web

@ameya-deshmukh ameya-deshmukh merged commit c8032a3 into main Dec 1, 2025
5 checks passed
@ameya-deshmukh ameya-deshmukh deleted the ameya/fix-deposit branch December 1, 2025 19: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.

2 participants