Using Mainnet Accounts and Programs
Oftentimes, local tests rely on programs and accounts that are not available on
the local validator by default.
The Solana CLI allows to both:
- Download Programs and Accounts
- Load Programs and Accounts to a local validator
How to load accounts from mainnet
It is possible to download the JUP token mint account to file:
Loading it to your localnet is then done by passing the account's file and destination address (on the local cluster) when starting the validator:
Similarly, it is possible to download the Openbook program:
Loading it to your localnet is then done by passing the program's file and destination address (on the local cluster) when starting the validator: