js icon indicating copy to clipboard operation
js copied to clipboard

Can't create Candy machine v3 in devnet

Open akinwol opened this issue 2 years ago • 1 comments

For reference I am following the v3 Candy Machine docs https://docs.metaplex.com/programs/candy-machine/managing-candy-machines

I am attempting to create a new candy machine in devnet but getting an error.

Steps to reproduce

  1. Created a new collection
const { nft: collectionNft } = await metaplex.nfts().create({
  name: 'My Collection NFT',
  uri: 'https://example.com/path/to/some/json/metadata.json',
  sellerFeeBasisPoints: 0,
  isCollection: true,
});
  1. Attempted to create a new candy machine like the docs recommended
const { candyMachine } = await metaplex.candyMachines().create({
  itemsAvailable: toBigNumber(5000),
  sellerFeeBasisPoints: 333, // 3.33%
  collection: {
    address: collectionNft.address,
    updateAuthority: metaplex.identity(),
  },
});

  1. The above did not work. I am getting these errors
"Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 2: custom program error: 0x3f
    at Connection.sendEncodedTransaction (webpack-internal:///./node_modules/@solana/web3.js/lib/index.browser.esm.js:6745:13)
    at async Connection.sendRawTransaction (webpack-internal:///./node_modules/@solana/web3.js/lib/index.browser.esm.js:6702:20)
    at async RpcClient.sendTransaction (webpack-internal:///./node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:83:14)
    at async RpcClient.sendAndConfirmTransaction (webpack-internal:///./node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:115:23)
    at async TransactionBuilder.sendAndConfirm (webpack-internal:///./node_modules/@metaplex-foundation/js/dist/esm/utils/TransactionBuilder.mjs:144:22)
    at async Object.handle (webpack-internal:///./node_modules/@metaplex-foundation/js/dist/esm/plugins/candyMachineModule/operations/createCandyMachine.mjs:78:20)
    at async Disposable.run (webpack-internal:///./node_modules/@metaplex-foundation/js/dist/esm/utils/Disposable.mjs:28:14)"

logs

0: "Program Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g invoke [1]"
1: "Program log: Instruction: Initialize"
2: "Program 11111111111111111111111111111111 invoke [2]"
3: "Program 11111111111111111111111111111111 success"
4: "Program Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g consumed 12861 of 800000 compute units"
5: "Program Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g success"
6: "Program 11111111111111111111111111111111 invoke [1]"
7: "Program 11111111111111111111111111111111 success"
8: "Program CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR invoke [1]"
9: "Program log: Instruction: Initialize"
10: "Program log: ProgramError occurred. Error Code: Custom(63). Error Number: 63. Error Message: Custom program error: 0x3f."
11: "Program CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR consumed 18925 of 787139 compute units"
12: "Program CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR failed: custom program error: 0x3f"

program

CandyMachineProgram > Unknown Program Error
>> Source: Program > CandyMachineProgram [CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR]
>> Problem: The program [CandyMachineProgram] at address [CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR] raised an error that is not recognized by the programs registered by the SDK.
>> Solution: Unfortunately, you will need to check the unparsed error below to investigate what went wrong. To get more helpful error messages, ensure the program that failed is registered by the SDK and provides an "errorResolver" method.

Caused By: Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 2: custom program error: 0x3f

[ Logs: Program Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g invoke [1] |$> Program log: Instruction: Initialize |$> Program 11111111111111111111111111111111 invoke [2] |$> Program 11111111111111111111111111111111 success |$> Program Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g consumed 14361 of 800000 compute units |$> Program Guard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g success |$> Program 11111111111111111111111111111111 invoke [1] |$> Program 11111111111111111111111111111111 success |$> Program CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR invoke [1] |$> Program log: Instruction: Initialize |$> Program log: ProgramError occurred. Error Code: Custom(63). Error Number: 63. Error Message: Custom program error: 0x3f. |$> Program CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR consumed 21925 of 785639 compute units |$> Program CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR failed: custom program error: 0x3f ]

when I tried to execute the function and approve I see this message in my wallet image

akinwol avatar Oct 25 '22 22:10 akinwol