Deploy NTT to Sui#
Native Token Transfers (NTT) enable seamless multichain transfers of Sui tokens using Wormhole's messaging protocol. Instead of creating wrapped tokens, NTT allows native assets to move across chains while maintaining their original properties.
This guide walks you through deploying NTT on Sui, including setting up dependencies, configuring token compatibility, and using the NTT CLI to deploy in hub-and-spoke or burn-and-mint mode.
Prerequisites#
Before deploying NTT on Sui, ensure you have the following prerequisites:
Overview of the Deployment Process#
Deploying NTT on the Sui network follows a structured process:
-
Choose your token setup:
- Use an existing Sui token: If your token is already deployed on the Sui network, you can skip token creation and move directly to the Set Up NTT section.
-
Create a new Sui token: If you don't already have a Sui token deployed, you'll need to deploy and configure it on the Sui network before integrating with Wormhole's NTT.
Create and Deploy Sui Tokens
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).
-
-
Choose your deployment model:
- Hub-and-spoke: Tokens are locked on a hub chain and minted on destination spoke chains. Since the token supply remains controlled by the hub chain, no changes to the minting authority are required.
- Burn-and-mint: Tokens are burned on the source chain and minted on the destination chain. This requires transferring the Sui Treasury cap object to the NTT manager.
-
Deploy and configure NTT: Use the NTT CLI to initialize and deploy the NTT program, specifying your Sui token and deployment mode.
Set Up NTT#
Before deploying NTT contracts on Sui, you need to scaffold a project and initialize your deployment configuration.
Note
If you already have an NTT deployment to another chain (like Solana), you can skip the ntt new
and ntt init
commands. Simply navigate to your existing NTT project directory and proceed directly to the Deploy and Configure NTT section.
The NTT CLI manages deployments, configures settings, and interacts with the NTT system. Follow these steps to set up NTT using the CLI tool:
Install the NTT CLI and Scaffold a New Project
-
Install the NTT CLI:
curl -fsSL https://raw.githubusercontent.com/wormhole-foundation/native-token-transfers/main/cli/install.sh | bash
Verify installation:
-
Initialize a new NTT project:
-
Create the deployment config using the following command. This will generate a
deployment.json
file where your settings are stored:
Deploy and Configure NTT#
Once you've set up NTT, proceed with deploying the contracts.
-
Environment Setup: Ensure you have set up your environment correctly, open your terminal, and run the
Note: Replaceexport
commands:goofy
with your actual key alias. This command exports the private key in the format required by the NTT add-chain command.After setting up your deployment, finalize the configuration and deploy the NTT program onto the Sui network by following the steps below.
-
Deploy NTT to Sui: Run the appropriate command based on your deployment mode.
Note
The
--token
parameter requires the full Sui coin type in the format0xADDRESS::module::struct
. For example,0x2::sui::SUI
for the native SUI token, or0x1234567890abcdef::my_module::MyToken
for a custom token.Warning
In burning mode, the NTT CLI moves the treasury-cap object during the add-chain command to the NTT manager, enabling the NTT manager to mint tokens. Important: Once the treasury-cap object is moved to the NTT manager, you will no longer be able to modify the token's metadata (such as name, symbol, or icon).
-
Verify deployment status: After deployment, check if your
deployment.json
file matches the on-chain configuration using the following command.If needed, sync your local configuration with the on-chain state:
-
Configure inbound and outbound rate limits: By default, the inbound and outbound limits are set to
0
and must be updated before deployment.Open your
deployment.json
file and adjust the values based on your use case: -
Push the final deployment: Once rate limits are set, sync the on-chain configuration with local changes made to your
deployment.json
file.
After you deploy the NTT contracts, ensure that the deployment is properly configured and your local representation is consistent with the actual on-chain state by running ntt status
and following the instructions shown on the screen.
Where to Go Next#
-
Test Your Deployment
Follow the NTT Post Deployment Guide for integration examples and testing instructions.
-
Deploy NTT to SVM Chains
Follow the guide to deploy and configure Wormhole's Native Token Transfers (NTT) for SVM chains.
-
View FAQs
Find answers to common questions about NTT.
-
Deploy NTT to EVM Chains
Follow the guide to deploy and configure Wormhole's Native Token Transfers (NTT) for EVM chains.