-
Notifications
You must be signed in to change notification settings - Fork 5
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
refactor: repalce positionConfig with positionInfo #21
refactor: repalce positionConfig with positionInfo #21
Conversation
1627b8d
to
8da8744
Compare
8da8744
to
34a1b4f
Compare
} | ||
|
||
/// @inheritdoc ICLPositionManager | ||
function getPositionConfigId(uint256 tokenId) external view returns (bytes32) { | ||
return positionConfigs[tokenId].getConfigId(); | ||
function positions(uint256 tokenId) |
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 wonder if it might be possible to also include hasSubscriber
in this positions(uint256 tokenId)
-- all the other related fields about position seems to be here
in the end maybe FE will just call positions(uint256 tokenId)
most of the time
src/pool-cl/CLPositionManager.sol
Outdated
if (address(poolKeys[poolId].poolManager) == address(0)) { | ||
poolKeys[poolId] = poolKey; | ||
} |
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.
this seems to be cheaper in gas
// if parameter (hook permission and tickSpacing) is bytes(0), it means the pool is not initialized yet
if (poolKeys[poolId].parameters == bytes32(0)) {
poolKeys[poolId] = poolKey;
}
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.
verified on my side as well 😂 interesting
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.
only 2 comments, lfg
No description provided.