Skip to content

Commit

Permalink
added new filter for getting only config key from config (metaplex-fo…
Browse files Browse the repository at this point in the history
  • Loading branch information
C0mberry authored Dec 1, 2021
1 parent 17f9c8f commit 19b405a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion js/packages/cli/src/candy-machine-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,19 @@ programCommand('withdraw')
}
const walletKeyPair = loadWalletKey(keypair);
const anchorProgram = await loadCandyProgram(walletKeyPair, env, rpcUrl);

// this is hash of first 8 symbols in pubkey
// account:Config
const hashConfig = [155, 12, 170, 224, 30, 250, 204, 130];
const configOrCommitment = {
commitment: 'confirmed',
filters: [
{
memcmp: {
offset: 0,
bytes: hashConfig,
},
},
{
memcmp: {
offset: 8,
Expand Down Expand Up @@ -710,7 +720,7 @@ programCommand('create_candy_machine')
if (treasuryBalance === 0) {
throw new Error(`Cannot use treasury account with 0 balance!`);
}
wallet = treasuryAccount
wallet = treasuryAccount;
}

const config = new PublicKey(cacheContent.program.config);
Expand Down

0 comments on commit 19b405a

Please sign in to comment.