Skip to content

Ilariae/clean ntt #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Before proceeding, make sure you have the NTT CLI installed and a project initialized.

Follow these steps (or see the [Get Started guide](/docs/products/native-token-transfers/get-started/#install-ntt-cli){target=\_blank}):

1. Install the NTT CLI:

```bash
Expand Down
142 changes: 88 additions & 54 deletions llms-files/llms-ntt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -705,10 +705,92 @@ categories: NTT, Transfer

This guide walks you through deploying NTT on EVM chains, 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 you begin, ensure you have the following:

- An existing ERC-20 token deployed to the [EVM chains](/docs/products/reference/supported-networks/#ntt){target=\_blank} you plan to use
- Make sure you have the NTT CLI installed and a project initialized. Follow the below steps or see the [Get Started guide](/docs/products/native-token-transfers/get-started/#install-ntt-cli){target=\_blank}:

???- interface "Install the NTT CLI and Scaffold a New Project"

1. Install the NTT CLI:

```bash
curl -fsSL https://raw.githubusercontent.com/wormhole-foundation/native-token-transfers/main/cli/install.sh | bash
```

Verify installation:

```bash
ntt --version
```

2. Initialize a new NTT project:

```bash
ntt new my-ntt-project
cd my-ntt-project
```

3. Create the deployment config**:

=== "Mainnet"

```bash
ntt init Mainnet
```

=== "Testnet"

```bash
ntt init Testnet
```

This generates a `deployment.json` file where your deployment settings will be stored.


## Deploy Your Token and Ensure Compatibility

If you still need to do so, deploy the token contract to the destination or spoke chains.

???- interface "Deploy an ERC-20 Token on EVM"
Use the [example NTT token repository](https://github.com/wormhole-foundation/example-ntt-token){target=\_blank} to deploy a basic ERC-20 token contract on testnet.

1. **Install Foundry** - install the [Forge CLI](https://book.getfoundry.sh/getting-started/installation){target=\_blank}

2. **Clone the repository** – fetch the example contract repository

```bash
git clone https://github.com/wormhole-foundation/example-ntt-token.git
cd example-ntt-token
```

3. **Deploy the token contract** – deploy to testnet with your preferred name, symbol, minter, and owner addresses

```bash
forge create --broadcast \
--rpc-url INSERT_RPC_URL \
--private-key INSERT_YOUR_PRIVATE_KEY \
src/PeerToken.sol:PeerToken \
--constructor-args "INSERT_TOKEN_NAME" "INSERT_TOKEN_SYMBOL" INSERT_MINTER_ADDRESS INSERT_OWNER_ADDRESS
```

4. **Mint tokens** – send tokens to your address

```bash
cast send INSERT_TOKEN_ADDRESS \
"mint(address,uint256)" \
INSERT_RECIPIENT_ADDRESS \
INSERT_AMOUNT_IN_WEI \
--private-key INSERT_YOUR_PRIVATE_KEY \
--rpc-url INSERT_RPC_URL
```

!!! note
This token uses 18 decimals by default. All minting values must be specified in `wei` (1 token = 10^18).


### Requirements for Token Deployment

Wormhole’s NTT framework supports two [deployment models](/docs/products/native-token-transfers/overview#deployment-models){target=\_blank}: burn-and-mint and hub-and-spoke. **Both require an ERC-20 token (new or existing).**
Expand Down Expand Up @@ -795,56 +877,12 @@ This table compares the configuration parameters available when deploying the NT

## Deploy NTT

Before deploying NTT contracts on EVM chains, you need to scaffold a project and initialize your deployment configuration.

???- interface "Install the NTT CLI and Scaffold a New Project"

Before proceeding, make sure you have the NTT CLI installed and a project initialized.

Follow these steps (or see the [Get Started guide](/docs/products/native-token-transfers/get-started/#install-ntt-cli){target=\_blank}):

1. Install the NTT CLI:

```bash
curl -fsSL https://raw.githubusercontent.com/wormhole-foundation/native-token-transfers/main/cli/install.sh | bash
```

Verify installation:

```bash
ntt --version
```

2. Initialize a new NTT project:

```bash
ntt new my-ntt-project
cd my-ntt-project
```

3. Create the deployment config**:

=== "Mainnet"

```bash
ntt init Mainnet
```

=== "Testnet"
Once you have the NTT CLI installed and a project initialized, proceed with adding your EVM chains and deploying contracts.

```bash
ntt init Testnet
```
Ensure your wallet is properly configured and that sensitive information such as private keys is handled securely.

This generates a `deployment.json` file where your deployment settings will be stored.

Once you've completed those steps, return here to proceed with adding your EVM chains and deploying contracts.

Ensure you have set up your environment correctly:

```bash
export ETH_PRIVATE_KEY=INSERT_PRIVATE_KEY
```
!!! info "Secure Key Management Recommended"
Avoid exposing your private key directly in scripts or environment variables. Use a secure key management method like encrypted keystores.

Add each chain you'll be deploying to. The following example demonstrates configuring NTT in burn-and-mint mode on Ethereum Sepolia and Arbitrum Sepolia:

Expand Down Expand Up @@ -906,7 +944,7 @@ The final step in the deployment process is to set the NTT Manager as a minter o

- If you followed the [`INttToken`](https://github.com/wormhole-foundation/native-token-transfers/blob/main/evm/src/interfaces/INttToken.sol){target=\_blank} interface, you can execute the `setMinter(address newMinter)` function
```json
cast send $TOKEN_ADDRESS "setMinter(address)" $NTT_MANAGER_ADDRESS --private-key $ETH_PRIVATE_KEY --rpc-url $YOUR_RPC_URL
cast send $TOKEN_ADDRESS "setMinter(address)" $NTT_MANAGER_ADDRESS --keystore /path/to/keystore.json --password <(echo "YOUR_PASSWORD") --rpc-url $YOUR_RPC_URL
```

- If you have a custom process to manage token minters, you should now follow that process to add the corresponding NTT Manager as a minter
Expand Down Expand Up @@ -1037,11 +1075,7 @@ The [NTT CLI](/docs/products/native-token-transfers/reference/cli-commands/){tar

???- interface "Install the NTT CLI and Scaffold a New Project"

Before proceeding, make sure you have the NTT CLI installed and a project initialized.

Follow these steps (or see the [Get Started guide](/docs/products/native-token-transfers/get-started/#install-ntt-cli){target=\_blank}):

1. Install the NTT CLI:
1. Install the NTT CLI:

```bash
curl -fsSL https://raw.githubusercontent.com/wormhole-foundation/native-token-transfers/main/cli/install.sh | bash
Expand Down
142 changes: 88 additions & 54 deletions llms-files/llms-transfer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5398,10 +5398,92 @@ categories: NTT, Transfer

This guide walks you through deploying NTT on EVM chains, 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 you begin, ensure you have the following:

- An existing ERC-20 token deployed to the [EVM chains](/docs/products/reference/supported-networks/#ntt){target=\_blank} you plan to use
- Make sure you have the NTT CLI installed and a project initialized. Follow the below steps or see the [Get Started guide](/docs/products/native-token-transfers/get-started/#install-ntt-cli){target=\_blank}:

???- interface "Install the NTT CLI and Scaffold a New Project"

1. Install the NTT CLI:

```bash
curl -fsSL https://raw.githubusercontent.com/wormhole-foundation/native-token-transfers/main/cli/install.sh | bash
```

Verify installation:

```bash
ntt --version
```

2. Initialize a new NTT project:

```bash
ntt new my-ntt-project
cd my-ntt-project
```

3. Create the deployment config**:

=== "Mainnet"

```bash
ntt init Mainnet
```

=== "Testnet"

```bash
ntt init Testnet
```

This generates a `deployment.json` file where your deployment settings will be stored.


## Deploy Your Token and Ensure Compatibility

If you still need to do so, deploy the token contract to the destination or spoke chains.

???- interface "Deploy an ERC-20 Token on EVM"
Use the [example NTT token repository](https://github.com/wormhole-foundation/example-ntt-token){target=\_blank} to deploy a basic ERC-20 token contract on testnet.

1. **Install Foundry** - install the [Forge CLI](https://book.getfoundry.sh/getting-started/installation){target=\_blank}

2. **Clone the repository** – fetch the example contract repository

```bash
git clone https://github.com/wormhole-foundation/example-ntt-token.git
cd example-ntt-token
```

3. **Deploy the token contract** – deploy to testnet with your preferred name, symbol, minter, and owner addresses

```bash
forge create --broadcast \
--rpc-url INSERT_RPC_URL \
--private-key INSERT_YOUR_PRIVATE_KEY \
src/PeerToken.sol:PeerToken \
--constructor-args "INSERT_TOKEN_NAME" "INSERT_TOKEN_SYMBOL" INSERT_MINTER_ADDRESS INSERT_OWNER_ADDRESS
```

4. **Mint tokens** – send tokens to your address

```bash
cast send INSERT_TOKEN_ADDRESS \
"mint(address,uint256)" \
INSERT_RECIPIENT_ADDRESS \
INSERT_AMOUNT_IN_WEI \
--private-key INSERT_YOUR_PRIVATE_KEY \
--rpc-url INSERT_RPC_URL
```

!!! note
This token uses 18 decimals by default. All minting values must be specified in `wei` (1 token = 10^18).


### Requirements for Token Deployment

Wormhole’s NTT framework supports two [deployment models](/docs/products/native-token-transfers/overview#deployment-models){target=\_blank}: burn-and-mint and hub-and-spoke. **Both require an ERC-20 token (new or existing).**
Expand Down Expand Up @@ -5488,56 +5570,12 @@ This table compares the configuration parameters available when deploying the NT

## Deploy NTT

Before deploying NTT contracts on EVM chains, you need to scaffold a project and initialize your deployment configuration.

???- interface "Install the NTT CLI and Scaffold a New Project"

Before proceeding, make sure you have the NTT CLI installed and a project initialized.

Follow these steps (or see the [Get Started guide](/docs/products/native-token-transfers/get-started/#install-ntt-cli){target=\_blank}):

1. Install the NTT CLI:

```bash
curl -fsSL https://raw.githubusercontent.com/wormhole-foundation/native-token-transfers/main/cli/install.sh | bash
```

Verify installation:

```bash
ntt --version
```

2. Initialize a new NTT project:

```bash
ntt new my-ntt-project
cd my-ntt-project
```

3. Create the deployment config**:

=== "Mainnet"

```bash
ntt init Mainnet
```

=== "Testnet"
Once you have the NTT CLI installed and a project initialized, proceed with adding your EVM chains and deploying contracts.

```bash
ntt init Testnet
```
Ensure your wallet is properly configured and that sensitive information such as private keys is handled securely.

This generates a `deployment.json` file where your deployment settings will be stored.

Once you've completed those steps, return here to proceed with adding your EVM chains and deploying contracts.

Ensure you have set up your environment correctly:

```bash
export ETH_PRIVATE_KEY=INSERT_PRIVATE_KEY
```
!!! info "Secure Key Management Recommended"
Avoid exposing your private key directly in scripts or environment variables. Use a secure key management method like encrypted keystores.

Add each chain you'll be deploying to. The following example demonstrates configuring NTT in burn-and-mint mode on Ethereum Sepolia and Arbitrum Sepolia:

Expand Down Expand Up @@ -5599,7 +5637,7 @@ The final step in the deployment process is to set the NTT Manager as a minter o

- If you followed the [`INttToken`](https://github.com/wormhole-foundation/native-token-transfers/blob/main/evm/src/interfaces/INttToken.sol){target=\_blank} interface, you can execute the `setMinter(address newMinter)` function
```json
cast send $TOKEN_ADDRESS "setMinter(address)" $NTT_MANAGER_ADDRESS --private-key $ETH_PRIVATE_KEY --rpc-url $YOUR_RPC_URL
cast send $TOKEN_ADDRESS "setMinter(address)" $NTT_MANAGER_ADDRESS --keystore /path/to/keystore.json --password <(echo "YOUR_PASSWORD") --rpc-url $YOUR_RPC_URL
```

- If you have a custom process to manage token minters, you should now follow that process to add the corresponding NTT Manager as a minter
Expand Down Expand Up @@ -5730,11 +5768,7 @@ The [NTT CLI](/docs/products/native-token-transfers/reference/cli-commands/){tar

???- interface "Install the NTT CLI and Scaffold a New Project"

Before proceeding, make sure you have the NTT CLI installed and a project initialized.

Follow these steps (or see the [Get Started guide](/docs/products/native-token-transfers/get-started/#install-ntt-cli){target=\_blank}):

1. Install the NTT CLI:
1. Install the NTT CLI:

```bash
curl -fsSL https://raw.githubusercontent.com/wormhole-foundation/native-token-transfers/main/cli/install.sh | bash
Expand Down
Loading