-
Notifications
You must be signed in to change notification settings - Fork 86
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
fix(router-sdk): special case eth, weth fake pool #282
Conversation
types.push('uint24', 'uint24', 'address', 'address') | ||
// a tickSpacing of 0 indicates a "fake" v4 pool where the quote actually requires a wrap or unwrap | ||
if (pool.tickSpacing == 0) { | ||
let wrapOrUnwrapEncoding = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapOrUnwrapEncoding is now always zero?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that is just the "version" that the quoter uses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aw yes, i was confused because it's a let
. just a nit, it can be a constant now, like const WRAP_OR_UNWRAP_ENCODING = 0
at top of the file
@snreynolds wondering if you have time to add a unit test coverage? if not, the change LGTM, otherwise. |
Graphite Automations"Request reviewers once CI passes on sdks monorepo" took an action on this PR • (01/30/25)1 reviewer was added and 1 assignee was added to this PR based on Siyu Jiang (See-You John)'s automation. |
if (pool.tickSpacing === 0) { | ||
const wrapOrUnwrapEncoding = 0 | ||
path.push(wrapOrUnwrapEncoding, currencyOut.isNative ? ADDRESS_ZERO : currencyOut.wrapped.address) | ||
types.push('uint8', 'address') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the uint8 of 0 for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use that to denote protocol version 0, which just signals a wrap/unwrap in the mixed route quoter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
PR Scope
Please title your PR according to the following types and scopes following conventional commits:
fix(SDK name):
will trigger a patch versionchore(<type>):
will not trigger any release and should be used for internal repo changes<type>(public):
will trigger a patch version for non-code changes (e.g. README changes)feat(SDK name):
will trigger a minor versionfeat(breaking):
will trigger a major version for a breaking changeDescription
[Summary of the change, motivation, and context]
How Has This Been Tested?
[e.g. Manually, E2E tests, unit tests, Storybook]
Are there any breaking changes?
[e.g. Type definitions, API definitions]
If there are breaking changes, please ensure you bump the major version Bump the major version (by using the title
feat(breaking): ...
), post a notice in #eng-sdks, and explicitly notify all Uniswap Labs consumers of the SDK.(Optional) Feedback Focus
[Specific parts of this PR you'd like feedback on, or that reviewers should pay closer attention to]
(Optional) Follow Ups
[Things that weren't addressed in this PR, ways you plan to build on this work, or other ways this work could be extended]