Skip to content
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

node: Use simulate + write contract pattern for approval tx #156

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

sehyunc
Copy link
Contributor

@sehyunc sehyunc commented Jan 16, 2025

Purpose

This PR implements the suggested pattern of pairing simulateContract with writeContract to validate that the contract write will execute without errors. This fixes an issue we saw with sending approval transactions on testnet.

The deposit transaction is attempted even if the transaction receipt is not received. This is because we often miss transaction receipts in testnet.

This replaces helper functions generated by @wagmi/cli.

Testing

  • Tested locally against testnet
  • Tested locally against mainnet

@sehyunc sehyunc requested a review from joeykraut January 16, 2025 07:10
@sehyunc sehyunc merged commit bedc613 into main Jan 16, 2025
@sehyunc sehyunc deleted the sehyun/execute-deposit-approval branch January 16, 2025 07:41
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