@@ -45,7 +45,7 @@ import {
4545} from '../../sdk/src' ;
4646import { createInitializeConfidentialTransferMintInstruction } from './confidential-transfers' ;
4747import { Program , BN } from '@coral-xyz/anchor' ;
48- import { anchorProvider , keysFromEnv , NttManager } from './utils' ;
48+ import { anchorProvider , keysFromEnv , NttManager , updatePortalMint } from './utils' ;
4949import { MerkleTree } from '../../sdk/src/merkle' ;
5050import { bs58 } from '@coral-xyz/anchor/dist/cjs/utils/bytes' ;
5151import { SolanaUnsignedTransaction } from '@wormhole-foundation/sdk-solana/dist/cjs' ;
@@ -78,7 +78,7 @@ async function main() {
7878 . command ( 'print-addresses' )
7979 . description ( 'Print the addresses of all the relevant programs and accounts' )
8080 . action ( ( ) => {
81- const [ mMint , wmMint , multisig ] = keysFromEnv ( [ 'M_MINT_KEYPAIR' , 'WM_MINT_KEYPAIR' , 'M_MINT_MULTISIG_KEYPAIR '] ) ;
81+ const [ mMint , wmMint ] = keysFromEnv ( [ 'M_MINT_KEYPAIR' , 'WM_MINT_KEYPAIR' ] ) ;
8282 const [ portalTokenAuthPda ] = PublicKey . findProgramAddressSync ( [ Buffer . from ( 'token_authority' ) ] , PROGRAMS . portal ) ;
8383 const [ earnTokenAuthPda ] = PublicKey . findProgramAddressSync ( [ Buffer . from ( 'token_authority' ) ] , PROGRAMS . earn ) ;
8484 const [ portalEmitter ] = PublicKey . findProgramAddressSync ( [ Buffer . from ( 'emitter' ) ] , PROGRAMS . portal ) ;
@@ -94,7 +94,6 @@ async function main() {
9494 'Earn Program' : PROGRAMS . earn ,
9595 'Swap Program' : PROGRAMS . swap ,
9696 'M Mint' : mMint . publicKey ,
97- 'M Mint Multisig' : multisig . publicKey ,
9897 'Portal Token Authority' : portalTokenAuthPda ,
9998 'Earn Token Authority' : earnTokenAuthPda ,
10099 'wM Mint' : wmMint . publicKey ,
@@ -246,7 +245,26 @@ async function main() {
246245 } ) ;
247246
248247 program . command ( 'update-portal-mint' ) . action ( async ( ) => {
249- const [ owner ] = keysFromEnv ( [ 'PAYER_KEYPAIR' ] ) ;
248+ const [ payer , mint ] = keysFromEnv ( [ 'PAYER_KEYPAIR' , 'M_MINT_KEYPAIR' ] ) ;
249+ const { ntt } = NttManager ( connection , payer , mint . publicKey ) ;
250+
251+ let owner = payer . publicKey ;
252+ if ( process . env . SQUADS_VAULT ) {
253+ owner = new PublicKey ( process . env . SQUADS_VAULT ) ;
254+ }
255+
256+ const tx = new Transaction ( ) . add ( updatePortalMint ( owner , ntt . pdas . configAccount ( ) , mint . publicKey ) ) ;
257+
258+ if ( process . env . SQUADS_VAULT ) {
259+ const b = tx . serialize ( { verifySignatures : false } ) ;
260+ console . log ( 'Transaction:' , {
261+ b64 : b . toString ( 'base64' ) ,
262+ b58 : bs58 . encode ( b ) ,
263+ } ) ;
264+ } else {
265+ const sig = await connection . sendTransaction ( tx , [ payer ] ) ;
266+ console . log ( `Paused: ${ sig } ` ) ;
267+ }
250268 } ) ;
251269
252270 program
@@ -366,7 +384,7 @@ async function main() {
366384 const pauseTxn = ( await ntt . pause ( sender ) . next ( ) ) . value as SolanaUnsignedTransaction < 'Mainnet' , 'Solana' > ;
367385 const tx = pauseTxn . transaction . transaction as Transaction ;
368386
369- if ( process . env . SQUADS_MULTISIG ) {
387+ if ( process . env . SQUADS_VAULT ) {
370388 const b = tx . serialize ( { verifySignatures : false } ) ;
371389 console . log ( 'Transaction:' , {
372390 b64 : b . toString ( 'base64' ) ,
@@ -390,7 +408,7 @@ async function main() {
390408 const pauseTxn = ( await cmd ( sender ) . next ( ) ) . value as SolanaUnsignedTransaction < 'Mainnet' , 'Solana' > ;
391409 const tx = pauseTxn . transaction . transaction as Transaction ;
392410
393- if ( process . env . SQUADS_MULTISIG ) {
411+ if ( process . env . SQUADS_VAULT ) {
394412 const b = tx . serialize ( { verifySignatures : false } ) ;
395413 console . log ( 'Transaction:' , {
396414 b64 : b . toString ( 'base64' ) ,
0 commit comments