Fix/candy machine cli (#280)

* fix: stringify tx object

* add: log the CM publicKey

* mod: mine_one_token ty Dad!

* remove: built js file (i m smurt)
This commit is contained in:
Koenrad MacBride 2021-09-02 09:18:13 -07:00 committed by GitHub
parent 9d9d9d93b1
commit 617d197e84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -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 <path>', 'Solana wallet')
.command('mint_one_token')
.option('-k, --keypair <path>', `The purchaser's wallet key`)
.option('-c, --cache-name <path>', '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,