Skip to main content
6 votes

429 Too Many Requests for url: https://api.mainnet-beta.solana.com/

If you are hitting mainnet-beta you will get rate limited, so you need to configure your CLI or Application with an RPC endpoint... here's a list of RPC providers https://docs.metaplex.com/resources/...
OneFishTaco's user avatar
4 votes
Accepted

CLOSED_ACCOUNT_DISCRIMINATOR removed from 0.30

I was able to solve this by using the recommended method of passing the close attribute. #[account(mut, close = destination)] https://github.com/coral-xyz/sealevel-attacks/blob/master/programs/9-...
ZeroNine's user avatar
  • 516
3 votes
Accepted

Is it common to have close account instruction inside my solana program

To close a program account, you'll need dedicated instruction in your program as you mentioned. If you're using Anchor here's a basic reference that you can add additional constraints to: https://...
john's user avatar
  • 7,794
3 votes
Accepted

How to safely close program buffers?

To give a quick rundown, a program account is actually just data for a pubkey pointing towards the account that actually contains the program executable data. The program executable data account ...
Jon C's user avatar
  • 19.6k
3 votes

429 Too Many Requests for url: https://api.mainnet-beta.solana.com/

The following RPC servers are public goods: https://docs.solana.com/cluster/rpc-endpoints Those RPC servers are sponsored, and open for anybody to use. As such, they have very strict rate limits – ...
steveluscher's user avatar
  • 3,153
3 votes
Accepted

PDA rent exemption collection to transaction fee payer error on account close

So, I found what my problem is. If I get the sum of the rents and apply it at the very end instead of updating the payer account at each step of the loop it works. So it looks something like this: let ...
Vincent Berthier's user avatar
3 votes

How do you repopen a closed account?

The close attribute in anchor removes all lamports (SOL) from the account which basically frees/deletes the account. After an account is closed, you should be able to init it as if it was never ...
Serban's user avatar
  • 1,486
2 votes
Accepted

Which accounts can a program close?

A program can only close an account which it has initialized. It could be PDAs, token accounts, etc. You can't just pass any arbitrary account and close it. If you wish to close a state/PDA account ...
Syed Aabis Akhtar's user avatar
2 votes
Accepted

How to close associated token accounts on a program-owned account?

To answer your questions: There's certainly nothing wrong with this! DeFi application are often built using token accounts owned by program-owned accounts The ATAs must be closed by the account that ...
Jon C's user avatar
  • 19.6k
1 vote

How can I close a token account AND transfer all my sol to another wallet within the same transaction?

This is possible. You can combine the two instructions(close SPL Token account and transfer SOL) in one transaction, and the runtime will execute them atomically. async function closeAndTransferSol() {...
Jimii's user avatar
  • 7,712
1 vote

close sol account - rent

To close an account, you must transfer all sol to another account/address. If an account has no SOL in it to be rent-exempt, it will be purged from the runtime. If you are referring to wrapped SOL, ...
Jimii's user avatar
  • 7,712
1 vote

What does it mean Garbage Collection?

"Garbage collection" refers to deleting an account on the network. When an account has no more lamports in it, the runtime will "garbage collect" it and reinitialize all of the ...
Jon C's user avatar
  • 19.6k
1 vote

What does it mean Garbage Collection?

Here is a PR that mentions a feature gate to disable rent collection. It also mentions there are no longer rent paying accounts on the network. The rent paying accounts on solana are phasing out. Add ...
john's user avatar
  • 7,794
1 vote

Closing token accounts with spl-token close not working

did you try spl-token close --address 2WehTH4Hjb1kLU4BYG8Y71KLCwPX95H6xoQen6ngRWk5
Concise Labs's user avatar
  • 1,364

Only top scored, non community-wiki answers of a minimum length are eligible