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

implement safe transfer from as in the todo for the example #108

Closed
wants to merge 3 commits into from

Conversation

mr-uniswap
Copy link
Contributor

Related Issue

Solves #107

Description of changes

Implements the safetransferfrom in the example

@mr-uniswap mr-uniswap marked this pull request as draft April 8, 2024 05:26
@@ -264,7 +266,7 @@ contract FullRange is BaseHook, ILockCallback {
if (sender == address(this)) {
currency.transfer(address(poolManager), amount);
} else {
IERC20Minimal(Currency.unwrap(currency)).transferFrom(sender, address(poolManager), amount);
SafeERC20.safeTransferFrom(IERC20(Currency.unwrap(currency)), sender, address(poolManager), amount);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi! please could you use
using SafeERC20 for IERC20
and then just token.safeTransferFrom?

@mr-uniswap mr-uniswap closed this Aug 9, 2024
@mr-uniswap mr-uniswap deleted the chore/set-safe-transfer-from branch August 9, 2024 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants