Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token Swap Error - The provided token program does not match the token program expected by the swap #6718

Closed
1997roylee opened this issue May 11, 2024 · 2 comments
Labels
question Further information is requested

Comments

@1997roylee
Copy link
Contributor

I followed the example code and test code to implement the token swap and it return this error to me "The provided token program does not match the token program expected by the swap". And I try to run the testing case and it don't work. I'm using the latest token swap program: SwapsVeCiPHMUAtzQWZw7RjsKjgCjhwU55QGu4U1Szw (3.0.0 version).

https://solscan.io/tx/2jvQovmaz2vdjPiGBr8Sf6JKiEM4Ea4cTnz32ah579oRdzdX7ZcFtaftkRbPWDuzqmBhUyY83SiHmpA14CcDvcNv?cluster=devnet

@buffalojoec
Copy link
Contributor

Hey there! It sounds like you're likely passing an account that isn't owned by either token program (SPL Token or SPL Token-2022) to one of the swap program instructions, hence the reason for the error.

If you think this is definitely a bug in the token swap implementation, please open an issue and describe the exact steps to reproduce the bug, however this sounds like it's more likely an issue with your implementation or test specifically.

@buffalojoec buffalojoec added the question Further information is requested label May 13, 2024
Copy link
Contributor

Hi @1997roylee,

Thanks for your question!

We want to make sure to keep signal strong in the GitHub issue tracker – to make sure that it remains the best place to track issues that affect the development of Solana itself.

Questions like yours deserve a purpose-built Q&A forum. Unless there exists evidence that this is a bug with Solana itself, please post your question to the Solana Stack Exchange using this link: https://solana.stackexchange.com/questions/ask


This automated message is a result of having added the ‘question’ tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants