-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Reference ]Feat/dynamic fee hook #11
Conversation
2dae20c
to
8093073
Compare
8093073
to
27d7ff6
Compare
1c3f4a9
to
6a4664b
Compare
returns (bytes4) | ||
{ | ||
setDynamicLpFee(key, DEFAULT_LP_FEE); | ||
return this.beforeInitialize.selector; |
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.
return this.beforeInitialize.selector; | |
return this.afterInitialize.selector; |
bytes calldata hookData | ||
) external override returns (bytes4) { | ||
setDynamicLpFee(key, DEFAULT_LP_FEE); | ||
return this.beforeInitialize.selector; |
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.
return this.beforeInitialize.selector; | |
return this.afterInitialize.selector; |
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.
got it, do u want me to redeploy the contract ?
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.
wrong selector used
fix: return correct selector for beforeInit* hook
Merge it since it has been heavily used for FE testing |
function beforeMint( | ||
address, | ||
PoolKey calldata, | ||
IBinPoolManager.MintParams calldata, | ||
bytes calldata | ||
) external override returns (bytes4, uint24) { |
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.
function beforeMint(
address,
PoolKey calldata,
+ IBinPoolManager.MintParams calldata
- IBinPoolManager.MintParams calldata,
- bytes calldata
) external override returns (bytes4, uint24) {
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.
it has got updated #21. Thx for reminding
This would only be used in FE tests, we might not want to merge it since the code isn't safe