Ellipsis-Labs / phoenix-sdk

SDK for interacting with the Phoenix DEX.
82 stars 39 forks source link

Error processing Instruction 0: Provided owner is not allowed #165

Open Fankouzu opened 4 months ago

Fankouzu commented 4 months ago

Swap 1 of 10 Market buy 9 USDC with 0.8 % slippage Expected out amount: 0.008995502248875561 SOL Error: SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Provided owner is not allowed at Connection.sendEncodedTransaction (/Users/cuimiandashi/GitHub/phoenix-trade/node_modules/@solana/web3.js/src/connection.ts:5923:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async Connection.sendRawTransaction (/Users/cuimiandashi/GitHub/phoenix-trade/node_modules/@solana/web3.js/src/connection.ts:5880:20) at async Connection.sendTransaction (/Users/cuimiandashi/GitHub/phoenix-trade/node_modules/@solana/web3.js/src/connection.ts:5868:12) at async sendAndConfirmTransaction (/Users/cuimiandashi/GitHub/phoenix-trade/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts:35:21) at async swap (/Users/cuimiandashi/GitHub/phoenix-trade/src/swap.ts:84:16) at async /Users/cuimiandashi/GitHub/phoenix-trade/src/swap.ts:138:7 { logs: [ 'Program PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY invoke [1]', 'Program log: Discriminant for phoenix::program::accounts::MarketHeader is 8167313896524341111', 'Program log: PhoenixInstruction::Swap', 'Program consumption: 195020 units remaining', 'Program log: Token account must be owned by the Token Program. \n' + 'src/program/validation/checkers/token_checkers.rs:51:9', 'Program PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY consumed 8242 of 200000 compute units', 'Program PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY failed: Provided owner is not allowed' ] }

true-claim commented 3 months ago

did you find a solution to this problem?

SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Provided owner is not allowed at Connection.sendEncodedTransaction (/Users/pavelgorbunov/Documents/SCRIPTS_MARKET/phoenix_sol/node_modules/@solana/web3.js/lib/index.cjs.js:8050:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Connection.sendRawTransaction (/Users/pavelgorbunov/Documents/SCRIPTS_MARKET/phoenix_sol/node_modules/@solana/web3.js/lib/index.cjs.js:8015:20) at async Connection.sendTransaction (/Users/pavelgorbunov/Documents/SCRIPTS_MARKET/phoenix_sol/node_modules/@solana/web3.js/lib/index.cjs.js:8006:12) at async sendAndConfirmTransaction (/Users/pavelgorbunov/Documents/SCRIPTS_MARKET/phoenix_sol/node_modules/@solana/web3.js/lib/index.cjs.js:2178:21) at async swap (file:///Users/pavelgorbunov/Documents/SCRIPTS_MARKET/phoenix_sol/source/run.js:68:16) at async file:///Users/pavelgorbunov/Documents/SCRIPTS_MARKET/phoenix_sol/source/run.js:79:9 { logs: [ 'Program PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY invoke [1]', 'Program log: Discriminant for phoenix::program::accounts::MarketHeader is 8167313896524341111', 'Program log: PhoenixInstruction::Swap', 'Program consumption: 195020 units remaining', 'Program log: Token account must be owned by the Token Program. \n' + 'src/program/validation/checkers/token_checkers.rs:51:9', 'Program PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY consumed 8242 of 200000 compute units', 'Program PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY failed: Provided owner is not allowed' ] }

MeguMan commented 3 months ago

same problem

fitchgc commented 3 months ago

same error too

maksympanchyshyn commented 3 months ago

Same error, any news on this one?

kevgithub commented 2 months ago

Need to fetch token accounts by yourself, also you might need to create wrapped_native_account to prevent "insufficient funds" issue, phoenix's SDK is very amateur

superlixun commented 1 month ago

Need to fetch token accounts by yourself, also you might need to create wrapped_native_account to prevent "insufficient funds" issue, phoenix's SDK is very amateur

I'm a newbie, can you explain in detail? thx