-
Notifications
You must be signed in to change notification settings - Fork 7
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
automan proxy contract #47
base: main
Are you sure you want to change the base?
Conversation
import "@openzeppelin/contracts/access/Ownable.sol"; | ||
import {INonfungiblePositionManager as INPM} from "@aperture_finance/uni-v3-lib/src/interfaces/INonfungiblePositionManager.sol"; | ||
|
||
interface Automan { |
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.
Use src/interfaces/IAutoman.sol
?
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.
done
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.
Delete interface Automan
?
src/tools/AutomanProxy.sol
Outdated
bytes32 r, | ||
bytes32 s | ||
) external returns (uint256 newTokenId, uint128 liquidity, uint256 amount0, uint256 amount1) { | ||
address owner = npm.ownerOf(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.
Make the following logic into a modifier (similar to how we use onlyOwner
):
address owner = npm.ownerOf(tokenId);
require(allowance[msg.sender][owner], "not allow relayer");
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.
done
import "@openzeppelin/contracts/access/Ownable.sol"; | ||
import {INonfungiblePositionManager as INPM} from "@aperture_finance/uni-v3-lib/src/interfaces/INonfungiblePositionManager.sol"; | ||
|
||
interface Automan { |
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.
Delete interface Automan
?
a proxy contract to allow whitelist only relayer