Reputation: 2106
I have set up metaplex candy machine for fair NFT mint in Solana. But My creator account was not verified. So I want to get all tokens minted through my candy machine and sign the metadata (creator list).
My QUestion is how can I get the SPL tokens minted by my machine and sign the metadata from my creator account.?
var filter : MemcmpFilter = {} as MemcmpFilter;
filter.memcmp = {
bytes: "MY_CANDY_MACHINE_ADDRESS",
offset : 1
};
var config: GetProgramAccountsConfig = {} as GetProgramAccountsConfig;
config.commitment = "confirmed";
config.filters = [filter]
var data = await connection.getProgramAccounts(toPublicKey("cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ"), "confirmed");
console.log(data);
Help me to complete the code and sign the metadata
Upvotes: 4
Views: 2130
Reputation: 1
If you want to sign the on-chain metadata for all SPL tokens minted from a candy machine, the Metaplex foundation Github has a CLI tool to do just this: https://github.com/metaplex-foundation/metaplex/blob/6018393ecfcde06bc41c8ffc44c50913355c4ba6/js/packages/cli/src/candy-machine-cli.ts#L657-L683
Note: I've never used this command myself, but I've used other Metaplex tools before.
Upvotes: 0