Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 1.98 KB

File metadata and controls

72 lines (51 loc) · 1.98 KB

NTT Token Mint Authority Transfer Demo

A utility script for transferring token mint authority out of NTT.

Project Setup

  1. Clone the Repository:
git clone https://github.com/wormhole-foundation/demo-ntt-token-mint-authority-transfer
cd demo-ntt-token-mint-authority-transfer
  1. Install Dependencies:
npm install
  1. Replace <TODO>'s and verify the following in the transfer-mint-authority.ts script: You will find most of the needed info in your deployment.json file.

    • Keypair Path Config
    • Network Config
    • SPL Token Config
    • NTT Config
  2. Ensure NTT is paused:

    • If using the NTT CLI, this can be done as follows:

      • Set paused for the Solana chain to true in the deployment.json file:
       {
          "network": "",
          "chains": {
             "Solana": {
             "version": "3.x.x",
      -      "paused": false,
      +      "paused": true,
             ...
          }
       }
      • Run ntt push to sync the changes on-chain.
    • Via TS script, this can be done as follows:

      const pauseTxs = ntt.pause(sender);

Usage:

Transfer token mint authority to new authority:

npm run transfer <NEW_AUTHORITY>

Note

The above only executes the first step of the transfer. Run npm run claim <NEW_AUTHORITY> to complete the transfer.

Complete token mint authority transfer to new authority:

npm run claim <NEW_AUTHORITY>

Note

In case of claiming via SPL Multisig with m > 1, make sure ADDITIONAL_SIGNER_KEYPAIR_PATHS (Keypair Path Config) in the transfer-mint-authority.ts script is correct.