jup-ag / space-station

Jupiter Station
https://station.jup.ag
48 stars 87 forks source link

FeeAccount is causing "The given account is owned by a different program than expected" #547

Open maxsap opened 1 week ago

maxsap commented 1 week ago

I am not sure if this is the best place to report this issue, I tried searching for feeAccount related issues here and did not find anything, so excuse me if I missed it.

Initially I though this has to do with ATA missing hence as you can see in the transaction above I am trying to alter the resulted transaction and add the necessary instructions.

The docs are saying Fee token account, it can be either the input mint or the output mint for ExactIn and only the input mint for ExactOut, it is derived using the seeds = ["referral_ata", referral_account, mint] and the REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3 referral contract (only pass in if you set a feeBps and make sure that the feeAccount has been created). It doesn't support Token2022 tokens.

which is not really clear to me what it means.

So the questions that I have is: