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

Should other instructions be an array? #61

Open
austbot opened this issue Mar 3, 2025 · 0 comments
Open

Should other instructions be an array? #61

austbot opened this issue Mar 3, 2025 · 0 comments

Comments

@austbot
Copy link

austbot commented Mar 3, 2025

In the quote response I'm seeing other instructions coming back as an [] but in the deserialization code found here

'otherInstructions': InstructionFromJSON(json['otherInstructions']),

its being treated like an object.

Here is some output on a USDC to BONK quote

Swap instructions received: {
  otherInstructions: [],
  computeBudgetInstructions: [
    {
      programId: "ComputeBudget111111111111111111111111111111",
      accounts: [],
      data: "AljXAwA=",
    }, {
      programId: "ComputeBudget111111111111111111111111111111",
      accounts: [],
      data: "AzAwBgAAAAAA",
    }
  ],

Here is my request

swapRequest {
  userPublicKey: "<redacted>",
  wrapAndUnwrapSol: true,
  useSharedAccounts: undefined,
  feeAccount: undefined,
  trackingAccount: undefined,
  prioritizationFeeLamports: {
    priorityLevelWithMaxLamports: {
      priorityLevel: "medium",
      maxLamports: 1000000,
    },
    jitoTipLamports: undefined,
  },
  asLegacyTransaction: undefined,
  destinationTokenAccount: undefined,
  dynamicComputeUnitLimit: true,
  skipUserAccountsRpcCalls: undefined,
  dynamicSlippage: undefined,
  computeUnitPriceMicroLamports: undefined,
  quoteResponse: {
    inputMint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    inAmount: "10000000",
    outputMint: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
    outAmount: "73945723793",
    otherAmountThreshold: "73871778070",
    swapMode: "ExactIn",
    slippageBps: 10,
    platformFee: undefined,
    priceImpactPct: "0.0004607674230336317235341978",
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant