Ashburton-Finance/flash-aggregator

Find total cost of deploying, and how it can be reduced

MedadRufus opened this issue · 2 comments

Things to consider:

  • rent
  • cost of deployment

Perhaps consider making a way to estimate total costs on anchor.

A rent free deposit has to be sent. Currently, the program takes up 437280 bytes. Running solana program show will show the size of the program. Solana appears to automatically deploy with the rent exempt minimum, in this case 3.04467288 SOL.

solana program show GT2jZnYzjMkv4uufjPHpRStKmQKQEt5oJYHmCAcFXb4M


# Program Id: GT2jZnYzjMkv4uufjPHpRStKmQKQEt5oJYHmCAcFXb4M
# Owner: BPFLoaderUpgradeab1e11111111111111111111111
# ProgramData Address: 6VxqZdhHGQqs8eBEjdCgc4H8M4HUQxWtdSHcnt1HMa65
# Authority: 711gc5iRvrUCjd17VeDdJkcqm7wbe71fMfNGRNCWFukt
# Last Deployed In Slot: 95293605
# Data Length: 437280 (0x6ac20) bytes
# Balance: 3.04467288 SOL

But its important to note that the amount can be recovered when the account is closed. So its not consumed.