Port dApp from Solana
To reduce the time to convert and rebuild programs from Solana. We have supported scripts to quickly re-deploy programs to Renec from previously built programs.
#
Prerequisites- For Linux user:
- For Mac user:
- For Windows user: must install make
- Install Chocolatey from here https://chocolatey.org/install
- Then run
choco install make
from a fresh terminal. - Then install git
#
Setup#
Clone repository#
Setup environments- To setup program dependencies, run:
This will install the anchor
and solana
cli if needed. Default solana 1.14.6
, anchor 0.25.0
. We recommend using this version.
To use different version compatible with renec cluster
, set the CLUSTER
and ANCHOR_VERSION
environment variables and run the command
For example:
CLUSTER
can either be mainnet
, testnet
or localnet
. By setting the cluster correctly, the installer will set the corresponding cli
for the program's interaction.
- To run a
localnet
that has the same version asrenec-mainnet
, run;
#
Setup wallets- To gen a new wallet, run:
Type “Enter” for skipping pass Passphrase, and a new wallet will be created:
The wallet's secret key will be stored in the ./wallets
folder.
- To import an existing wallet, create a json file in
.wallets
folder containing the secret string. Example: preparesolana.json
wallet
Then run:
- To request faucet token in
testnet
orlocalnet
, run:
#
Deploy#
Bash script params annotation:program_file_path
: Path to the built program file used to deploy on Solana
keypair_path
: Path to the keypair used to deploy on Solana
program_id_keypair
: Path to the program ID keypair file used to deploy on Solana
- Deploy on Testnet:
- Deploy on Mainnet: