Questions tagged [rent]
The rent tag has no usage guidance.
49
questions
2
votes
1
answer
54
views
How can I find out how much SOL I will need to deploy an anchor program?
If I have an anchor program, how can I find out how much SOL it will cost me to deploy it? Afaik the raw binary size isn't accurate, as some padding is also added.
1
vote
1
answer
29
views
Determining rent epoch
Is there a way to determine preferably on chain when the rent for an account was last paid? If not, is there a way to do so off-chain?
1
vote
1
answer
39
views
Which accounts can a program close?
Suppose I use the function close, which closes an arbitrary account,
pub fn close(ctx: Context<Close>) -> ProgramResult {
let dest_starting_lamports = ctx.accounts.destination....
0
votes
1
answer
67
views
How is delegated stake balance calculated?
I created my staking account with 1 + 0.00228288 (rent-exempt) SOL. So that my initial delegated stake was exactly 1 SOL.
After 6 epochs, my balance is 1.004707281. And my delegated stake is 1....
2
votes
2
answers
40
views
How to determine how much will be paid back/paid extra when reallocing
Say we have the following definition for an instruction and we know that my_acc previously took up 200 bytes and is now being realloced to 100. How can we find out how many lamports will be paid to ...
1
vote
0
answers
13
views
Solana Rent Calculation [duplicate]
Could someone please provide guidance or a code example on how to calculate rent for Solana accounts? Specifically, I'm interested in understanding how to determine the rent due for each account based ...
1
vote
1
answer
42
views
Do I need to fund a wallet to keep a token account rent free?
Let’s say I create a new empty wallet. Let’s call this wallet A.
In wallet B I have SOL and a Spl token. From wallet B I send to wallet A some of the SPL tokens and I pay SOL to initiate the token ...
0
votes
3
answers
65
views
Is it a waste to implement HashMap via PDAs when the value type is only a bool?
When writing smart contracts for EVM chains, I can define a mapping(address => bool). When it comes to Solana, I think I can only use PDAs to achieve the same thing? Is my understanding correct?
If ...
1
vote
1
answer
34
views
rent handling in storage
How does this "collecting rent" work exactly(or used to work)? Does it iterate over all the accounts that are not rent exempt per every epoch?
in this link, i saw this line:
requires the ...
2
votes
1
answer
193
views
Cost of logging vs storing data in Solana programs?
The Way Ethereum stores data through Events I want to do the same on Solana but not sure
How do the compare the cost of storing it in logs or in Solana programs?
Are there any other cheaper ways to ...
0
votes
1
answer
80
views
Reducing rent costs
I feel like for some base accounts, I’m getting charged 0.002 sol, which is like $0.20 to store a simple data field on a PDA.
Especially for multiple data fields I want to store, this number added ...
1
vote
3
answers
233
views
Solana rent and garbage collection
I'm working on a project that can be seen as a centralized exchange. We already have support for Solana deposits/withdrawals and I now I'm adding support for token deposit/withdrawals, but with this, ...
2
votes
1
answer
85
views
How can I retrieve the rent balance on an address from the native node RPC?
Is there an endpoint in the JSON RPC API which can give me back the rent balance for a given address?
https://docs.solana.com/api/http#getaccountinfo
1
vote
1
answer
127
views
PDA rent exemption collection to transaction fee payer error on account close
In a transaction, I’m trying to close an ATA and a PDA.
The ATA is closed by calling close_account from the SPL Token 2022 crate / On Chain Program, and the rent exemption can be sent without any ...
1
vote
2
answers
158
views
transfer token with rent exempt on solana network
Does anyone know how to transfer token on solana without paying rent which is equivalent to ~0.002 sol?