4

Originally asked in the SolanaU discord.

Is there a reason why the Solana CLI will return different values for solana program show and solana account?

solana program show 3KS2k14CmtnuVv2fvYcvdrNgC94Y11WETBpMUGgXyWZL output is

enter image description here

While that of solana account 3KS2k14CmtnuVv2fvYcvdrNgC94Y11WETBpMUGgXyWZL

enter image description here

To add to this, if the difference in the balance has to do something with rent and the data field has something to do with length in memory vs length for storage, shouldn't the fields labels communicate this clearly?

1 Answer 1

5
solana program show 

shows the program and the size of the Executable Data account. This is where the actually .so file will be depoyed to and takes up the most of the cost for deploying a program.

solana account 

shows you the rent that the program account itself costs.

If you open the program in https://explorer.solana.com/address/3KS2k14CmtnuVv2fvYcvdrNgC94Y11WETBpMUGgXyWZL you will see both accounts there.

You can always use

solana rent <amountOfBytes> 

to figure out how much rent and account will cost.

solana rent 5216

will return 0.03719424 SOL for the executable data for example.

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.