You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why does using the imported IV4Router cause a type conversion error, but defining a local version of the interface resolves it? Could this be due to different struct definitions in v4-core vs. v4-periphery despite the same commit hash?
Would appreciate any insights—thanks!
Expected Behavior
When importing IV4Router from v4-periphery, the ExactOutputSingleParams struct should match the documented definition and work without type conversion errors.
The struct should accept PoolKey without requiring any implicit conversions.
Removing sqrtPriceLimitX96 should not cause an error.
Using the official IV4Router interface should behave the same as a manually defined minimal version.
To Reproduce
Import IV4Router from v4-periphery and PoolKey from v4-core:
@cqlyj this is a repo configuration problem. If you want to use v4-periphery with a top-level v4-core install, you will need to remap v4-periphery's core dependency:
inside remappings.txt
lib/v4-periphery:@uniswap/v4-core/=lib/v4-core/
v4-periphery installs with its own copy of v4-core, so youre attempting to use PoolKey definitions from different files (lib/v4-core and lib/v4-periphery/lib/v4-core)
@cqlyj this is a repo configuration problem. If you want to use v4-periphery with a top-level v4-core install, you will need to remap v4-periphery's core dependency:
inside remappings.txt
lib/v4-periphery:@uniswap/v4-core/=lib/v4-core/
v4-periphery installs with its own copy of v4-core, so youre attempting to use PoolKey definitions from different files (lib/v4-core and lib/v4-periphery/lib/v4-core)
That fix this, Thanks! But that IRouterV4 issue is still there: Uniswap/docs#901
Describe the bug
Description
In the file
IV4Router
, imported via:I noticed that the parameter structure differs from what is documented. I previously raised an issue regarding this discrepancy here.
After attempting to remove the following code snippet:
I encountered a new error:
What I’ve Tried
v4-core
commit hash isb619b67
, and thev4-periphery
commit hash matches.IV4Router
and instead define my own minimal interface:then everything compiles and works as expected.
Question
Why does using the imported
IV4Router
cause a type conversion error, but defining a local version of the interface resolves it? Could this be due to different struct definitions inv4-core
vs.v4-periphery
despite the same commit hash?Would appreciate any insights—thanks!
Expected Behavior
When importing
IV4Router
fromv4-periphery
, theExactOutputSingleParams
struct should match the documented definition and work without type conversion errors.PoolKey
without requiring any implicit conversions.sqrtPriceLimitX96
should not cause an error.IV4Router
interface should behave the same as a manually defined minimal version.To Reproduce
Import
IV4Router
fromv4-periphery
andPoolKey
fromv4-core
:Use the
ExactOutputSingleParams
struct in a function:Compile the contract and observe the error:
Instead, define a minimal interface manually:
Replace the imported
IV4Router
with the manually defined one, and compile again—this time, it works without errors.Additional context
No response
The text was updated successfully, but these errors were encountered: