Skip to content

Conversation

@JFrankfurt
Copy link

No description provided.

Comment on lines +26 to +40
interface BaseQuoteParams {
fee: FeeAmount
sqrtPriceLimitX96: string
tokenIn: string
tokenOut: string
}
interface QuoteParamsV1 extends BaseQuoteParams {
amount?: string
}
interface QuoteParamsV2 extends QuoteParamsV1 {
amountIn?: string
}

type QuoteParams = QuoteParamsV1 | QuoteParamsV2

Copy link
Owner

Choose a reason for hiding this comment

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

🔥 - I see what you meant

Comment on lines +71 to +74
const quoteV2Params: QuoteParams = {
amount: quoteAmount,
fee: route.pools[0].fee,
sqrtPriceLimitX96: toHex(options?.sqrtPriceLimitX96 ?? 0),
Copy link
Owner

Choose a reason for hiding this comment

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

The order of these parameters matter when making the function call.

For QuoterV1, the function argument is an array of values

@Jesse-Sawa Jesse-Sawa merged commit 24f4bcf into Jesse-Sawa:main Jul 6, 2022
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

Successfully merging this pull request may close these issues.

2 participants