-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
move the oracle into a hook, remove time based stuff from pool manager #54
Conversation
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.
Cool
/// @notice Get the current value in slot0 of the given pool | ||
function getSlot0(PoolKey memory key) external view returns (uint160 sqrtPriceX96, int24 tick); |
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.
Why do we unpack this? Why not return the Slot0 struct?
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.
the slot0 struct feels like an internal thing, consumers shouldn't need to know about it, although it was exposed in the previous versions and also named that...
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.
In that case should we rename this to something like getPrice
so the term slot0
remains internal?
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.
i'd rather defer the issue, it was named slot0 because in the past it contained other stuff that wasn't just the price or easily categorized except that they all were packed in slot 0. we don't know what else will go in the slot later
…ean oracle to be a single pool with locked liquidity
# Conflicts: # contracts/PoolManager.sol # test/__snapshots__/PoolManager.gas.spec.ts.snap # test/__snapshots__/PoolManager.spec.ts.snap
fixes #53
fixes #64