Replies: 4 comments 3 replies
-
@MoonNone are you able to swap using the demo scene? https://magicblock-labs.github.io/Solana.Unity-SDK/ The swap example uses Jupiter, is included in the demo you can import on SDK installation. Please use it as a reference for implementing the swap functionality. |
Beta Was this translation helpful? Give feedback.
-
Thanks Gabriele, |
Beta Was this translation helpful? Give feedback.
-
Ok, I think it might be a SDK error. Jupiter swap does not work for some reason : But Orca does : And there's another small glitch : by default for Orca, slippageBPS unit is decimal (0.01), instead of real unit (1). |
Beta Was this translation helpful? Give feedback.
-
Hi. I have an error making this swap transaction. "invalid transaction: Transaction failed to sanitize accounts offsets correctly"
}` |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When trying to make a swap, I have this error :
"failed to deserialize solana_sdk::transaction::versioned::VersionedTransaction: invalid value: continue signal on byte-three, expected a terminal signal on or before byte-three".
Failure happens with SendTransactionAsync (txResult.Result is null)
`
SwapQuoteAg swapQuote = await m_dexJupiter.GetSwapQuote(m_tokenSell.MintAddress, m_tokenBuy.MintAddress, DecimalUtil.ToUlong(m_amount, m_tokenSell.Decimals), SwapMode.ExactIn);
Transaction tx = await m_dexJupiter.Swap(swapQuote);
byte[] transactionData = transaction.Serialize();
byte[] txSign = m_wallet.Sign(transactionData);
var txResult = await m_clientRPC.SendTransactionAsync(Convert.ToBase64String(txSign));
`
Beta Was this translation helpful? Give feedback.
All reactions