Deploy to Solana
Install Dependencies
Ensure you have the following dependencies installed:
Deploy NTT
Create a new NTT project (or use an existing NTT project):
ntt new my-ntt-deployment
cd my-ntt-deployment
Initialize a new deployment.json
file, specifying the network.
# Testnet Deployment
ntt init Testnet
# Or, Mainnet Deployment
ntt init Mainnet
Deploy your Solana Token
If you haven't already, deploy a token to Solana.
Generate NTT Program Keypair
When you deploy a Solana program, you need to hardcode the program ID (which is itself a pubkey) into the program code. The NTT CLI allows you to do this seamlessly.
Generate a new NTT program keypair using:
solana-keygen grind --starts-with ntt:1 --ignore-case
Derive the 'token-authority' PDA of the newly generated NTT Program id
ntt solana token-authority <your-ntt-program-keypair>
Set SPL token Mint Authority to newly generated 'token authority' PDA
spl-token authorize <TOKEN_ADDRESS> mint <DERIVED_PDA>
If deploying to Solana in burning
mode, set the mint authority for your SPL token to the NTT program ID you generated in the previous step.
Deploy NTT
Generate or export your payer keypair, then run:
ntt add-chain Solana --latest --mode burning --token <your-SPL-token> --payer <your-keypair.json> --program-key <your-ntt-program-keypair.json>
The NTT Solana program will then compile and deploy.
Configure NTT
The NTT CLI takes inspiration from git. You can run:
ntt status
to check whether yourdeployment.json
file is consistent with what's actually on-chainntt pull
to sync yourdeployment.json
file with the on-chain configuration and set up rate limits with the appropriate number of decimals, depending on the specific chain. For example:For Solana, the limits are set with 9 decimal places:
"inbound": { "Sepolia": "1000.000000000" # inbound limit from Sepolia to Solana }
For Sepolia (Ethereum testnet), the limits are set with 18 decimal places:
"inbound": { "Solana": "1000.000000000000000000" # inbound limit from Solana to Sepolia }
This initial configuration ensures that the rate limits are correctly represented for each chain's token precision
Push deployment to Solana, specifying the Keypair that will cover the gas fees
ntt push --payer <your-keypair.json>
Last updated
Was this helpful?