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

make withdraw_spl_token tx successful when "non-existent destination" happened #63

Closed
Tracked by #3233
ws4charlie opened this issue Nov 27, 2024 · 0 comments · Fixed by #67
Closed
Tracked by #3233

make withdraw_spl_token tx successful when "non-existent destination" happened #63

ws4charlie opened this issue Nov 27, 2024 · 0 comments · Fixed by #67

Comments

@ws4charlie
Copy link
Collaborator

The context:

After ToB audit, we tend to disable the feature of automatic ATA account creation at the moment. So, what happens if a user withdraw SPL token to an non-existent destination?

To solve the problem, a few updates need to be done when "non-existent destination" case happened:

  1. The solana program needs to make the withdraw_spl_token call successful.
  2. The solana program needs to increment the program nonce even though the SPL token transfer cannot be done.
  3. The solana program needs to signal the "non-existent destination" case by printing a proper log message, for example: ata does not exist or non-existent destination.
  4. zetaclient interpret this withdraw_spl_token transaction as failed if above log message (in 3) is detected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant