metaplex-foundation / metaplex-program-library

Smart contracts maintained by the Metaplex team
Other
591 stars 517 forks source link

Error while creating Candy Machine using instructions. #921

Closed AyushRathore18 closed 1 year ago

AyushRathore18 commented 1 year ago

Which package is this bug report for? candy-machine

Issue description I want to create a candy machine for minting nfts. While creating the candy machine (the initial step), I am facing an error in createInitializeCandyMachineInstruction(). I have created a script for the same while running the script I get the below error.
In the script, I am creating instructions and broadcasting using web3.

SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 1: custom program error: 0x7d3

logs: [
    'Program 11111111111111111111111111111111 invoke [1]',
    'Program 11111111111111111111111111111111 success',
    'Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ invoke [1]',
    'Program log: Instruction: InitializeCandyMachine',
    'Program log: AnchorError caused by account: candy_machine. Error Code: ConstraintRaw. Error Number: 2003. Error Message: A raw constraint was violated.',
    'Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ consumed 9125 of 400000 compute units',
    'Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ failed: custom program error: 0x7d3'
  ]
samuelvanderwaal commented 1 year ago

This isn't sufficient information to debug your issue but it's probably not a bug in Candy Machine. Anchor constraints error means you're likely not passing in all your accounts correctly so double and triple check all your inputs. If you can't figure out ask on the Metaplex Discord.