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

Close Account Functionality #1

Open
cavemanloverboy opened this issue Oct 16, 2024 · 0 comments
Open

Close Account Functionality #1

cavemanloverboy opened this issue Oct 16, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@cavemanloverboy
Copy link
Owner

nanotoken needs a close_account instruction.

Recommended api

  1. Accounts: [account_to_close, destination_account, owner].
  2. Data: [discriminator]

Functionality:

After checking owner is signer, and that account 1 and account 2 share the same mint index (and doing all other account validation), transfer nonzero balance to destination account, and close the account (transfer lamports to owner, set data len to 0, reassign to system program)

@cavemanloverboy cavemanloverboy added good first issue Good for newcomers enhancement New feature or request labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant