Skip to content

Conversation

@mlguys
Copy link
Contributor

@mlguys mlguys commented Nov 2, 2025

Before submitting this PR, please make sure:

  • Your code builds clean without any errors or warnings
  • You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request:

  • Add Orca connector to gateway

Tests performed by the developer:

  • Use all clmm routes of Orca to manage clmm positions
  • Merge with latest changes from development
  • Add unit tests to meet test coverage

Tips for QA testing:

@mlguys mlguys marked this pull request as ready for review November 3, 2025 13:53
* @param signature Transaction signature
* @param owner Owner address (required for SPL tokens and SOL balance extraction)
* @param tokens Array of token mint addresses or 'SOL' for native SOL
* @param treatWsolAsSplToken If true, treats WSOL as a regular SPL token instead of native SOL (default: false for backward compatibility)
Copy link
Contributor Author

@mlguys mlguys Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @fengtality, about this method, do we know the reason why we treat Wrapped SOL as native token? Since most of Orca operations do not auto wrap and un-wrap SOL so I have to add this flag so that Wrapped SOL can be treated as normal SPL token and therefore Wrapped SOL balance changes can be tracked properly, at least for Orca operations.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @mlguys, meeep from Orca here. You can use our helper function to create the wrap/unwrap/createATA for you with this util function when you construct the whirlpool instructions

You can take a look at how it's being used across our SDK here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you end up using our new sdk, this is handled for you in our out of the box functions and this wouldn't be necessary.

@rapcmia rapcmia requested review from fengtality and rapcmia November 5, 2025 10:08
@rapcmia rapcmia moved this from Backlog to Under Review in Pull Request Board Nov 7, 2025
@rapcmia rapcmia moved this from Under Review to Backlog in Pull Request Board Nov 10, 2025
* @param signature Transaction signature
* @param owner Owner address (required for SPL tokens and SOL balance extraction)
* @param tokens Array of token mint addresses or 'SOL' for native SOL
* @param treatWsolAsSplToken If true, treats WSOL as a regular SPL token instead of native SOL (default: false for backward compatibility)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @mlguys, meeep from Orca here. You can use our helper function to create the wrap/unwrap/createATA for you with this util function when you construct the whirlpool instructions

You can take a look at how it's being used across our SDK here.

* @param signature Transaction signature
* @param owner Owner address (required for SPL tokens and SOL balance extraction)
* @param tokens Array of token mint addresses or 'SOL' for native SOL
* @param treatWsolAsSplToken If true, treats WSOL as a regular SPL token instead of native SOL (default: false for backward compatibility)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you end up using our new sdk, this is handled for you in our out of the box functions and this wouldn't be necessary.

"@raydium-io/raydium-sdk-v2": "0.1.141-alpha",
"@sinclair/typebox": "^0.33.22",
"@solana-program/token-2022": "^0.6.0",
"@solana/kit": "3.0.3",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two ts-sdks in the Orca realm. The legacy-sdk orca-so/whirlpools-sdk & the new kit-based SDK orca-so/whirlpools. They are both at feature parity.

Looking at hummingbot's usage here, the requirement is mostly to construct the ix and executing it. If there are no issues adding @solana/kit as a dependency, we'd highly recommend using the new SDK and not use the legacy-sdk since it's a lot easier to use for your use-case.

For example, the following QoL type functionality are done for you:

  • appending ATA / wrapSOL ix if necessary
  • initializing tick-arrays before tick-array operations
  • ...etc

import { getTickArrayPubkeys, handleWsolAta } from '../orca.utils';
import { OrcaClmmAddLiquidityRequest } from '../schemas';

async function addLiquidity(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following routes can be simplified to a single call to construct the ix & execution if you use our kit-sdk (toggle the "Typescript Kit" header when you visit our docs to see the examples):

The complexities such as input conversion, ATA/wSOL handling & other Orca specific operations are done for you in these methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants