Get Started with NTT#
Introduction#
The Native Token Transfers (NTT) framework enables seamless cross-chain token movement without wrapping or liquidity pools. This guide shows you how to install the NTT CLI, which is used to configure and deploy native token contracts, and scaffold your first project for deployment on testnet or mainnet.
If you are looking for a no-code experience to deploy on mainnet, you can explore the NTT Launchpad. For a coding walkthrough, watch the NTT deployment demo.
Prerequisites#
Before you begin, make sure you have:
- Node.js and npm installed.
- Bun installed.
- A wallet private key with tokens on supported chains.
- ERC-20 or SPL tokens already deployed on the source and destination chains.
Don’t Have a Token Yet?#
To use NTT, you must have a token already deployed on the source and destination chains. If you don’t have one, follow the quick guides below to deploy a basic test token.
Deploy an ERC-20 Token on EVM
Use the example NTT token repository to deploy a basic ERC-20 token contract on testnet.
-
Install Foundry: Install the Forge CLI.
-
Clone the repository: Fetch the example contract repository.
-
Deploy the token contract: Deploy to testnet with your preferred name, symbol, minter, and owner addresses.
-
Mint tokens: Send tokens to your address.
Note
This token uses 18 decimals by default. All minting values must be specified in wei
(1 token = 10^18).
Create and Mint an SPL Token
This section walks you through generating a Solana wallet, deploying an SPL token, creating a token account, and minting tokens.
-
Generate a key pair: Run the following command to create a new wallet compatible with supported SVM chains.
-
Set CLI keypair configuration: Configure the Solana CLI to use the generated key pair.
-
Select an RPC URL: Configure the CLI to use the appropriate network using one of the following commands.
Note
Solana's official testnet cluster is not supported for token creation or deployment with NTT. You must use the Solana devnet instead.
-
Fund your wallet: Ensure your wallet has enough native tokens to cover transaction fees.
-
On Solana Devnet, you can request an airdrop:
-
-
Install SPL Token CLI: Install or update the required CLI tool.
-
Create a new SPL token: Initialize the token on your connected SVM chain.
-
Create a token account: Generate an account to hold the token.
-
Mint tokens: Send 1000 tokens to the created account.
Note
NTT versions >=v2.0.0+solana
support SPL tokens with transfer hooks.
Create and Deploy a Sui Token
This section walks you through setting up a wallet, deploying a Sui Coin contract, and minting tokens on testnet.
-
Clone the repository: Use the example NTT token repository to deploy a Sui Coin contract on testnet.
-
Set up a new wallet on testnet: Before building and deploying your token, you'll need to create a new wallet on the Sui testnet and fund it with test tokens.
-
Create a new testnet environment: Configure your Sui client for testnet.
-
Generate a new address: Create a new Ed25519 address for your wallet.
-
Switch to the new address: The above command will output a new address. Copy this address and switch to it.
-
Fund your wallet: Use the faucet to get test tokens.
-
Verify funding: Check that your wallet has been funded.
-
-
Build the project: Compile the Move contract.
-
Deploy the token contract: Deploy to testnet.
-
Mint tokens: Send tokens to your address.
Note
This token uses 9 decimals by default. All minting values must be specified with that in mind (1 token = 10^9).
Install NTT CLI#
The NTT CLI is recommended to deploy and manage your cross-chain token configuration.
-
Run the installation command in your terminal:
-
Verify the NTT CLI is installed:
Command not found?
If the ntt
command is not recognized after installation, ensure that Bun is installed and that its binary directory is included in your shell’s PATH.
Append this line to your shell config (e.g., ~/.zshrc
or ~/.bashrc
):
Then, restart your terminal or run source ~/.zshrc
.
Initialize a New NTT Project#
-
Once the CLI is installed, scaffold a new project by running:
-
Initialize a new
deployment.json
file specifying the network:After initialization, the
deployment.json
file contains your NTT configuration and starts with the selected network.
In the deployment steps, you will add your supported chains, their token addresses, deployment modes, and any custom settings.
Next Steps#
You have scaffolded your NTT project and initialized the configuration file. Next, follow the appropriate guide below to configure your supported chains and deploy NTT contracts:
- Deploy to EVM: Deploy NTT on EVM-compatible chains.
- Deploy to SVM: Deploy NTT on SVM-compatible chains.
- Deploy to Sui: Deploy NTT on Sui.