Skip to content
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

Merged
merged 6 commits into from
Sep 12, 2024

Conversation

chefburger
Copy link
Contributor

No description provided.

@chefburger chefburger force-pushed the refactor/replace-positionConfig-with-positionInfo branch from 1627b8d to 8da8744 Compare September 11, 2024 06:42
Base automatically changed from internal-audit4 to main September 11, 2024 06:52
@chefburger chefburger force-pushed the refactor/replace-positionConfig-with-positionInfo branch from 8da8744 to 34a1b4f Compare September 11, 2024 07:04
}

/// @inheritdoc ICLPositionManager
function getPositionConfigId(uint256 tokenId) external view returns (bytes32) {
return positionConfigs[tokenId].getConfigId();
function positions(uint256 tokenId)
Copy link
Collaborator

@ChefMist ChefMist Sep 12, 2024

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

Comment on lines 246 to 248
if (address(poolKeys[poolId].poolManager) == address(0)) {
poolKeys[poolId] = poolKey;
}
Copy link
Collaborator

@ChefMist ChefMist Sep 12, 2024

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;
}

Copy link
Contributor Author

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

ChefMist
ChefMist previously approved these changes Sep 12, 2024
Copy link
Collaborator

@ChefMist ChefMist left a 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

@chefburger chefburger merged commit e0f3aa7 into main Sep 12, 2024
2 checks passed
@chefburger chefburger deleted the refactor/replace-positionConfig-with-positionInfo branch September 12, 2024 03:47
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