Open NickKelly1 opened 1 day ago
The changes primarily involve modifications to the Jupiter swap provider's functionality within the packages/swap/src/providers/jupiter
directory. Key updates include adjustments to the backoff timing for retry logic in several functions, the addition of a new property prioritizationFeeLamports
in the getJupiterSwap
function, and enhancements to the JupiterSwapParams
type to accommodate various prioritization strategies. Additionally, a new utility function, extractComputeUnitPriceMicroLamports
, has been introduced in the Solana utility module to extract compute unit pricing from transactions.
File Path | Change Summary |
---|---|
packages/swap/src/providers/jupiter/index.ts | - Adjusted backoff timing in getJupiterTokens , getJupiterQuote , and getJupiterSwap functions, reducing maximum wait times. - Added prioritizationFeeLamports property in swapParams of getJupiterSwap . - Minor adjustments to the sleep function. |
packages/swap/src/providers/jupiter/types.ts | - Updated prioritizationFeeLamports type in JupiterSwapParams to accept number , "auto" , or an object with autoMultiplier . - Clarified comments regarding the type of prioritizationFeeLamports . |
packages/swap/src/utils/solana.ts | - Added extractComputeUnitPriceMicroLamports function to extract compute unit price from VersionedTransaction . |
sequenceDiagram
participant User
participant JupiterProvider
participant SolanaUtils
User->>JupiterProvider: Request Swap
JupiterProvider->>JupiterProvider: getJupiterSwap()
JupiterProvider->>JupiterProvider: Adjust Backoff Timing
JupiterProvider->>JupiterProvider: Include prioritizationFeeLamports
JupiterProvider->>SolanaUtils: extractComputeUnitPriceMicroLamports()
SolanaUtils-->>JupiterProvider: Return Compute Unit Price
JupiterProvider-->>User: Return Swap Result
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
:briefcase: Build Files chrome: enkrypt-chrome-10dfeb06.zip firefox: enkrypt-firefox-10dfeb06.zip
:syringe: Virus total analysis chrome: 10dfeb06 firefox: 10dfeb06
Summary by CodeRabbit
New Features
prioritizationFeeLamports
, to optimize swap transaction fees.Type Updates
prioritizationFeeLamports
type to allow for more flexible prioritization strategies.Bug Fixes