diff --git a/js/packages/cli/src/cli.ts b/js/packages/cli/src/cli.ts index a124b35..6e18fc3 100755 --- a/js/packages/cli/src/cli.ts +++ b/js/packages/cli/src/cli.ts @@ -611,12 +611,12 @@ program }, ); - console.log('Done'); + console.log(`Done: CANDYMACHINE: ${candyMachine.toBase58()}`); }); program - .command('mint_token_as_candy_machine_owner') - .option('-k, --keypair ', 'Solana wallet') + .command('mint_one_token') + .option('-k, --keypair ', `The purchaser's wallet key`) .option('-c, --cache-name ', 'Cache file name') .action(async (directory, cmd) => { const solConnection = new anchor.web3.Connection( @@ -649,6 +649,7 @@ program config, cachedContent.program.uuid, ); + const candy = await anchorProgram.account.candyMachine.fetch(candyMachine); const metadata = await getMetadata(mint.publicKey); const masterEdition = await getMasterEdition(mint.publicKey); const tx = await anchorProgram.rpc.mintNft({ @@ -656,7 +657,8 @@ program config: config, candyMachine: candyMachine, payer: walletKey.publicKey, - wallet: walletKey.publicKey, + //@ts-ignore + wallet: candy.wallet, mint: mint.publicKey, metadata, masterEdition,