diff --git a/llms-files/llms-ntt.txt b/llms-files/llms-ntt.txt index 26d298285..f83fc793c 100644 --- a/llms-files/llms-ntt.txt +++ b/llms-files/llms-ntt.txt @@ -19,6 +19,7 @@ Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/re Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/configuration/rate-limiting.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/faqs.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/get-started.md [type: other] +Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/create-spl-token.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/deploy-to-evm.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/deploy-to-solana.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/evm-launchpad.md [type: other] @@ -691,6 +692,110 @@ You have scaffolded your NTT project and initialized the configuration file. Nex - [Deploy to Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank}: Deploy NTT on Solana. --- END CONTENT --- +Doc-Content: https://wormhole.com/docs/products/native-token-transfers/guides/create-spl-token/ +--- BEGIN CONTENT --- +--- +title: Create and Mint Solana SPL Tokens +description: Step-by-step guide to create and mint Solana SPL tokens, and prepare them for integration with Wormhole's Native Token Transfers (NTT). +categories: NTT, Transfer +--- + +# Create and Mint Solana SPL Tokens + +This guide walks you through the process of creating and minting a new SPL token on Solana for use with Wormhole's [Native Token Transfers (NTT)](/docs/products/native-token-transfers/overview/){target=\_blank}. If your project doesn't already have a token deployed, start here before setting up your NTT deployment. + +You will generate a wallet, configure the Solana CLI, create the token, and mint an initial supply. Once complete, your token will be ready to integrate with NTT using either the burn-and-mint or hub-and-spoke model. + +## Prerequisites + +Before creating and minting a Solana SPL token, make sure the following tools are installed: + +- [Rust](https://www.rust-lang.org/tools/install){target=\_blank} +- [Solana](https://docs.solanalabs.com/cli/install){target=\_blank} **`{{ ntt.solana_cli_version }}`** +- [Anchor](https://www.anchor-lang.com/docs/installation){target=\_blank} **`{{ ntt.anchor_version }}`** + +## Steps to Create and Mint a Token + +Follow the steps below to create a new SPL token and mint an initial supply. If you already have an SPL token deployed, you can skip this guide and proceed to [Deploy Native Token Transfers on Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank}. + +1. **Generate a Solana key pair**: Run the following command to create a new wallet. + + ```bash + solana-keygen grind --starts-with w:1 --ignore-case + ``` + +2. **Set Solana configuration**: Configure the Solana CLI to use the generated key pair using the following command. + + ```bash + solana config set --keypair INSERT_PATH_TO_KEYPAIR_JSON + ``` + +3. **Select an RPC URL**: Configure Solana to use the appropriate network using one of the following commands. + + === "Mainnet" + ```bash + solana config set -um + ``` + + === "Testnet" + ```bash + solana config set -ut + ``` + + === "Devnet" + ```bash + solana config set -ud + ``` + +4. **Fund your wallet**: Ensure you have enough SOL to create a token. If deploying on devnet, request an airdrop with the following commands. + + ```bash + solana airdrop 2 + solana balance + ``` + +5. **Install SPL Token CLI**: Install or update the required [CLI tool](https://spl.solana.com/token){target=\_blank}. + + ```bash + cargo install spl-token-cli + ``` + +6. **Create a new SPL token**: Initialize the token on Solana. + + ```bash + spl-token create-token + ``` + +7. **Create a token account**: Generate an account to hold the token. + + ```bash + spl-token create-account INSERT_TOKEN_ADDRESS + ``` + +8. **Mint tokens**: Send 1000 tokens to the created account. + + ```bash + spl-token mint INSERT_TOKEN_ADDRESS 1000 + ``` + +!!! note + NTT versions `>=v2.0.0+solana` support SPL tokens with [transfer hooks](https://spl.solana.com/transfer-hook-interface){target=\_blank}. + +## Where to Go Next + +
+ +- :octicons-globe-16:{ .lg .middle } **Deploy NTT on Solana** + + --- + + Now that your SPL token is live, connect it to Wormhole using the NTT protocol on Solana. + + [:custom-arrow: Deploy NTT on Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank} + +
+--- END CONTENT --- + Doc-Content: https://wormhole.com/docs/products/native-token-transfers/guides/deploy-to-evm/ --- BEGIN CONTENT --- --- @@ -948,73 +1053,7 @@ Deploying NTT with the CLI on Solana follows a structured process: 1. **Choose your token setup**: - **Use an existing SPL token** - if your token is already deployed on Solana, you can skip token creation and move directly to the [Set Up NTT](#set-up-ntt) section - - **Create a new SPL token** - if you don't already have an SPL token deployed, you'll need to deploy and configure it on Solana before integrating with Wormhole's NTT - - ???- interface "Create and Mint SPL Tokens" - This section walks you through generating a Solana wallet, deploying an SPL token, creating a token account, and minting tokens. - - 1. **Generate a Solana key pair** - run the following command to create a new wallet: - - ```bash - solana-keygen grind --starts-with w:1 --ignore-case - ``` - - 2. **Set Solana configuration** - configure the Solana CLI to use the generated key pair using the following command: - - ```bash - solana config set --keypair INSERT_PATH_TO_KEYPAIR_JSON - ``` - - 3. **Select an RPC URL** - configure Solana to use the appropriate network using one of the following commands: - - === "Mainnet" - ```bash - solana config set -um - ``` - - === "Testnet" - ```bash - solana config set -ut - ``` - - === "Devnet" - ```bash - solana config set -ud - ``` - - 4. **Fund your wallet** - ensure you have enough SOL to create a token. If deploying on devnet, request an airdrop with the following commands: - - ```bash - solana airdrop 2 - solana balance - ``` - - 5. **Install SPL Token CLI** - install or update the required [CLI tool](https://spl.solana.com/token){target=\_blank} - - ```bash - cargo install spl-token-cli - ``` - - 6. **Create a new SPL token** - initialize the token on Solana - - ```bash - spl-token create-token - ``` - - 7. **Create a token account** - generate an account to hold the token - - ```bash - spl-token create-account INSERT_TOKEN_ADDRESS - ``` - - 8. **Mint tokens** - send 1000 tokens to the created account - - ```bash - spl-token mint INSERT_TOKEN_ADDRESS 1000 - ``` - - !!! note - NTT versions `>=v2.0.0+solana` support SPL tokens with [transfer hooks](https://spl.solana.com/transfer-hook-interface){target=\_blank}. + - **Create a new SPL token** - if you don't already have an SPL token deployed, you'll need to deploy and configure it on Solana before integrating with Wormhole's NTT. Follow the [Create and Mint Solana SPL Tokens](/docs/products/native-token-transfers/guides/create-spl-token/){target=\_blank} guide to walk through this process step by step. 2. **Choose your deployment model**: diff --git a/llms-files/llms-transfer.txt b/llms-files/llms-transfer.txt index 2eb19a8ca..4cb223b20 100644 --- a/llms-files/llms-transfer.txt +++ b/llms-files/llms-transfer.txt @@ -32,6 +32,7 @@ Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/re Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/configuration/rate-limiting.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/faqs.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/get-started.md [type: other] +Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/create-spl-token.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/deploy-to-evm.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/deploy-to-solana.md [type: other] Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/evm-launchpad.md [type: other] @@ -5384,6 +5385,110 @@ You have scaffolded your NTT project and initialized the configuration file. Nex - [Deploy to Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank}: Deploy NTT on Solana. --- END CONTENT --- +Doc-Content: https://wormhole.com/docs/products/native-token-transfers/guides/create-spl-token/ +--- BEGIN CONTENT --- +--- +title: Create and Mint Solana SPL Tokens +description: Step-by-step guide to create and mint Solana SPL tokens, and prepare them for integration with Wormhole's Native Token Transfers (NTT). +categories: NTT, Transfer +--- + +# Create and Mint Solana SPL Tokens + +This guide walks you through the process of creating and minting a new SPL token on Solana for use with Wormhole's [Native Token Transfers (NTT)](/docs/products/native-token-transfers/overview/){target=\_blank}. If your project doesn't already have a token deployed, start here before setting up your NTT deployment. + +You will generate a wallet, configure the Solana CLI, create the token, and mint an initial supply. Once complete, your token will be ready to integrate with NTT using either the burn-and-mint or hub-and-spoke model. + +## Prerequisites + +Before creating and minting a Solana SPL token, make sure the following tools are installed: + +- [Rust](https://www.rust-lang.org/tools/install){target=\_blank} +- [Solana](https://docs.solanalabs.com/cli/install){target=\_blank} **`{{ ntt.solana_cli_version }}`** +- [Anchor](https://www.anchor-lang.com/docs/installation){target=\_blank} **`{{ ntt.anchor_version }}`** + +## Steps to Create and Mint a Token + +Follow the steps below to create a new SPL token and mint an initial supply. If you already have an SPL token deployed, you can skip this guide and proceed to [Deploy Native Token Transfers on Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank}. + +1. **Generate a Solana key pair**: Run the following command to create a new wallet. + + ```bash + solana-keygen grind --starts-with w:1 --ignore-case + ``` + +2. **Set Solana configuration**: Configure the Solana CLI to use the generated key pair using the following command. + + ```bash + solana config set --keypair INSERT_PATH_TO_KEYPAIR_JSON + ``` + +3. **Select an RPC URL**: Configure Solana to use the appropriate network using one of the following commands. + + === "Mainnet" + ```bash + solana config set -um + ``` + + === "Testnet" + ```bash + solana config set -ut + ``` + + === "Devnet" + ```bash + solana config set -ud + ``` + +4. **Fund your wallet**: Ensure you have enough SOL to create a token. If deploying on devnet, request an airdrop with the following commands. + + ```bash + solana airdrop 2 + solana balance + ``` + +5. **Install SPL Token CLI**: Install or update the required [CLI tool](https://spl.solana.com/token){target=\_blank}. + + ```bash + cargo install spl-token-cli + ``` + +6. **Create a new SPL token**: Initialize the token on Solana. + + ```bash + spl-token create-token + ``` + +7. **Create a token account**: Generate an account to hold the token. + + ```bash + spl-token create-account INSERT_TOKEN_ADDRESS + ``` + +8. **Mint tokens**: Send 1000 tokens to the created account. + + ```bash + spl-token mint INSERT_TOKEN_ADDRESS 1000 + ``` + +!!! note + NTT versions `>=v2.0.0+solana` support SPL tokens with [transfer hooks](https://spl.solana.com/transfer-hook-interface){target=\_blank}. + +## Where to Go Next + +
+ +- :octicons-globe-16:{ .lg .middle } **Deploy NTT on Solana** + + --- + + Now that your SPL token is live, connect it to Wormhole using the NTT protocol on Solana. + + [:custom-arrow: Deploy NTT on Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank} + +
+--- END CONTENT --- + Doc-Content: https://wormhole.com/docs/products/native-token-transfers/guides/deploy-to-evm/ --- BEGIN CONTENT --- --- @@ -5641,73 +5746,7 @@ Deploying NTT with the CLI on Solana follows a structured process: 1. **Choose your token setup**: - **Use an existing SPL token** - if your token is already deployed on Solana, you can skip token creation and move directly to the [Set Up NTT](#set-up-ntt) section - - **Create a new SPL token** - if you don't already have an SPL token deployed, you'll need to deploy and configure it on Solana before integrating with Wormhole's NTT - - ???- interface "Create and Mint SPL Tokens" - This section walks you through generating a Solana wallet, deploying an SPL token, creating a token account, and minting tokens. - - 1. **Generate a Solana key pair** - run the following command to create a new wallet: - - ```bash - solana-keygen grind --starts-with w:1 --ignore-case - ``` - - 2. **Set Solana configuration** - configure the Solana CLI to use the generated key pair using the following command: - - ```bash - solana config set --keypair INSERT_PATH_TO_KEYPAIR_JSON - ``` - - 3. **Select an RPC URL** - configure Solana to use the appropriate network using one of the following commands: - - === "Mainnet" - ```bash - solana config set -um - ``` - - === "Testnet" - ```bash - solana config set -ut - ``` - - === "Devnet" - ```bash - solana config set -ud - ``` - - 4. **Fund your wallet** - ensure you have enough SOL to create a token. If deploying on devnet, request an airdrop with the following commands: - - ```bash - solana airdrop 2 - solana balance - ``` - - 5. **Install SPL Token CLI** - install or update the required [CLI tool](https://spl.solana.com/token){target=\_blank} - - ```bash - cargo install spl-token-cli - ``` - - 6. **Create a new SPL token** - initialize the token on Solana - - ```bash - spl-token create-token - ``` - - 7. **Create a token account** - generate an account to hold the token - - ```bash - spl-token create-account INSERT_TOKEN_ADDRESS - ``` - - 8. **Mint tokens** - send 1000 tokens to the created account - - ```bash - spl-token mint INSERT_TOKEN_ADDRESS 1000 - ``` - - !!! note - NTT versions `>=v2.0.0+solana` support SPL tokens with [transfer hooks](https://spl.solana.com/transfer-hook-interface){target=\_blank}. + - **Create a new SPL token** - if you don't already have an SPL token deployed, you'll need to deploy and configure it on Solana before integrating with Wormhole's NTT. Follow the [Create and Mint Solana SPL Tokens](/docs/products/native-token-transfers/guides/create-spl-token/){target=\_blank} guide to walk through this process step by step. 2. **Choose your deployment model**: diff --git a/llms-full.txt b/llms-full.txt index 1f7af2f22..ca3f64e85 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -44,6 +44,7 @@ Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/re Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/configuration/rate-limiting.md Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/faqs.md Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/get-started.md +Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/create-spl-token.md Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/deploy-to-evm.md Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/deploy-to-solana.md Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/evm-launchpad.md @@ -12321,6 +12322,110 @@ You have scaffolded your NTT project and initialized the configuration file. Nex - [Deploy to Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank}: Deploy NTT on Solana. --- END CONTENT --- +Doc-Content: https://wormhole.com/docs/products/native-token-transfers/guides/create-spl-token/ +--- BEGIN CONTENT --- +--- +title: Create and Mint Solana SPL Tokens +description: Step-by-step guide to create and mint Solana SPL tokens, and prepare them for integration with Wormhole's Native Token Transfers (NTT). +categories: NTT, Transfer +--- + +# Create and Mint Solana SPL Tokens + +This guide walks you through the process of creating and minting a new SPL token on Solana for use with Wormhole's [Native Token Transfers (NTT)](/docs/products/native-token-transfers/overview/){target=\_blank}. If your project doesn't already have a token deployed, start here before setting up your NTT deployment. + +You will generate a wallet, configure the Solana CLI, create the token, and mint an initial supply. Once complete, your token will be ready to integrate with NTT using either the burn-and-mint or hub-and-spoke model. + +## Prerequisites + +Before creating and minting a Solana SPL token, make sure the following tools are installed: + +- [Rust](https://www.rust-lang.org/tools/install){target=\_blank} +- [Solana](https://docs.solanalabs.com/cli/install){target=\_blank} **`{{ ntt.solana_cli_version }}`** +- [Anchor](https://www.anchor-lang.com/docs/installation){target=\_blank} **`{{ ntt.anchor_version }}`** + +## Steps to Create and Mint a Token + +Follow the steps below to create a new SPL token and mint an initial supply. If you already have an SPL token deployed, you can skip this guide and proceed to [Deploy Native Token Transfers on Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank}. + +1. **Generate a Solana key pair**: Run the following command to create a new wallet. + + ```bash + solana-keygen grind --starts-with w:1 --ignore-case + ``` + +2. **Set Solana configuration**: Configure the Solana CLI to use the generated key pair using the following command. + + ```bash + solana config set --keypair INSERT_PATH_TO_KEYPAIR_JSON + ``` + +3. **Select an RPC URL**: Configure Solana to use the appropriate network using one of the following commands. + + === "Mainnet" + ```bash + solana config set -um + ``` + + === "Testnet" + ```bash + solana config set -ut + ``` + + === "Devnet" + ```bash + solana config set -ud + ``` + +4. **Fund your wallet**: Ensure you have enough SOL to create a token. If deploying on devnet, request an airdrop with the following commands. + + ```bash + solana airdrop 2 + solana balance + ``` + +5. **Install SPL Token CLI**: Install or update the required [CLI tool](https://spl.solana.com/token){target=\_blank}. + + ```bash + cargo install spl-token-cli + ``` + +6. **Create a new SPL token**: Initialize the token on Solana. + + ```bash + spl-token create-token + ``` + +7. **Create a token account**: Generate an account to hold the token. + + ```bash + spl-token create-account INSERT_TOKEN_ADDRESS + ``` + +8. **Mint tokens**: Send 1000 tokens to the created account. + + ```bash + spl-token mint INSERT_TOKEN_ADDRESS 1000 + ``` + +!!! note + NTT versions `>=v2.0.0+solana` support SPL tokens with [transfer hooks](https://spl.solana.com/transfer-hook-interface){target=\_blank}. + +## Where to Go Next + +
+ +- :octicons-globe-16:{ .lg .middle } **Deploy NTT on Solana** + + --- + + Now that your SPL token is live, connect it to Wormhole using the NTT protocol on Solana. + + [:custom-arrow: Deploy NTT on Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank} + +
+--- END CONTENT --- + Doc-Content: https://wormhole.com/docs/products/native-token-transfers/guides/deploy-to-evm/ --- BEGIN CONTENT --- --- @@ -12578,73 +12683,7 @@ Deploying NTT with the CLI on Solana follows a structured process: 1. **Choose your token setup**: - **Use an existing SPL token** - if your token is already deployed on Solana, you can skip token creation and move directly to the [Set Up NTT](#set-up-ntt) section - - **Create a new SPL token** - if you don't already have an SPL token deployed, you'll need to deploy and configure it on Solana before integrating with Wormhole's NTT - - ???- interface "Create and Mint SPL Tokens" - This section walks you through generating a Solana wallet, deploying an SPL token, creating a token account, and minting tokens. - - 1. **Generate a Solana key pair** - run the following command to create a new wallet: - - ```bash - solana-keygen grind --starts-with w:1 --ignore-case - ``` - - 2. **Set Solana configuration** - configure the Solana CLI to use the generated key pair using the following command: - - ```bash - solana config set --keypair INSERT_PATH_TO_KEYPAIR_JSON - ``` - - 3. **Select an RPC URL** - configure Solana to use the appropriate network using one of the following commands: - - === "Mainnet" - ```bash - solana config set -um - ``` - - === "Testnet" - ```bash - solana config set -ut - ``` - - === "Devnet" - ```bash - solana config set -ud - ``` - - 4. **Fund your wallet** - ensure you have enough SOL to create a token. If deploying on devnet, request an airdrop with the following commands: - - ```bash - solana airdrop 2 - solana balance - ``` - - 5. **Install SPL Token CLI** - install or update the required [CLI tool](https://spl.solana.com/token){target=\_blank} - - ```bash - cargo install spl-token-cli - ``` - - 6. **Create a new SPL token** - initialize the token on Solana - - ```bash - spl-token create-token - ``` - - 7. **Create a token account** - generate an account to hold the token - - ```bash - spl-token create-account INSERT_TOKEN_ADDRESS - ``` - - 8. **Mint tokens** - send 1000 tokens to the created account - - ```bash - spl-token mint INSERT_TOKEN_ADDRESS 1000 - ``` - - !!! note - NTT versions `>=v2.0.0+solana` support SPL tokens with [transfer hooks](https://spl.solana.com/transfer-hook-interface){target=\_blank}. + - **Create a new SPL token** - if you don't already have an SPL token deployed, you'll need to deploy and configure it on Solana before integrating with Wormhole's NTT. Follow the [Create and Mint Solana SPL Tokens](/docs/products/native-token-transfers/guides/create-spl-token/){target=\_blank} guide to walk through this process step by step. 2. **Choose your deployment model**: diff --git a/llms.txt b/llms.txt index b96b1956f..da08a2f4a 100644 --- a/llms.txt +++ b/llms.txt @@ -42,6 +42,7 @@ - [Native Token Transfers Rate Limiting](https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/configuration/rate-limiting.md): Learn about rate limits in Wormhole NTT by configuring send/receive limits, queuing, and canceling flows to manage multichain token transfers efficiently. - [Native Token Transfers FAQs](https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/faqs.md): Frequently asked questions about Wormhole Native Token Transfers, including cross-chain lending, SDK usage, custom RPCs, and integration challenges. - [Get Started with NTT](https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/get-started.md): NTT enables cross-chain token movement without wrapping. Install the CLI, deploy test tokens, and scaffold a project to integrate NTT into your app. +- [Create and Mint Solana SPL Tokens](https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/create-spl-token.md): Step-by-step guide to create and mint Solana SPL tokens, and prepare them for integration with Wormhole's Native Token Transfers (NTT). - [Native Token Transfers EVM Deployment](https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/deploy-to-evm.md): Deploy and configure Wormhole’s Native Token Transfers (NTT) for EVM chains, including setup, token compatibility, mint/burn modes, and CLI usage. - [Native Token Transfers Solana Deployment](https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/deploy-to-solana.md): Deploy and configure Wormhole's Native Token Transfers (NTT) for Solana, including setup, token compatibility, mint/burn modes, and CLI usage. - [Deploy Native Token Transfers with Launchpad](https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/native-token-transfers/guides/evm-launchpad.md): Deploy a new token or extend an existing one across multiple chains with the NTT Launchpad. Manage transfers, supply, and settings—all from a single platform. diff --git a/products/native-token-transfers/guides/.pages b/products/native-token-transfers/guides/.pages index 69ca6f893..120c4443b 100644 --- a/products/native-token-transfers/guides/.pages +++ b/products/native-token-transfers/guides/.pages @@ -3,5 +3,6 @@ nav: - 'Deploy to EVM Chains': deploy-to-evm.md - 'Deploy to EVM Chains via Launchpad': evm-launchpad.md - 'Deploy to Solana': deploy-to-solana.md +- 'Create and Mint Solana SPL Tokens': create-spl-token.md - 'Troubleshoot Your Deployment': troubleshoot.md - 'Post Deployment': post-deployment.md \ No newline at end of file diff --git a/products/native-token-transfers/guides/create-spl-token.md b/products/native-token-transfers/guides/create-spl-token.md new file mode 100644 index 000000000..82f5b9ace --- /dev/null +++ b/products/native-token-transfers/guides/create-spl-token.md @@ -0,0 +1,100 @@ +--- +title: Create and Mint Solana SPL Tokens +description: Step-by-step guide to create and mint Solana SPL tokens, and prepare them for integration with Wormhole's Native Token Transfers (NTT). +categories: NTT, Transfer +--- + +# Create and Mint Solana SPL Tokens + +This guide walks you through the process of creating and minting a new SPL token on Solana for use with Wormhole's [Native Token Transfers (NTT)](/docs/products/native-token-transfers/overview/){target=\_blank}. If your project doesn't already have a token deployed, start here before setting up your NTT deployment. + +You will generate a wallet, configure the Solana CLI, create the token, and mint an initial supply. Once complete, your token will be ready to integrate with NTT using either the burn-and-mint or hub-and-spoke model. + +## Prerequisites + +Before creating and minting a Solana SPL token, make sure the following tools are installed: + +- [Rust](https://www.rust-lang.org/tools/install){target=\_blank} +- [Solana](https://docs.solanalabs.com/cli/install){target=\_blank} **`{{ ntt.solana_cli_version }}`** +- [Anchor](https://www.anchor-lang.com/docs/installation){target=\_blank} **`{{ ntt.anchor_version }}`** + +## Steps to Create and Mint a Token + +Follow the steps below to create a new SPL token and mint an initial supply. If you already have an SPL token deployed, you can skip this guide and proceed to [Deploy Native Token Transfers on Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank}. + +1. **Generate a Solana key pair**: Run the following command to create a new wallet. + + ```bash + solana-keygen grind --starts-with w:1 --ignore-case + ``` + +2. **Set Solana configuration**: Configure the Solana CLI to use the generated key pair using the following command. + + ```bash + solana config set --keypair INSERT_PATH_TO_KEYPAIR_JSON + ``` + +3. **Select an RPC URL**: Configure Solana to use the appropriate network using one of the following commands. + + === "Mainnet" + ```bash + solana config set -um + ``` + + === "Testnet" + ```bash + solana config set -ut + ``` + + === "Devnet" + ```bash + solana config set -ud + ``` + +4. **Fund your wallet**: Ensure you have enough SOL to create a token. If deploying on devnet, request an airdrop with the following commands. + + ```bash + solana airdrop 2 + solana balance + ``` + +5. **Install SPL Token CLI**: Install or update the required [CLI tool](https://spl.solana.com/token){target=\_blank}. + + ```bash + cargo install spl-token-cli + ``` + +6. **Create a new SPL token**: Initialize the token on Solana. + + ```bash + spl-token create-token + ``` + +7. **Create a token account**: Generate an account to hold the token. + + ```bash + spl-token create-account INSERT_TOKEN_ADDRESS + ``` + +8. **Mint tokens**: Send 1000 tokens to the created account. + + ```bash + spl-token mint INSERT_TOKEN_ADDRESS 1000 + ``` + +!!! note + NTT versions `>=v2.0.0+solana` support SPL tokens with [transfer hooks](https://spl.solana.com/transfer-hook-interface){target=\_blank}. + +## Where to Go Next + +
+ +- :octicons-globe-16:{ .lg .middle } **Deploy NTT on Solana** + + --- + + Now that your SPL token is live, connect it to Wormhole using the NTT protocol on Solana. + + [:custom-arrow: Deploy NTT on Solana](/docs/products/native-token-transfers/guides/deploy-to-solana/){target=\_blank} + +
\ No newline at end of file diff --git a/products/native-token-transfers/guides/deploy-to-solana.md b/products/native-token-transfers/guides/deploy-to-solana.md index eabc2c12c..85ef7032f 100644 --- a/products/native-token-transfers/guides/deploy-to-solana.md +++ b/products/native-token-transfers/guides/deploy-to-solana.md @@ -27,73 +27,7 @@ Deploying NTT with the CLI on Solana follows a structured process: 1. **Choose your token setup**: - **Use an existing SPL token** - if your token is already deployed on Solana, you can skip token creation and move directly to the [Set Up NTT](#set-up-ntt) section - - **Create a new SPL token** - if you don't already have an SPL token deployed, you'll need to deploy and configure it on Solana before integrating with Wormhole's NTT - - ???- interface "Create and Mint SPL Tokens" - This section walks you through generating a Solana wallet, deploying an SPL token, creating a token account, and minting tokens. - - 1. **Generate a Solana key pair** - run the following command to create a new wallet: - - ```bash - solana-keygen grind --starts-with w:1 --ignore-case - ``` - - 2. **Set Solana configuration** - configure the Solana CLI to use the generated key pair using the following command: - - ```bash - solana config set --keypair INSERT_PATH_TO_KEYPAIR_JSON - ``` - - 3. **Select an RPC URL** - configure Solana to use the appropriate network using one of the following commands: - - === "Mainnet" - ```bash - solana config set -um - ``` - - === "Testnet" - ```bash - solana config set -ut - ``` - - === "Devnet" - ```bash - solana config set -ud - ``` - - 4. **Fund your wallet** - ensure you have enough SOL to create a token. If deploying on devnet, request an airdrop with the following commands: - - ```bash - solana airdrop 2 - solana balance - ``` - - 5. **Install SPL Token CLI** - install or update the required [CLI tool](https://spl.solana.com/token){target=\_blank} - - ```bash - cargo install spl-token-cli - ``` - - 6. **Create a new SPL token** - initialize the token on Solana - - ```bash - spl-token create-token - ``` - - 7. **Create a token account** - generate an account to hold the token - - ```bash - spl-token create-account INSERT_TOKEN_ADDRESS - ``` - - 8. **Mint tokens** - send 1000 tokens to the created account - - ```bash - spl-token mint INSERT_TOKEN_ADDRESS 1000 - ``` - - !!! note - NTT versions `>=v2.0.0+solana` support SPL tokens with [transfer hooks](https://spl.solana.com/transfer-hook-interface){target=\_blank}. + - **Create a new SPL token** - if you don't already have an SPL token deployed, you'll need to deploy and configure it on Solana before integrating with Wormhole's NTT. Follow the [Create and Mint Solana SPL Tokens](/docs/products/native-token-transfers/guides/create-spl-token/){target=\_blank} guide to walk through this process step by step. 2. **Choose your deployment model**: