0

I'm integrating smart contract in next js. and getting this error

Uncaught (in promise) Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 2: custom program error: 0x7d3
    at Connection.sendEncodedTransaction (webpack-internal:///(app-pages-browser)/./node_modules/@solana/web3.js/lib/index.browser.esm.js:7336:13)
    at async Connection.sendRawTransaction (webpack-internal:///(app-pages-browser)/./node_modules/@solana/web3.js/lib/index.browser.esm.js:7302:20)
    at async claimSpot (webpack-internal:///(app-pages-browser)/./app/[hostee]/events/[event]/page.tsx:72:21)
    at async claim (webpack-internal:///(app-pages-browser)/./app/[hostee]/events/[event]/page.tsx:87:9

here's the code for it https://gist.github.com/simplysabir/9b81bc573537b31ebada921b55a17b9f

and here's the sc part of it https://gist.github.com/simplysabir/0914bcc3223ca92d3106f49a3a7d494c

1 Answer 1

0

please check this constraint : constraint = token_mint.key() == event_account.token,

check if the event_account.token value is the same as the mint address you're using

2
  • yeah it's resolved. token address in event account was different.
    – Sabir Khan
    Commented Oct 18, 2023 at 4:42
  • nice ! so please could you accept my answer? thx !
    – Effe2
    Commented Oct 18, 2023 at 6:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.