Deploy to EVM
Last updated
Was this helpful?
Last updated
Was this helpful?
If your token is not already deployed, deploy the token contract to the destination or spoke chains.
Tokens integrated with NttManager
in burning
mode requre the following two functions to be present:
burn(uint256 amount)
mint(address account, uint256 amount)
These functions are not part of the standard ERC20 interface.
The documents the required functions and convenience methods, errors, and events.
Later on, we will demonstrate setting mint authority to the corresponding NttManager
contract.
You can also follow the scripts in the repository to deploy a token contract.
Create a new NTT project:
Initialize a new deployment.json
file, specifying the network.
Ensure your environment is set up:
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:
The ntt add-chain
command takes the following parameters:
Name of each chain
Version of NTT to deploy (use --latest
for the latest contract versions)
Mode (either burning
or locking
)
Your Token Contract Address
ntt status
to check whether your deployment.json
file is consistent with what's actually on-chain
ntt pull
to sync your deployment.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:
For Sepolia (Ethereum testnet), the limits are set with 18 decimal places:
This initial configuration ensures that the rate limits are correctly represented for each chain's token precision
ntt push
to sync the on-chain configuration with local changes made to your deployment.json
file
After you deploy the NTT contracts, make sure 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.
The final step in the deployment process is to set the NTT Manager as a minter of your token on all chains you have deployed to in burning
mode. When performing a hub and spoke deployment, it is only necessary to set the NTT Manager as a minter of the token on each spoke chain.
If you have a custom process to manage your token minter(s), you should now follow that process to add the corresponding NTT Manager as a minter.
The NTT CLI takes inspiration from . You can run:
If you followed the interface, you can execute the setMinter(address newMinter)
function.